@verdaccio/config 6.0.0-6-next.49 → 6.0.0-6-next.51
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 +28 -0
- package/build/security.d.ts +1 -1
- package/build/security.js +5 -4
- package/build/security.js.map +1 -1
- package/build/user.js +1 -1
- package/build/user.js.map +1 -1
- package/package.json +4 -4
- package/src/security.ts +3 -2
- package/src/user.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @verdaccio/config
|
|
2
2
|
|
|
3
|
+
## 6.0.0-6-next.51
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4b29d715: chore: move improvements from v5 to v6
|
|
8
|
+
|
|
9
|
+
Migrate improvements form v5 to v6:
|
|
10
|
+
|
|
11
|
+
- https://github.com/verdaccio/verdaccio/pull/3158
|
|
12
|
+
- https://github.com/verdaccio/verdaccio/pull/3151
|
|
13
|
+
- https://github.com/verdaccio/verdaccio/pull/2271
|
|
14
|
+
- https://github.com/verdaccio/verdaccio/pull/2787
|
|
15
|
+
- https://github.com/verdaccio/verdaccio/pull/2791
|
|
16
|
+
- https://github.com/verdaccio/verdaccio/pull/2205
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [4b29d715]
|
|
21
|
+
- @verdaccio/core@6.0.0-6-next.51
|
|
22
|
+
- @verdaccio/utils@6.0.0-6-next.19
|
|
23
|
+
|
|
24
|
+
## 6.0.0-6-next.50
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- @verdaccio/core@6.0.0-6-next.50
|
|
29
|
+
- @verdaccio/utils@6.0.0-6-next.18
|
|
30
|
+
|
|
3
31
|
## 6.0.0-6-next.49
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/build/security.d.ts
CHANGED
package/build/security.js
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.defaultSecurity = exports.
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
exports.defaultSecurity = exports.TIME_EXPIRATION_1H = void 0;
|
|
7
|
+
// TODO: get this from core package
|
|
8
|
+
const TIME_EXPIRATION_1H = '1h';
|
|
9
|
+
exports.TIME_EXPIRATION_1H = TIME_EXPIRATION_1H;
|
|
9
10
|
const defaultWebTokenOptions = {
|
|
10
11
|
sign: {
|
|
11
12
|
// The expiration token for the website is 7 days
|
|
12
|
-
expiresIn:
|
|
13
|
+
expiresIn: TIME_EXPIRATION_1H
|
|
13
14
|
},
|
|
14
15
|
verify: {}
|
|
15
16
|
};
|
package/build/security.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security.js","names":["
|
|
1
|
+
{"version":3,"file":"security.js","names":["TIME_EXPIRATION_1H","defaultWebTokenOptions","sign","expiresIn","verify","defaultApiTokenConf","legacy","defaultSecurity","web","api"],"sources":["../src/security.ts"],"sourcesContent":["import { APITokenOptions, JWTOptions, Security } from '@verdaccio/types';\n\n// TODO: get this from core package\nexport const TIME_EXPIRATION_1H = '1h';\n\nconst defaultWebTokenOptions: JWTOptions = {\n sign: {\n // The expiration token for the website is 7 days\n expiresIn: TIME_EXPIRATION_1H,\n },\n verify: {},\n};\n\nconst defaultApiTokenConf: APITokenOptions = {\n legacy: true,\n};\n\nexport const defaultSecurity: Security = {\n web: defaultWebTokenOptions,\n api: defaultApiTokenConf,\n};\n"],"mappings":";;;;;;AAEA;AACO,MAAMA,kBAAkB,GAAG,IAA3B;;AAEP,MAAMC,sBAAkC,GAAG;EACzCC,IAAI,EAAE;IACJ;IACAC,SAAS,EAAEH;EAFP,CADmC;EAKzCI,MAAM,EAAE;AALiC,CAA3C;AAQA,MAAMC,mBAAoC,GAAG;EAC3CC,MAAM,EAAE;AADmC,CAA7C;AAIO,MAAMC,eAAyB,GAAG;EACvCC,GAAG,EAAEP,sBADkC;EAEvCQ,GAAG,EAAEJ;AAFkC,CAAlC"}
|
package/build/user.js
CHANGED
|
@@ -29,7 +29,7 @@ exports.defaultNonLoggedUserRoles = defaultNonLoggedUserRoles;
|
|
|
29
29
|
|
|
30
30
|
function createRemoteUser(name, pluginGroups) {
|
|
31
31
|
const isGroupValid = Array.isArray(pluginGroups);
|
|
32
|
-
const groups = (isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles]);
|
|
32
|
+
const groups = Array.from(new Set((isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles])));
|
|
33
33
|
return {
|
|
34
34
|
name,
|
|
35
35
|
groups,
|
package/build/user.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","names":["defaultLoggedUserRoles","ROLES","$ALL","$AUTH","DEPRECATED_ALL","DEPRECATED_AUTH","ALL","defaultNonLoggedUserRoles","$ANONYMOUS","DEPRECATED_ANONYMOUS","createRemoteUser","name","pluginGroups","isGroupValid","Array","isArray","groups","concat","real_groups","createAnonymousRemoteUser","undefined"],"sources":["../src/user.ts"],"sourcesContent":["import { RemoteUser } from '@verdaccio/types';\n\nimport { ROLES } from './package-access';\n\n/**\n * All logged users will have by default the group $all and $authenticate\n */\nexport const defaultLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$AUTH,\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_AUTH,\n ROLES.ALL,\n];\n/**\n *\n */\nexport const defaultNonLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$ANONYMOUS,\n // groups without '$' are going to be deprecated eventually\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_ANONYMOUS,\n];\n\n/**\n * Create a RemoteUser object\n * @return {Object} { name: xx, pluginGroups: [], real_groups: [] }\n */\nexport function createRemoteUser(name: string, pluginGroups: string[]): RemoteUser {\n const isGroupValid: boolean = Array.isArray(pluginGroups);\n const groups = (isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles]);\n\n return {\n name,\n groups,\n real_groups: pluginGroups,\n };\n}\n\n/**\n * Builds an anonymous remote user in case none is logged in.\n * @return {Object} { name: xx, groups: [], real_groups: [] }\n */\nexport function createAnonymousRemoteUser(): RemoteUser {\n return {\n name: undefined,\n groups: [...defaultNonLoggedUserRoles],\n real_groups: [],\n };\n}\n"],"mappings":";;;;;;;;;AAEA;;AAEA;AACA;AACA;AACO,MAAMA,sBAAsB,GAAG,CACpCC,oBAAA,CAAMC,IAD8B,EAEpCD,oBAAA,CAAME,KAF8B,EAGpCF,oBAAA,CAAMG,cAH8B,EAIpCH,oBAAA,CAAMI,eAJ8B,EAKpCJ,oBAAA,CAAMK,GAL8B,CAA/B;AAOP;AACA;AACA;;;AACO,MAAMC,yBAAyB,GAAG,CACvCN,oBAAA,CAAMC,IADiC,EAEvCD,oBAAA,CAAMO,UAFiC,EAGvC;AACAP,oBAAA,CAAMG,cAJiC,EAKvCH,oBAAA,CAAMQ,oBALiC,CAAlC;AAQP;AACA;AACA;AACA;;;;AACO,SAASC,gBAAT,CAA0BC,IAA1B,EAAwCC,YAAxC,EAA4E;EACjF,MAAMC,YAAqB,GAAGC,KAAK,CAACC,OAAN,CAAcH,YAAd,CAA9B;EACA,MAAMI,MAAM,
|
|
1
|
+
{"version":3,"file":"user.js","names":["defaultLoggedUserRoles","ROLES","$ALL","$AUTH","DEPRECATED_ALL","DEPRECATED_AUTH","ALL","defaultNonLoggedUserRoles","$ANONYMOUS","DEPRECATED_ANONYMOUS","createRemoteUser","name","pluginGroups","isGroupValid","Array","isArray","groups","from","Set","concat","real_groups","createAnonymousRemoteUser","undefined"],"sources":["../src/user.ts"],"sourcesContent":["import { RemoteUser } from '@verdaccio/types';\n\nimport { ROLES } from './package-access';\n\n/**\n * All logged users will have by default the group $all and $authenticate\n */\nexport const defaultLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$AUTH,\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_AUTH,\n ROLES.ALL,\n];\n/**\n *\n */\nexport const defaultNonLoggedUserRoles = [\n ROLES.$ALL,\n ROLES.$ANONYMOUS,\n // groups without '$' are going to be deprecated eventually\n ROLES.DEPRECATED_ALL,\n ROLES.DEPRECATED_ANONYMOUS,\n];\n\n/**\n * Create a RemoteUser object\n * @return {Object} { name: xx, pluginGroups: [], real_groups: [] }\n */\nexport function createRemoteUser(name: string, pluginGroups: string[]): RemoteUser {\n const isGroupValid: boolean = Array.isArray(pluginGroups);\n const groups = Array.from(\n new Set((isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles]))\n );\n\n return {\n name,\n groups,\n real_groups: pluginGroups,\n };\n}\n\n/**\n * Builds an anonymous remote user in case none is logged in.\n * @return {Object} { name: xx, groups: [], real_groups: [] }\n */\nexport function createAnonymousRemoteUser(): RemoteUser {\n return {\n name: undefined,\n groups: [...defaultNonLoggedUserRoles],\n real_groups: [],\n };\n}\n"],"mappings":";;;;;;;;;AAEA;;AAEA;AACA;AACA;AACO,MAAMA,sBAAsB,GAAG,CACpCC,oBAAA,CAAMC,IAD8B,EAEpCD,oBAAA,CAAME,KAF8B,EAGpCF,oBAAA,CAAMG,cAH8B,EAIpCH,oBAAA,CAAMI,eAJ8B,EAKpCJ,oBAAA,CAAMK,GAL8B,CAA/B;AAOP;AACA;AACA;;;AACO,MAAMC,yBAAyB,GAAG,CACvCN,oBAAA,CAAMC,IADiC,EAEvCD,oBAAA,CAAMO,UAFiC,EAGvC;AACAP,oBAAA,CAAMG,cAJiC,EAKvCH,oBAAA,CAAMQ,oBALiC,CAAlC;AAQP;AACA;AACA;AACA;;;;AACO,SAASC,gBAAT,CAA0BC,IAA1B,EAAwCC,YAAxC,EAA4E;EACjF,MAAMC,YAAqB,GAAGC,KAAK,CAACC,OAAN,CAAcH,YAAd,CAA9B;EACA,MAAMI,MAAM,GAAGF,KAAK,CAACG,IAAN,CACb,IAAIC,GAAJ,CAAQ,CAACL,YAAY,GAAGD,YAAH,GAAkB,EAA/B,EAAmCO,MAAnC,CAA0C,CAAC,GAAGnB,sBAAJ,CAA1C,CAAR,CADa,CAAf;EAIA,OAAO;IACLW,IADK;IAELK,MAFK;IAGLI,WAAW,EAAER;EAHR,CAAP;AAKD;AAED;AACA;AACA;AACA;;;AACO,SAASS,yBAAT,GAAiD;EACtD,OAAO;IACLV,IAAI,EAAEW,SADD;IAELN,MAAM,EAAE,CAAC,GAAGT,yBAAJ,CAFH;IAGLa,WAAW,EAAE;EAHR,CAAP;AAKD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/config",
|
|
3
|
-
"version": "6.0.0-6-next.
|
|
3
|
+
"version": "6.0.0-6-next.51",
|
|
4
4
|
"description": "logger",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"npm": ">=6"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@verdaccio/core": "6.0.0-6-next.
|
|
34
|
-
"@verdaccio/utils": "6.0.0-6-next.
|
|
33
|
+
"@verdaccio/core": "6.0.0-6-next.51",
|
|
34
|
+
"@verdaccio/utils": "6.0.0-6-next.19",
|
|
35
35
|
"debug": "4.3.4",
|
|
36
|
-
"yaml": "2.1.
|
|
36
|
+
"yaml": "2.1.3",
|
|
37
37
|
"lodash": "4.17.21",
|
|
38
38
|
"minimatch": "3.1.2",
|
|
39
39
|
"yup": "0.32.11"
|
package/src/security.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { APITokenOptions, JWTOptions, Security } from '@verdaccio/types';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// TODO: get this from core package
|
|
4
|
+
export const TIME_EXPIRATION_1H = '1h';
|
|
4
5
|
|
|
5
6
|
const defaultWebTokenOptions: JWTOptions = {
|
|
6
7
|
sign: {
|
|
7
8
|
// The expiration token for the website is 7 days
|
|
8
|
-
expiresIn:
|
|
9
|
+
expiresIn: TIME_EXPIRATION_1H,
|
|
9
10
|
},
|
|
10
11
|
verify: {},
|
|
11
12
|
};
|
package/src/user.ts
CHANGED
|
@@ -29,7 +29,9 @@ export const defaultNonLoggedUserRoles = [
|
|
|
29
29
|
*/
|
|
30
30
|
export function createRemoteUser(name: string, pluginGroups: string[]): RemoteUser {
|
|
31
31
|
const isGroupValid: boolean = Array.isArray(pluginGroups);
|
|
32
|
-
const groups =
|
|
32
|
+
const groups = Array.from(
|
|
33
|
+
new Set((isGroupValid ? pluginGroups : []).concat([...defaultLoggedUserRoles]))
|
|
34
|
+
);
|
|
33
35
|
|
|
34
36
|
return {
|
|
35
37
|
name,
|