mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01:00
Merge branch '4.x' into fix-492
This commit is contained in:
commit
84d6f3b48f
18
.github/main.workflow
vendored
Normal file
18
.github/main.workflow
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
workflow "New workflow" {
|
||||
on = "push"
|
||||
resolves = [
|
||||
"Docker build health check",
|
||||
"Test Publish Verdaccio",
|
||||
]
|
||||
}
|
||||
|
||||
action "Docker build health check" {
|
||||
uses = "actions/docker/cli@8cdf801b322af5f369e00d85e9cf3a7122f49108"
|
||||
args = "build ."
|
||||
}
|
||||
|
||||
action "Test Publish Verdaccio" {
|
||||
uses = "verdaccio/github-actions/publish@v0.1.0"
|
||||
needs = ["Docker build health check"]
|
||||
args = "-ddd"
|
||||
}
|
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@ -10,6 +10,7 @@
|
||||
"name": "CLI Babel Registry",
|
||||
"stopOnEntry": false,
|
||||
"program": "${workspaceFolder}/debug/bootstrap.js",
|
||||
"args": ["-l", "0.0.0.0:4873"],
|
||||
"env": {
|
||||
"BABEL_ENV": "registry"
|
||||
},
|
||||
@ -71,7 +72,8 @@
|
||||
"name": "Verdaccio Compiled",
|
||||
"preLaunchTask": "npm: code:build",
|
||||
"program": "${workspaceRoot}/bin/verdaccio",
|
||||
"args": ["-l", "0.0.0.0:4873"],
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -176,9 +176,6 @@
|
||||
"npm": ">=3"
|
||||
},
|
||||
"preferGlobal": true,
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged && commitlint -e $GIT_PARAMS"
|
||||
|
@ -252,6 +252,14 @@ class Auth implements IAuth {
|
||||
}
|
||||
|
||||
apiJWTmiddleware() {
|
||||
const plugins = this.plugins.slice(0);
|
||||
const helpers = { createAnonymousRemoteUser, createRemoteUser };
|
||||
for (const plugin of plugins) {
|
||||
if (plugin.apiJWTmiddleware) {
|
||||
return plugin.apiJWTmiddleware(helpers);
|
||||
}
|
||||
}
|
||||
|
||||
return (req: $RequestExtend, res: $Response, _next: NextFunction) => {
|
||||
req.pause();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user