@verdaccio/core 7.0.0-next.4 → 7.0.0-next.5
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 +6 -0
- package/build/schemes/publish-manifest.js +1 -0
- package/build/schemes/publish-manifest.js.map +1 -1
- package/build/warning-utils.d.ts +2 -1
- package/build/warning-utils.js +2 -0
- package/build/warning-utils.js.map +1 -1
- package/package.json +4 -4
- package/src/warning-utils.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-manifest.js","names":["_ajv","_interopRequireDefault","require","obj","__esModule","default","ajv","Ajv","schema","type","properties","name","versions","maxProperties","_attachments","required","additionalProperties","validate","compile","validatePublishSingleVersion","manifest"],"sources":["../../src/schemes/publish-manifest.ts"],"sourcesContent":["import Ajv, { JSONSchemaType } from 'ajv';\n\nconst ajv = new Ajv();\n\n// FIXME: this could extend from @verdaccio/types but we need\n// schemas from @verdaccio/types to be able to validate them\ninterface Manifest {\n name: string;\n versions: object;\n _attachments: object;\n}\n\nconst schema: JSONSchemaType<Manifest> = {\n type: 'object',\n properties: {\n name: { type: 'string' },\n versions: { type: 'object', maxProperties: 1 },\n _attachments: { type: 'object', maxProperties: 1 },\n },\n required: ['name', 'versions', '_attachments'],\n additionalProperties: true,\n};\n\n// validate is a type guard for MyData - type is inferred from schema type\nconst validate = ajv.compile(schema);\n\n/**\n * Validate if a manifest has the correct structure when a new package\n * is being created. The properties name, versions and _attachments must contain 1 element.\n * @param data a manifest object\n * @returns boolean\n */\nexport function validatePublishSingleVersion(manifest: any) {\n if (!manifest) {\n return false;\n }\n return validate(manifest);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE1C,MAAMG,GAAG,GAAG,IAAIC,YAAG,CAAC,CAAC;;AAErB;AACA
|
|
1
|
+
{"version":3,"file":"publish-manifest.js","names":["_ajv","_interopRequireDefault","require","obj","__esModule","default","ajv","Ajv","schema","type","properties","name","versions","maxProperties","_attachments","required","additionalProperties","validate","compile","validatePublishSingleVersion","manifest"],"sources":["../../src/schemes/publish-manifest.ts"],"sourcesContent":["import Ajv, { JSONSchemaType } from 'ajv';\n\nconst ajv = new Ajv();\n\n// FIXME: this could extend from @verdaccio/types but we need\n// schemas from @verdaccio/types to be able to validate them\ninterface Manifest {\n name: string;\n versions: object;\n _attachments: object;\n}\n\nconst schema: JSONSchemaType<Manifest> = {\n type: 'object',\n properties: {\n name: { type: 'string' },\n versions: { type: 'object', maxProperties: 1 },\n _attachments: { type: 'object', maxProperties: 1 },\n },\n required: ['name', 'versions', '_attachments'],\n additionalProperties: true,\n};\n\n// validate is a type guard for MyData - type is inferred from schema type\nconst validate = ajv.compile(schema);\n\n/**\n * Validate if a manifest has the correct structure when a new package\n * is being created. The properties name, versions and _attachments must contain 1 element.\n * @param data a manifest object\n * @returns boolean\n */\nexport function validatePublishSingleVersion(manifest: any) {\n if (!manifest) {\n return false;\n }\n return validate(manifest);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE1C,MAAMG,GAAG,GAAG,IAAIC,YAAG,CAAC,CAAC;;AAErB;AACA;;AAOA,MAAMC,MAAgC,GAAG;EACvCC,IAAI,EAAE,QAAQ;EACdC,UAAU,EAAE;IACVC,IAAI,EAAE;MAAEF,IAAI,EAAE;IAAS,CAAC;IACxBG,QAAQ,EAAE;MAAEH,IAAI,EAAE,QAAQ;MAAEI,aAAa,EAAE;IAAE,CAAC;IAC9CC,YAAY,EAAE;MAAEL,IAAI,EAAE,QAAQ;MAAEI,aAAa,EAAE;IAAE;EACnD,CAAC;EACDE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,cAAc,CAAC;EAC9CC,oBAAoB,EAAE;AACxB,CAAC;;AAED;AACA,MAAMC,QAAQ,GAAGX,GAAG,CAACY,OAAO,CAACV,MAAM,CAAC;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACO,SAASW,4BAA4BA,CAACC,QAAa,EAAE;EAC1D,IAAI,CAACA,QAAQ,EAAE;IACb,OAAO,KAAK;EACd;EACA,OAAOH,QAAQ,CAACG,QAAQ,CAAC;AAC3B"}
|
package/build/warning-utils.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare enum Codes {
|
|
|
4
4
|
VERWAR003 = "VERWAR003",
|
|
5
5
|
VERWAR004 = "VERWAR004",
|
|
6
6
|
VERWAR005 = "VERWAR005",
|
|
7
|
-
VERDEP003 = "VERDEP003"
|
|
7
|
+
VERDEP003 = "VERDEP003",
|
|
8
|
+
VERWAR006 = "VERWAR006"
|
|
8
9
|
}
|
|
9
10
|
export declare function emit(code: string, a?: string, b?: string, c?: string): void;
|
package/build/warning-utils.js
CHANGED
|
@@ -17,6 +17,7 @@ let Codes = exports.Codes = /*#__PURE__*/function (Codes) {
|
|
|
17
17
|
Codes["VERWAR004"] = "VERWAR004";
|
|
18
18
|
Codes["VERWAR005"] = "VERWAR005";
|
|
19
19
|
Codes["VERDEP003"] = "VERDEP003";
|
|
20
|
+
Codes["VERWAR006"] = "VERWAR006";
|
|
20
21
|
return Codes;
|
|
21
22
|
}({});
|
|
22
23
|
warningInstance.create(verdaccioWarning, Codes.VERWAR002, `The configuration property "logs" has been deprecated, please rename to "log" for future compatibility`);
|
|
@@ -27,6 +28,7 @@ host:port (e.g. "localhost:4873") or full url '(e.g. "http://localhost:4873/")
|
|
|
27
28
|
https://verdaccio.org/docs/en/configuration#listen-port`);
|
|
28
29
|
warningInstance.create(verdaccioWarning, Codes.VERWAR005, 'disable enhanced legacy signature is considered a security risk, please reconsider enable it');
|
|
29
30
|
warningInstance.create(verdaccioDeprecation, Codes.VERDEP003, 'multiple addresses will be deprecated in the next major, only use one');
|
|
31
|
+
warningInstance.create(verdaccioDeprecation, Codes.VERWAR006, 'the auth plugin method "add_user" in the auth plugin is deprecated and will be removed in next major release, rename to "adduser"');
|
|
30
32
|
function emit(code, a, b, c) {
|
|
31
33
|
warningInstance.emit(code, a, b, c);
|
|
32
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warning-utils.js","names":["_processWarning","_interopRequireDefault","require","obj","__esModule","default","warningInstance","warning","verdaccioWarning","verdaccioDeprecation","Codes","exports","create","VERWAR002","VERWAR001","VERWAR003","VERWAR004","VERWAR005","VERDEP003","emit","code","a","b","c"],"sources":["../src/warning-utils.ts"],"sourcesContent":["import warning from 'process-warning';\n\nconst warningInstance = warning();\nconst verdaccioWarning = 'VerdaccioWarning';\nconst verdaccioDeprecation = 'VerdaccioDeprecation';\n\nexport enum Codes {\n VERWAR001 = 'VERWAR001',\n VERWAR002 = 'VERWAR002',\n VERWAR003 = 'VERWAR003',\n VERWAR004 = 'VERWAR004',\n VERWAR005 = 'VERWAR005',\n // deprecation warnings\n VERDEP003 = 'VERDEP003',\n}\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR002,\n `The configuration property \"logs\" has been deprecated, please rename to \"log\" for future compatibility`\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR001,\n `Verdaccio doesn't need superuser privileges. don't run it under root`\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR003,\n 'rotating-file type is not longer supported, consider use [logrotate] instead'\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR004,\n `invalid address - %s, we expect a port (e.g. \"4873\"), \nhost:port (e.g. \"localhost:4873\") or full url '(e.g. \"http://localhost:4873/\")\nhttps://verdaccio.org/docs/en/configuration#listen-port`\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR005,\n 'disable enhanced legacy signature is considered a security risk, please reconsider enable it'\n);\n\nwarningInstance.create(\n verdaccioDeprecation,\n Codes.VERDEP003,\n 'multiple addresses will be deprecated in the next major, only use one'\n);\n\nexport function emit(code: string, a?: string, b?: string, c?: string) {\n warningInstance.emit(code, a, b, c);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAsC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEtC,MAAMG,eAAe,GAAG,IAAAC,uBAAO,EAAC,CAAC;AACjC,MAAMC,gBAAgB,GAAG,kBAAkB;AAC3C,MAAMC,oBAAoB,GAAG,sBAAsB;AAAC,IAExCC,KAAK,GAAAC,OAAA,CAAAD,KAAA,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;
|
|
1
|
+
{"version":3,"file":"warning-utils.js","names":["_processWarning","_interopRequireDefault","require","obj","__esModule","default","warningInstance","warning","verdaccioWarning","verdaccioDeprecation","Codes","exports","create","VERWAR002","VERWAR001","VERWAR003","VERWAR004","VERWAR005","VERDEP003","VERWAR006","emit","code","a","b","c"],"sources":["../src/warning-utils.ts"],"sourcesContent":["import warning from 'process-warning';\n\nconst warningInstance = warning();\nconst verdaccioWarning = 'VerdaccioWarning';\nconst verdaccioDeprecation = 'VerdaccioDeprecation';\n\nexport enum Codes {\n VERWAR001 = 'VERWAR001',\n VERWAR002 = 'VERWAR002',\n VERWAR003 = 'VERWAR003',\n VERWAR004 = 'VERWAR004',\n VERWAR005 = 'VERWAR005',\n // deprecation warnings\n VERDEP003 = 'VERDEP003',\n VERWAR006 = 'VERWAR006',\n}\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR002,\n `The configuration property \"logs\" has been deprecated, please rename to \"log\" for future compatibility`\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR001,\n `Verdaccio doesn't need superuser privileges. don't run it under root`\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR003,\n 'rotating-file type is not longer supported, consider use [logrotate] instead'\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR004,\n `invalid address - %s, we expect a port (e.g. \"4873\"), \nhost:port (e.g. \"localhost:4873\") or full url '(e.g. \"http://localhost:4873/\")\nhttps://verdaccio.org/docs/en/configuration#listen-port`\n);\n\nwarningInstance.create(\n verdaccioWarning,\n Codes.VERWAR005,\n 'disable enhanced legacy signature is considered a security risk, please reconsider enable it'\n);\n\nwarningInstance.create(\n verdaccioDeprecation,\n Codes.VERDEP003,\n 'multiple addresses will be deprecated in the next major, only use one'\n);\n\nwarningInstance.create(\n verdaccioDeprecation,\n Codes.VERWAR006,\n 'the auth plugin method \"add_user\" in the auth plugin is deprecated and will be removed in next major release, rename to \"adduser\"'\n);\n\nexport function emit(code: string, a?: string, b?: string, c?: string) {\n warningInstance.emit(code, a, b, c);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAsC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEtC,MAAMG,eAAe,GAAG,IAAAC,uBAAO,EAAC,CAAC;AACjC,MAAMC,gBAAgB,GAAG,kBAAkB;AAC3C,MAAMC,oBAAoB,GAAG,sBAAsB;AAAC,IAExCC,KAAK,GAAAC,OAAA,CAAAD,KAAA,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAWjBJ,eAAe,CAACM,MAAM,CACpBJ,gBAAgB,EAChBE,KAAK,CAACG,SAAS,EACd,wGACH,CAAC;AAEDP,eAAe,CAACM,MAAM,CACpBJ,gBAAgB,EAChBE,KAAK,CAACI,SAAS,EACd,sEACH,CAAC;AAEDR,eAAe,CAACM,MAAM,CACpBJ,gBAAgB,EAChBE,KAAK,CAACK,SAAS,EACf,8EACF,CAAC;AAEDT,eAAe,CAACM,MAAM,CACpBJ,gBAAgB,EAChBE,KAAK,CAACM,SAAS,EACd;AACH;AACA,wDACA,CAAC;AAEDV,eAAe,CAACM,MAAM,CACpBJ,gBAAgB,EAChBE,KAAK,CAACO,SAAS,EACf,8FACF,CAAC;AAEDX,eAAe,CAACM,MAAM,CACpBH,oBAAoB,EACpBC,KAAK,CAACQ,SAAS,EACf,uEACF,CAAC;AAEDZ,eAAe,CAACM,MAAM,CACpBH,oBAAoB,EACpBC,KAAK,CAACS,SAAS,EACf,mIACF,CAAC;AAEM,SAASC,IAAIA,CAACC,IAAY,EAAEC,CAAU,EAAEC,CAAU,EAAEC,CAAU,EAAE;EACrElB,eAAe,CAACc,IAAI,CAACC,IAAI,EAAEC,CAAC,EAAEC,CAAC,EAAEC,CAAC,CAAC;AACrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/core",
|
|
3
|
-
"version": "7.0.0-next.
|
|
3
|
+
"version": "7.0.0-next.5",
|
|
4
4
|
"description": "core utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"private",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"http-errors": "2.0.0",
|
|
37
|
-
"http-status-codes": "2.
|
|
37
|
+
"http-status-codes": "2.3.0",
|
|
38
38
|
"semver": "7.5.4",
|
|
39
39
|
"ajv": "8.12.0",
|
|
40
40
|
"process-warning": "1.0.0",
|
|
41
|
-
"core-js": "3.
|
|
41
|
+
"core-js": "3.35.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"lodash": "4.17.21",
|
|
45
45
|
"typedoc": "0.23.25",
|
|
46
46
|
"typedoc-plugin-missing-exports": "latest",
|
|
47
|
-
"@verdaccio/types": "12.0.0-next.
|
|
47
|
+
"@verdaccio/types": "12.0.0-next.2"
|
|
48
48
|
},
|
|
49
49
|
"funding": {
|
|
50
50
|
"type": "opencollective",
|
package/src/warning-utils.ts
CHANGED
|
@@ -12,6 +12,7 @@ export enum Codes {
|
|
|
12
12
|
VERWAR005 = 'VERWAR005',
|
|
13
13
|
// deprecation warnings
|
|
14
14
|
VERDEP003 = 'VERDEP003',
|
|
15
|
+
VERWAR006 = 'VERWAR006',
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
warningInstance.create(
|
|
@@ -52,6 +53,12 @@ warningInstance.create(
|
|
|
52
53
|
'multiple addresses will be deprecated in the next major, only use one'
|
|
53
54
|
);
|
|
54
55
|
|
|
56
|
+
warningInstance.create(
|
|
57
|
+
verdaccioDeprecation,
|
|
58
|
+
Codes.VERWAR006,
|
|
59
|
+
'the auth plugin method "add_user" in the auth plugin is deprecated and will be removed in next major release, rename to "adduser"'
|
|
60
|
+
);
|
|
61
|
+
|
|
55
62
|
export function emit(code: string, a?: string, b?: string, c?: string) {
|
|
56
63
|
warningInstance.emit(code, a, b, c);
|
|
57
64
|
}
|