0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-13 22:48:31 -05:00

fix: wrong auth plugin signature

This commit is contained in:
Juan Picado @jotadeveloper 2018-07-16 17:34:59 +02:00
parent 6f33876587
commit 5c2c414e03
No known key found for this signature in database
GPG key ID: 18AC54485952D158
3 changed files with 9 additions and 8 deletions

View file

@ -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",

View file

@ -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', {}, () => {});

View file

@ -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"