@verdaccio/core 9.0.0-next-9.0 → 9.0.0-next-9.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.
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { PackageAccess, PackageList } from '@verdaccio/types';
3
2
  export interface CookieSessionToken {
4
3
  expires: Date;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { Hash } from 'node:crypto';
4
2
  export declare const defaultTarballHashAlgorithm = "sha1";
5
3
  export declare function createTarballHash(): Hash;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Express, RequestHandler } from 'express';
3
2
  import type { Readable, Writable } from 'node:stream';
4
3
  import type { AllowAccess, Callback, Config, Logger, Manifest, PackageAccess, RemoteUser, Token, TokenFilter } from '@verdaccio/types';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Readable } from 'node:stream';
3
2
  import { Transform } from 'node:stream';
4
3
  /**
@@ -5,36 +5,63 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Codes = void 0;
7
7
  exports.emit = emit;
8
- var _processWarning = _interopRequireDefault(require("process-warning"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- const warningInstance = (0, _processWarning.default)();
8
+ var _processWarning = require("process-warning");
11
9
  const verdaccioWarning = 'VerdaccioWarning';
12
- const verdaccioDeprecation = 'VerdaccioDeprecation';
13
10
  let Codes = exports.Codes = /*#__PURE__*/function (Codes) {
14
11
  Codes["VERWAR001"] = "VERWAR001";
15
12
  Codes["VERWAR002"] = "VERWAR002";
16
13
  Codes["VERWAR003"] = "VERWAR003";
17
14
  Codes["VERWAR004"] = "VERWAR004";
15
+ // deprecation warnings
18
16
  Codes["VERDEP003"] = "VERDEP003";
19
17
  Codes["VERWAR006"] = "VERWAR006";
20
18
  Codes["VERWAR007"] = "VERWAR007";
21
19
  return Codes;
22
20
  }({});
23
21
  /* general warnings */
24
- warningInstance.create(verdaccioWarning, Codes.VERWAR001, `Verdaccio doesn't need superuser privileges. don't run it under root`);
25
- warningInstance.create(verdaccioWarning, Codes.VERWAR002, `The configuration property "logs" has been deprecated, please rename to "log" for future compatibility`);
26
- warningInstance.create(verdaccioWarning, Codes.VERWAR003, 'rotating-file type is not longer supported, consider use [logrotate] instead');
27
- warningInstance.create(verdaccioWarning, Codes.VERWAR004, `invalid address - %s, we expect a port (e.g. "4873"),
22
+ const warnings = {};
23
+ warnings[Codes.VERWAR001] = (0, _processWarning.createWarning)({
24
+ name: verdaccioWarning,
25
+ code: Codes.VERWAR001,
26
+ message: `Verdaccio doesn't need superuser privileges. don't run it under root`
27
+ });
28
+ warnings[Codes.VERWAR002] = (0, _processWarning.createWarning)({
29
+ name: verdaccioWarning,
30
+ code: Codes.VERWAR002,
31
+ message: `The configuration property "logs" has been deprecated, please rename to "log" for future compatibility`
32
+ });
33
+ warnings[Codes.VERWAR003] = (0, _processWarning.createWarning)({
34
+ name: verdaccioWarning,
35
+ code: Codes.VERWAR003,
36
+ message: 'rotating-file type is not longer supported, consider use [logrotate] instead'
37
+ });
38
+ warnings[Codes.VERWAR004] = (0, _processWarning.createWarning)({
39
+ name: verdaccioWarning,
40
+ code: Codes.VERWAR004,
41
+ message: `invalid address - %s, we expect a port (e.g. "4873"),
28
42
  host:port (e.g. "localhost:4873") or full url '(e.g. "http://localhost:4873/")
29
- https://verdaccio.org/docs/en/configuration#listen-port`);
30
- 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"');
31
- warningInstance.create(verdaccioDeprecation, Codes.VERWAR007, `the secret length is too long, it must be 32 characters long, please consider generate a new one
32
- Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db`);
43
+ https://verdaccio.org/docs/en/configuration#listen-port`
44
+ });
45
+ warnings[Codes.VERWAR006] = (0, _processWarning.createDeprecation)({
46
+ code: Codes.VERWAR006,
47
+ message: 'the auth plugin method "add_user" in the auth plugin is deprecated and will be removed in next major release, rename to "adduser"'
48
+ });
49
+ warnings[Codes.VERWAR007] = (0, _processWarning.createDeprecation)({
50
+ code: Codes.VERWAR007,
51
+ message: `the secret length is too long, it must be 32 characters long, please consider generate a new one
52
+ Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db`
53
+ });
33
54
 
34
55
  /* deprecation warnings */
35
56
 
36
- warningInstance.create(verdaccioDeprecation, Codes.VERDEP003, 'multiple addresses will be deprecated in the next major, only use one');
57
+ warnings[Codes.VERDEP003] = (0, _processWarning.createDeprecation)({
58
+ code: Codes.VERDEP003,
59
+ message: 'multiple addresses will be deprecated in the next major, only use one'
60
+ });
37
61
  function emit(code, a, b, c) {
38
- warningInstance.emit(code, a, b, c);
62
+ const warning = warnings[code];
63
+ if (warning) {
64
+ warning(a, b, c);
65
+ }
39
66
  }
40
67
  //# sourceMappingURL=warning-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"warning-utils.js","names":["_processWarning","_interopRequireDefault","require","e","__esModule","default","warningInstance","warning","verdaccioWarning","verdaccioDeprecation","Codes","exports","create","VERWAR001","VERWAR002","VERWAR003","VERWAR004","VERWAR006","VERWAR007","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 // deprecation warnings\n VERDEP003 = 'VERDEP003',\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\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,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;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;AAWjB;AAEAJ,eAAe,CAACM,MAAM,CACpBJ,gBAAgB,EAChBE,KAAK,CAACG,SAAS,EACf,sEACF,CAAC;AAEDP,eAAe,CAACM,MAAM,CACpBJ,gBAAgB,EAChBE,KAAK,CAACI,SAAS,EACf,wGACF,CAAC;AAEDR,eAAe,CAACM,MAAM,CACpBJ,gBAAgB,EAChBE,KAAK,CAACK,SAAS,EACf,8EACF,CAAC;AAEDT,eAAe,CAACM,MAAM,CACpBJ,gBAAgB,EAChBE,KAAK,CAACM,SAAS,EACf;AACF;AACA,wDACA,CAAC;AAEDV,eAAe,CAACM,MAAM,CACpBH,oBAAoB,EACpBC,KAAK,CAACO,SAAS,EACf,mIACF,CAAC;AAEDX,eAAe,CAACM,MAAM,CACpBH,oBAAoB,EACpBC,KAAK,CAACQ,SAAS,EACf;AACF,wEACA,CAAC;;AAED;;AAEAZ,eAAe,CAACM,MAAM,CACpBH,oBAAoB,EACpBC,KAAK,CAACS,SAAS,EACf,uEACF,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","ignoreList":[]}
1
+ {"version":3,"file":"warning-utils.js","names":["_processWarning","require","verdaccioWarning","Codes","exports","warnings","VERWAR001","createWarning","name","code","message","VERWAR002","VERWAR003","VERWAR004","VERWAR006","createDeprecation","VERWAR007","VERDEP003","emit","a","b","c","warning"],"sources":["../src/warning-utils.ts"],"sourcesContent":["import { createDeprecation, createWarning } from 'process-warning';\n\nconst verdaccioWarning = 'VerdaccioWarning';\n\nexport enum Codes {\n VERWAR001 = 'VERWAR001',\n VERWAR002 = 'VERWAR002',\n VERWAR003 = 'VERWAR003',\n VERWAR004 = 'VERWAR004',\n // deprecation warnings\n VERDEP003 = 'VERDEP003',\n VERWAR006 = 'VERWAR006',\n VERWAR007 = 'VERWAR007',\n}\n\n/* general warnings */\n\nconst warnings: Record<string, (a?: any, b?: any, c?: any) => void> = {};\n\nwarnings[Codes.VERWAR001] = createWarning({\n name: verdaccioWarning,\n code: Codes.VERWAR001,\n message: `Verdaccio doesn't need superuser privileges. don't run it under root`,\n});\n\nwarnings[Codes.VERWAR002] = createWarning({\n name: verdaccioWarning,\n code: Codes.VERWAR002,\n message: `The configuration property \"logs\" has been deprecated, please rename to \"log\" for future compatibility`,\n});\n\nwarnings[Codes.VERWAR003] = createWarning({\n name: verdaccioWarning,\n code: Codes.VERWAR003,\n message: 'rotating-file type is not longer supported, consider use [logrotate] instead',\n});\n\nwarnings[Codes.VERWAR004] = createWarning({\n name: verdaccioWarning,\n code: Codes.VERWAR004,\n message: `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\nwarnings[Codes.VERWAR006] = createDeprecation({\n code: Codes.VERWAR006,\n message:\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\nwarnings[Codes.VERWAR007] = createDeprecation({\n code: Codes.VERWAR007,\n message: `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\nwarnings[Codes.VERDEP003] = createDeprecation({\n code: Codes.VERDEP003,\n message: '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 const warning = warnings[code];\n if (warning) {\n warning(a, b, c);\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAEA,MAAMC,gBAAgB,GAAG,kBAAkB;AAAC,IAEhCC,KAAK,GAAAC,OAAA,CAAAD,KAAA,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAKf;EALUA,KAAK;EAALA,KAAK;EAALA,KAA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C,CAAC;AAEK,SAASQ,IAAIA,CAACT,IAAY,EAAEU,CAAU,EAAEC,CAAU,EAAEC,CAAU,EAAE;EACrE,MAAMC,OAAO,GAAGjB,QAAQ,CAACI,IAAI,CAAC;EAC9B,IAAIa,OAAO,EAAE;IACXA,OAAO,CAACH,CAAC,EAAEC,CAAC,EAAEC,CAAC,CAAC;EAClB;AACF","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/core",
3
- "version": "9.0.0-next-9.0",
3
+ "version": "9.0.0-next-9.2",
4
4
  "description": "Verdaccio Core Components",
5
5
  "keywords": [
6
6
  "private",
@@ -19,7 +19,7 @@
19
19
  "license": "MIT",
20
20
  "homepage": "https://verdaccio.org",
21
21
  "engines": {
22
- "node": ">=18"
22
+ "node": ">=24"
23
23
  },
24
24
  "repository": {
25
25
  "type": "https",
@@ -37,12 +37,12 @@
37
37
  "http-errors": "2.0.1",
38
38
  "http-status-codes": "2.3.0",
39
39
  "minimatch": "7.4.9",
40
- "process-warning": "1.0.0",
40
+ "process-warning": "5.0.0",
41
41
  "semver": "7.7.4"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@verdaccio/types": "14.0.0-next-9.0",
45
- "express": "4.22.1",
45
+ "express": "5.2.1",
46
46
  "typedoc": "0.28.14",
47
47
  "vitest": "3.2.4"
48
48
  },