@verdaccio/cli 8.0.0-next-8.28 → 8.0.0-next-8.29
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
CHANGED
|
@@ -17,7 +17,7 @@ const [node, app, ...args] = process.argv;
|
|
|
17
17
|
const cli = new _clipanion.Cli({
|
|
18
18
|
binaryLabel: `verdaccio`,
|
|
19
19
|
binaryName: `${node} ${app}`,
|
|
20
|
-
binaryVersion:
|
|
20
|
+
binaryVersion: _core.pkgUtils.getPackageJson(__dirname, '..').version
|
|
21
21
|
});
|
|
22
22
|
cli.register(_info.InfoCommand);
|
|
23
23
|
cli.register(_init.InitCommand);
|
package/build/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","names":["_clipanion","require","_core","_info","_init","_version","_utils","process","getuid","warningUtils","emit","Codes","VERWAR001","isVersionValid","version","Error","MIN_NODE_VERSION","node","app","args","argv","cli","Cli","binaryLabel","binaryName","binaryVersion","register","InfoCommand","InitCommand","VersionCommand","runExit","defaultContext","on","err","console","error","stack","exit"],"sources":["../src/cli.ts"],"sourcesContent":["import { Cli } from 'clipanion';\n\nimport { 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:
|
|
1
|
+
{"version":3,"file":"cli.js","names":["_clipanion","require","_core","_info","_init","_version","_utils","process","getuid","warningUtils","emit","Codes","VERWAR001","isVersionValid","version","Error","MIN_NODE_VERSION","node","app","args","argv","cli","Cli","binaryLabel","binaryName","binaryVersion","pkgUtils","getPackageJson","__dirname","register","InfoCommand","InitCommand","VersionCommand","runExit","defaultContext","on","err","console","error","stack","exit"],"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, '..').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 // eslint-disable-next-line max-len\n `uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \\n${err.stack}`\n );\n process.exit(1);\n});\n"],"mappings":";;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAIM,OAAO,CAACC,MAAM,IAAID,OAAO,CAACC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE;EAC5CC,kBAAY,CAACC,IAAI,CAACD,kBAAY,CAACE,KAAK,CAACC,SAAS,CAAC;AACjD;AAEA,IAAI,CAAC,IAAAC,qBAAc,EAACN,OAAO,CAACO,OAAO,CAAC,EAAE;EACpC,MAAM,IAAIC,KAAK,CACb,wCAAwCC,uBAAgB,qCAAqCT,OAAO,CAACO,OAAO;AAChH,6CACE,CAAC;AACH;AAEA,MAAM,CAACG,IAAI,EAAEC,GAAG,EAAE,GAAGC,IAAI,CAAC,GAAGZ,OAAO,CAACa,IAAI;AAEzC,MAAMC,GAAG,GAAG,IAAIC,cAAG,CAAC;EAClBC,WAAW,EAAE,WAAW;EACxBC,UAAU,EAAE,GAAGP,IAAI,IAAIC,GAAG,EAAE;EAC5BO,aAAa,EAAEC,cAAQ,CAACC,cAAc,CAACC,SAAS,EAAE,IAAI,CAAC,CAACd;AAC1D,CAAC,CAAC;AAEFO,GAAG,CAACQ,QAAQ,CAACC,iBAAW,CAAC;AACzBT,GAAG,CAACQ,QAAQ,CAACE,iBAAW,CAAC;AACzBV,GAAG,CAACQ,QAAQ,CAACG,uBAAc,CAAC;AAC5BX,GAAG,CAACY,OAAO,CAACd,IAAI,EAAEG,cAAG,CAACY,cAAc,CAAC;AAErC3B,OAAO,CAAC4B,EAAE,CAAC,mBAAmB,EAAE,UAAUC,GAAG,EAAE;EAC7CC,OAAO,CAACC,KAAK;EACX;EACA,6FAA6FF,GAAG,CAACG,KAAK,EACxG,CAAC;EACDhC,OAAO,CAACiC,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC","ignoreList":[]}
|
package/build/commands/init.js
CHANGED
|
@@ -59,7 +59,7 @@ class InitCommand extends _clipanion.Command {
|
|
|
59
59
|
const {
|
|
60
60
|
version,
|
|
61
61
|
name
|
|
62
|
-
} =
|
|
62
|
+
} = _core.pkgUtils.getPackageJson(__dirname, '../..');
|
|
63
63
|
await (0, _nodeApi.initServer)(configParsed, this.port, version, name);
|
|
64
64
|
const logLevel = configParsed.log?.level || 'default';
|
|
65
65
|
_logger.logger.info({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","names":["_clipanion","require","_config","_core","_logger","_nodeApi","DEFAULT_PROCESS_NAME","exports","InitCommand","Command","paths","Default","port","Option","String","description","usage","Usage","details","examples","config","initLogger","logConfig","logs","log","warningUtils","emit","Codes","VERWAR002","setup","execute","configPathLocation","findConfigFile","configParsed","parseConfigFile","logger","info","file","web","process","title","version","name","initServer","logLevel","level","err","console","error","exit"],"sources":["../../src/commands/init.ts"],"sourcesContent":["import { Command, Option } from 'clipanion';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { warningUtils } from '@verdaccio/core';\nimport { logger, setup } from '@verdaccio/logger';\nimport { initServer } from '@verdaccio/node-api';\nimport { 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 // eslint-disable-next-line\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 initLogger(logConfig: ConfigYaml) {\n if (logConfig.logs) {\n logConfig.log = logConfig.logs;\n warningUtils.emit(warningUtils.Codes.VERWAR002);\n }\n 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 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 } =
|
|
1
|
+
{"version":3,"file":"init.js","names":["_clipanion","require","_config","_core","_logger","_nodeApi","DEFAULT_PROCESS_NAME","exports","InitCommand","Command","paths","Default","port","Option","String","description","usage","Usage","details","examples","config","initLogger","logConfig","logs","log","warningUtils","emit","Codes","VERWAR002","setup","execute","configPathLocation","findConfigFile","configParsed","parseConfigFile","logger","info","file","web","process","title","version","name","pkgUtils","getPackageJson","__dirname","initServer","logLevel","level","err","console","error","exit"],"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 { 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 // eslint-disable-next-line\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 initLogger(logConfig: ConfigYaml) {\n if (logConfig.logs) {\n logConfig.log = logConfig.logs;\n warningUtils.emit(warningUtils.Codes.VERWAR002);\n }\n 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 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(__dirname, '../..');\n\n await initServer(configParsed, this.port as string, version as string, name as string);\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":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAGO,MAAMK,oBAA4B,GAAAC,OAAA,CAAAD,oBAAA,GAAG,WAAW;AAEhD,MAAME,WAAW,SAASC,kBAAO,CAAC;EACvC,OAAcC,KAAK,GAAG,CAACD,kBAAO,CAACE,OAAO,CAAC;EAE/BC,IAAI,GAAGC,iBAAM,CAACC,MAAM,CAAC,uBAAuB,EAAE;IACpDC,WAAW,EAAE;EACf,CAAC,CAAC;;EAEF;EACA,OAAOC,KAAK,GAAGP,kBAAO,CAACQ,KAAK,CAAC;IAC3BF,WAAW,EAAE,mBAAmB;IAChCG,OAAO,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,QAAQ,EAAE,CACR,CAAC,gDAAgD,EAAE,WAAW,CAAC,EAC/D,CAAC,kCAAkC,EAAE,yBAAyB,CAAC,EAC/D,CACE,kFAAkF,EAClF,qDAAqD,CACtD;EAEL,CAAC,CAAC;EAEMC,MAAM,GAAGP,iBAAM,CAACC,MAAM,CAAC,aA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C,CAAC;IACjB;EACF;AACF;AAAC7C,OAAA,CAAAC,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -5,12 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.VersionCommand = void 0;
|
|
7
7
|
var _clipanion = require("clipanion");
|
|
8
|
+
var _core = require("@verdaccio/core");
|
|
8
9
|
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
|
|
9
10
|
|
|
10
11
|
class VersionCommand extends _clipanion.Command {
|
|
11
12
|
static paths = [[`--version`], [`-v`]];
|
|
12
13
|
async execute() {
|
|
13
|
-
const
|
|
14
|
+
const {
|
|
15
|
+
version
|
|
16
|
+
} = _core.pkgUtils.getPackageJson(__dirname, '../..');
|
|
14
17
|
this.context.stdout.write(`v${version}\n`);
|
|
15
18
|
process.exit(0);
|
|
16
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":["_clipanion","require","VersionCommand","Command","paths","execute","version","context","stdout","write","process","exit","exports"],"sources":["../../src/commands/version.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-member-accessibility */\nimport { Command } from 'clipanion';\n\nexport class VersionCommand extends Command {\n static paths = [[`--version`], [`-v`]];\n\n async execute() {\n const version =
|
|
1
|
+
{"version":3,"file":"version.js","names":["_clipanion","require","_core","VersionCommand","Command","paths","execute","version","pkgUtils","getPackageJson","__dirname","context","stdout","write","process","exit","exports"],"sources":["../../src/commands/version.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-member-accessibility */\nimport { 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(__dirname, '../..');\n this.context.stdout.write(`v${version}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAHA;;AAKO,MAAME,cAAc,SAASC,kBAAO,CAAC;EAC1C,OAAOC,KAAK,GAAG,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;EAEtC,MAAMC,OAAOA,CAAA,EAAG;IACd,MAAM;MAAEC;IAAQ,CAAC,GAAGC,cAAQ,CAACC,cAAc,CAACC,SAAS,EAAE,OAAO,CAAC;IAC/D,IAAI,CAACC,OAAO,CAACC,MAAM,CAACC,KAAK,CAAC,IAAIN,OAAO,IAAI,CAAC;IAC1CO,OAAO,CAACC,IAAI,CAAC,CAAC,CAAC;EACjB;AACF;AAACC,OAAA,CAAAb,cAAA,GAAAA,cAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/cli",
|
|
3
|
-
"version": "8.0.0-next-8.
|
|
3
|
+
"version": "8.0.0-next-8.29",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Juan Picado",
|
|
6
6
|
"email": "juanpicado19@gmail.com"
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"main": "./build/index.js",
|
|
38
38
|
"types": "build/index.d.ts",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@verdaccio/config": "8.0.0-next-8.
|
|
41
|
-
"@verdaccio/core": "8.0.0-next-8.
|
|
42
|
-
"@verdaccio/logger": "8.0.0-next-8.
|
|
43
|
-
"@verdaccio/node-api": "8.0.0-next-8.
|
|
40
|
+
"@verdaccio/config": "8.0.0-next-8.29",
|
|
41
|
+
"@verdaccio/core": "8.0.0-next-8.29",
|
|
42
|
+
"@verdaccio/logger": "8.0.0-next-8.29",
|
|
43
|
+
"@verdaccio/node-api": "8.0.0-next-8.29",
|
|
44
44
|
"clipanion": "4.0.0-rc.4",
|
|
45
45
|
"envinfo": "7.19.0",
|
|
46
46
|
"semver": "7.7.3"
|