@verdaccio/cli 9.0.0-next-9.21 → 9.0.0-next-9.22
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.d.ts +2 -2
- package/build/cli.js.map +1 -1
- package/build/cli.mjs.map +1 -1
- package/build/commands/init.d.ts +1 -1
- package/build/commands/init.js +3 -0
- package/build/commands/init.js.map +1 -1
- package/build/commands/init.mjs +3 -1
- package/build/commands/init.mjs.map +1 -1
- package/build/commands/version.js.map +1 -1
- package/build/commands/version.mjs.map +1 -1
- package/build/runtime.d.ts +1 -1
- package/package.json +9 -9
package/build/cli.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliRuntimeOptions } from './runtime';
|
|
1
|
+
import type { CliRuntimeOptions } from './runtime';
|
|
2
2
|
/**
|
|
3
3
|
* Build and run the Verdaccio CLI.
|
|
4
4
|
*
|
|
@@ -7,4 +7,4 @@ import { CliRuntimeOptions } from './runtime';
|
|
|
7
7
|
* version/name) via {@link CliRuntimeOptions} — e.g. a registry that needs to
|
|
8
8
|
* boot with a custom Storage — without re-implementing the command set.
|
|
9
9
|
*/
|
|
10
|
-
export declare function runCli(options?: CliRuntimeOptions): Promise<
|
|
10
|
+
export declare function runCli(options?: CliRuntimeOptions): Promise<void>;
|
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 type { CliRuntimeOptions } from './runtime';\nimport { configureCli } from './runtime';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\n/**\n * Build and run the Verdaccio CLI.\n *\n * Called with no arguments it behaves exactly like the standalone `verdaccio`\n * binary. Downstream distributions can inject a custom server factory (and\n * version/name) via {@link CliRuntimeOptions} — e.g. a registry that needs to\n * boot with a custom Storage — without re-implementing the command set.\n */\nexport function runCli(options: CliRuntimeOptions = {}): Promise<
|
|
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 type { CliRuntimeOptions } from './runtime';\nimport { configureCli } from './runtime';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\n/**\n * Build and run the Verdaccio CLI.\n *\n * Called with no arguments it behaves exactly like the standalone `verdaccio`\n * binary. Downstream distributions can inject a custom server factory (and\n * version/name) via {@link CliRuntimeOptions} — e.g. a registry that needs to\n * boot with a custom Storage — without re-implementing the command set.\n */\nexport function runCli(options: CliRuntimeOptions = {}): Promise<void> {\n configureCli(options);\n\n if (process.getuid && process.getuid() === 0) {\n warningUtils.emit(warningUtils.Codes.VERWAR001);\n }\n\n if (!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\n const [node, app, ...args] = process.argv;\n\n const version =\n options.version ??\n (pkgUtils.getPackageJson(\n typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname,\n '..'\n ).version as string);\n\n const cli = new Cli({\n binaryLabel: `verdaccio`,\n binaryName: `${node} ${app}`,\n binaryVersion: version,\n });\n\n cli.register(InfoCommand);\n cli.register(InitCommand);\n cli.register(VersionCommand);\n\n process.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\n return cli.runExit(args, Cli.defaultContext);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,SAAgB,OAAO,UAA6B,CAAC,GAAkB;CACrE,gBAAA,aAAa,OAAO;CAEpB,IAAI,QAAQ,UAAU,QAAQ,OAAO,MAAM,GACzC,gBAAA,aAAa,KAAK,gBAAA,aAAa,MAAM,SAAS;CAGhD,IAAI,CAAC,cAAA,eAAe,QAAQ,OAAO,GACjC,MAAM,IAAI,MACR,wCAAwC,cAAA,iBAAiB,oCAAoC,QAAQ,QAAQ;6CAE/G;CAGF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,QAAQ;CAErC,MAAM,UACJ,QAAQ,WACP,gBAAA,SAAS,eACR,OAAO,cAAc,cAAc,YAAA,CAAA,EAAwB,SAC3D,IACF,CAAC,CAAC;CAEJ,MAAM,MAAM,IAAI,UAAA,IAAI;EAClB,aAAa;EACb,YAAY,GAAG,KAAK,GAAG;EACvB,eAAe;CACjB,CAAC;CAED,IAAI,SAAS,aAAA,WAAW;CACxB,IAAI,SAAS,aAAA,WAAW;CACxB,IAAI,SAAS,gBAAA,cAAc;CAE3B,QAAQ,GAAG,qBAAqB,SAAU,KAAK;EAC7C,QAAQ,MACN,6FAA6F,IAAI,OACnG;EACA,QAAQ,KAAK,CAAC;CAChB,CAAC;CAED,OAAO,IAAI,QAAQ,MAAM,UAAA,IAAI,cAAc;AAC7C"}
|
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 type { CliRuntimeOptions } from './runtime';\nimport { configureCli } from './runtime';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\n/**\n * Build and run the Verdaccio CLI.\n *\n * Called with no arguments it behaves exactly like the standalone `verdaccio`\n * binary. Downstream distributions can inject a custom server factory (and\n * version/name) via {@link CliRuntimeOptions} — e.g. a registry that needs to\n * boot with a custom Storage — without re-implementing the command set.\n */\nexport function runCli(options: CliRuntimeOptions = {}): Promise<
|
|
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 type { CliRuntimeOptions } from './runtime';\nimport { configureCli } from './runtime';\nimport { MIN_NODE_VERSION, isVersionValid } from './utils';\n\n/**\n * Build and run the Verdaccio CLI.\n *\n * Called with no arguments it behaves exactly like the standalone `verdaccio`\n * binary. Downstream distributions can inject a custom server factory (and\n * version/name) via {@link CliRuntimeOptions} — e.g. a registry that needs to\n * boot with a custom Storage — without re-implementing the command set.\n */\nexport function runCli(options: CliRuntimeOptions = {}): Promise<void> {\n configureCli(options);\n\n if (process.getuid && process.getuid() === 0) {\n warningUtils.emit(warningUtils.Codes.VERWAR001);\n }\n\n if (!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\n const [node, app, ...args] = process.argv;\n\n const version =\n options.version ??\n (pkgUtils.getPackageJson(\n typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname,\n '..'\n ).version as string);\n\n const cli = new Cli({\n binaryLabel: `verdaccio`,\n binaryName: `${node} ${app}`,\n binaryVersion: version,\n });\n\n cli.register(InfoCommand);\n cli.register(InitCommand);\n cli.register(VersionCommand);\n\n process.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\n return cli.runExit(args, Cli.defaultContext);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,SAAgB,OAAO,UAA6B,CAAC,GAAkB;CACrE,aAAa,OAAO;CAEpB,IAAI,QAAQ,UAAU,QAAQ,OAAO,MAAM,GACzC,aAAa,KAAK,aAAa,MAAM,SAAS;CAGhD,IAAI,CAAC,eAAe,QAAQ,OAAO,GACjC,MAAM,IAAI,MACR,wCAAwC,iBAAiB,oCAAoC,QAAQ,QAAQ;6CAE/G;CAGF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,QAAQ;CAErC,MAAM,UACJ,QAAQ,WACP,SAAS,eACR,OAAO,cAAc,cAAc,YAAY,OAAO,KAAK,SAC3D,IACF,CAAC,CAAC;CAEJ,MAAM,MAAM,IAAI,IAAI;EAClB,aAAa;EACb,YAAY,GAAG,KAAK,GAAG;EACvB,eAAe;CACjB,CAAC;CAED,IAAI,SAAS,WAAW;CACxB,IAAI,SAAS,WAAW;CACxB,IAAI,SAAS,cAAc;CAE3B,QAAQ,GAAG,qBAAqB,SAAU,KAAK;EAC7C,QAAQ,MACN,6FAA6F,IAAI,OACnG;EACA,QAAQ,KAAK,CAAC;CAChB,CAAC;CAED,OAAO,IAAI,QAAQ,MAAM,IAAI,cAAc;AAC7C"}
|
package/build/commands/init.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const DEFAULT_PROCESS_NAME: string;
|
|
|
3
3
|
export declare class InitCommand extends Command {
|
|
4
4
|
static paths: never[][];
|
|
5
5
|
private port;
|
|
6
|
-
static usage: import(
|
|
6
|
+
static usage: import("clipanion").Usage;
|
|
7
7
|
private config;
|
|
8
8
|
private initLogger;
|
|
9
9
|
execute(): Promise<void>;
|
package/build/commands/init.js
CHANGED
|
@@ -4,6 +4,8 @@ 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
|
+
//#region src/commands/init.ts
|
|
8
|
+
var DEFAULT_PROCESS_NAME = "verdaccio";
|
|
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)" });
|
|
@@ -59,6 +61,7 @@ var InitCommand = class extends clipanion.Command {
|
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
//#endregion
|
|
64
|
+
exports.DEFAULT_PROCESS_NAME = DEFAULT_PROCESS_NAME;
|
|
62
65
|
exports.InitCommand = InitCommand;
|
|
63
66
|
|
|
64
67
|
//# sourceMappingURL=init.js.map
|
|
@@ -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\nimport { getPkgNameOverride, getStartServer, getVersionOverride } from '../runtime';\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 pkg = pkgUtils.getPackageJson(currentDir, '../..');\n const version = getVersionOverride() ?? (pkg.version as string);\n const name = getPkgNameOverride() ?? (pkg.name as string);\n\n await initServer(\n configParsed,\n this.port as string,\n version as string,\n name as string,\n getStartServer()\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":"
|
|
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\nimport { getPkgNameOverride, getStartServer, getVersionOverride } from '../runtime';\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 pkg = pkgUtils.getPackageJson(currentDir, '../..');\n const version = getVersionOverride() ?? (pkg.version as string);\n const name = getPkgNameOverride() ?? (pkg.name as string);\n\n await initServer(\n configParsed,\n this.port as string,\n version as string,\n name as string,\n getStartServer()\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":";;;;;;;AAUA,IAAa,uBAA+B;AAE5C,IAAa,cAAb,cAAiC,UAAA,QAAQ;CACvC,OAAc,QAAQ,CAAC,UAAA,QAAQ,OAAO;CAEtC,OAAe,UAAA,OAAO,OAAO,yBAAyB,EACpD,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,SAAiB,UAAA,OAAO,OAAO,eAAe,EAC5C,aAAa,uDACf,CAAC;CAED,MAAc,WAAW,WAAuB;EAC9C,IAAI,UAAU,MAAM;GAClB,UAAU,MAAM,UAAU;GAC1B,gBAAA,aAAa,KAAK,gBAAA,aAAa,MAAM,SAAS;EAChD;EACA,OAAA,GAAA,kBAAA,MAAA,CAAY,UAAU,GAAuB;CAC/C;CAEA,MAAa,UAAU;EACrB,IAAI;GACF,MAAM,sBAAA,GAAA,kBAAA,eAAA,CAAoC,KAAK,MAAgB;GAC/D,MAAM,gBAAA,GAAA,kBAAA,gBAAA,CAA+B,kBAAkB;GACvD,MAAM,KAAK,WAAW,YAAY;GAClC,kBAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,GAAG,4BAA4B;GACtE,MAAM,EAAE,QAAQ;GAEhB,QAAQ,QAAQ,KAAK,SAAA;GAErB,MAAM,aAAa,OAAO,cAAc,cAAc,YAAA,CAAA,EAAwB;GAC9E,MAAM,MAAM,gBAAA,SAAS,eAAe,YAAY,OAAO;GACvD,MAAM,UAAU,gBAAA,mBAAmB,KAAM,IAAI;GAC7C,MAAM,OAAO,gBAAA,mBAAmB,KAAM,IAAI;GAE1C,OAAA,GAAA,oBAAA,WAAA,CACE,cACA,KAAK,MACL,SACA,MACA,gBAAA,eAAe,CACjB;GAEA,MAAM,WAAW,aAAa,KAAK,SAAS;GAC5C,kBAAA,OAAO,KAAK,EAAE,SAAS,GAAG,wBAAwB;GAClD,kBAAA,OAAO,KAAK,gBAAgB;EAC9B,SAAS,KAAU;GACjB,QAAQ,MAAM,GAAG;GACjB,QAAQ,KAAK,CAAC;EAChB;CACF;AACF"}
|
package/build/commands/init.mjs
CHANGED
|
@@ -4,6 +4,8 @@ import { pkgUtils, warningUtils } from "@verdaccio/core";
|
|
|
4
4
|
import { findConfigFile, parseConfigFile } from "@verdaccio/config";
|
|
5
5
|
import { logger, setup } from "@verdaccio/logger";
|
|
6
6
|
import { initServer } from "@verdaccio/node-api";
|
|
7
|
+
//#region src/commands/init.ts
|
|
8
|
+
var DEFAULT_PROCESS_NAME = "verdaccio";
|
|
7
9
|
var InitCommand = class extends Command {
|
|
8
10
|
static paths = [Command.Default];
|
|
9
11
|
port = Option.String("-l,-p,--listen,--port", { description: "host:port number to listen on (default: localhost:4873)" });
|
|
@@ -59,6 +61,6 @@ var InitCommand = class extends Command {
|
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
//#endregion
|
|
62
|
-
export { InitCommand };
|
|
64
|
+
export { DEFAULT_PROCESS_NAME, InitCommand };
|
|
63
65
|
|
|
64
66
|
//# sourceMappingURL=init.mjs.map
|
|
@@ -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\nimport { getPkgNameOverride, getStartServer, getVersionOverride } from '../runtime';\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 pkg = pkgUtils.getPackageJson(currentDir, '../..');\n const version = getVersionOverride() ?? (pkg.version as string);\n const name = getPkgNameOverride() ?? (pkg.name as string);\n\n await initServer(\n configParsed,\n this.port as string,\n version as string,\n name as string,\n getStartServer()\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":"
|
|
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\nimport { getPkgNameOverride, getStartServer, getVersionOverride } from '../runtime';\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 pkg = pkgUtils.getPackageJson(currentDir, '../..');\n const version = getVersionOverride() ?? (pkg.version as string);\n const name = getPkgNameOverride() ?? (pkg.name as string);\n\n await initServer(\n configParsed,\n this.port as string,\n version as string,\n name as string,\n getStartServer()\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":";;;;;;;AAUA,IAAa,uBAA+B;AAE5C,IAAa,cAAb,cAAiC,QAAQ;CACvC,OAAc,QAAQ,CAAC,QAAQ,OAAO;CAEtC,OAAe,OAAO,OAAO,yBAAyB,EACpD,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,SAAiB,OAAO,OAAO,eAAe,EAC5C,aAAa,uDACf,CAAC;CAED,MAAc,WAAW,WAAuB;EAC9C,IAAI,UAAU,MAAM;GAClB,UAAU,MAAM,UAAU;GAC1B,aAAa,KAAK,aAAa,MAAM,SAAS;EAChD;EACA,MAAM,MAAM,UAAU,GAAuB;CAC/C;CAEA,MAAa,UAAU;EACrB,IAAI;GACF,MAAM,qBAAqB,eAAe,KAAK,MAAgB;GAC/D,MAAM,eAAe,gBAAgB,kBAAkB;GACvD,MAAM,KAAK,WAAW,YAAY;GAClC,OAAO,KAAK,EAAE,MAAM,mBAAmB,GAAG,4BAA4B;GACtE,MAAM,EAAE,QAAQ;GAEhB,QAAQ,QAAQ,KAAK,SAAA;GAErB,MAAM,aAAa,OAAO,cAAc,cAAc,YAAY,OAAO,KAAK;GAC9E,MAAM,MAAM,SAAS,eAAe,YAAY,OAAO;GACvD,MAAM,UAAU,mBAAmB,KAAM,IAAI;GAC7C,MAAM,OAAO,mBAAmB,KAAM,IAAI;GAE1C,MAAM,WACJ,cACA,KAAK,MACL,SACA,MACA,eAAe,CACjB;GAEA,MAAM,WAAW,aAAa,KAAK,SAAS;GAC5C,OAAO,KAAK,EAAE,SAAS,GAAG,wBAAwB;GAClD,OAAO,KAAK,gBAAgB;EAC9B,SAAS,KAAU;GACjB,QAAQ,MAAM,GAAG;GACjB,QAAQ,KAAK,CAAC;EAChB;CACF;AACF"}
|
|
@@ -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\nimport { getVersionOverride } from '../runtime';\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 = getVersionOverride() ?? pkgUtils.getPackageJson(currentDir, '../..').version;\n this.context.stdout.write(`v${version}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;;AAMA,IAAa,iBAAb,cAAoC,UAAA,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC;CAErC,MAAM,UAAU;EACd,MAAM,aAAa,OAAO,cAAc,cAAc,YAAA,CAAA,EAAwB;EAC9E,MAAM,UAAU,gBAAA,mBAAmB,KAAK,gBAAA,SAAS,eAAe,YAAY,OAAO,
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../../src/commands/version.ts"],"sourcesContent":["import { Command } from 'clipanion';\n\nimport { pkgUtils } from '@verdaccio/core';\n\nimport { getVersionOverride } from '../runtime';\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 = getVersionOverride() ?? pkgUtils.getPackageJson(currentDir, '../..').version;\n this.context.stdout.write(`v${version}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;;AAMA,IAAa,iBAAb,cAAoC,UAAA,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC;CAErC,MAAM,UAAU;EACd,MAAM,aAAa,OAAO,cAAc,cAAc,YAAA,CAAA,EAAwB;EAC9E,MAAM,UAAU,gBAAA,mBAAmB,KAAK,gBAAA,SAAS,eAAe,YAAY,OAAO,CAAC,CAAC;EACrF,KAAK,QAAQ,OAAO,MAAM,IAAI,QAAQ,GAAG;EACzC,QAAQ,KAAK,CAAC;CAChB;AACF"}
|
|
@@ -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\nimport { getVersionOverride } from '../runtime';\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 = getVersionOverride() ?? pkgUtils.getPackageJson(currentDir, '../..').version;\n this.context.stdout.write(`v${version}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;;AAMA,IAAa,iBAAb,cAAoC,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC;CAErC,MAAM,UAAU;EACd,MAAM,aAAa,OAAO,cAAc,cAAc,YAAY,OAAO,KAAK;EAC9E,MAAM,UAAU,mBAAmB,KAAK,SAAS,eAAe,YAAY,OAAO,
|
|
1
|
+
{"version":3,"file":"version.mjs","names":[],"sources":["../../src/commands/version.ts"],"sourcesContent":["import { Command } from 'clipanion';\n\nimport { pkgUtils } from '@verdaccio/core';\n\nimport { getVersionOverride } from '../runtime';\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 = getVersionOverride() ?? pkgUtils.getPackageJson(currentDir, '../..').version;\n this.context.stdout.write(`v${version}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;;AAMA,IAAa,iBAAb,cAAoC,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC;CAErC,MAAM,UAAU;EACd,MAAM,aAAa,OAAO,cAAc,cAAc,YAAY,OAAO,KAAK;EAC9E,MAAM,UAAU,mBAAmB,KAAK,SAAS,eAAe,YAAY,OAAO,CAAC,CAAC;EACrF,KAAK,QAAQ,OAAO,MAAM,IAAI,QAAQ,GAAG;EACzC,QAAQ,KAAK,CAAC;CAChB;AACF"}
|
package/build/runtime.d.ts
CHANGED
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.22",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Juan Picado",
|
|
6
6
|
"email": "juanpicado19@gmail.com"
|
|
@@ -37,21 +37,21 @@
|
|
|
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.
|
|
44
|
-
"@verdaccio/server": "9.0.0-next-9.
|
|
40
|
+
"@verdaccio/config": "9.0.0-next-9.22",
|
|
41
|
+
"@verdaccio/core": "9.0.0-next-9.22",
|
|
42
|
+
"@verdaccio/logger": "9.0.0-next-9.22",
|
|
43
|
+
"@verdaccio/node-api": "9.0.0-next-9.22",
|
|
44
|
+
"@verdaccio/server": "9.0.0-next-9.22",
|
|
45
45
|
"clipanion": "4.0.0-rc.4",
|
|
46
46
|
"envinfo": "7.19.0",
|
|
47
|
-
"semver": "7.8.
|
|
47
|
+
"semver": "7.8.5",
|
|
48
48
|
"tsx": "4.22.4"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@verdaccio/types": "14.0.0-next-9.11",
|
|
52
52
|
"rimraf": "6.1.3",
|
|
53
|
-
"vite": "8.
|
|
54
|
-
"vitest": "4.1.
|
|
53
|
+
"vite": "8.1.4",
|
|
54
|
+
"vitest": "4.1.10"
|
|
55
55
|
},
|
|
56
56
|
"funding": {
|
|
57
57
|
"type": "opencollective",
|