@verdaccio/core 8.1.4 → 8.2.0
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/build/_virtual/_rolldown/runtime.js +33 -0
- package/build/_virtual/_rolldown/runtime.mjs +13 -0
- package/build/auth-utils.d.ts +0 -1
- package/build/auth-utils.js +23 -25
- package/build/auth-utils.js.map +1 -1
- package/build/auth-utils.mjs +32 -0
- package/build/auth-utils.mjs.map +1 -0
- package/build/constants.js +201 -157
- package/build/constants.js.map +1 -1
- package/build/constants.mjs +185 -0
- package/build/constants.mjs.map +1 -0
- package/build/crypto-utils.d.ts +0 -2
- package/build/crypto-utils.js +33 -29
- package/build/crypto-utils.js.map +1 -1
- package/build/crypto-utils.mjs +40 -0
- package/build/crypto-utils.mjs.map +1 -0
- package/build/error-utils.js +92 -80
- package/build/error-utils.js.map +1 -1
- package/build/error-utils.mjs +107 -0
- package/build/error-utils.mjs.map +1 -0
- package/build/file-utils.js +35 -31
- package/build/file-utils.js.map +1 -1
- package/build/file-utils.mjs +35 -0
- package/build/file-utils.mjs.map +1 -0
- package/build/index.d.ts +2 -1
- package/build/index.js +125 -185
- package/build/index.mjs +15 -0
- package/build/ip-utils.js +52 -69
- package/build/ip-utils.js.map +1 -1
- package/build/ip-utils.mjs +60 -0
- package/build/ip-utils.mjs.map +1 -0
- package/build/pkg-utils.js +60 -76
- package/build/pkg-utils.js.map +1 -1
- package/build/pkg-utils.mjs +69 -0
- package/build/pkg-utils.mjs.map +1 -0
- package/build/plugin-utils.d.ts +0 -1
- package/build/plugin-utils.js +27 -78
- package/build/plugin-utils.js.map +1 -1
- package/build/plugin-utils.mjs +26 -0
- package/build/plugin-utils.mjs.map +1 -0
- package/build/schemes/publish-manifest.js +33 -43
- package/build/schemes/publish-manifest.js.map +1 -1
- package/build/schemes/publish-manifest.mjs +36 -0
- package/build/schemes/publish-manifest.mjs.map +1 -0
- package/build/schemes/unpublish-manifest.js +51 -72
- package/build/schemes/unpublish-manifest.js.map +1 -1
- package/build/schemes/unpublish-manifest.mjs +54 -0
- package/build/schemes/unpublish-manifest.mjs.map +1 -0
- package/build/search-utils.js +9 -9
- package/build/search-utils.js.map +1 -1
- package/build/search-utils.mjs +8 -0
- package/build/search-utils.mjs.map +1 -0
- package/build/stream-utils.d.ts +0 -1
- package/build/stream-utils.js +29 -28
- package/build/stream-utils.js.map +1 -1
- package/build/stream-utils.mjs +30 -0
- package/build/stream-utils.mjs.map +1 -0
- package/build/string-utils.js +31 -34
- package/build/string-utils.js.map +1 -1
- package/build/string-utils.mjs +31 -0
- package/build/string-utils.mjs.map +1 -0
- package/build/tarball-utils.js +40 -39
- package/build/tarball-utils.js.map +1 -1
- package/build/tarball-utils.mjs +46 -0
- package/build/tarball-utils.mjs.map +1 -0
- package/build/validation-utils.js +78 -112
- package/build/validation-utils.js.map +1 -1
- package/build/validation-utils.mjs +91 -0
- package/build/validation-utils.mjs.map +1 -0
- package/build/warning-utils.d.ts +1 -0
- package/build/warning-utils.js +38 -33
- package/build/warning-utils.js.map +1 -1
- package/build/warning-utils.mjs +40 -0
- package/build/warning-utils.mjs.map +1 -0
- package/package.json +19 -6
- package/build/index.js.map +0 -1
- package/build/path-utils.js +0 -2
- package/build/path-utils.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-utils.mjs","names":[],"sources":["../src/validation-utils.ts"],"sourcesContent":["import assert from 'node:assert';\n\nimport type { Manifest } from '@verdaccio/types';\n\nimport { DEFAULT_PASSWORD_VALIDATION, DIST_TAGS, MAINTAINERS } from './constants';\n\nexport { validatePublishSingleVersion } from './schemes/publish-manifest';\nexport { validateUnPublishSingleVersion } from './schemes/unpublish-manifest';\n\nexport function isPackageNameScoped(name: string): boolean {\n return name.startsWith('@');\n}\n\n/**\n * From normalize-package-data/lib/fixer.js\n * @param {*} name the package name\n * @return {Boolean} whether is valid or not\n */\nexport function validateName(name: string): boolean {\n if (typeof name !== 'string') {\n return false;\n }\n\n let normalizedName: string = name.toLowerCase();\n\n const isScoped: boolean = isPackageNameScoped(name);\n const scopedName = name.split('/', 2)[1];\n\n if (isScoped && typeof scopedName !== 'undefined') {\n normalizedName = scopedName.toLowerCase();\n }\n\n /**\n * Some context about the first regex\n * - npm used to have a different tarball naming system.\n * eg: http://registry.npmjs.com/thirty-two\n * https://registry.npmjs.org/thirty-two/-/thirty-two@0.0.1.tgz\n * The file name thirty-two@0.0.1.tgz, the version and the pkg name was separated by an at (@)\n * while nowadays the naming system is based in dashes\n * https://registry.npmjs.org/verdaccio/-/verdaccio-1.4.0.tgz\n *\n * more info here: https://github.com/rlidwka/sinopia/issues/75\n */\n return !(\n !normalizedName.match(/^[-a-zA-Z0-9_.!~*'()@]+$/) ||\n normalizedName.startsWith('.') || // \".bin\", etc.\n ['node_modules', '__proto__', 'favicon.ico'].includes(normalizedName)\n );\n}\n\n/**\n * Validate a package.\n * @return {Boolean} whether the package is valid or not\n */\nexport function validatePackage(name: string): boolean {\n const nameList = name.split('/', 2);\n if (nameList.length === 1) {\n // normal package\n return validateName(nameList[0]);\n }\n // scoped package\n return nameList[0][0] === '@' && validateName(nameList[0].slice(1)) && validateName(nameList[1]);\n}\n\n/**\n * Validate the package metadata, add additional properties whether are missing within\n * the metadata properties.\n * @param {*} manifest\n * @param {*} name\n * @return {Object} the object with additional properties as dist-tags ad versions\n */\nexport function normalizeMetadata(manifest: Manifest, name: string): Manifest {\n assert.strictEqual(manifest.name, name);\n const _manifest = { ...manifest };\n\n if (!isObject(manifest[DIST_TAGS])) {\n _manifest[DIST_TAGS] = {};\n }\n\n if (!Array.isArray(manifest[MAINTAINERS])) {\n _manifest[MAINTAINERS] = [];\n }\n\n // This may not be needed\n if (!isObject(manifest['versions'])) {\n _manifest['versions'] = {};\n }\n\n if (!isObject(manifest['time'])) {\n _manifest['time'] = {};\n }\n\n return _manifest;\n}\n\n/**\n * Check whether an element is an Object\n * @param {*} obj the element\n * @return {Boolean}\n */\nexport function isObject(obj: any): boolean {\n // if (obj === null || typeof obj === 'undefined' || typeof obj === 'string') {\n // return false;\n // }\n\n // return (\n // (typeof obj === 'object' || typeof obj.prototype === 'undefined') &&\n // Array.isArray(obj) === false\n // );\n return Object.prototype.toString.call(obj) === '[object Object]';\n}\n\nexport function validatePassword(\n password: string,\n validation: RegExp = DEFAULT_PASSWORD_VALIDATION\n): boolean {\n return typeof password === 'string' && validation instanceof RegExp\n ? password.match(validation) !== null\n : false;\n}\n\nexport function validateUserName(userName: any, expectedName: string): boolean {\n return (\n typeof userName === 'string' &&\n userName.split(':')[0] === 'org.couchdb.user' &&\n userName.split(':')[1] === expectedName\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AASA,SAAgB,oBAAoB,MAAuB;CACzD,OAAO,KAAK,WAAW,GAAG;AAC5B;;;;;;AAOA,SAAgB,aAAa,MAAuB;CAClD,IAAI,OAAO,SAAS,UAClB,OAAO;CAGT,IAAI,iBAAyB,KAAK,YAAY;CAE9C,MAAM,WAAoB,oBAAoB,IAAI;CAClD,MAAM,aAAa,KAAK,MAAM,KAAK,CAAC,EAAE;CAEtC,IAAI,YAAY,OAAO,eAAe,aACpC,iBAAiB,WAAW,YAAY;;;;;;;;;;;;CAc1C,OAAO,EACL,CAAC,eAAe,MAAM,0BAA0B,KAChD,eAAe,WAAW,GAAG,KAC7B;EAAC;EAAgB;EAAa;CAAa,EAAE,SAAS,cAAc;AAExE;;;;;AAMA,SAAgB,gBAAgB,MAAuB;CACrD,MAAM,WAAW,KAAK,MAAM,KAAK,CAAC;CAClC,IAAI,SAAS,WAAW,GAEtB,OAAO,aAAa,SAAS,EAAE;CAGjC,OAAO,SAAS,GAAG,OAAO,OAAO,aAAa,SAAS,GAAG,MAAM,CAAC,CAAC,KAAK,aAAa,SAAS,EAAE;AACjG;;;;;;;;AASA,SAAgB,kBAAkB,UAAoB,MAAwB;CAC5E,OAAO,YAAY,SAAS,MAAM,IAAI;CACtC,MAAM,YAAY,EAAE,GAAG,SAAS;CAEhC,IAAI,CAAC,SAAS,SAAA,YAAmB,GAC/B,UAAU,aAAa,CAAC;CAG1B,IAAI,CAAC,MAAM,QAAQ,SAAA,cAAqB,GACtC,UAAU,eAAe,CAAC;CAI5B,IAAI,CAAC,SAAS,SAAS,WAAW,GAChC,UAAU,cAAc,CAAC;CAG3B,IAAI,CAAC,SAAS,SAAS,OAAO,GAC5B,UAAU,UAAU,CAAC;CAGvB,OAAO;AACT;;;;;;AAOA,SAAgB,SAAS,KAAmB;CAS1C,OAAO,OAAO,UAAU,SAAS,KAAK,GAAG,MAAM;AACjD;AAEA,SAAgB,iBACd,UACA,aAAqB,6BACZ;CACT,OAAO,OAAO,aAAa,YAAY,sBAAsB,SACzD,SAAS,MAAM,UAAU,MAAM,OAC/B;AACN;AAEA,SAAgB,iBAAiB,UAAe,cAA+B;CAC7E,OACE,OAAO,aAAa,YACpB,SAAS,MAAM,GAAG,EAAE,OAAO,sBAC3B,SAAS,MAAM,GAAG,EAAE,OAAO;AAE/B"}
|
package/build/warning-utils.d.ts
CHANGED
package/build/warning-utils.js
CHANGED
|
@@ -1,41 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.js");
|
|
2
|
+
let process_warning = require("process-warning");
|
|
3
|
+
process_warning = require_runtime.__toESM(process_warning);
|
|
4
|
+
//#region src/warning-utils.ts
|
|
5
|
+
var warning_utils_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
6
|
+
Codes: () => Codes,
|
|
7
|
+
emit: () => emit
|
|
5
8
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Codes["VERDEP003"] = "VERDEP003";
|
|
20
|
-
Codes["VERWAR006"] = "VERWAR006";
|
|
21
|
-
Codes["VERWAR007"] = "VERWAR007";
|
|
22
|
-
return Codes;
|
|
9
|
+
var warningInstance = (0, process_warning.default)();
|
|
10
|
+
var verdaccioWarning = "VerdaccioWarning";
|
|
11
|
+
var verdaccioDeprecation = "VerdaccioDeprecation";
|
|
12
|
+
var Codes = /* @__PURE__ */ function(Codes) {
|
|
13
|
+
Codes["VERWAR001"] = "VERWAR001";
|
|
14
|
+
Codes["VERWAR002"] = "VERWAR002";
|
|
15
|
+
Codes["VERWAR003"] = "VERWAR003";
|
|
16
|
+
Codes["VERWAR004"] = "VERWAR004";
|
|
17
|
+
Codes["VERDEP003"] = "VERDEP003";
|
|
18
|
+
Codes["VERDEP004"] = "VERDEP004";
|
|
19
|
+
Codes["VERWAR006"] = "VERWAR006";
|
|
20
|
+
Codes["VERWAR007"] = "VERWAR007";
|
|
21
|
+
return Codes;
|
|
23
22
|
}({});
|
|
24
|
-
|
|
25
|
-
warningInstance.create(verdaccioWarning,
|
|
26
|
-
warningInstance.create(verdaccioWarning,
|
|
27
|
-
warningInstance.create(verdaccioWarning,
|
|
28
|
-
warningInstance.create(verdaccioWarning, Codes.VERWAR004, `invalid address - %s, we expect a port (e.g. "4873"),
|
|
23
|
+
warningInstance.create(verdaccioWarning, "VERWAR001", `Verdaccio doesn't need superuser privileges. don't run it under root`);
|
|
24
|
+
warningInstance.create(verdaccioWarning, "VERWAR002", `The configuration property "logs" has been deprecated, please rename to "log" for future compatibility`);
|
|
25
|
+
warningInstance.create(verdaccioWarning, "VERWAR003", "rotating-file type is not longer supported, consider use [logrotate] instead");
|
|
26
|
+
warningInstance.create(verdaccioWarning, "VERWAR004", `invalid address - %s, we expect a port (e.g. "4873"),
|
|
29
27
|
host:port (e.g. "localhost:4873") or full url '(e.g. "http://localhost:4873/")
|
|
30
28
|
https://verdaccio.org/docs/en/configuration#listen-port`);
|
|
31
|
-
warningInstance.create(verdaccioDeprecation,
|
|
32
|
-
warningInstance.create(verdaccioDeprecation,
|
|
29
|
+
warningInstance.create(verdaccioDeprecation, "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
|
+
warningInstance.create(verdaccioDeprecation, "VERWAR007", `the secret length is too long, it must be 32 characters long, please consider generate a new one
|
|
33
31
|
Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db`);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
warningInstance.create(verdaccioDeprecation, Codes.VERDEP003, 'multiple addresses will be deprecated in the next major, only use one');
|
|
32
|
+
warningInstance.create(verdaccioDeprecation, "VERDEP003", "multiple addresses will be deprecated in the next major, only use one");
|
|
33
|
+
warningInstance.create(verdaccioDeprecation, "VERDEP004", `JavaScript configuration files are deprecated and will be removed in the next major release, please migrate to YAML (.yaml)
|
|
34
|
+
Learn more at https://verdaccio.org/docs/configuration`);
|
|
38
35
|
function emit(code, a, b, c) {
|
|
39
|
-
|
|
36
|
+
warningInstance.emit(code, a, b, c);
|
|
40
37
|
}
|
|
38
|
+
//#endregion
|
|
39
|
+
Object.defineProperty(exports, "warning_utils_exports", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function() {
|
|
42
|
+
return warning_utils_exports;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
41
46
|
//# sourceMappingURL=warning-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warning-utils.js","names":[
|
|
1
|
+
{"version":3,"file":"warning-utils.js","names":[],"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 // deprecation warnings\n VERDEP003 = 'VERDEP003',\n VERDEP004 = 'VERDEP004',\n VERWAR006 = 'VERWAR006',\n VERWAR007 = 'VERWAR007',\n}\n\n/* general warnings */\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.VERWAR002,\n `The configuration property \"logs\" has been deprecated, please rename to \"log\" for future compatibility`\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 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\nwarningInstance.create(\n verdaccioDeprecation,\n Codes.VERWAR007,\n `the secret length is too long, it must be 32 characters long, please consider generate a new one \n Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db`\n);\n\n/* deprecation warnings */\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.VERDEP004,\n `JavaScript configuration files are deprecated and will be removed in the next major release, please migrate to YAML (.yaml)\n Learn more at https://verdaccio.org/docs/configuration`\n);\n\nexport function emit(code: string, a?: string, b?: string, c?: string) {\n warningInstance.emit(code, a, b, c);\n}\n"],"mappings":";;;;;;;;AAEA,IAAM,mBAAA,GAAA,gBAAA,SAA0B;AAChC,IAAM,mBAAmB;AACzB,IAAM,uBAAuB;AAE7B,IAAY,QAAL,yBAAA,OAAA;CACL,MAAA,eAAA;CACA,MAAA,eAAA;CACA,MAAA,eAAA;CACA,MAAA,eAAA;CAEA,MAAA,eAAA;CACA,MAAA,eAAA;CACA,MAAA,eAAA;CACA,MAAA,eAAA;;AACF,EAAA,CAAA,CAAA;AAIA,gBAAgB,OACd,kBAAA,aAEA,sEACF;AAEA,gBAAgB,OACd,kBAAA,aAEA,wGACF;AAEA,gBAAgB,OACd,kBAAA,aAEA,8EACF;AAEA,gBAAgB,OACd,kBAAA,aAEA;;wDAGF;AAEA,gBAAgB,OACd,sBAAA,aAEA,uIACF;AAEA,gBAAgB,OACd,sBAAA,aAEA;wEAEF;AAIA,gBAAgB,OACd,sBAAA,aAEA,uEACF;AAEA,gBAAgB,OACd,sBAAA,aAEA;yDAEF;AAEA,SAAgB,KAAK,MAAc,GAAY,GAAY,GAAY;CACrE,gBAAgB,KAAK,MAAM,GAAG,GAAG,CAAC;AACpC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import warning from "process-warning";
|
|
3
|
+
//#region src/warning-utils.ts
|
|
4
|
+
var warning_utils_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Codes: () => Codes,
|
|
6
|
+
emit: () => emit
|
|
7
|
+
});
|
|
8
|
+
var warningInstance = warning();
|
|
9
|
+
var verdaccioWarning = "VerdaccioWarning";
|
|
10
|
+
var verdaccioDeprecation = "VerdaccioDeprecation";
|
|
11
|
+
var Codes = /* @__PURE__ */ function(Codes) {
|
|
12
|
+
Codes["VERWAR001"] = "VERWAR001";
|
|
13
|
+
Codes["VERWAR002"] = "VERWAR002";
|
|
14
|
+
Codes["VERWAR003"] = "VERWAR003";
|
|
15
|
+
Codes["VERWAR004"] = "VERWAR004";
|
|
16
|
+
Codes["VERDEP003"] = "VERDEP003";
|
|
17
|
+
Codes["VERDEP004"] = "VERDEP004";
|
|
18
|
+
Codes["VERWAR006"] = "VERWAR006";
|
|
19
|
+
Codes["VERWAR007"] = "VERWAR007";
|
|
20
|
+
return Codes;
|
|
21
|
+
}({});
|
|
22
|
+
warningInstance.create(verdaccioWarning, "VERWAR001", `Verdaccio doesn't need superuser privileges. don't run it under root`);
|
|
23
|
+
warningInstance.create(verdaccioWarning, "VERWAR002", `The configuration property "logs" has been deprecated, please rename to "log" for future compatibility`);
|
|
24
|
+
warningInstance.create(verdaccioWarning, "VERWAR003", "rotating-file type is not longer supported, consider use [logrotate] instead");
|
|
25
|
+
warningInstance.create(verdaccioWarning, "VERWAR004", `invalid address - %s, we expect a port (e.g. "4873"),
|
|
26
|
+
host:port (e.g. "localhost:4873") or full url '(e.g. "http://localhost:4873/")
|
|
27
|
+
https://verdaccio.org/docs/en/configuration#listen-port`);
|
|
28
|
+
warningInstance.create(verdaccioDeprecation, "VERWAR006", "the auth plugin method \"add_user\" in the auth plugin is deprecated and will be removed in next major release, rename to \"adduser\"");
|
|
29
|
+
warningInstance.create(verdaccioDeprecation, "VERWAR007", `the secret length is too long, it must be 32 characters long, please consider generate a new one
|
|
30
|
+
Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db`);
|
|
31
|
+
warningInstance.create(verdaccioDeprecation, "VERDEP003", "multiple addresses will be deprecated in the next major, only use one");
|
|
32
|
+
warningInstance.create(verdaccioDeprecation, "VERDEP004", `JavaScript configuration files are deprecated and will be removed in the next major release, please migrate to YAML (.yaml)
|
|
33
|
+
Learn more at https://verdaccio.org/docs/configuration`);
|
|
34
|
+
function emit(code, a, b, c) {
|
|
35
|
+
warningInstance.emit(code, a, b, c);
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { warning_utils_exports };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=warning-utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning-utils.mjs","names":[],"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 // deprecation warnings\n VERDEP003 = 'VERDEP003',\n VERDEP004 = 'VERDEP004',\n VERWAR006 = 'VERWAR006',\n VERWAR007 = 'VERWAR007',\n}\n\n/* general warnings */\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.VERWAR002,\n `The configuration property \"logs\" has been deprecated, please rename to \"log\" for future compatibility`\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 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\nwarningInstance.create(\n verdaccioDeprecation,\n Codes.VERWAR007,\n `the secret length is too long, it must be 32 characters long, please consider generate a new one \n Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db`\n);\n\n/* deprecation warnings */\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.VERDEP004,\n `JavaScript configuration files are deprecated and will be removed in the next major release, please migrate to YAML (.yaml)\n Learn more at https://verdaccio.org/docs/configuration`\n);\n\nexport function emit(code: string, a?: string, b?: string, c?: string) {\n warningInstance.emit(code, a, b, c);\n}\n"],"mappings":";;;;;;;AAEA,IAAM,kBAAkB,QAAQ;AAChC,IAAM,mBAAmB;AACzB,IAAM,uBAAuB;AAE7B,IAAY,QAAL,yBAAA,OAAA;CACL,MAAA,eAAA;CACA,MAAA,eAAA;CACA,MAAA,eAAA;CACA,MAAA,eAAA;CAEA,MAAA,eAAA;CACA,MAAA,eAAA;CACA,MAAA,eAAA;CACA,MAAA,eAAA;;AACF,EAAA,CAAA,CAAA;AAIA,gBAAgB,OACd,kBAAA,aAEA,sEACF;AAEA,gBAAgB,OACd,kBAAA,aAEA,wGACF;AAEA,gBAAgB,OACd,kBAAA,aAEA,8EACF;AAEA,gBAAgB,OACd,kBAAA,aAEA;;wDAGF;AAEA,gBAAgB,OACd,sBAAA,aAEA,uIACF;AAEA,gBAAgB,OACd,sBAAA,aAEA;wEAEF;AAIA,gBAAgB,OACd,sBAAA,aAEA,uEACF;AAEA,gBAAgB,OACd,sBAAA,aAEA;yDAEF;AAEA,SAAgB,KAAK,MAAc,GAAY,GAAY,GAAY;CACrE,gBAAgB,KAAK,MAAM,GAAG,GAAG,CAAC;AACpC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Verdaccio Core Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"enterprise",
|
|
@@ -29,7 +29,21 @@
|
|
|
29
29
|
"url": "https://opencollective.com/verdaccio"
|
|
30
30
|
},
|
|
31
31
|
"main": "./build/index.js",
|
|
32
|
+
"module": "./build/index.mjs",
|
|
32
33
|
"types": "./build/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"import": {
|
|
37
|
+
"types": "./build/index.d.ts",
|
|
38
|
+
"default": "./build/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"require": {
|
|
41
|
+
"types": "./build/index.d.ts",
|
|
42
|
+
"default": "./build/index.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"./build/*": "./build/*"
|
|
46
|
+
},
|
|
33
47
|
"publishConfig": {
|
|
34
48
|
"access": "public"
|
|
35
49
|
},
|
|
@@ -45,19 +59,18 @@
|
|
|
45
59
|
"@verdaccio/types": "13.0.5",
|
|
46
60
|
"express": "4.22.1",
|
|
47
61
|
"typedoc": "0.28.14",
|
|
62
|
+
"vite": "8.0.16",
|
|
48
63
|
"vitest": "4.1.2"
|
|
49
64
|
},
|
|
50
65
|
"engines": {
|
|
51
|
-
"node": ">=
|
|
66
|
+
"node": ">=22"
|
|
52
67
|
},
|
|
53
68
|
"scripts": {
|
|
54
69
|
"clean": "rimraf ./build",
|
|
55
70
|
"test": "vitest run",
|
|
56
71
|
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
|
57
72
|
"build:docs": "typedoc --options ./typedoc.json --tsconfig tsconfig.build.json",
|
|
58
|
-
"
|
|
59
|
-
"build
|
|
60
|
-
"watch": "pnpm build:js -- --watch",
|
|
61
|
-
"build": "pnpm run build:js && pnpm run build:types"
|
|
73
|
+
"watch": "vite build --watch",
|
|
74
|
+
"build": "vite build && tsc --emitDeclarationOnly -p tsconfig.build.json"
|
|
62
75
|
}
|
|
63
76
|
}
|
package/build/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["authUtils","_interopRequireWildcard","require","exports","constants","cryptoUtils","errorUtils","fileUtils","ipUtils","pkgUtils","pluginUtils","searchUtils","streamUtils","stringUtils","tarballUtils","validationUtils","warningUtils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../src/index.ts"],"sourcesContent":["import * as authUtils from './auth-utils';\nimport * as constants from './constants';\nimport * as cryptoUtils from './crypto-utils';\nimport * as errorUtils from './error-utils';\nimport * as fileUtils from './file-utils';\nimport * as ipUtils from './ip-utils';\nimport * as pkgUtils from './pkg-utils';\nimport * as pluginUtils from './plugin-utils';\nimport * as searchUtils from './search-utils';\nimport * as streamUtils from './stream-utils';\nimport * as stringUtils from './string-utils';\nimport * as tarballUtils from './tarball-utils';\nimport * as validationUtils from './validation-utils';\nimport * as warningUtils from './warning-utils';\n\nexport { VerdaccioError, API_ERROR, SUPPORT_ERRORS, APP_ERROR } from './error-utils';\nexport {\n TOKEN_BASIC,\n TOKEN_BEARER,\n HTTP_STATUS,\n API_MESSAGE,\n HEADERS,\n DIST_TAGS,\n CHARACTER_ENCODING,\n HEADER_TYPE,\n LATEST,\n DEFAULT_PASSWORD_VALIDATION,\n DEFAULT_USER,\n ANONYMOUS_USER,\n USERS,\n MAINTAINERS,\n PLUGIN_CATEGORY,\n PLUGIN_PREFIX,\n PLUGIN_UI_PREFIX,\n HtpasswdHashAlgorithm,\n DEFAULT_DOMAIN,\n DEFAULT_PORT,\n DEFAULT_PROTOCOL,\n} from './constants';\nexport {\n authUtils,\n cryptoUtils,\n fileUtils,\n ipUtils,\n pkgUtils,\n searchUtils,\n streamUtils,\n errorUtils,\n validationUtils,\n stringUtils,\n constants,\n pluginUtils,\n warningUtils,\n tarballUtils,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA0CC,OAAA,CAAAH,SAAA,GAAAA,SAAA;AAC1C,IAAAI,SAAA,GAAAH,uBAAA,CAAAC,OAAA;AAAyCC,OAAA,CAAAC,SAAA,GAAAA,SAAA;AACzC,IAAAC,WAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAA8CC,OAAA,CAAAE,WAAA,GAAAA,WAAA;AAC9C,IAAAC,UAAA,GAAAL,uBAAA,CAAAC,OAAA;AAA4CC,OAAA,CAAAG,UAAA,GAAAA,UAAA;AAC5C,IAAAC,SAAA,GAAAN,uBAAA,CAAAC,OAAA;AAA0CC,OAAA,CAAAI,SAAA,GAAAA,SAAA;AAC1C,IAAAC,OAAA,GAAAP,uBAAA,CAAAC,OAAA;AAAsCC,OAAA,CAAAK,OAAA,GAAAA,OAAA;AACtC,IAAAC,QAAA,GAAAR,uBAAA,CAAAC,OAAA;AAAwCC,OAAA,CAAAM,QAAA,GAAAA,QAAA;AACxC,IAAAC,WAAA,GAAAT,uBAAA,CAAAC,OAAA;AAA8CC,OAAA,CAAAO,WAAA,GAAAA,WAAA;AAC9C,IAAAC,WAAA,GAAAV,uBAAA,CAAAC,OAAA;AAA8CC,OAAA,CAAAQ,WAAA,GAAAA,WAAA;AAC9C,IAAAC,WAAA,GAAAX,uBAAA,CAAAC,OAAA;AAA8CC,OAAA,CAAAS,WAAA,GAAAA,WAAA;AAC9C,IAAAC,WAAA,GAAAZ,uBAAA,CAAAC,OAAA;AAA8CC,OAAA,CAAAU,WAAA,GAAAA,WAAA;AAC9C,IAAAC,YAAA,GAAAb,uBAAA,CAAAC,OAAA;AAAgDC,OAAA,CAAAW,YAAA,GAAAA,YAAA;AAChD,IAAAC,eAAA,GAAAd,uBAAA,CAAAC,OAAA;AAAsDC,OAAA,CAAAY,eAAA,GAAAA,eAAA;AACtD,IAAAC,YAAA,GAAAf,uBAAA,CAAAC,OAAA;AAAgDC,OAAA,CAAAa,YAAA,GAAAA,YAAA;AAAA,SAAAf,wBAAAgB,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAlB,uBAAA,YAAAA,CAAAgB,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA","ignoreList":[]}
|
package/build/path-utils.js
DELETED
package/build/path-utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-utils.js","names":[],"sources":["../src/path-utils.ts"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
|