From 5c2c414e03e479a1a44136718df4d039f987a0cd Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Mon, 16 Jul 2018 17:34:59 +0200 Subject: [PATCH] fix: wrong auth plugin signature --- package.json | 2 +- test/flow/plugins/auth/example.auth.plugin.js | 9 +++++---- yarn.lock | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index ffa97962a..8e3eb2cf7 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "devDependencies": { "@commitlint/cli": "6.1.3", "@commitlint/config-conventional": "6.1.3", - "@verdaccio/types": "3.3.2", + "@verdaccio/types": "3.3.3", "babel-cli": "6.26.0", "babel-core": "6.26.0", "babel-eslint": "8.2.2", diff --git a/test/flow/plugins/auth/example.auth.plugin.js b/test/flow/plugins/auth/example.auth.plugin.js index 38eb8715c..9527d51e7 100644 --- a/test/flow/plugins/auth/example.auth.plugin.js +++ b/test/flow/plugins/auth/example.auth.plugin.js @@ -7,6 +7,7 @@ import LoggerApi from '../../../../src/lib/logger'; import type { Config as AppConfig, + PackageAccess, IPluginAuth, Logger, PluginOptions @@ -29,11 +30,11 @@ class ExampleAuthPlugin implements IPluginAuth { cb(); } - allow_access(packageName: string, user: string, cb: verdaccio$Callback): void { + allow_access(user: string, pkg: PackageAccess, cb: verdaccio$Callback): void { cb(); } - allow_publish(packageName: string, user: string, cb: verdaccio$Callback): void { + allow_publish(user: string, pkg: PackageAccess, cb: verdaccio$Callback): void { cb(); } } @@ -51,5 +52,5 @@ const options: PluginOptions = { const auth = new ExampleAuthPlugin(config1, options); auth.authenticate('user', 'pass', () => {}); -auth.allow_access('packageName', 'user', () => {}); -auth.allow_publish('packageName', 'user', () => {}); +auth.allow_access('packageName', {}, () => {}); +auth.allow_publish('packageName', {}, () => {}); diff --git a/yarn.lock b/yarn.lock index c5e0b5d13..99bb7f272 100644 --- a/yarn.lock +++ b/yarn.lock @@ -234,9 +234,9 @@ version "1.0.0" resolved "https://registry.npmjs.org/@verdaccio/streams/-/streams-1.0.0.tgz#d5d24c6747208728b9fd16b908e3932c3fb1f864" -"@verdaccio/types@3.3.2": - version "3.3.2" - resolved "https://registry.npmjs.org/@verdaccio/types/-/types-3.3.2.tgz#1210ab1726055e4f2c5d1d4bae835c76e739ce70" +"@verdaccio/types@3.3.3": + version "3.3.3" + resolved "https://registry.npmjs.org/@verdaccio/types/-/types-3.3.3.tgz#640441dfd3b2290cb5c173d2048138ccaa6a4caa" "@webassemblyjs/ast@1.5.9": version "1.5.9"