mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
fix: wrong auth plugin signature
This commit is contained in:
parent
6f33876587
commit
5c2c414e03
3 changed files with 6 additions and 5 deletions
|
@ -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",
|
||||
|
|
|
@ -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', {}, () => {});
|
||||
|
|
BIN
yarn.lock
BIN
yarn.lock
Binary file not shown.
Loading…
Reference in a new issue