verdaccio 6.8.0 → 6.9.1
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/README.md +2 -2
- package/bin/verdaccio +5 -1
- package/build/_virtual/_rolldown/runtime.js +23 -0
- package/build/api/debug/index.js +23 -26
- package/build/api/debug/index.js.map +1 -0
- package/build/api/debug/index.mjs +19 -0
- package/build/api/debug/index.mjs.map +1 -0
- package/build/api/endpoint/api/dist-tags.js +62 -75
- package/build/api/endpoint/api/dist-tags.js.map +1 -0
- package/build/api/endpoint/api/dist-tags.mjs +56 -0
- package/build/api/endpoint/api/dist-tags.mjs.map +1 -0
- package/build/api/endpoint/api/package.js +91 -99
- package/build/api/endpoint/api/package.js.map +1 -0
- package/build/api/endpoint/api/package.mjs +89 -0
- package/build/api/endpoint/api/package.mjs.map +1 -0
- package/build/api/endpoint/api/ping.js +13 -11
- package/build/api/endpoint/api/ping.js.map +1 -0
- package/build/api/endpoint/api/ping.mjs +11 -0
- package/build/api/endpoint/api/ping.mjs.map +1 -0
- package/build/api/endpoint/api/publish.js +276 -367
- package/build/api/endpoint/api/publish.js.map +1 -0
- package/build/api/endpoint/api/publish.mjs +280 -0
- package/build/api/endpoint/api/publish.mjs.map +1 -0
- package/build/api/endpoint/api/search.js +57 -105
- package/build/api/endpoint/api/search.js.map +1 -0
- package/build/api/endpoint/api/search.mjs +54 -0
- package/build/api/endpoint/api/search.mjs.map +1 -0
- package/build/api/endpoint/api/star.js +60 -71
- package/build/api/endpoint/api/star.js.map +1 -0
- package/build/api/endpoint/api/star.mjs +54 -0
- package/build/api/endpoint/api/star.mjs.map +1 -0
- package/build/api/endpoint/api/stars.js +40 -40
- package/build/api/endpoint/api/stars.js.map +1 -0
- package/build/api/endpoint/api/stars.mjs +35 -0
- package/build/api/endpoint/api/stars.mjs.map +1 -0
- package/build/api/endpoint/api/user.js +69 -81
- package/build/api/endpoint/api/user.js.map +1 -0
- package/build/api/endpoint/api/user.mjs +64 -0
- package/build/api/endpoint/api/user.mjs.map +1 -0
- package/build/api/endpoint/api/v1/profile.js +50 -67
- package/build/api/endpoint/api/v1/profile.js.map +1 -0
- package/build/api/endpoint/api/v1/profile.mjs +46 -0
- package/build/api/endpoint/api/v1/profile.mjs.map +1 -0
- package/build/api/endpoint/api/v1/search.js +147 -203
- package/build/api/endpoint/api/v1/search.js.map +1 -0
- package/build/api/endpoint/api/v1/search.mjs +154 -0
- package/build/api/endpoint/api/v1/search.mjs.map +1 -0
- package/build/api/endpoint/api/v1/token.js +122 -155
- package/build/api/endpoint/api/v1/token.js.map +1 -0
- package/build/api/endpoint/api/v1/token.mjs +119 -0
- package/build/api/endpoint/api/v1/token.mjs.map +1 -0
- package/build/api/endpoint/api/whoami.js +13 -13
- package/build/api/endpoint/api/whoami.js.map +1 -0
- package/build/api/endpoint/api/whoami.mjs +11 -0
- package/build/api/endpoint/api/whoami.mjs.map +1 -0
- package/build/api/endpoint/index.js +58 -67
- package/build/api/endpoint/index.js.map +1 -0
- package/build/api/endpoint/index.mjs +54 -0
- package/build/api/endpoint/index.mjs.map +1 -0
- package/build/api/index.js +85 -106
- package/build/api/index.js.map +1 -0
- package/build/api/index.mjs +78 -0
- package/build/api/index.mjs.map +1 -0
- package/build/api/middleware.js +60 -54
- package/build/api/middleware.js.map +1 -0
- package/build/api/middleware.mjs +55 -0
- package/build/api/middleware.mjs.map +1 -0
- package/build/api/web/api/index.js +25 -29
- package/build/api/web/api/index.js.map +1 -0
- package/build/api/web/api/index.mjs +23 -0
- package/build/api/web/api/index.mjs.map +1 -0
- package/build/api/web/api/package.js +142 -160
- package/build/api/web/api/package.js.map +1 -0
- package/build/api/web/api/package.mjs +139 -0
- package/build/api/web/api/package.mjs.map +1 -0
- package/build/api/web/api/search.js +37 -49
- package/build/api/web/api/search.js.map +1 -0
- package/build/api/web/api/search.mjs +36 -0
- package/build/api/web/api/search.mjs.map +1 -0
- package/build/api/web/api/user.js +52 -72
- package/build/api/web/api/user.js.map +1 -0
- package/build/api/web/api/user.mjs +49 -0
- package/build/api/web/api/user.mjs.map +1 -0
- package/build/api/web/api/utils.js +9 -10
- package/build/api/web/api/utils.js.map +1 -0
- package/build/api/web/api/utils.mjs +11 -0
- package/build/api/web/api/utils.mjs.map +1 -0
- package/build/api/web/index.js +76 -88
- package/build/api/web/index.js.map +1 -0
- package/build/api/web/index.mjs +70 -0
- package/build/api/web/index.mjs.map +1 -0
- package/build/index.js +43 -60
- package/build/index.mjs +5 -0
- package/build/lib/auth-utils.js +12 -14
- package/build/lib/auth-utils.js.map +1 -0
- package/build/lib/auth-utils.mjs +11 -0
- package/build/lib/auth-utils.mjs.map +1 -0
- package/build/lib/bootstrap.js +125 -157
- package/build/lib/bootstrap.js.map +1 -0
- package/build/lib/bootstrap.mjs +125 -0
- package/build/lib/bootstrap.mjs.map +1 -0
- package/build/lib/cli/cli.js +22 -24
- package/build/lib/cli/cli.js.map +1 -0
- package/build/lib/cli/cli.mjs +23 -0
- package/build/lib/cli/cli.mjs.map +1 -0
- package/build/lib/cli/commands/info.js +34 -25
- package/build/lib/cli/commands/info.js.map +1 -0
- package/build/lib/cli/commands/info.mjs +32 -0
- package/build/lib/cli/commands/info.mjs.map +1 -0
- package/build/lib/cli/commands/init.js +61 -79
- package/build/lib/cli/commands/init.js.map +1 -0
- package/build/lib/cli/commands/init.mjs +70 -0
- package/build/lib/cli/commands/init.mjs.map +1 -0
- package/build/lib/cli/commands/version.js +14 -16
- package/build/lib/cli/commands/version.js.map +1 -0
- package/build/lib/cli/commands/version.mjs +14 -0
- package/build/lib/cli/commands/version.mjs.map +1 -0
- package/build/lib/cli/utils.d.ts +2 -2
- package/build/lib/cli/utils.js +16 -15
- package/build/lib/cli/utils.js.map +1 -0
- package/build/lib/cli/utils.mjs +14 -0
- package/build/lib/cli/utils.mjs.map +1 -0
- package/build/lib/cli.js +11 -14
- package/build/lib/cli.js.map +1 -0
- package/build/lib/cli.mjs +12 -0
- package/build/lib/cli.mjs.map +1 -0
- package/build/lib/config.js +19 -21
- package/build/lib/config.js.map +1 -0
- package/build/lib/config.mjs +16 -0
- package/build/lib/config.mjs.map +1 -0
- package/build/lib/constants.js +100 -93
- package/build/lib/constants.js.map +1 -0
- package/build/lib/constants.mjs +28 -0
- package/build/lib/constants.mjs.map +1 -0
- package/build/lib/experiments.js +19 -24
- package/build/lib/experiments.js.map +1 -0
- package/build/lib/experiments.mjs +20 -0
- package/build/lib/experiments.mjs.map +1 -0
- package/build/lib/local-storage.js +606 -764
- package/build/lib/local-storage.js.map +1 -0
- package/build/lib/local-storage.mjs +600 -0
- package/build/lib/local-storage.mjs.map +1 -0
- package/build/lib/logger/index.js +24 -19
- package/build/lib/logger/index.js.map +1 -0
- package/build/lib/logger/index.mjs +17 -0
- package/build/lib/logger/index.mjs.map +1 -0
- package/build/lib/metadata-utils.js +24 -36
- package/build/lib/metadata-utils.js.map +1 -0
- package/build/lib/metadata-utils.mjs +23 -0
- package/build/lib/metadata-utils.mjs.map +1 -0
- package/build/lib/run-server.js +83 -114
- package/build/lib/run-server.js.map +1 -0
- package/build/lib/run-server.mjs +82 -0
- package/build/lib/run-server.mjs.map +1 -0
- package/build/lib/storage-utils.js +369 -437
- package/build/lib/storage-utils.js.map +1 -0
- package/build/lib/storage-utils.mjs +400 -0
- package/build/lib/storage-utils.mjs.map +1 -0
- package/build/lib/storage.js +675 -836
- package/build/lib/storage.js.map +1 -0
- package/build/lib/storage.mjs +665 -0
- package/build/lib/storage.mjs.map +1 -0
- package/build/lib/up-storage.js +490 -616
- package/build/lib/up-storage.js.map +1 -0
- package/build/lib/up-storage.mjs +484 -0
- package/build/lib/up-storage.mjs.map +1 -0
- package/build/lib/uplink-util.js +21 -31
- package/build/lib/uplink-util.js.map +1 -0
- package/build/lib/uplink-util.mjs +24 -0
- package/build/lib/uplink-util.mjs.map +1 -0
- package/build/lib/utils.js +172 -231
- package/build/lib/utils.js.map +1 -0
- package/build/lib/utils.mjs +188 -0
- package/build/lib/utils.mjs.map +1 -0
- package/package.json +53 -45
|
@@ -1,26 +1,35 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
let clipanion = require("clipanion");
|
|
4
|
+
let envinfo = require("envinfo");
|
|
5
|
+
envinfo = require_runtime.__toESM(envinfo);
|
|
6
|
+
//#region src/lib/cli/commands/info.ts
|
|
7
|
+
var InfoCommand = class extends clipanion.Command {
|
|
8
|
+
static paths = [[`--info`], [`-i`]];
|
|
9
|
+
async execute() {
|
|
10
|
+
this.context.stdout.write("\nEnvironment Info:");
|
|
11
|
+
const data = await envinfo.default.run({
|
|
12
|
+
System: ["OS", "CPU"],
|
|
13
|
+
Binaries: [
|
|
14
|
+
"node",
|
|
15
|
+
"yarn",
|
|
16
|
+
"npm",
|
|
17
|
+
"pnpm"
|
|
18
|
+
],
|
|
19
|
+
Virtualization: ["Docker"],
|
|
20
|
+
Browsers: [
|
|
21
|
+
"Chrome",
|
|
22
|
+
"Edge",
|
|
23
|
+
"Firefox",
|
|
24
|
+
"Safari"
|
|
25
|
+
],
|
|
26
|
+
npmGlobalPackages: ["verdaccio"]
|
|
27
|
+
});
|
|
28
|
+
this.context.stdout.write(data);
|
|
29
|
+
process.exit(0);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
25
33
|
exports.InfoCommand = InfoCommand;
|
|
26
|
-
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.js","names":[],"sources":["../../../../src/lib/cli/commands/info.ts"],"sourcesContent":["import { Command } from 'clipanion';\nimport envinfo from 'envinfo';\n\nexport class InfoCommand extends Command {\n static paths = [[`--info`], [`-i`]];\n\n async execute() {\n this.context.stdout.write('\\nEnvironment Info:');\n const data = await envinfo.run({\n System: ['OS', 'CPU'],\n Binaries: ['node', 'yarn', 'npm', 'pnpm'],\n Virtualization: ['Docker'],\n Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],\n npmGlobalPackages: ['verdaccio'],\n });\n\n this.context.stdout.write(data);\n process.exit(0);\n }\n}\n"],"mappings":";;;;;;AAGA,IAAa,cAAb,cAAiC,UAAA,QAAQ;CACvC,OAAO,QAAQ,CAAC,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC;CAElC,MAAM,UAAU;EACd,KAAK,QAAQ,OAAO,MAAM,qBAAqB;EAC/C,MAAM,OAAO,MAAM,QAAA,QAAQ,IAAI;GAC7B,QAAQ,CAAC,MAAM,KAAK;GACpB,UAAU;IAAC;IAAQ;IAAQ;IAAO;GAAM;GACxC,gBAAgB,CAAC,QAAQ;GACzB,UAAU;IAAC;IAAU;IAAQ;IAAW;GAAQ;GAChD,mBAAmB,CAAC,WAAW;EACjC,CAAC;EAED,KAAK,QAAQ,OAAO,MAAM,IAAI;EAC9B,QAAQ,KAAK,CAAC;CAChB;AACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Command } from "clipanion";
|
|
2
|
+
import envinfo from "envinfo";
|
|
3
|
+
//#region src/lib/cli/commands/info.ts
|
|
4
|
+
var InfoCommand = class extends Command {
|
|
5
|
+
static paths = [[`--info`], [`-i`]];
|
|
6
|
+
async execute() {
|
|
7
|
+
this.context.stdout.write("\nEnvironment Info:");
|
|
8
|
+
const data = await envinfo.run({
|
|
9
|
+
System: ["OS", "CPU"],
|
|
10
|
+
Binaries: [
|
|
11
|
+
"node",
|
|
12
|
+
"yarn",
|
|
13
|
+
"npm",
|
|
14
|
+
"pnpm"
|
|
15
|
+
],
|
|
16
|
+
Virtualization: ["Docker"],
|
|
17
|
+
Browsers: [
|
|
18
|
+
"Chrome",
|
|
19
|
+
"Edge",
|
|
20
|
+
"Firefox",
|
|
21
|
+
"Safari"
|
|
22
|
+
],
|
|
23
|
+
npmGlobalPackages: ["verdaccio"]
|
|
24
|
+
});
|
|
25
|
+
this.context.stdout.write(data);
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { InfoCommand };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=info.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.mjs","names":[],"sources":["../../../../src/lib/cli/commands/info.ts"],"sourcesContent":["import { Command } from 'clipanion';\nimport envinfo from 'envinfo';\n\nexport class InfoCommand extends Command {\n static paths = [[`--info`], [`-i`]];\n\n async execute() {\n this.context.stdout.write('\\nEnvironment Info:');\n const data = await envinfo.run({\n System: ['OS', 'CPU'],\n Binaries: ['node', 'yarn', 'npm', 'pnpm'],\n Virtualization: ['Docker'],\n Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],\n npmGlobalPackages: ['verdaccio'],\n });\n\n this.context.stdout.write(data);\n process.exit(0);\n }\n}\n"],"mappings":";;;AAGA,IAAa,cAAb,cAAiC,QAAQ;CACvC,OAAO,QAAQ,CAAC,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC;CAElC,MAAM,UAAU;EACd,KAAK,QAAQ,OAAO,MAAM,qBAAqB;EAC/C,MAAM,OAAO,MAAM,QAAQ,IAAI;GAC7B,QAAQ,CAAC,MAAM,KAAK;GACpB,UAAU;IAAC;IAAQ;IAAQ;IAAO;GAAM;GACxC,gBAAgB,CAAC,QAAQ;GACzB,UAAU;IAAC;IAAU;IAAQ;IAAW;GAAQ;GAChD,mBAAmB,CAAC,WAAW;EACjC,CAAC;EAED,KAAK,QAAQ,OAAO,MAAM,IAAI;EAC9B,QAAQ,KAAK,CAAC;CAChB;AACF"}
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
description: 'host:port number to listen on (default: localhost:4873)'
|
|
23
|
-
});
|
|
24
|
-
static usage = _clipanion.Command.Usage({
|
|
25
|
-
description: `launch the server`,
|
|
26
|
-
details: `
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_lib_logger_index = require("../../logger/index.js");
|
|
4
|
+
const require_lib_utils = require("../../utils.js");
|
|
5
|
+
const require_lib_bootstrap = require("../../bootstrap.js");
|
|
6
|
+
const require_lib_run_server = require("../../run-server.js");
|
|
7
|
+
const require_lib_cli_utils = require("../utils.js");
|
|
8
|
+
let _verdaccio_config = require("@verdaccio/config");
|
|
9
|
+
let path = require("path");
|
|
10
|
+
path = require_runtime.__toESM(path);
|
|
11
|
+
let clipanion = require("clipanion");
|
|
12
|
+
//#region src/lib/cli/commands/init.ts
|
|
13
|
+
var pkgVersion = "6.9.1";
|
|
14
|
+
var pkgName = "verdaccio";
|
|
15
|
+
var DEFAULT_PROCESS_NAME = "verdaccio";
|
|
16
|
+
var InitCommand = class extends clipanion.Command {
|
|
17
|
+
static paths = [clipanion.Command.Default];
|
|
18
|
+
listen = clipanion.Option.String("-l,--listen", { description: "host:port number to listen on (default: localhost:4873)" });
|
|
19
|
+
static usage = clipanion.Command.Usage({
|
|
20
|
+
description: `launch the server`,
|
|
21
|
+
details: `
|
|
27
22
|
This start the registry in the default port.
|
|
28
23
|
|
|
29
24
|
When used without arguments, it:
|
|
@@ -36,57 +31,44 @@ class InitCommand extends _clipanion.Command {
|
|
|
36
31
|
- \`--config\` to define a different configuration path location,
|
|
37
32
|
|
|
38
33
|
`,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
console.error(`cannot open config file ${configPathLocation}: ${err.stack}`);
|
|
78
|
-
// @ts-expect-error
|
|
79
|
-
if (typeof _logger.logger?.logger?.fatal === 'function') {
|
|
80
|
-
_logger.logger.fatal({
|
|
81
|
-
file: configPathLocation,
|
|
82
|
-
err: err
|
|
83
|
-
}, 'cannot open config file @{file}: @{!err.message}');
|
|
84
|
-
} else {
|
|
85
|
-
console.error(`cannot open config file ${configPathLocation}: ${!err.message}`);
|
|
86
|
-
}
|
|
87
|
-
process.exit(1);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
34
|
+
examples: [
|
|
35
|
+
[`Runs the server with the default configuration`, `verdaccio`],
|
|
36
|
+
[`Runs the server in the port 5000`, `verdaccio --listen 5000`],
|
|
37
|
+
[`Runs the server by using a different absolute location of the configuration file`, `verdaccio --config /home/user/verdaccio/config.yaml`]
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
config = clipanion.Option.String("-c,--config", { description: "use this configuration file (default: ./config.yaml)" });
|
|
41
|
+
async execute() {
|
|
42
|
+
let configPathLocation;
|
|
43
|
+
try {
|
|
44
|
+
configPathLocation = (0, _verdaccio_config.findConfigFile)(this.config);
|
|
45
|
+
const configParsed = (0, _verdaccio_config.parseConfigFile)(configPathLocation);
|
|
46
|
+
if (!configParsed.self_path) {
|
|
47
|
+
configParsed.self_path = path.default.resolve(configPathLocation);
|
|
48
|
+
configParsed.configPath = configParsed.self_path;
|
|
49
|
+
}
|
|
50
|
+
if (!configParsed.https) configParsed.https = { enable: false };
|
|
51
|
+
process.title = configParsed.web && configParsed.web.title || "verdaccio";
|
|
52
|
+
require_lib_utils.initLogger(configParsed);
|
|
53
|
+
if (!require_lib_cli_utils.isVersionRecommended(process.version)) require_lib_logger_index.logger.warn({
|
|
54
|
+
current: process.version,
|
|
55
|
+
recommended: "24"
|
|
56
|
+
}, "you are using Node.js @{current}, Verdaccio recommends Node.js v@{recommended} or higher, please consider upgrading your Node.js distribution");
|
|
57
|
+
require_lib_logger_index.logger.info({ file: configPathLocation }, "config file - @{file}");
|
|
58
|
+
require_lib_bootstrap.listenDefaultCallback(await require_lib_run_server.runServer(configParsed, { listenArg: this.listen }), (0, _verdaccio_config.getListenAddress)(this.listen ?? configParsed.listen, require_lib_logger_index.logger), pkgName, pkgVersion);
|
|
59
|
+
} catch (err) {
|
|
60
|
+
console.error(`cannot open config file ${configPathLocation}: ${err.stack}`);
|
|
61
|
+
if (typeof require_lib_logger_index.logger?.logger?.fatal === "function") require_lib_logger_index.logger.fatal({
|
|
62
|
+
file: configPathLocation,
|
|
63
|
+
err
|
|
64
|
+
}, "cannot open config file @{file}: @{!err.message}");
|
|
65
|
+
else console.error(`cannot open config file ${configPathLocation}: ${!err.message}`);
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
exports.DEFAULT_PROCESS_NAME = DEFAULT_PROCESS_NAME;
|
|
91
72
|
exports.InitCommand = InitCommand;
|
|
92
|
-
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","names":[],"sources":["../../../../src/lib/cli/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\nimport path from 'path';\n\nimport { findConfigFile, getListenAddress } from '@verdaccio/config';\n\nimport { listenDefaultCallback } from '../../bootstrap';\nimport { logger } from '../../logger';\nimport { runServer } from '../../run-server';\nimport { initLogger, parseConfigFile } from '../../utils';\nimport { RECOMMENDED_NODE_VERSION, isVersionRecommended } from '../utils';\n\nconst pkgVersion = process.env.PACKAGE_VERSION || 'dev';\nconst pkgName = 'verdaccio';\n\nexport const DEFAULT_PROCESS_NAME: string = 'verdaccio';\n\nexport class InitCommand extends Command {\n static paths = [Command.Default];\n\n listen = Option.String('-l,--listen', {\n description: 'host:port number to listen on (default: localhost:4873)',\n });\n\n static usage = Command.Usage({\n description: `launch the server`,\n details: `\n This start the registry in the default port.\n\n When used without arguments, it:\n\n - bootstrap the server at the port \\`4873\\`\n\n The optional arguments are:\n\n - \\`--listen\\` to switch the default server port,\n - \\`--config\\` to define a different configuration path location,\n\n `,\n examples: [\n [`Runs the server with the default configuration`, `verdaccio`],\n [`Runs the server in the port 5000`, `verdaccio --listen 5000`],\n [\n `Runs the server by using a different absolute location of the configuration file`,\n `verdaccio --config /home/user/verdaccio/config.yaml`,\n ],\n ],\n });\n\n config = Option.String('-c,--config', {\n description: 'use this configuration file (default: ./config.yaml)',\n });\n\n async execute() {\n let configPathLocation;\n try {\n configPathLocation = findConfigFile(this.config as string);\n const configParsed: ReturnType<any> = parseConfigFile(configPathLocation);\n if (!configParsed.self_path) {\n configParsed.self_path = path.resolve(configPathLocation);\n // compatibility with 6.x plugins\n configParsed.configPath = configParsed.self_path;\n }\n if (!configParsed.https) {\n configParsed.https = { enable: false };\n }\n\n process.title = (configParsed.web && configParsed.web.title) || 'verdaccio';\n\n initLogger(configParsed);\n if (!isVersionRecommended(process.version)) {\n logger.warn(\n { current: process.version, recommended: RECOMMENDED_NODE_VERSION },\n 'you are using Node.js @{current}, Verdaccio recommends Node.js v@{recommended} or higher, please consider upgrading your Node.js distribution'\n );\n }\n logger.info({ file: configPathLocation }, 'config file - @{file}');\n const webServer = await runServer(configParsed, { listenArg: this.listen as string });\n const listen = (this.listen as string) ?? configParsed.listen;\n const addr = getListenAddress(listen, logger);\n listenDefaultCallback(webServer, addr, pkgName, pkgVersion);\n } catch (err: any) {\n console.error(`cannot open config file ${configPathLocation}: ${err.stack}`);\n // @ts-expect-error\n if (typeof logger?.logger?.fatal === 'function') {\n logger.fatal(\n { file: configPathLocation, err: err },\n 'cannot open config file @{file}: @{!err.message}'\n );\n } else {\n console.error(`cannot open config file ${configPathLocation}: ${!err.message}`);\n }\n process.exit(1);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;AAWA,IAAM,aAAA;AACN,IAAM,UAAU;AAEhB,IAAa,uBAA+B;AAE5C,IAAa,cAAb,cAAiC,UAAA,QAAQ;CACvC,OAAO,QAAQ,CAAC,UAAA,QAAQ,OAAO;CAE/B,SAAS,UAAA,OAAO,OAAO,eAAe,EACpC,aAAa,0DACf,CAAC;CAED,OAAO,QAAQ,UAAA,QAAQ,MAAM;EAC3B,aAAa;EACb,SAAS;;;;;;;;;;;;;EAaT,UAAU;GACR,CAAC,kDAAkD,WAAW;GAC9D,CAAC,oCAAoC,yBAAyB;GAC9D,CACE,oFACA,qDACF;EACF;CACF,CAAC;CAED,SAAS,UAAA,OAAO,OAAO,eAAe,EACpC,aAAa,uDACf,CAAC;CAED,MAAM,UAAU;EACd,IAAI;EACJ,IAAI;GACF,sBAAA,GAAA,kBAAA,eAAA,CAAoC,KAAK,MAAgB;GACzD,MAAM,gBAAA,GAAA,kBAAA,gBAAA,CAAgD,kBAAkB;GACxE,IAAI,CAAC,aAAa,WAAW;IAC3B,aAAa,YAAY,KAAA,QAAK,QAAQ,kBAAkB;IAExD,aAAa,aAAa,aAAa;GACzC;GACA,IAAI,CAAC,aAAa,OAChB,aAAa,QAAQ,EAAE,QAAQ,MAAM;GAGvC,QAAQ,QAAS,aAAa,OAAO,aAAa,IAAI,SAAU;GAEhE,kBAAA,WAAW,YAAY;GACvB,IAAI,CAAC,sBAAA,qBAAqB,QAAQ,OAAO,GACvC,yBAAA,OAAO,KACL;IAAE,SAAS,QAAQ;IAAS,aAAA;GAAsC,GAClE,+IACF;GAEF,yBAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,GAAG,wBAAwB;GAIlE,sBAAA,sBAAsB,MAHE,uBAAA,UAAU,cAAc,EAAE,WAAW,KAAK,OAAiB,CAAC,IAAA,GAAA,kBAAA,iBAAA,CACpE,KAAK,UAAqB,aAAa,QACjB,yBAAA,MACL,GAAM,SAAS,UAAU;EAC5D,SAAS,KAAU;GACjB,QAAQ,MAAM,2BAA2B,mBAAmB,IAAI,IAAI,OAAO;GAE3E,IAAI,OAAO,yBAAA,QAAQ,QAAQ,UAAU,YACnC,yBAAA,OAAO,MACL;IAAE,MAAM;IAAyB;GAAI,GACrC,kDACF;QAEA,QAAQ,MAAM,2BAA2B,mBAAmB,IAAI,CAAC,IAAI,SAAS;GAEhF,QAAQ,KAAK,CAAC;EAChB;CACF;AACF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { logger } from "../../logger/index.mjs";
|
|
2
|
+
import { initLogger, parseConfigFile } from "../../utils.mjs";
|
|
3
|
+
import { listenDefaultCallback } from "../../bootstrap.mjs";
|
|
4
|
+
import { runServer } from "../../run-server.mjs";
|
|
5
|
+
import { isVersionRecommended } from "../utils.mjs";
|
|
6
|
+
import { findConfigFile, getListenAddress } from "@verdaccio/config";
|
|
7
|
+
import Path from "path";
|
|
8
|
+
import { Command, Option } from "clipanion";
|
|
9
|
+
//#region src/lib/cli/commands/init.ts
|
|
10
|
+
var pkgVersion = "6.9.1";
|
|
11
|
+
var pkgName = "verdaccio";
|
|
12
|
+
var DEFAULT_PROCESS_NAME = "verdaccio";
|
|
13
|
+
var InitCommand = class extends Command {
|
|
14
|
+
static paths = [Command.Default];
|
|
15
|
+
listen = Option.String("-l,--listen", { description: "host:port number to listen on (default: localhost:4873)" });
|
|
16
|
+
static usage = Command.Usage({
|
|
17
|
+
description: `launch the server`,
|
|
18
|
+
details: `
|
|
19
|
+
This start the registry in the default port.
|
|
20
|
+
|
|
21
|
+
When used without arguments, it:
|
|
22
|
+
|
|
23
|
+
- bootstrap the server at the port \`4873\`
|
|
24
|
+
|
|
25
|
+
The optional arguments are:
|
|
26
|
+
|
|
27
|
+
- \`--listen\` to switch the default server port,
|
|
28
|
+
- \`--config\` to define a different configuration path location,
|
|
29
|
+
|
|
30
|
+
`,
|
|
31
|
+
examples: [
|
|
32
|
+
[`Runs the server with the default configuration`, `verdaccio`],
|
|
33
|
+
[`Runs the server in the port 5000`, `verdaccio --listen 5000`],
|
|
34
|
+
[`Runs the server by using a different absolute location of the configuration file`, `verdaccio --config /home/user/verdaccio/config.yaml`]
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
config = Option.String("-c,--config", { description: "use this configuration file (default: ./config.yaml)" });
|
|
38
|
+
async execute() {
|
|
39
|
+
let configPathLocation;
|
|
40
|
+
try {
|
|
41
|
+
configPathLocation = findConfigFile(this.config);
|
|
42
|
+
const configParsed = parseConfigFile(configPathLocation);
|
|
43
|
+
if (!configParsed.self_path) {
|
|
44
|
+
configParsed.self_path = Path.resolve(configPathLocation);
|
|
45
|
+
configParsed.configPath = configParsed.self_path;
|
|
46
|
+
}
|
|
47
|
+
if (!configParsed.https) configParsed.https = { enable: false };
|
|
48
|
+
process.title = configParsed.web && configParsed.web.title || "verdaccio";
|
|
49
|
+
initLogger(configParsed);
|
|
50
|
+
if (!isVersionRecommended(process.version)) logger.warn({
|
|
51
|
+
current: process.version,
|
|
52
|
+
recommended: "24"
|
|
53
|
+
}, "you are using Node.js @{current}, Verdaccio recommends Node.js v@{recommended} or higher, please consider upgrading your Node.js distribution");
|
|
54
|
+
logger.info({ file: configPathLocation }, "config file - @{file}");
|
|
55
|
+
listenDefaultCallback(await runServer(configParsed, { listenArg: this.listen }), getListenAddress(this.listen ?? configParsed.listen, logger), pkgName, pkgVersion);
|
|
56
|
+
} catch (err) {
|
|
57
|
+
console.error(`cannot open config file ${configPathLocation}: ${err.stack}`);
|
|
58
|
+
if (typeof logger?.logger?.fatal === "function") logger.fatal({
|
|
59
|
+
file: configPathLocation,
|
|
60
|
+
err
|
|
61
|
+
}, "cannot open config file @{file}: @{!err.message}");
|
|
62
|
+
else console.error(`cannot open config file ${configPathLocation}: ${!err.message}`);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { DEFAULT_PROCESS_NAME, InitCommand };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=init.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.mjs","names":[],"sources":["../../../../src/lib/cli/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\nimport path from 'path';\n\nimport { findConfigFile, getListenAddress } from '@verdaccio/config';\n\nimport { listenDefaultCallback } from '../../bootstrap';\nimport { logger } from '../../logger';\nimport { runServer } from '../../run-server';\nimport { initLogger, parseConfigFile } from '../../utils';\nimport { RECOMMENDED_NODE_VERSION, isVersionRecommended } from '../utils';\n\nconst pkgVersion = process.env.PACKAGE_VERSION || 'dev';\nconst pkgName = 'verdaccio';\n\nexport const DEFAULT_PROCESS_NAME: string = 'verdaccio';\n\nexport class InitCommand extends Command {\n static paths = [Command.Default];\n\n listen = Option.String('-l,--listen', {\n description: 'host:port number to listen on (default: localhost:4873)',\n });\n\n static usage = Command.Usage({\n description: `launch the server`,\n details: `\n This start the registry in the default port.\n\n When used without arguments, it:\n\n - bootstrap the server at the port \\`4873\\`\n\n The optional arguments are:\n\n - \\`--listen\\` to switch the default server port,\n - \\`--config\\` to define a different configuration path location,\n\n `,\n examples: [\n [`Runs the server with the default configuration`, `verdaccio`],\n [`Runs the server in the port 5000`, `verdaccio --listen 5000`],\n [\n `Runs the server by using a different absolute location of the configuration file`,\n `verdaccio --config /home/user/verdaccio/config.yaml`,\n ],\n ],\n });\n\n config = Option.String('-c,--config', {\n description: 'use this configuration file (default: ./config.yaml)',\n });\n\n async execute() {\n let configPathLocation;\n try {\n configPathLocation = findConfigFile(this.config as string);\n const configParsed: ReturnType<any> = parseConfigFile(configPathLocation);\n if (!configParsed.self_path) {\n configParsed.self_path = path.resolve(configPathLocation);\n // compatibility with 6.x plugins\n configParsed.configPath = configParsed.self_path;\n }\n if (!configParsed.https) {\n configParsed.https = { enable: false };\n }\n\n process.title = (configParsed.web && configParsed.web.title) || 'verdaccio';\n\n initLogger(configParsed);\n if (!isVersionRecommended(process.version)) {\n logger.warn(\n { current: process.version, recommended: RECOMMENDED_NODE_VERSION },\n 'you are using Node.js @{current}, Verdaccio recommends Node.js v@{recommended} or higher, please consider upgrading your Node.js distribution'\n );\n }\n logger.info({ file: configPathLocation }, 'config file - @{file}');\n const webServer = await runServer(configParsed, { listenArg: this.listen as string });\n const listen = (this.listen as string) ?? configParsed.listen;\n const addr = getListenAddress(listen, logger);\n listenDefaultCallback(webServer, addr, pkgName, pkgVersion);\n } catch (err: any) {\n console.error(`cannot open config file ${configPathLocation}: ${err.stack}`);\n // @ts-expect-error\n if (typeof logger?.logger?.fatal === 'function') {\n logger.fatal(\n { file: configPathLocation, err: err },\n 'cannot open config file @{file}: @{!err.message}'\n );\n } else {\n console.error(`cannot open config file ${configPathLocation}: ${!err.message}`);\n }\n process.exit(1);\n }\n }\n}\n"],"mappings":";;;;;;;;;AAWA,IAAM,aAAA;AACN,IAAM,UAAU;AAEhB,IAAa,uBAA+B;AAE5C,IAAa,cAAb,cAAiC,QAAQ;CACvC,OAAO,QAAQ,CAAC,QAAQ,OAAO;CAE/B,SAAS,OAAO,OAAO,eAAe,EACpC,aAAa,0DACf,CAAC;CAED,OAAO,QAAQ,QAAQ,MAAM;EAC3B,aAAa;EACb,SAAS;;;;;;;;;;;;;EAaT,UAAU;GACR,CAAC,kDAAkD,WAAW;GAC9D,CAAC,oCAAoC,yBAAyB;GAC9D,CACE,oFACA,qDACF;EACF;CACF,CAAC;CAED,SAAS,OAAO,OAAO,eAAe,EACpC,aAAa,uDACf,CAAC;CAED,MAAM,UAAU;EACd,IAAI;EACJ,IAAI;GACF,qBAAqB,eAAe,KAAK,MAAgB;GACzD,MAAM,eAAgC,gBAAgB,kBAAkB;GACxE,IAAI,CAAC,aAAa,WAAW;IAC3B,aAAa,YAAY,KAAK,QAAQ,kBAAkB;IAExD,aAAa,aAAa,aAAa;GACzC;GACA,IAAI,CAAC,aAAa,OAChB,aAAa,QAAQ,EAAE,QAAQ,MAAM;GAGvC,QAAQ,QAAS,aAAa,OAAO,aAAa,IAAI,SAAU;GAEhE,WAAW,YAAY;GACvB,IAAI,CAAC,qBAAqB,QAAQ,OAAO,GACvC,OAAO,KACL;IAAE,SAAS,QAAQ;IAAS,aAAA;GAAsC,GAClE,+IACF;GAEF,OAAO,KAAK,EAAE,MAAM,mBAAmB,GAAG,wBAAwB;GAIlE,sBAAsB,MAHE,UAAU,cAAc,EAAE,WAAW,KAAK,OAAiB,CAAC,GAEvE,iBADG,KAAK,UAAqB,aAAa,QACjB,MACL,GAAM,SAAS,UAAU;EAC5D,SAAS,KAAU;GACjB,QAAQ,MAAM,2BAA2B,mBAAmB,IAAI,IAAI,OAAO;GAE3E,IAAI,OAAO,QAAQ,QAAQ,UAAU,YACnC,OAAO,MACL;IAAE,MAAM;IAAyB;GAAI,GACrC,kDACF;QAEA,QAAQ,MAAM,2BAA2B,mBAAmB,IAAI,CAAC,IAAI,SAAS;GAEhF,QAAQ,KAAK,CAAC;EAChB;CACF;AACF"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
process.exit(0);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let clipanion = require("clipanion");
|
|
3
|
+
//#region src/lib/cli/commands/version.ts
|
|
4
|
+
var pkgVersion = "6.9.1";
|
|
5
|
+
var VersionCommand = class extends clipanion.Command {
|
|
6
|
+
static paths = [[`--version`], [`-v`]];
|
|
7
|
+
async execute() {
|
|
8
|
+
this.context.stdout.write(`v${pkgVersion}\n`);
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
16
13
|
exports.VersionCommand = VersionCommand;
|
|
17
|
-
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../../../../src/lib/cli/commands/version.ts"],"sourcesContent":["import { Command } from 'clipanion';\n\nconst pkgVersion = process.env.PACKAGE_VERSION || 'dev';\n\nexport class VersionCommand extends Command {\n static paths = [[`--version`], [`-v`]];\n\n async execute() {\n this.context.stdout.write(`v${pkgVersion}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;AAEA,IAAM,aAAA;AAEN,IAAa,iBAAb,cAAoC,UAAA,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC;CAErC,MAAM,UAAU;EACd,KAAK,QAAQ,OAAO,MAAM,IAAI,WAAW,GAAG;EAC5C,QAAQ,KAAK,CAAC;CAChB;AACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command } from "clipanion";
|
|
2
|
+
//#region src/lib/cli/commands/version.ts
|
|
3
|
+
var pkgVersion = "6.9.1";
|
|
4
|
+
var VersionCommand = class extends Command {
|
|
5
|
+
static paths = [[`--version`], [`-v`]];
|
|
6
|
+
async execute() {
|
|
7
|
+
this.context.stdout.write(`v${pkgVersion}\n`);
|
|
8
|
+
process.exit(0);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { VersionCommand };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=version.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.mjs","names":[],"sources":["../../../../src/lib/cli/commands/version.ts"],"sourcesContent":["import { Command } from 'clipanion';\n\nconst pkgVersion = process.env.PACKAGE_VERSION || 'dev';\n\nexport class VersionCommand extends Command {\n static paths = [[`--version`], [`-v`]];\n\n async execute() {\n this.context.stdout.write(`v${pkgVersion}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;AAEA,IAAM,aAAA;AAEN,IAAa,iBAAb,cAAoC,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC;CAErC,MAAM,UAAU;EACd,KAAK,QAAQ,OAAO,MAAM,IAAI,WAAW,GAAG;EAC5C,QAAQ,KAAK,CAAC;CAChB;AACF"}
|
package/build/lib/cli/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const MIN_NODE_VERSION = "
|
|
2
|
-
export declare const RECOMMENDED_NODE_VERSION = "
|
|
1
|
+
export declare const MIN_NODE_VERSION = "22";
|
|
2
|
+
export declare const RECOMMENDED_NODE_VERSION = "24";
|
|
3
3
|
export declare function isVersionValid(version: any): boolean;
|
|
4
4
|
export declare function isVersionRecommended(version: any): boolean;
|
package/build/lib/cli/utils.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.isVersionValid = isVersionValid;
|
|
9
|
-
var _semver = _interopRequireDefault(require("semver"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
const MIN_NODE_VERSION = exports.MIN_NODE_VERSION = '18';
|
|
12
|
-
const RECOMMENDED_NODE_VERSION = exports.RECOMMENDED_NODE_VERSION = '22';
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
let semver = require("semver");
|
|
4
|
+
semver = require_runtime.__toESM(semver);
|
|
5
|
+
//#region src/lib/cli/utils.ts
|
|
6
|
+
var MIN_NODE_VERSION = "22";
|
|
7
|
+
var RECOMMENDED_NODE_VERSION = "24";
|
|
13
8
|
function isVersionValid(version) {
|
|
14
|
-
|
|
9
|
+
return semver.default.satisfies(version, `>=22`);
|
|
15
10
|
}
|
|
16
11
|
function isVersionRecommended(version) {
|
|
17
|
-
|
|
12
|
+
return semver.default.satisfies(version, `>=24`);
|
|
18
13
|
}
|
|
19
|
-
//#
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.MIN_NODE_VERSION = MIN_NODE_VERSION;
|
|
16
|
+
exports.RECOMMENDED_NODE_VERSION = RECOMMENDED_NODE_VERSION;
|
|
17
|
+
exports.isVersionRecommended = isVersionRecommended;
|
|
18
|
+
exports.isVersionValid = isVersionValid;
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/lib/cli/utils.ts"],"sourcesContent":["import semver from 'semver';\n\nexport const MIN_NODE_VERSION = '22';\nexport const RECOMMENDED_NODE_VERSION = '24';\n\nexport function isVersionValid(version) {\n return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);\n}\n\nexport function isVersionRecommended(version) {\n return semver.satisfies(version, `>=${RECOMMENDED_NODE_VERSION}`);\n}\n"],"mappings":";;;;;AAEA,IAAa,mBAAmB;AAChC,IAAa,2BAA2B;AAExC,SAAgB,eAAe,SAAS;CACtC,OAAO,OAAA,QAAO,UAAU,SAAS,MAAuB;AAC1D;AAEA,SAAgB,qBAAqB,SAAS;CAC5C,OAAO,OAAA,QAAO,UAAU,SAAS,MAA+B;AAClE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import semver from "semver";
|
|
2
|
+
//#region src/lib/cli/utils.ts
|
|
3
|
+
var MIN_NODE_VERSION = "22";
|
|
4
|
+
var RECOMMENDED_NODE_VERSION = "24";
|
|
5
|
+
function isVersionValid(version) {
|
|
6
|
+
return semver.satisfies(version, `>=22`);
|
|
7
|
+
}
|
|
8
|
+
function isVersionRecommended(version) {
|
|
9
|
+
return semver.satisfies(version, `>=24`);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { MIN_NODE_VERSION, RECOMMENDED_NODE_VERSION, isVersionRecommended, isVersionValid };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../src/lib/cli/utils.ts"],"sourcesContent":["import semver from 'semver';\n\nexport const MIN_NODE_VERSION = '22';\nexport const RECOMMENDED_NODE_VERSION = '24';\n\nexport function isVersionValid(version) {\n return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);\n}\n\nexport function isVersionRecommended(version) {\n return semver.satisfies(version, `>=${RECOMMENDED_NODE_VERSION}`);\n}\n"],"mappings":";;AAEA,IAAa,mBAAmB;AAChC,IAAa,2BAA2B;AAExC,SAAgB,eAAe,SAAS;CACtC,OAAO,OAAO,UAAU,SAAS,MAAuB;AAC1D;AAEA,SAAgB,qBAAqB,SAAS;CAC5C,OAAO,OAAO,UAAU,SAAS,MAA+B;AAClE"}
|
package/build/lib/cli.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
require("./cli/cli");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
process.on('uncaughtException', err => {
|
|
11
|
-
_logger.logger?.fatal?.({
|
|
12
|
-
err
|
|
13
|
-
}, 'uncaught exception, please report this\n@{err.stack}');
|
|
14
|
-
process.exit(255);
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_lib_logger_index = require("./logger/index.js");
|
|
4
|
+
require("./cli/cli.js");
|
|
5
|
+
//#region src/lib/cli.ts
|
|
6
|
+
if (typeof process.getuid === "function" && process.getuid() === 0) process.emitWarning(`Verdaccio doesn't need superuser privileges. Don't run it under root.`);
|
|
7
|
+
process.on("uncaughtException", (err) => {
|
|
8
|
+
require_lib_logger_index.logger?.fatal?.({ err }, "uncaught exception, please report this\n@{err.stack}");
|
|
9
|
+
process.exit(255);
|
|
15
10
|
});
|
|
16
|
-
//#
|
|
11
|
+
//#endregion
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","names":[],"sources":["../../src/lib/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport './cli/cli';\nimport { logger } from './logger';\n\n// ESM-friendly version of root-check\nif (typeof process.getuid === 'function' && process.getuid() === 0) {\n process.emitWarning(`Verdaccio doesn't need superuser privileges. Don't run it under root.`);\n}\n\nprocess.on('uncaughtException', (err: unknown) => {\n logger?.fatal?.({ err }, 'uncaught exception, please report this\\n@{err.stack}');\n process.exit(255);\n});\n"],"mappings":";;;;;AAKA,IAAI,OAAO,QAAQ,WAAW,cAAc,QAAQ,OAAO,MAAM,GAC/D,QAAQ,YAAY,uEAAuE;AAG7F,QAAQ,GAAG,sBAAsB,QAAiB;CAChD,yBAAA,QAAQ,QAAQ,EAAE,IAAI,GAAG,sDAAsD;CAC/E,QAAQ,KAAK,GAAG;AAClB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { logger } from "./logger/index.mjs";
|
|
3
|
+
import "./cli/cli.mjs";
|
|
4
|
+
//#region src/lib/cli.ts
|
|
5
|
+
if (typeof process.getuid === "function" && process.getuid() === 0) process.emitWarning(`Verdaccio doesn't need superuser privileges. Don't run it under root.`);
|
|
6
|
+
process.on("uncaughtException", (err) => {
|
|
7
|
+
logger?.fatal?.({ err }, "uncaught exception, please report this\n@{err.stack}");
|
|
8
|
+
process.exit(255);
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=cli.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":[],"sources":["../../src/lib/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport './cli/cli';\nimport { logger } from './logger';\n\n// ESM-friendly version of root-check\nif (typeof process.getuid === 'function' && process.getuid() === 0) {\n process.emitWarning(`Verdaccio doesn't need superuser privileges. Don't run it under root.`);\n}\n\nprocess.on('uncaughtException', (err: unknown) => {\n logger?.fatal?.({ err }, 'uncaught exception, please report this\\n@{err.stack}');\n process.exit(255);\n});\n"],"mappings":";;;;AAKA,IAAI,OAAO,QAAQ,WAAW,cAAc,QAAQ,OAAO,MAAM,GAC/D,QAAQ,YAAY,uEAAuE;AAG7F,QAAQ,GAAG,sBAAsB,QAAiB;CAChD,QAAQ,QAAQ,EAAE,IAAI,GAAG,sDAAsD;CAC/E,QAAQ,KAAK,GAAG;AAClB,CAAC"}
|
package/build/lib/config.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
4
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfY29uZmlnIiwicmVxdWlyZSIsIl91dGlscyIsIkNvbmZpZyIsIkNvbmZpZ0NvcmUiLCJjb25zdHJ1Y3RvciIsImNvbmZpZyIsImNvbmZpZ1BhdGgiLCJzZWxmX3BhdGgiLCJmb3JjZU1pZ3JhdGVUb1NlY3VyZUxlZ2FjeVNpZ25hdHVyZSIsImdldE1hdGNoZWRQYWNrYWdlc1NwZWMiLCJwa2dOYW1lIiwicGFja2FnZXMiLCJfZGVmYXVsdCIsImV4cG9ydHMiLCJkZWZhdWx0Il0sInNvdXJjZXMiOlsiLi4vLi4vc3JjL2xpYi9jb25maWcudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29uZmlnIGFzIENvbmZpZ0NvcmUgfSBmcm9tICdAdmVyZGFjY2lvL2NvbmZpZyc7XG5pbXBvcnQgeyBnZXRNYXRjaGVkUGFja2FnZXNTcGVjIH0gZnJvbSAnQHZlcmRhY2Npby91dGlscyc7XG5cbmNsYXNzIENvbmZpZyBleHRlbmRzIENvbmZpZ0NvcmUge1xuICBwdWJsaWMgY29uc3RydWN0b3IoY29uZmlnOiBhbnkpIHtcbiAgICBjb25maWcuY29uZmlnUGF0aCA9IGNvbmZpZy5zZWxmX3BhdGg7XG4gICAgc3VwZXIoY29uZmlnLCB7IGZvcmNlTWlncmF0ZVRvU2VjdXJlTGVnYWN5U2lnbmF0dXJlOiBmYWxzZSB9KTtcbiAgICAvLyBUZW1wb3Jhcnkgc29sdXRpb24gZm9yIHBsdWdpbnMgdGhhdCBkZXBlbmRzIG9uIGxlZ2FjeSBjb25maWd1cmF0aW9uIGZpbGVzXG4gICAgdGhpcy5nZXRNYXRjaGVkUGFja2FnZXNTcGVjID0gKHBrZ05hbWUpID0+IHtcbiAgICAgIHJldHVybiBnZXRNYXRjaGVkUGFja2FnZXNTcGVjKHBrZ05hbWUsIHRoaXMucGFja2FnZXMpO1xuICAgIH07XG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29uZmlnO1xuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxJQUFBQSxPQUFBLEdBQUFDLE9BQUE7QUFDQSxJQUFBQyxNQUFBLEdBQUFELE9BQUE7QUFFQSxNQUFNRSxNQUFNLFNBQVNDLGNBQVUsQ0FBQztFQUN2QkMsV0FBV0EsQ0FBQ0MsTUFBVyxFQUFFO0lBQzlCQSxNQUFNLENBQUNDLFVBQVUsR0FBR0QsTUFBTSxDQUFDRSxTQUFTO0lBQ3BDLEtBQUssQ0FBQ0YsTUFBTSxFQUFFO01BQUVHLG1DQUFtQyxFQUFFO0lBQU0sQ0FBQyxDQUFDO0lBQzdEO0lBQ0EsSUFBSSxDQUFDQyxzQkFBc0IsR0FBSUMsT0FBTyxJQUFLO01BQ3pDLE9BQU8sSUFBQUQsNkJBQXNCLEVBQUNDLE9BQU8sRUFBRSxJQUFJLENBQUNDLFFBQVEsQ0FBQztJQUN2RCxDQUFDO0VBQ0g7QUFDRjtBQUFDLElBQUFDLFFBQUEsR0FBQUMsT0FBQSxDQUFBQyxPQUFBLEdBRWNaLE1BQU0iLCJpZ25vcmVMaXN0IjpbXX0=
|
|
5
|
+
let _verdaccio_utils = require("@verdaccio/utils");
|
|
6
|
+
let _verdaccio_config = require("@verdaccio/config");
|
|
7
|
+
//#region src/lib/config.ts
|
|
8
|
+
var Config = class extends _verdaccio_config.Config {
|
|
9
|
+
constructor(config) {
|
|
10
|
+
config.configPath = config.self_path;
|
|
11
|
+
super(config, { forceMigrateToSecureLegacySignature: false });
|
|
12
|
+
this.getMatchedPackagesSpec = (pkgName) => {
|
|
13
|
+
return (0, _verdaccio_utils.getMatchedPackagesSpec)(pkgName, this.packages);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.default = Config;
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","names":[],"sources":["../../src/lib/config.ts"],"sourcesContent":["import { Config as ConfigCore } from '@verdaccio/config';\nimport { getMatchedPackagesSpec } from '@verdaccio/utils';\n\nclass Config extends ConfigCore {\n public constructor(config: any) {\n config.configPath = config.self_path;\n super(config, { forceMigrateToSecureLegacySignature: false });\n // Temporary solution for plugins that depends on legacy configuration files\n this.getMatchedPackagesSpec = (pkgName) => {\n return getMatchedPackagesSpec(pkgName, this.packages);\n };\n }\n}\n\nexport default Config;\n"],"mappings":";;;;;;;AAGA,IAAM,SAAN,cAAqB,kBAAA,OAAW;CAC9B,YAAmB,QAAa;EAC9B,OAAO,aAAa,OAAO;EAC3B,MAAM,QAAQ,EAAE,qCAAqC,MAAM,CAAC;EAE5D,KAAK,0BAA0B,YAAY;GACzC,QAAA,GAAA,iBAAA,uBAAA,CAA8B,SAAS,KAAK,QAAQ;EACtD;CACF;AACF"}
|