@verdaccio/cli 9.0.0-next-9.7 → 9.0.0-next-9.9
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/cli.js +1 -1
- package/build/cli.js.map +1 -1
- package/build/cli.mjs +1 -1
- package/build/cli.mjs.map +1 -1
- package/build/commands/init.js +6 -3
- package/build/commands/init.js.map +1 -1
- package/build/commands/init.mjs +4 -2
- package/build/commands/init.mjs.map +1 -1
- package/build/commands/version.js +2 -1
- package/build/commands/version.js.map +1 -1
- package/build/commands/version.mjs +2 -1
- package/build/commands/version.mjs.map +1 -1
- package/package.json +6 -5
package/build/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ var [node, app, ...args] = process.argv;
|
|
|
13
13
|
var cli = new clipanion.Cli({
|
|
14
14
|
binaryLabel: `verdaccio`,
|
|
15
15
|
binaryName: `${node} ${app}`,
|
|
16
|
-
binaryVersion: _verdaccio_core.pkgUtils.getPackageJson(__dirname, "..").version
|
|
16
|
+
binaryVersion: _verdaccio_core.pkgUtils.getPackageJson(typeof __dirname !== "undefined" ? __dirname : {}.dirname, "..").version
|
|
17
17
|
});
|
|
18
18
|
cli.register(require_info.InfoCommand);
|
|
19
19
|
cli.register(require_init.InitCommand);
|
package/build/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { Cli } from 'clipanion';\n\nimport { pkgUtils, warningUtils } from '@verdaccio/core';\n\nimport { InfoCommand } from './commands/info';\nimport { InitCommand } from './commands/init';\nimport { VersionCommand } from './commands/version';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\nif (process.getuid && process.getuid() === 0) {\n warningUtils.emit(warningUtils.Codes.VERWAR001);\n}\n\nif (!isVersionValid(process.version)) {\n throw new Error(\n `Verdaccio requires at least Node.js v${MIN_NODE_VERSION} or higher and you have installed ${process.version}, \n please upgrade your Node.js distribution`\n );\n}\n\nconst [node, app, ...args] = process.argv;\n\nconst cli = new Cli({\n binaryLabel: `verdaccio`,\n binaryName: `${node} ${app}`,\n binaryVersion: pkgUtils.getPackageJson(__dirname
|
|
1
|
+
{"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { Cli } from 'clipanion';\n\nimport { pkgUtils, warningUtils } from '@verdaccio/core';\n\nimport { InfoCommand } from './commands/info';\nimport { InitCommand } from './commands/init';\nimport { VersionCommand } from './commands/version';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\nif (process.getuid && process.getuid() === 0) {\n warningUtils.emit(warningUtils.Codes.VERWAR001);\n}\n\nif (!isVersionValid(process.version)) {\n throw new Error(\n `Verdaccio requires at least Node.js v${MIN_NODE_VERSION} or higher and you have installed ${process.version}, \n please upgrade your Node.js distribution`\n );\n}\n\nconst [node, app, ...args] = process.argv;\n\nconst cli = new Cli({\n binaryLabel: `verdaccio`,\n binaryName: `${node} ${app}`,\n binaryVersion: pkgUtils.getPackageJson(\n typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname,\n '..'\n ).version as string,\n});\n\ncli.register(InfoCommand);\ncli.register(InitCommand);\ncli.register(VersionCommand);\ncli.runExit(args, Cli.defaultContext);\n\nprocess.on('uncaughtException', function (err) {\n console.error(\n `uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \\n${err.stack}`\n );\n process.exit(1);\n});\n"],"mappings":";;;;;;;;AASA,IAAI,QAAQ,UAAU,QAAQ,QAAQ,KAAK,EACzC,iBAAA,aAAa,KAAK,gBAAA,aAAa,MAAM,UAAU;AAGjD,IAAI,CAAC,cAAA,eAAe,QAAQ,QAAQ,CAClC,OAAM,IAAI,MACR,wCAAwC,cAAA,iBAAiB,oCAAoC,QAAQ,QAAQ;8CAE9G;AAGH,IAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,QAAQ;AAErC,IAAM,MAAM,IAAI,UAAA,IAAI;CAClB,aAAa;CACb,YAAY,GAAG,KAAK,GAAG;CACvB,eAAe,gBAAA,SAAS,eACtB,OAAO,cAAc,cAAc,YAAA,EAAA,CAAwB,SAC3D,KACD,CAAC;CACH,CAAC;AAEF,IAAI,SAAS,aAAA,YAAY;AACzB,IAAI,SAAS,aAAA,YAAY;AACzB,IAAI,SAAS,gBAAA,eAAe;AAC5B,IAAI,QAAQ,MAAM,UAAA,IAAI,eAAe;AAErC,QAAQ,GAAG,qBAAqB,SAAU,KAAK;AAC7C,SAAQ,MACN,6FAA6F,IAAI,QAClG;AACD,SAAQ,KAAK,EAAE;EACf"}
|
package/build/cli.mjs
CHANGED
|
@@ -12,7 +12,7 @@ var [node, app, ...args] = process.argv;
|
|
|
12
12
|
var cli = new Cli({
|
|
13
13
|
binaryLabel: `verdaccio`,
|
|
14
14
|
binaryName: `${node} ${app}`,
|
|
15
|
-
binaryVersion: pkgUtils.getPackageJson(__dirname, "..").version
|
|
15
|
+
binaryVersion: pkgUtils.getPackageJson(typeof __dirname !== "undefined" ? __dirname : import.meta.dirname, "..").version
|
|
16
16
|
});
|
|
17
17
|
cli.register(InfoCommand);
|
|
18
18
|
cli.register(InitCommand);
|
package/build/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { Cli } from 'clipanion';\n\nimport { pkgUtils, warningUtils } from '@verdaccio/core';\n\nimport { InfoCommand } from './commands/info';\nimport { InitCommand } from './commands/init';\nimport { VersionCommand } from './commands/version';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\nif (process.getuid && process.getuid() === 0) {\n warningUtils.emit(warningUtils.Codes.VERWAR001);\n}\n\nif (!isVersionValid(process.version)) {\n throw new Error(\n `Verdaccio requires at least Node.js v${MIN_NODE_VERSION} or higher and you have installed ${process.version}, \n please upgrade your Node.js distribution`\n );\n}\n\nconst [node, app, ...args] = process.argv;\n\nconst cli = new Cli({\n binaryLabel: `verdaccio`,\n binaryName: `${node} ${app}`,\n binaryVersion: pkgUtils.getPackageJson(__dirname
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { Cli } from 'clipanion';\n\nimport { pkgUtils, warningUtils } from '@verdaccio/core';\n\nimport { InfoCommand } from './commands/info';\nimport { InitCommand } from './commands/init';\nimport { VersionCommand } from './commands/version';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\nif (process.getuid && process.getuid() === 0) {\n warningUtils.emit(warningUtils.Codes.VERWAR001);\n}\n\nif (!isVersionValid(process.version)) {\n throw new Error(\n `Verdaccio requires at least Node.js v${MIN_NODE_VERSION} or higher and you have installed ${process.version}, \n please upgrade your Node.js distribution`\n );\n}\n\nconst [node, app, ...args] = process.argv;\n\nconst cli = new Cli({\n binaryLabel: `verdaccio`,\n binaryName: `${node} ${app}`,\n binaryVersion: pkgUtils.getPackageJson(\n typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname,\n '..'\n ).version as string,\n});\n\ncli.register(InfoCommand);\ncli.register(InitCommand);\ncli.register(VersionCommand);\ncli.runExit(args, Cli.defaultContext);\n\nprocess.on('uncaughtException', function (err) {\n console.error(\n `uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \\n${err.stack}`\n );\n process.exit(1);\n});\n"],"mappings":";;;;;;;AASA,IAAI,QAAQ,UAAU,QAAQ,QAAQ,KAAK,EACzC,cAAa,KAAK,aAAa,MAAM,UAAU;AAGjD,IAAI,CAAC,eAAe,QAAQ,QAAQ,CAClC,OAAM,IAAI,MACR,wCAAwC,iBAAiB,oCAAoC,QAAQ,QAAQ;8CAE9G;AAGH,IAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,QAAQ;AAErC,IAAM,MAAM,IAAI,IAAI;CAClB,aAAa;CACb,YAAY,GAAG,KAAK,GAAG;CACvB,eAAe,SAAS,eACtB,OAAO,cAAc,cAAc,YAAY,OAAO,KAAK,SAC3D,KACD,CAAC;CACH,CAAC;AAEF,IAAI,SAAS,YAAY;AACzB,IAAI,SAAS,YAAY;AACzB,IAAI,SAAS,eAAe;AAC5B,IAAI,QAAQ,MAAM,IAAI,eAAe;AAErC,QAAQ,GAAG,qBAAqB,SAAU,KAAK;AAC7C,SAAQ,MACN,6FAA6F,IAAI,QAClG;AACD,SAAQ,KAAK,EAAE;EACf"}
|
package/build/commands/init.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.js");
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.js");
|
|
2
2
|
let clipanion = require("clipanion");
|
|
3
3
|
let _verdaccio_core = require("@verdaccio/core");
|
|
4
4
|
let _verdaccio_config = require("@verdaccio/config");
|
|
5
5
|
let _verdaccio_logger = require("@verdaccio/logger");
|
|
6
6
|
let _verdaccio_node_api = require("@verdaccio/node-api");
|
|
7
|
+
let _verdaccio_server = require("@verdaccio/server");
|
|
8
|
+
_verdaccio_server = require_runtime.__toESM(_verdaccio_server);
|
|
7
9
|
var InitCommand = class extends clipanion.Command {
|
|
8
10
|
static paths = [clipanion.Command.Default];
|
|
9
11
|
port = clipanion.Option.String("-l,-p,--listen,--port", { description: "host:port number to listen on (default: localhost:4873)" });
|
|
@@ -44,8 +46,9 @@ var InitCommand = class extends clipanion.Command {
|
|
|
44
46
|
_verdaccio_logger.logger.info({ file: configPathLocation }, "using config file: @{file}");
|
|
45
47
|
const { web } = configParsed;
|
|
46
48
|
process.title = web?.title || "verdaccio";
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
+
const currentDir = typeof __dirname !== "undefined" ? __dirname : {}.dirname;
|
|
50
|
+
const { version, name } = _verdaccio_core.pkgUtils.getPackageJson(currentDir, "../..");
|
|
51
|
+
await (0, _verdaccio_node_api.initServer)(configParsed, this.port, version, name, _verdaccio_server.default);
|
|
49
52
|
const logLevel = configParsed.log?.level || "default";
|
|
50
53
|
_verdaccio_logger.logger.info({ logLevel }, "log level: @{logLevel}");
|
|
51
54
|
_verdaccio_logger.logger.info("server started");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","names":[],"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { pkgUtils, warningUtils } from '@verdaccio/core';\nimport { logger, setup } from '@verdaccio/logger';\nimport { initServer } from '@verdaccio/node-api';\nimport type { ConfigYaml, LoggerConfigItem } from '@verdaccio/types';\n\nexport const DEFAULT_PROCESS_NAME: string = 'verdaccio';\n\nexport class InitCommand extends Command {\n public static paths = [Command.Default];\n\n private port = Option.String('-l,-p,--listen,--port', {\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 - \\`-l | --listen | -p | --port\\` to switch the default server port,\n - \\`-c | --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 private config = Option.String('-c,--config', {\n description: 'use this configuration file (default: ./config.yaml)',\n });\n\n private async initLogger(logConfig: ConfigYaml) {\n if (logConfig.logs) {\n logConfig.log = logConfig.logs;\n warningUtils.emit(warningUtils.Codes.VERWAR002);\n }\n await setup(logConfig.log as LoggerConfigItem);\n }\n\n public async execute() {\n try {\n const configPathLocation = findConfigFile(this.config as string);\n const configParsed = parseConfigFile(configPathLocation);\n await this.initLogger(configParsed);\n logger.info({ file: configPathLocation }, 'using config file: @{file}');\n const { web } = configParsed;\n\n process.title = web?.title || DEFAULT_PROCESS_NAME;\n\n const { version, name } = pkgUtils.getPackageJson(
|
|
1
|
+
{"version":3,"file":"init.js","names":[],"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { pkgUtils, warningUtils } from '@verdaccio/core';\nimport { logger, setup } from '@verdaccio/logger';\nimport { initServer } from '@verdaccio/node-api';\nimport startServer from '@verdaccio/server';\nimport type { ConfigYaml, LoggerConfigItem } from '@verdaccio/types';\n\nexport const DEFAULT_PROCESS_NAME: string = 'verdaccio';\n\nexport class InitCommand extends Command {\n public static paths = [Command.Default];\n\n private port = Option.String('-l,-p,--listen,--port', {\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 - \\`-l | --listen | -p | --port\\` to switch the default server port,\n - \\`-c | --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 private config = Option.String('-c,--config', {\n description: 'use this configuration file (default: ./config.yaml)',\n });\n\n private async initLogger(logConfig: ConfigYaml) {\n if (logConfig.logs) {\n logConfig.log = logConfig.logs;\n warningUtils.emit(warningUtils.Codes.VERWAR002);\n }\n await setup(logConfig.log as LoggerConfigItem);\n }\n\n public async execute() {\n try {\n const configPathLocation = findConfigFile(this.config as string);\n const configParsed = parseConfigFile(configPathLocation);\n await this.initLogger(configParsed);\n logger.info({ file: configPathLocation }, 'using config file: @{file}');\n const { web } = configParsed;\n\n process.title = web?.title || DEFAULT_PROCESS_NAME;\n\n const currentDir = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname;\n const { version, name } = pkgUtils.getPackageJson(currentDir, '../..');\n\n await initServer(\n configParsed,\n this.port as string,\n version as string,\n name as string,\n startServer\n );\n\n const logLevel = configParsed.log?.level || 'default';\n logger.info({ logLevel }, 'log level: @{logLevel}');\n logger.info('server started');\n } catch (err: any) {\n console.error(err);\n process.exit(1);\n }\n }\n}\n"],"mappings":";;;;;;;;AAWA,IAAa,cAAb,cAAiC,UAAA,QAAQ;CACvC,OAAc,QAAQ,CAAC,UAAA,QAAQ,QAAQ;CAEvC,OAAe,UAAA,OAAO,OAAO,yBAAyB,EACpD,aAAa,2DACd,CAAC;CAEF,OAAO,QAAQ,UAAA,QAAQ,MAAM;EAC3B,aAAa;EACb,SAAS;;;;;;;;;;;;;EAaT,UAAU;GACR,CAAC,kDAAkD,YAAY;GAC/D,CAAC,oCAAoC,0BAA0B;GAC/D,CACE,oFACA,sDACD;GACF;EACF,CAAC;CAEF,SAAiB,UAAA,OAAO,OAAO,eAAe,EAC5C,aAAa,wDACd,CAAC;CAEF,MAAc,WAAW,WAAuB;AAC9C,MAAI,UAAU,MAAM;AAClB,aAAU,MAAM,UAAU;AAC1B,mBAAA,aAAa,KAAK,gBAAA,aAAa,MAAM,UAAU;;AAEjD,SAAA,GAAA,kBAAA,OAAY,UAAU,IAAwB;;CAGhD,MAAa,UAAU;AACrB,MAAI;GACF,MAAM,sBAAA,GAAA,kBAAA,gBAAoC,KAAK,OAAiB;GAChE,MAAM,gBAAA,GAAA,kBAAA,iBAA+B,mBAAmB;AACxD,SAAM,KAAK,WAAW,aAAa;AACnC,qBAAA,OAAO,KAAK,EAAE,MAAM,oBAAoB,EAAE,6BAA6B;GACvE,MAAM,EAAE,QAAQ;AAEhB,WAAQ,QAAQ,KAAK,SAAA;GAErB,MAAM,aAAa,OAAO,cAAc,cAAc,YAAA,EAAA,CAAwB;GAC9E,MAAM,EAAE,SAAS,SAAS,gBAAA,SAAS,eAAe,YAAY,QAAQ;AAEtE,UAAA,GAAA,oBAAA,YACE,cACA,KAAK,MACL,SACA,MACA,kBAAA,QACD;GAED,MAAM,WAAW,aAAa,KAAK,SAAS;AAC5C,qBAAA,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB;AACnD,qBAAA,OAAO,KAAK,iBAAiB;WACtB,KAAU;AACjB,WAAQ,MAAM,IAAI;AAClB,WAAQ,KAAK,EAAE"}
|
package/build/commands/init.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { pkgUtils, warningUtils } from "@verdaccio/core";
|
|
|
3
3
|
import { findConfigFile, parseConfigFile } from "@verdaccio/config";
|
|
4
4
|
import { logger, setup } from "@verdaccio/logger";
|
|
5
5
|
import { initServer } from "@verdaccio/node-api";
|
|
6
|
+
import startServer from "@verdaccio/server";
|
|
6
7
|
var InitCommand = class extends Command {
|
|
7
8
|
static paths = [Command.Default];
|
|
8
9
|
port = Option.String("-l,-p,--listen,--port", { description: "host:port number to listen on (default: localhost:4873)" });
|
|
@@ -43,8 +44,9 @@ var InitCommand = class extends Command {
|
|
|
43
44
|
logger.info({ file: configPathLocation }, "using config file: @{file}");
|
|
44
45
|
const { web } = configParsed;
|
|
45
46
|
process.title = web?.title || "verdaccio";
|
|
46
|
-
const
|
|
47
|
-
|
|
47
|
+
const currentDir = typeof __dirname !== "undefined" ? __dirname : import.meta.dirname;
|
|
48
|
+
const { version, name } = pkgUtils.getPackageJson(currentDir, "../..");
|
|
49
|
+
await initServer(configParsed, this.port, version, name, startServer);
|
|
48
50
|
const logLevel = configParsed.log?.level || "default";
|
|
49
51
|
logger.info({ logLevel }, "log level: @{logLevel}");
|
|
50
52
|
logger.info("server started");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.mjs","names":[],"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { pkgUtils, warningUtils } from '@verdaccio/core';\nimport { logger, setup } from '@verdaccio/logger';\nimport { initServer } from '@verdaccio/node-api';\nimport type { ConfigYaml, LoggerConfigItem } from '@verdaccio/types';\n\nexport const DEFAULT_PROCESS_NAME: string = 'verdaccio';\n\nexport class InitCommand extends Command {\n public static paths = [Command.Default];\n\n private port = Option.String('-l,-p,--listen,--port', {\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 - \\`-l | --listen | -p | --port\\` to switch the default server port,\n - \\`-c | --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 private config = Option.String('-c,--config', {\n description: 'use this configuration file (default: ./config.yaml)',\n });\n\n private async initLogger(logConfig: ConfigYaml) {\n if (logConfig.logs) {\n logConfig.log = logConfig.logs;\n warningUtils.emit(warningUtils.Codes.VERWAR002);\n }\n await setup(logConfig.log as LoggerConfigItem);\n }\n\n public async execute() {\n try {\n const configPathLocation = findConfigFile(this.config as string);\n const configParsed = parseConfigFile(configPathLocation);\n await this.initLogger(configParsed);\n logger.info({ file: configPathLocation }, 'using config file: @{file}');\n const { web } = configParsed;\n\n process.title = web?.title || DEFAULT_PROCESS_NAME;\n\n const { version, name } = pkgUtils.getPackageJson(
|
|
1
|
+
{"version":3,"file":"init.mjs","names":[],"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { pkgUtils, warningUtils } from '@verdaccio/core';\nimport { logger, setup } from '@verdaccio/logger';\nimport { initServer } from '@verdaccio/node-api';\nimport startServer from '@verdaccio/server';\nimport type { ConfigYaml, LoggerConfigItem } from '@verdaccio/types';\n\nexport const DEFAULT_PROCESS_NAME: string = 'verdaccio';\n\nexport class InitCommand extends Command {\n public static paths = [Command.Default];\n\n private port = Option.String('-l,-p,--listen,--port', {\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 - \\`-l | --listen | -p | --port\\` to switch the default server port,\n - \\`-c | --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 private config = Option.String('-c,--config', {\n description: 'use this configuration file (default: ./config.yaml)',\n });\n\n private async initLogger(logConfig: ConfigYaml) {\n if (logConfig.logs) {\n logConfig.log = logConfig.logs;\n warningUtils.emit(warningUtils.Codes.VERWAR002);\n }\n await setup(logConfig.log as LoggerConfigItem);\n }\n\n public async execute() {\n try {\n const configPathLocation = findConfigFile(this.config as string);\n const configParsed = parseConfigFile(configPathLocation);\n await this.initLogger(configParsed);\n logger.info({ file: configPathLocation }, 'using config file: @{file}');\n const { web } = configParsed;\n\n process.title = web?.title || DEFAULT_PROCESS_NAME;\n\n const currentDir = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname;\n const { version, name } = pkgUtils.getPackageJson(currentDir, '../..');\n\n await initServer(\n configParsed,\n this.port as string,\n version as string,\n name as string,\n startServer\n );\n\n const logLevel = configParsed.log?.level || 'default';\n logger.info({ logLevel }, 'log level: @{logLevel}');\n logger.info('server started');\n } catch (err: any) {\n console.error(err);\n process.exit(1);\n }\n }\n}\n"],"mappings":";;;;;;AAWA,IAAa,cAAb,cAAiC,QAAQ;CACvC,OAAc,QAAQ,CAAC,QAAQ,QAAQ;CAEvC,OAAe,OAAO,OAAO,yBAAyB,EACpD,aAAa,2DACd,CAAC;CAEF,OAAO,QAAQ,QAAQ,MAAM;EAC3B,aAAa;EACb,SAAS;;;;;;;;;;;;;EAaT,UAAU;GACR,CAAC,kDAAkD,YAAY;GAC/D,CAAC,oCAAoC,0BAA0B;GAC/D,CACE,oFACA,sDACD;GACF;EACF,CAAC;CAEF,SAAiB,OAAO,OAAO,eAAe,EAC5C,aAAa,wDACd,CAAC;CAEF,MAAc,WAAW,WAAuB;AAC9C,MAAI,UAAU,MAAM;AAClB,aAAU,MAAM,UAAU;AAC1B,gBAAa,KAAK,aAAa,MAAM,UAAU;;AAEjD,QAAM,MAAM,UAAU,IAAwB;;CAGhD,MAAa,UAAU;AACrB,MAAI;GACF,MAAM,qBAAqB,eAAe,KAAK,OAAiB;GAChE,MAAM,eAAe,gBAAgB,mBAAmB;AACxD,SAAM,KAAK,WAAW,aAAa;AACnC,UAAO,KAAK,EAAE,MAAM,oBAAoB,EAAE,6BAA6B;GACvE,MAAM,EAAE,QAAQ;AAEhB,WAAQ,QAAQ,KAAK,SAAA;GAErB,MAAM,aAAa,OAAO,cAAc,cAAc,YAAY,OAAO,KAAK;GAC9E,MAAM,EAAE,SAAS,SAAS,SAAS,eAAe,YAAY,QAAQ;AAEtE,SAAM,WACJ,cACA,KAAK,MACL,SACA,MACA,YACD;GAED,MAAM,WAAW,aAAa,KAAK,SAAS;AAC5C,UAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB;AACnD,UAAO,KAAK,iBAAiB;WACtB,KAAU;AACjB,WAAQ,MAAM,IAAI;AAClB,WAAQ,KAAK,EAAE"}
|
|
@@ -5,7 +5,8 @@ let _verdaccio_core = require("@verdaccio/core");
|
|
|
5
5
|
var VersionCommand = class extends clipanion.Command {
|
|
6
6
|
static paths = [[`--version`], [`-v`]];
|
|
7
7
|
async execute() {
|
|
8
|
-
const
|
|
8
|
+
const currentDir = typeof __dirname !== "undefined" ? __dirname : {}.dirname;
|
|
9
|
+
const { version } = _verdaccio_core.pkgUtils.getPackageJson(currentDir, "../..");
|
|
9
10
|
this.context.stdout.write(`v${version}\n`);
|
|
10
11
|
process.exit(0);
|
|
11
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":[],"sources":["../../src/commands/version.ts"],"sourcesContent":["import { Command } from 'clipanion';\n\nimport { pkgUtils } from '@verdaccio/core';\n\nexport class VersionCommand extends Command {\n static paths = [[`--version`], [`-v`]];\n\n async execute() {\n const { version } = pkgUtils.getPackageJson(
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../../src/commands/version.ts"],"sourcesContent":["import { Command } from 'clipanion';\n\nimport { pkgUtils } from '@verdaccio/core';\n\nexport class VersionCommand extends Command {\n static paths = [[`--version`], [`-v`]];\n\n async execute() {\n const currentDir = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname;\n const { version } = pkgUtils.getPackageJson(currentDir, '../..');\n this.context.stdout.write(`v${version}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;;AAIA,IAAa,iBAAb,cAAoC,UAAA,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC;CAEtC,MAAM,UAAU;EACd,MAAM,aAAa,OAAO,cAAc,cAAc,YAAA,EAAA,CAAwB;EAC9E,MAAM,EAAE,YAAY,gBAAA,SAAS,eAAe,YAAY,QAAQ;AAChE,OAAK,QAAQ,OAAO,MAAM,IAAI,QAAQ,IAAI;AAC1C,UAAQ,KAAK,EAAE"}
|
|
@@ -4,7 +4,8 @@ import { pkgUtils } from "@verdaccio/core";
|
|
|
4
4
|
var VersionCommand = class extends Command {
|
|
5
5
|
static paths = [[`--version`], [`-v`]];
|
|
6
6
|
async execute() {
|
|
7
|
-
const
|
|
7
|
+
const currentDir = typeof __dirname !== "undefined" ? __dirname : import.meta.dirname;
|
|
8
|
+
const { version } = pkgUtils.getPackageJson(currentDir, "../..");
|
|
8
9
|
this.context.stdout.write(`v${version}\n`);
|
|
9
10
|
process.exit(0);
|
|
10
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","names":[],"sources":["../../src/commands/version.ts"],"sourcesContent":["import { Command } from 'clipanion';\n\nimport { pkgUtils } from '@verdaccio/core';\n\nexport class VersionCommand extends Command {\n static paths = [[`--version`], [`-v`]];\n\n async execute() {\n const { version } = pkgUtils.getPackageJson(
|
|
1
|
+
{"version":3,"file":"version.mjs","names":[],"sources":["../../src/commands/version.ts"],"sourcesContent":["import { Command } from 'clipanion';\n\nimport { pkgUtils } from '@verdaccio/core';\n\nexport class VersionCommand extends Command {\n static paths = [[`--version`], [`-v`]];\n\n async execute() {\n const currentDir = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname;\n const { version } = pkgUtils.getPackageJson(currentDir, '../..');\n this.context.stdout.write(`v${version}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;AAIA,IAAa,iBAAb,cAAoC,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC;CAEtC,MAAM,UAAU;EACd,MAAM,aAAa,OAAO,cAAc,cAAc,YAAY,OAAO,KAAK;EAC9E,MAAM,EAAE,YAAY,SAAS,eAAe,YAAY,QAAQ;AAChE,OAAK,QAAQ,OAAO,MAAM,IAAI,QAAQ,IAAI;AAC1C,UAAQ,KAAK,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/cli",
|
|
3
|
-
"version": "9.0.0-next-9.
|
|
3
|
+
"version": "9.0.0-next-9.9",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Juan Picado",
|
|
6
6
|
"email": "juanpicado19@gmail.com"
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
"main": "./build/index.js",
|
|
38
38
|
"types": "build/index.d.ts",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@verdaccio/config": "9.0.0-next-9.
|
|
41
|
-
"@verdaccio/core": "9.0.0-next-9.
|
|
42
|
-
"@verdaccio/logger": "9.0.0-next-9.
|
|
43
|
-
"@verdaccio/node-api": "9.0.0-next-9.
|
|
40
|
+
"@verdaccio/config": "9.0.0-next-9.9",
|
|
41
|
+
"@verdaccio/core": "9.0.0-next-9.9",
|
|
42
|
+
"@verdaccio/logger": "9.0.0-next-9.9",
|
|
43
|
+
"@verdaccio/node-api": "9.0.0-next-9.9",
|
|
44
|
+
"@verdaccio/server": "9.0.0-next-9.9",
|
|
44
45
|
"clipanion": "4.0.0-rc.4",
|
|
45
46
|
"envinfo": "7.19.0",
|
|
46
47
|
"semver": "7.7.4"
|