verdaccio 5.3.2 → 5.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/CODE_OF_CONDUCT.md +10 -10
- package/CONTRIBUTING.md +28 -27
- package/README.md +6 -5
- package/SECURITY.md +8 -9
- package/build/api/debug/index.js +1 -1
- package/build/api/endpoint/api/dist-tags.js +4 -4
- package/build/api/endpoint/api/package.js +3 -3
- package/build/api/endpoint/api/ping.js +1 -1
- package/build/api/endpoint/api/publish.js +11 -11
- package/build/api/endpoint/api/star.js +5 -5
- package/build/api/endpoint/api/stars.js +1 -1
- package/build/api/endpoint/api/user.js +19 -9
- package/build/api/endpoint/api/v1/index.js +26 -0
- package/build/api/endpoint/api/v1/profile.js +13 -5
- package/build/api/endpoint/api/v1/search.js +4 -4
- package/build/api/endpoint/api/v1/token.js +20 -11
- package/build/api/endpoint/api/whoami.js +1 -1
- package/build/api/endpoint/index.js +11 -14
- package/build/api/index.js +23 -17
- package/build/api/middleware.js +6 -6
- package/build/api/rate-limiter.js +24 -0
- package/build/api/web/api.js +6 -18
- package/build/api/web/endpoint/index.js +51 -0
- package/build/api/web/endpoint/package.js +16 -11
- package/build/api/web/endpoint/search.js +9 -3
- package/build/api/web/endpoint/user.js +11 -5
- package/build/api/web/html/renderHTML.js +13 -9
- package/build/api/web/html/template.js +1 -1
- package/build/api/web/index.js +14 -11
- package/build/config/env.js +1 -1
- package/build/index.js +1 -1
- package/build/lib/auth-utils.js +15 -8
- package/build/lib/auth.js +7 -17
- package/build/lib/bootstrap.js +8 -8
- package/build/lib/cli/cli.js +3 -3
- package/build/lib/cli/commands/info.js +3 -3
- package/build/lib/cli/commands/init.js +3 -3
- package/build/lib/cli/commands/version.js +1 -1
- package/build/lib/cli/utils.js +3 -3
- package/build/lib/config-path.js +3 -3
- package/build/lib/config-utils.js +3 -3
- package/build/lib/config.js +16 -31
- package/build/lib/constants.js +5 -4
- package/build/lib/crypto-utils.js +3 -3
- package/build/lib/local-storage.js +7 -15
- package/build/lib/logger/formatter/index.js +1 -1
- package/build/lib/logger/formatter/prettifier.js +3 -3
- package/build/lib/logger/levels.js +1 -1
- package/build/lib/logger/logger.js +10 -6
- package/build/lib/logger/utils.js +1 -1
- package/build/lib/metadata-utils.js +3 -3
- package/build/lib/notify/index.js +3 -3
- package/build/lib/notify/notify-request.js +5 -5
- package/build/lib/plugin-loader.js +4 -4
- package/build/lib/search.js +2 -6
- package/build/lib/storage-utils.js +3 -3
- package/build/lib/storage.js +10 -22
- package/build/lib/up-storage.js +14 -45
- package/build/lib/uplink-util.js +1 -1
- package/build/lib/utils.js +32 -14
- package/build/utils/user.js +1 -1
- package/conf/README.md +3 -3
- package/conf/default.yaml +3 -1
- package/conf/docker.yaml +3 -1
- package/eslintrc.js +92 -92
- package/index.js +1 -1
- package/package.json +66 -59
- package/prettier.config.js +15 -0
- package/tsconfig.json +3 -10
- package/yarn-plugins/plugin-postinstall.js +10 -10
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {default as startVerdaccio} from './build/index';
|
|
1
|
+
export { default as startVerdaccio } from './build/index';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verdaccio",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.2",
|
|
4
4
|
"description": "A lightweight private npm proxy registry",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Verdaccio Maintainers",
|
|
@@ -18,103 +18,107 @@
|
|
|
18
18
|
"url": "https://opencollective.com/verdaccio"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@verdaccio/commons-api": "10.0
|
|
22
|
-
"@verdaccio/local-storage": "10.1.
|
|
23
|
-
"@verdaccio/readme": "10.2.
|
|
21
|
+
"@verdaccio/commons-api": "10.1.0",
|
|
22
|
+
"@verdaccio/local-storage": "10.1.1",
|
|
23
|
+
"@verdaccio/readme": "10.2.1",
|
|
24
24
|
"@verdaccio/streams": "10.1.0",
|
|
25
|
-
"@verdaccio/ui-theme": "
|
|
25
|
+
"@verdaccio/ui-theme": "6.0.0-6-next.16",
|
|
26
26
|
"JSONStream": "1.3.5",
|
|
27
|
-
"async": "3.2.
|
|
28
|
-
"body-parser": "1.19.
|
|
27
|
+
"async": "3.2.3",
|
|
28
|
+
"body-parser": "1.19.1",
|
|
29
29
|
"clipanion": "3.1.0",
|
|
30
30
|
"compression": "1.7.4",
|
|
31
31
|
"cookies": "0.8.0",
|
|
32
32
|
"cors": "2.8.5",
|
|
33
33
|
"dayjs": "1.10.7",
|
|
34
|
-
"debug": "^4.3.
|
|
34
|
+
"debug": "^4.3.3",
|
|
35
35
|
"envinfo": "7.8.1",
|
|
36
|
-
"eslint-import-resolver-node": "0.3.
|
|
37
|
-
"express": "4.17.
|
|
38
|
-
"
|
|
36
|
+
"eslint-import-resolver-node": "0.3.6",
|
|
37
|
+
"express": "4.17.2",
|
|
38
|
+
"express-rate-limit": "5.5.1",
|
|
39
|
+
"fast-safe-stringify": "2.1.1",
|
|
39
40
|
"handlebars": "4.7.7",
|
|
40
|
-
"http-errors": "
|
|
41
|
+
"http-errors": "2.0.0",
|
|
41
42
|
"js-yaml": "4.1.0",
|
|
42
43
|
"jsonwebtoken": "8.5.1",
|
|
43
44
|
"kleur": "4.1.4",
|
|
44
45
|
"lodash": "4.17.21",
|
|
45
46
|
"lru-cache": "6.0.0",
|
|
46
47
|
"lunr-mutable-indexes": "2.3.2",
|
|
47
|
-
"marked": "
|
|
48
|
+
"marked": "4.0.10",
|
|
48
49
|
"memoizee": "0.4.15",
|
|
49
|
-
"mime": "
|
|
50
|
+
"mime": "3.0.0",
|
|
50
51
|
"minimatch": "3.0.4",
|
|
51
52
|
"mkdirp": "1.0.4",
|
|
52
53
|
"mv": "2.1.1",
|
|
53
|
-
"pino": "6.13.
|
|
54
|
+
"pino": "6.13.4",
|
|
54
55
|
"pkginfo": "0.4.1",
|
|
55
56
|
"prettier-bytes": "^1.0.4",
|
|
56
57
|
"pretty-ms": "^7.0.1",
|
|
57
58
|
"request": "2.88.0",
|
|
58
59
|
"semver": "7.3.5",
|
|
59
60
|
"validator": "13.7.0",
|
|
60
|
-
"verdaccio-audit": "10.1.
|
|
61
|
+
"verdaccio-audit": "10.1.1",
|
|
61
62
|
"verdaccio-htpasswd": "10.1.0"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
|
-
"@babel/cli": "7.16.
|
|
65
|
-
"@babel/core": "7.16.
|
|
66
|
-
"@babel/node": "7.16.
|
|
67
|
-
"@babel/plugin-proposal-class-properties": "7.16.
|
|
68
|
-
"@babel/plugin-proposal-decorators": "7.16.
|
|
69
|
-
"@babel/plugin-proposal-export-namespace-from": "7.16.
|
|
70
|
-
"@babel/plugin-proposal-function-sent": "7.16.
|
|
71
|
-
"@babel/plugin-proposal-json-strings": "7.16.
|
|
72
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "7.16.
|
|
73
|
-
"@babel/plugin-proposal-numeric-separator": "7.16.
|
|
74
|
-
"@babel/plugin-proposal-object-rest-spread": "7.16.
|
|
75
|
-
"@babel/plugin-proposal-optional-chaining": "7.16.
|
|
76
|
-
"@babel/plugin-proposal-throw-expressions": "7.16.
|
|
65
|
+
"@babel/cli": "7.16.8",
|
|
66
|
+
"@babel/core": "7.16.10",
|
|
67
|
+
"@babel/node": "7.16.8",
|
|
68
|
+
"@babel/plugin-proposal-class-properties": "7.16.7",
|
|
69
|
+
"@babel/plugin-proposal-decorators": "7.16.7",
|
|
70
|
+
"@babel/plugin-proposal-export-namespace-from": "7.16.7",
|
|
71
|
+
"@babel/plugin-proposal-function-sent": "7.16.7",
|
|
72
|
+
"@babel/plugin-proposal-json-strings": "7.16.7",
|
|
73
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "7.16.7",
|
|
74
|
+
"@babel/plugin-proposal-numeric-separator": "7.16.7",
|
|
75
|
+
"@babel/plugin-proposal-object-rest-spread": "7.16.7",
|
|
76
|
+
"@babel/plugin-proposal-optional-chaining": "7.16.7",
|
|
77
|
+
"@babel/plugin-proposal-throw-expressions": "7.16.7",
|
|
77
78
|
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
|
78
79
|
"@babel/plugin-syntax-import-meta": "7.10.4",
|
|
79
|
-
"@babel/plugin-transform-async-to-generator": "7.16.
|
|
80
|
-
"@babel/plugin-transform-classes": "7.16.
|
|
81
|
-
"@babel/plugin-transform-runtime": "7.16.
|
|
80
|
+
"@babel/plugin-transform-async-to-generator": "7.16.8",
|
|
81
|
+
"@babel/plugin-transform-classes": "7.16.7",
|
|
82
|
+
"@babel/plugin-transform-runtime": "7.16.10",
|
|
82
83
|
"@babel/polyfill": "^7.12.1",
|
|
83
|
-
"@babel/preset-env": "7.16.
|
|
84
|
-
"@babel/preset-typescript": "7.16.
|
|
85
|
-
"@babel/register": "7.16.
|
|
86
|
-
"@babel/runtime": "7.16.
|
|
84
|
+
"@babel/preset-env": "7.16.11",
|
|
85
|
+
"@babel/preset-typescript": "7.16.7",
|
|
86
|
+
"@babel/register": "7.16.9",
|
|
87
|
+
"@babel/runtime": "7.16.7",
|
|
87
88
|
"@commitlint/cli": "12.1.4",
|
|
88
89
|
"@commitlint/config-conventional": "12.1.4",
|
|
89
|
-
"@octokit/rest": "18.
|
|
90
|
-
"@
|
|
91
|
-
"@types/
|
|
92
|
-
"@types/
|
|
93
|
-
"@types/
|
|
94
|
-
"@types/
|
|
90
|
+
"@octokit/rest": "18.12.0",
|
|
91
|
+
"@trivago/prettier-plugin-sort-imports": "3.1.1",
|
|
92
|
+
"@types/async": "3.2.12",
|
|
93
|
+
"@types/express": "4.17.13",
|
|
94
|
+
"@types/express-rate-limit": "5.1.3",
|
|
95
|
+
"@types/express-serve-static-core": "4.17.28",
|
|
96
|
+
"@types/http-errors": "1.8.2",
|
|
97
|
+
"@types/jest": "26.0.24",
|
|
98
|
+
"@types/lodash": "4.14.178",
|
|
95
99
|
"@types/mime": "2.0.3",
|
|
96
|
-
"@types/minimatch": "3.0.
|
|
100
|
+
"@types/minimatch": "3.0.5",
|
|
97
101
|
"@types/node": "14.14.37",
|
|
98
102
|
"@types/pino": "6.3.12",
|
|
99
|
-
"@types/request": "2.48.
|
|
100
|
-
"@types/semver": "7.3.
|
|
101
|
-
"@typescript-eslint/eslint-plugin": "4.
|
|
102
|
-
"@typescript-eslint/parser": "4.
|
|
103
|
+
"@types/request": "2.48.8",
|
|
104
|
+
"@types/semver": "7.3.9",
|
|
105
|
+
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
106
|
+
"@typescript-eslint/parser": "4.33.0",
|
|
103
107
|
"@verdaccio/eslint-config": "^8.5.0",
|
|
104
|
-
"@verdaccio/types": "
|
|
108
|
+
"@verdaccio/types": "10.2.2",
|
|
105
109
|
"all-contributors-cli": "6.20.0",
|
|
106
110
|
"babel-eslint": "10.1.0",
|
|
107
111
|
"babel-jest": "26.6.3",
|
|
108
|
-
"babel-loader": "^8.2.
|
|
112
|
+
"babel-loader": "^8.2.3",
|
|
109
113
|
"babel-plugin-dynamic-import-node": "2.3.3",
|
|
110
114
|
"cross-env": "7.0.3",
|
|
111
115
|
"detect-secrets": "1.0.6",
|
|
112
|
-
"eslint": "7.
|
|
116
|
+
"eslint": "7.32.0",
|
|
113
117
|
"eslint-config-google": "0.14.0",
|
|
114
118
|
"eslint-config-prettier": "7.2.0",
|
|
115
119
|
"eslint-plugin-babel": "5.3.1",
|
|
116
|
-
"eslint-plugin-import": "2.
|
|
117
|
-
"eslint-plugin-jest": "24.
|
|
120
|
+
"eslint-plugin-import": "2.25.4",
|
|
121
|
+
"eslint-plugin-jest": "24.7.0",
|
|
118
122
|
"eslint-plugin-simple-import-sort": "7.0.0",
|
|
119
123
|
"eslint-plugin-verdaccio": "9.6.1",
|
|
120
124
|
"fs-extra": "10.0.0",
|
|
@@ -122,19 +126,19 @@
|
|
|
122
126
|
"jest": "26.6.3",
|
|
123
127
|
"jest-config": "26.6.3",
|
|
124
128
|
"jest-environment-node": "26.6.2",
|
|
125
|
-
"jest-junit": "12.
|
|
129
|
+
"jest-junit": "12.3.0",
|
|
126
130
|
"lint-staged": "11.0.1",
|
|
127
131
|
"lockfile-lint": "4.6.2",
|
|
128
132
|
"nock": "12.0.3",
|
|
129
133
|
"node-mocks-http": "^1.10.1",
|
|
130
134
|
"pinst": "2.1.6",
|
|
131
|
-
"prettier": "2.
|
|
135
|
+
"prettier": "2.5.1",
|
|
132
136
|
"puppeteer": "5.5.0",
|
|
133
137
|
"rimraf": "3.0.2",
|
|
134
|
-
"selfsigned": "1.10.
|
|
138
|
+
"selfsigned": "1.10.14",
|
|
135
139
|
"standard-version": "9.3.2",
|
|
136
|
-
"supertest": "6.
|
|
137
|
-
"ts-node": "10.
|
|
140
|
+
"supertest": "6.2.2",
|
|
141
|
+
"ts-node": "10.4.0",
|
|
138
142
|
"typescript": "4.1.3",
|
|
139
143
|
"verdaccio-auth-memory": "10.1.0",
|
|
140
144
|
"verdaccio-memory": "10.1.0"
|
|
@@ -154,8 +158,8 @@
|
|
|
154
158
|
"release": "standard-version -a -s",
|
|
155
159
|
"type-check": "tsc --noEmit",
|
|
156
160
|
"type-check:watch": "yarn run type-check -- --watch",
|
|
157
|
-
"format": "prettier --
|
|
158
|
-
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"
|
|
161
|
+
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
|
|
162
|
+
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
|
|
159
163
|
"test": "yarn run test:unit",
|
|
160
164
|
"test:clean": "npx jest --clearCache",
|
|
161
165
|
"test:unit": "cross-env NODE_ENV=test TZ=UTC FORCE_COLOR=1 jest --config ./jest.config.js --maxWorkers 2 --passWithNoTests",
|
|
@@ -189,6 +193,9 @@
|
|
|
189
193
|
"*.{js,jsx,ts,tsx,json,yml,yaml,md}": "prettier --write",
|
|
190
194
|
"*.{js,ts,tsx}": "eslint --fix -c ./eslintrc.js"
|
|
191
195
|
},
|
|
196
|
+
"resolutions": {
|
|
197
|
+
"@types/serve-static": "1.13.10"
|
|
198
|
+
},
|
|
192
199
|
"collective": {
|
|
193
200
|
"type": "opencollective",
|
|
194
201
|
"url": "https://opencollective.com/verdaccio",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
endOfLine: 'lf',
|
|
3
|
+
useTabs: false,
|
|
4
|
+
printWidth: 180,
|
|
5
|
+
tabWidth: 2,
|
|
6
|
+
singleQuote: true,
|
|
7
|
+
bracketSpacing: true,
|
|
8
|
+
trailingComma: 'es5',
|
|
9
|
+
semi: true,
|
|
10
|
+
plugins: [require('@trivago/prettier-plugin-sort-imports')],
|
|
11
|
+
importOrder: ['^@verdaccio/(.*)$', '^[./]'],
|
|
12
|
+
importOrderSeparation: true,
|
|
13
|
+
importOrderParserPlugins: ['typescript', 'classProperties', 'jsx'],
|
|
14
|
+
importOrderSortSpecifiers: true,
|
|
15
|
+
};
|
package/tsconfig.json
CHANGED
|
@@ -9,15 +9,8 @@
|
|
|
9
9
|
"resolveJsonModule": true,
|
|
10
10
|
"outDir": "lib",
|
|
11
11
|
"allowSyntheticDefaultImports": true,
|
|
12
|
-
"esModuleInterop": true
|
|
12
|
+
"esModuleInterop": true
|
|
13
13
|
},
|
|
14
|
-
"exclude": [
|
|
15
|
-
|
|
16
|
-
"**/*.spec.ts"
|
|
17
|
-
],
|
|
18
|
-
"include": [
|
|
19
|
-
"src/**/*.ts",
|
|
20
|
-
"test/**/*.ts",
|
|
21
|
-
"types/*.d.ts"
|
|
22
|
-
]
|
|
14
|
+
"exclude": ["node_modules", "**/*.spec.ts"],
|
|
15
|
+
"include": ["src/**/*.ts", "test/**/*.ts", "types/*.d.ts"]
|
|
23
16
|
}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* Ref https://github.com/verdaccio/verdaccio/pull/2253#discussion_r632052482
|
|
4
4
|
*/
|
|
5
5
|
module.exports = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
name: `plugin-postinstall`,
|
|
7
|
+
factory: () => ({
|
|
8
|
+
hooks: {
|
|
9
|
+
beforeWorkspacePacking(_workspace, data) {
|
|
10
|
+
if ('scripts' in data && 'postinstall' in data.scripts) {
|
|
11
|
+
delete data.scripts.postinstall;
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
}),
|
|
16
16
|
};
|