@verdaccio/cli 6.0.0-6-next.51 → 6.0.0-6-next.52

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @verdaccio/cli
2
2
 
3
+ ## 6.0.0-6-next.52
4
+
5
+ ### Patch Changes
6
+
7
+ - @verdaccio/core@6.0.0-6-next.52
8
+ - @verdaccio/config@6.0.0-6-next.52
9
+ - @verdaccio/node-api@6.0.0-6-next.52
10
+ - @verdaccio/logger@6.0.0-6-next.20
11
+
3
12
  ## 6.0.0-6-next.51
4
13
 
5
14
  ### Patch Changes
package/build/cli.js CHANGED
@@ -1,26 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  var _clipanion = require("clipanion");
4
-
5
4
  var _core = require("@verdaccio/core");
6
-
7
5
  var _info = require("./commands/info");
8
-
9
6
  var _init = require("./commands/init");
10
-
11
7
  var _version = require("./commands/version");
12
-
13
8
  var _utils = require("./utils");
14
-
15
9
  if (process.getuid && process.getuid() === 0) {
16
10
  _core.warningUtils.emit(_core.warningUtils.Codes.VERWAR001);
17
11
  }
18
-
19
12
  if (!(0, _utils.isVersionValid)(process.version)) {
20
13
  throw new Error(`Verdaccio requires at least Node.js v${_utils.MIN_NODE_VERSION} or higher and you have installed ${process.version},
21
14
  please upgrade your Node.js distribution`);
22
15
  }
23
-
24
16
  const [node, app, ...args] = process.argv;
25
17
  const cli = new _clipanion.Cli({
26
18
  binaryLabel: `verdaccio`,
@@ -32,7 +24,8 @@ cli.register(_init.InitCommand);
32
24
  cli.register(_version.VersionCommand);
33
25
  cli.runExit(args, _clipanion.Cli.defaultContext);
34
26
  process.on('uncaughtException', function (err) {
35
- console.error( // eslint-disable-next-line max-len
27
+ console.error(
28
+ // eslint-disable-next-line max-len
36
29
  `uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \n${err.stack}`);
37
30
  process.exit(1);
38
31
  });
package/build/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","names":["process","getuid","warningUtils","emit","Codes","VERWAR001","isVersionValid","version","Error","MIN_NODE_VERSION","node","app","args","argv","cli","Cli","binaryLabel","binaryName","binaryVersion","require","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: require('../package.json').version,\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;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AAEA,IAAIA,OAAO,CAACC,MAAR,IAAkBD,OAAO,CAACC,MAAR,OAAqB,CAA3C,EAA8C;EAC5CC,kBAAA,CAAaC,IAAb,CAAkBD,kBAAA,CAAaE,KAAb,CAAmBC,SAArC;AACD;;AAED,IAAI,CAAC,IAAAC,qBAAA,EAAeN,OAAO,CAACO,OAAvB,CAAL,EAAsC;EACpC,MAAM,IAAIC,KAAJ,CACH,wCAAuCC,uBAAiB,qCAAoCT,OAAO,CAACO,OAAQ;AACjH,6CAFQ,CAAN;AAID;;AAED,MAAM,CAACG,IAAD,EAAOC,GAAP,EAAY,GAAGC,IAAf,IAAuBZ,OAAO,CAACa,IAArC;AAEA,MAAMC,GAAG,GAAG,IAAIC,cAAJ,CAAQ;EAClBC,WAAW,EAAG,WADI;EAElBC,UAAU,EAAG,GAAEP,IAAK,IAAGC,GAAI,EAFT;EAGlBO,aAAa,EAAEC,OAAO,CAAC,iBAAD,CAAP,CAA2BZ;AAHxB,CAAR,CAAZ;AAMAO,GAAG,CAACM,QAAJ,CAAaC,iBAAb;AACAP,GAAG,CAACM,QAAJ,CAAaE,iBAAb;AACAR,GAAG,CAACM,QAAJ,CAAaG,uBAAb;AACAT,GAAG,CAACU,OAAJ,CAAYZ,IAAZ,EAAkBG,cAAA,CAAIU,cAAtB;AAEAzB,OAAO,CAAC0B,EAAR,CAAW,mBAAX,EAAgC,UAAUC,GAAV,EAAe;EAC7CC,OAAO,CAACC,KAAR,EACE;EACC,6FAA4FF,GAAG,CAACG,KAAM,EAFzG;EAIA9B,OAAO,CAAC+B,IAAR,CAAa,CAAb;AACD,CAND"}
1
+ {"version":3,"file":"cli.js","names":["process","getuid","warningUtils","emit","Codes","VERWAR001","isVersionValid","version","Error","MIN_NODE_VERSION","node","app","args","argv","cli","Cli","binaryLabel","binaryName","binaryVersion","require","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: require('../package.json').version,\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;AAEA;AAEA;AACA;AACA;AACA;AAEA,IAAIA,OAAO,CAACC,MAAM,IAAID,OAAO,CAACC,MAAM,EAAE,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,CACZ,wCAAuCC,uBAAiB,qCAAoCT,OAAO,CAACO,OAAQ;AACjH,6CAA6C,CAC1C;AACH;AAEA,MAAM,CAACG,IAAI,EAAEC,GAAG,EAAE,GAAGC,IAAI,CAAC,GAAGZ,OAAO,CAACa,IAAI;AAEzC,MAAMC,GAAG,GAAG,IAAIC,cAAG,CAAC;EAClBC,WAAW,EAAG,WAAU;EACxBC,UAAU,EAAG,GAAEP,IAAK,IAAGC,GAAI,EAAC;EAC5BO,aAAa,EAAEC,OAAO,CAAC,iBAAiB,CAAC,CAACZ;AAC5C,CAAC,CAAC;AAEFO,GAAG,CAACM,QAAQ,CAACC,iBAAW,CAAC;AACzBP,GAAG,CAACM,QAAQ,CAACE,iBAAW,CAAC;AACzBR,GAAG,CAACM,QAAQ,CAACG,uBAAc,CAAC;AAC5BT,GAAG,CAACU,OAAO,CAACZ,IAAI,EAAEG,cAAG,CAACU,cAAc,CAAC;AAErCzB,OAAO,CAAC0B,EAAE,CAAC,mBAAmB,EAAE,UAAUC,GAAG,EAAE;EAC7CC,OAAO,CAACC,KAAK;EACX;EACC,6FAA4FF,GAAG,CAACG,KAAM,EAAC,CACzG;EACD9B,OAAO,CAAC+B,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC"}
@@ -4,16 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.InfoCommand = void 0;
7
-
8
7
  var _clipanion = require("clipanion");
9
-
10
8
  var _envinfo = _interopRequireDefault(require("envinfo"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  class InfoCommand extends _clipanion.Command {
15
11
  static paths = [[`--info`], [`-i`]];
16
-
17
12
  async execute() {
18
13
  this.context.stdout.write('\nEnvironment Info:');
19
14
  const data = await _envinfo.default.run({
@@ -26,8 +21,6 @@ class InfoCommand extends _clipanion.Command {
26
21
  this.context.stdout.write(data);
27
22
  process.exit(0);
28
23
  }
29
-
30
24
  }
31
-
32
25
  exports.InfoCommand = InfoCommand;
33
26
  //# sourceMappingURL=info.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"info.js","names":["InfoCommand","Command","paths","execute","context","stdout","write","data","envinfo","run","System","Binaries","Virtualization","Browsers","npmGlobalPackages","process","exit"],"sources":["../../src/commands/info.ts"],"sourcesContent":["import { Command } from 'clipanion';\nimport envinfo from 'envinfo';\n\nexport class InfoCommand extends Command {\n public static paths = [[`--info`], [`-i`]];\n\n public async execute(): Promise<void> {\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":";;;;;;;AAAA;;AACA;;;;AAEO,MAAMA,WAAN,SAA0BC,kBAA1B,CAAkC;EACpB,OAALC,KAAK,GAAG,CAAC,CAAE,QAAF,CAAD,EAAa,CAAE,IAAF,CAAb,CAAH;;EAEC,MAAPC,OAAO,GAAkB;IACpC,KAAKC,OAAL,CAAaC,MAAb,CAAoBC,KAApB,CAA0B,qBAA1B;IACA,MAAMC,IAAI,GAAG,MAAMC,gBAAA,CAAQC,GAAR,CAAY;MAC7BC,MAAM,EAAE,CAAC,IAAD,EAAO,KAAP,CADqB;MAE7BC,QAAQ,EAAE,CAAC,MAAD,EAAS,MAAT,EAAiB,KAAjB,EAAwB,MAAxB,CAFmB;MAG7BC,cAAc,EAAE,CAAC,QAAD,CAHa;MAI7BC,QAAQ,EAAE,CAAC,QAAD,EAAW,MAAX,EAAmB,SAAnB,EAA8B,QAA9B,CAJmB;MAK7BC,iBAAiB,EAAE,CAAC,WAAD;IALU,CAAZ,CAAnB;IAQA,KAAKV,OAAL,CAAaC,MAAb,CAAoBC,KAApB,CAA0BC,IAA1B;IACAQ,OAAO,CAACC,IAAR,CAAa,CAAb;EACD;;AAfsC"}
1
+ {"version":3,"file":"info.js","names":["InfoCommand","Command","paths","execute","context","stdout","write","data","envinfo","run","System","Binaries","Virtualization","Browsers","npmGlobalPackages","process","exit"],"sources":["../../src/commands/info.ts"],"sourcesContent":["import { Command } from 'clipanion';\nimport envinfo from 'envinfo';\n\nexport class InfoCommand extends Command {\n public static paths = [[`--info`], [`-i`]];\n\n public async execute(): Promise<void> {\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":";;;;;;AAAA;AACA;AAA8B;AAEvB,MAAMA,WAAW,SAASC,kBAAO,CAAC;EACvC,OAAcC,KAAK,GAAG,CAAC,CAAE,QAAO,CAAC,EAAE,CAAE,IAAG,CAAC,CAAC;EAE1C,MAAaC,OAAO,GAAkB;IACpC,IAAI,CAACC,OAAO,CAACC,MAAM,CAACC,KAAK,CAAC,qBAAqB,CAAC;IAChD,MAAMC,IAAI,GAAG,MAAMC,gBAAO,CAACC,GAAG,CAAC;MAC7BC,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;MACrBC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;MACzCC,cAAc,EAAE,CAAC,QAAQ,CAAC;MAC1BC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;MACjDC,iBAAiB,EAAE,CAAC,WAAW;IACjC,CAAC,CAAC;IAEF,IAAI,CAACV,OAAO,CAACC,MAAM,CAACC,KAAK,CAACC,IAAI,CAAC;IAC/BQ,OAAO,CAACC,IAAI,CAAC,CAAC,CAAC;EACjB;AACF;AAAC"}
@@ -4,26 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.InitCommand = exports.DEFAULT_PROCESS_NAME = void 0;
7
-
8
7
  var _clipanion = require("clipanion");
9
-
10
8
  var _config = require("@verdaccio/config");
11
-
12
9
  var _core = require("@verdaccio/core");
13
-
14
10
  var _logger = require("@verdaccio/logger");
15
-
16
11
  var _nodeApi = require("@verdaccio/node-api");
17
-
18
12
  const DEFAULT_PROCESS_NAME = 'verdaccio';
19
13
  exports.DEFAULT_PROCESS_NAME = DEFAULT_PROCESS_NAME;
20
-
21
14
  class InitCommand extends _clipanion.Command {
22
15
  static paths = [_clipanion.Command.Default];
23
16
  port = _clipanion.Option.String('-l,-p,--listen,--port', {
24
17
  description: 'host:port number to listen on (default: localhost:4873)'
25
- }); // eslint-disable-next-line
18
+ });
26
19
 
20
+ // eslint-disable-next-line
27
21
  static usage = _clipanion.Command.Usage({
28
22
  description: `launch the server`,
29
23
  details: `
@@ -44,19 +38,15 @@ class InitCommand extends _clipanion.Command {
44
38
  config = _clipanion.Option.String('-c,--config', {
45
39
  description: 'use this configuration file (default: ./config.yaml)'
46
40
  });
47
-
48
41
  initLogger(logConfig) {
49
42
  // @ts-expect-error
50
43
  if (logConfig.logs) {
51
44
  // @ts-expect-error
52
45
  logConfig.log = logConfig.logs;
53
-
54
46
  _core.warningUtils.emit(_core.warningUtils.Codes.VERWAR002);
55
47
  }
56
-
57
48
  (0, _logger.setup)(logConfig.log);
58
49
  }
59
-
60
50
  async execute() {
61
51
  try {
62
52
  const configPathLocation = (0, _config.findConfigFile)(this.config);
@@ -66,22 +56,17 @@ class InitCommand extends _clipanion.Command {
66
56
  web
67
57
  } = configParsed;
68
58
  process.title = (web === null || web === void 0 ? void 0 : web.title) || DEFAULT_PROCESS_NAME;
69
-
70
59
  const {
71
60
  version,
72
61
  name
73
62
  } = require('../../package.json');
74
-
75
63
  await (0, _nodeApi.initServer)(configParsed, this.port, version, name);
76
-
77
64
  _logger.logger.info('server started');
78
65
  } catch (err) {
79
66
  console.error(err);
80
67
  process.exit(1);
81
68
  }
82
69
  }
83
-
84
70
  }
85
-
86
71
  exports.InitCommand = InitCommand;
87
72
  //# sourceMappingURL=init.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","names":["DEFAULT_PROCESS_NAME","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","web","process","title","version","name","require","initServer","logger","info","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 // @ts-expect-error\n if (logConfig.logs) {\n // @ts-expect-error\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 const { web } = configParsed;\n\n process.title = web?.title || DEFAULT_PROCESS_NAME;\n\n const { version, name } = require('../../package.json');\n\n await initServer(configParsed, this.port as string, version, name);\n logger.info('server started');\n } catch (err: any) {\n console.error(err);\n process.exit(1);\n }\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AAGO,MAAMA,oBAA4B,GAAG,WAArC;;;AAEA,MAAMC,WAAN,SAA0BC,kBAA1B,CAAkC;EACpB,OAALC,KAAK,GAAG,CAACD,kBAAA,CAAQE,OAAT,CAAH;EAEXC,IAAI,GAAGC,iBAAA,CAAOC,MAAP,CAAc,uBAAd,EAAuC;IACpDC,WAAW,EAAE;EADuC,CAAvC,CAAH,CAH2B,CAOvC;;EACY,OAALC,KAAK,GAAGP,kBAAA,CAAQQ,KAAR,CAAc;IAC3BF,WAAW,EAAG,mBADa;IAE3BG,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAd+B;IAe3BC,QAAQ,EAAE,CACR,CAAE,gDAAF,EAAoD,WAApD,CADQ,EAER,CAAE,kCAAF,EAAsC,yBAAtC,CAFQ,EAGR,CACG,kFADH,EAEG,qDAFH,CAHQ;EAfiB,CAAd,CAAH;EAyBJC,MAAM,GAAGP,iBAAA,CAAOC,MAAP,CAAc,aAAd,EAA6B;IAC5CC,WAAW,EAAE;EAD+B,CAA7B,CAAH;;EAINM,UAAU,CAACC,SAAD,EAAwB;IACxC;IACA,IAAIA,SAAS,CAACC,IAAd,EAAoB;MAClB;MACAD,SAAS,CAACE,GAAV,GAAgBF,SAAS,CAACC,IAA1B;;MACAE,kBAAA,CAAaC,IAAb,CAAkBD,kBAAA,CAAaE,KAAb,CAAmBC,SAArC;IACD;;IACD,IAAAC,aAAA,EAAMP,SAAS,CAACE,GAAhB;EACD;;EAEmB,MAAPM,OAAO,GAAG;IACrB,IAAI;MACF,MAAMC,kBAAkB,GAAG,IAAAC,sBAAA,EAAe,KAAKZ,MAApB,CAA3B;MACA,MAAMa,YAAY,GAAG,IAAAC,uBAAA,EAAgBH,kBAAhB,CAArB;MACA,KAAKV,UAAL,CAAgBY,YAAhB;MACA,MAAM;QAAEE;MAAF,IAAUF,YAAhB;MAEAG,OAAO,CAACC,KAAR,GAAgB,CAAAF,GAAG,SAAH,IAAAA,GAAG,WAAH,YAAAA,GAAG,CAAEE,KAAL,KAAc9B,oBAA9B;;MAEA,MAAM;QAAE+B,OAAF;QAAWC;MAAX,IAAoBC,OAAO,CAAC,oBAAD,CAAjC;;MAEA,MAAM,IAAAC,mBAAA,EAAWR,YAAX,EAAyB,KAAKrB,IAA9B,EAA8C0B,OAA9C,EAAuDC,IAAvD,CAAN;;MACAG,cAAA,CAAOC,IAAP,CAAY,gBAAZ;IACD,CAZD,CAYE,OAAOC,GAAP,EAAiB;MACjBC,OAAO,CAACC,KAAR,CAAcF,GAAd;MACAR,OAAO,CAACW,IAAR,CAAa,CAAb;IACD;EACF;;AAhEsC"}
1
+ {"version":3,"file":"init.js","names":["DEFAULT_PROCESS_NAME","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","web","process","title","version","name","require","initServer","logger","info","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 // @ts-expect-error\n if (logConfig.logs) {\n // @ts-expect-error\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 const { web } = configParsed;\n\n process.title = web?.title || DEFAULT_PROCESS_NAME;\n\n const { version, name } = require('../../package.json');\n\n await initServer(configParsed, this.port as string, version, name);\n logger.info('server started');\n } catch (err: any) {\n console.error(err);\n process.exit(1);\n }\n }\n}\n"],"mappings":";;;;;;AAAA;AAEA;AACA;AACA;AACA;AAGO,MAAMA,oBAA4B,GAAG,WAAW;AAAC;AAEjD,MAAMC,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,EAAG,mBAAkB;IAChCG,OAAO,EAAG;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,QAAQ,EAAE,CACR,CAAE,gDAA+C,EAAG,WAAU,CAAC,EAC/D,CAAE,kCAAiC,EAAG,yBAAwB,CAAC,EAC/D,CACG,kFAAiF,EACjF,qDAAoD,CACtD;EAEL,CAAC,CAAC;EAEMC,MAAM,GAAGP,iBAAM,CAACC,MAAM,CAAC,aAAa,EAAE;IAC5CC,WAAW,EAAE;EACf,CAAC,CAAC;EAEMM,UAAU,CAACC,SAAqB,EAAE;IACxC;IACA,IAAIA,SAAS,CAACC,IAAI,EAAE;MAClB;MACAD,SAAS,CAACE,GAAG,GAAGF,SAAS,CAACC,IAAI;MAC9BE,kBAAY,CAACC,IAAI,CAACD,kBAAY,CAACE,KAAK,CAACC,SAAS,CAAC;IACjD;IACA,IAAAC,aAAK,EAACP,SAAS,CAACE,GAAG,CAAqB;EAC1C;EAEA,MAAaM,OAAO,GAAG;IACrB,IAAI;MACF,MAAMC,kBAAkB,GAAG,IAAAC,sBAAc,EAAC,IAAI,CAACZ,MAAM,CAAW;MAChE,MAAMa,YAAY,GAAG,IAAAC,uBAAe,EAACH,kBAAkB,CAAC;MACxD,IAAI,CAACV,UAAU,CAACY,YAAY,CAAC;MAC7B,MAAM;QAAEE;MAAI,CAAC,GAAGF,YAAY;MAE5BG,OAAO,CAACC,KAAK,GAAG,CAAAF,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEE,KAAK,KAAI9B,oBAAoB;MAElD,MAAM;QAAE+B,OAAO;QAAEC;MAAK,CAAC,GAAGC,OAAO,CAAC,oBAAoB,CAAC;MAEvD,MAAM,IAAAC,mBAAU,EAACR,YAAY,EAAE,IAAI,CAACrB,IAAI,EAAY0B,OAAO,EAAEC,IAAI,CAAC;MAClEG,cAAM,CAACC,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC,CAAC,OAAOC,GAAQ,EAAE;MACjBC,OAAO,CAACC,KAAK,CAACF,GAAG,CAAC;MAClBR,OAAO,CAACW,IAAI,CAAC,CAAC,CAAC;IACjB;EACF;AACF;AAAC"}
@@ -4,21 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.VersionCommand = void 0;
7
-
8
7
  var _clipanion = require("clipanion");
9
-
10
8
  /* eslint-disable @typescript-eslint/explicit-member-accessibility */
9
+
11
10
  class VersionCommand extends _clipanion.Command {
12
11
  static paths = [[`--version`], [`-v`]];
13
-
14
12
  async execute() {
15
13
  const version = require('../../package.json').version;
16
-
17
14
  this.context.stdout.write(`v${version}\n`);
18
15
  process.exit(0);
19
16
  }
20
-
21
17
  }
22
-
23
18
  exports.VersionCommand = VersionCommand;
24
19
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":["VersionCommand","Command","paths","execute","version","require","context","stdout","write","process","exit"],"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 = require('../../package.json').version;\n this.context.stdout.write(`v${version}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;;;;;AACA;;AADA;AAGO,MAAMA,cAAN,SAA6BC,kBAA7B,CAAqC;EAC9B,OAALC,KAAK,GAAG,CAAC,CAAE,WAAF,CAAD,EAAgB,CAAE,IAAF,CAAhB,CAAH;;EAEC,MAAPC,OAAO,GAAG;IACd,MAAMC,OAAO,GAAGC,OAAO,CAAC,oBAAD,CAAP,CAA8BD,OAA9C;;IACA,KAAKE,OAAL,CAAaC,MAAb,CAAoBC,KAApB,CAA2B,IAAGJ,OAAQ,IAAtC;IACAK,OAAO,CAACC,IAAR,CAAa,CAAb;EACD;;AAPyC"}
1
+ {"version":3,"file":"version.js","names":["VersionCommand","Command","paths","execute","version","require","context","stdout","write","process","exit"],"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 = require('../../package.json').version;\n this.context.stdout.write(`v${version}\\n`);\n process.exit(0);\n }\n}\n"],"mappings":";;;;;;AACA;AADA;;AAGO,MAAMA,cAAc,SAASC,kBAAO,CAAC;EAC1C,OAAOC,KAAK,GAAG,CAAC,CAAE,WAAU,CAAC,EAAE,CAAE,IAAG,CAAC,CAAC;EAEtC,MAAMC,OAAO,GAAG;IACd,MAAMC,OAAO,GAAGC,OAAO,CAAC,oBAAoB,CAAC,CAACD,OAAO;IACrD,IAAI,CAACE,OAAO,CAACC,MAAM,CAACC,KAAK,CAAE,IAAGJ,OAAQ,IAAG,CAAC;IAC1CK,OAAO,CAACC,IAAI,CAAC,CAAC,CAAC;EACjB;AACF;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["require"],"sources":["../src/index.ts"],"sourcesContent":["require('./cli');\n"],"mappings":";;AAAAA,OAAO,CAAC,OAAD,CAAP"}
1
+ {"version":3,"file":"index.js","names":["require"],"sources":["../src/index.ts"],"sourcesContent":["require('./cli');\n"],"mappings":";;AAAAA,OAAO,CAAC,OAAO,CAAC"}
package/build/utils.js CHANGED
@@ -5,14 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.MIN_NODE_VERSION = void 0;
7
7
  exports.isVersionValid = isVersionValid;
8
-
9
8
  var _semver = _interopRequireDefault(require("semver"));
10
-
11
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
10
  const MIN_NODE_VERSION = '14.0.0';
14
11
  exports.MIN_NODE_VERSION = MIN_NODE_VERSION;
15
-
16
12
  function isVersionValid(processVersion) {
17
13
  const version = processVersion.slice(1);
18
14
  return _semver.default.satisfies(version, `>=${MIN_NODE_VERSION}`);
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["MIN_NODE_VERSION","isVersionValid","processVersion","version","slice","semver","satisfies"],"sources":["../src/utils.ts"],"sourcesContent":["import semver from 'semver';\n\nexport const MIN_NODE_VERSION = '14.0.0';\n\nexport function isVersionValid(processVersion) {\n const version = processVersion.slice(1);\n return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);\n}\n"],"mappings":";;;;;;;;AAAA;;;;AAEO,MAAMA,gBAAgB,GAAG,QAAzB;;;AAEA,SAASC,cAAT,CAAwBC,cAAxB,EAAwC;EAC7C,MAAMC,OAAO,GAAGD,cAAc,CAACE,KAAf,CAAqB,CAArB,CAAhB;EACA,OAAOC,eAAA,CAAOC,SAAP,CAAiBH,OAAjB,EAA2B,KAAIH,gBAAiB,EAAhD,CAAP;AACD"}
1
+ {"version":3,"file":"utils.js","names":["MIN_NODE_VERSION","isVersionValid","processVersion","version","slice","semver","satisfies"],"sources":["../src/utils.ts"],"sourcesContent":["import semver from 'semver';\n\nexport const MIN_NODE_VERSION = '14.0.0';\n\nexport function isVersionValid(processVersion) {\n const version = processVersion.slice(1);\n return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);\n}\n"],"mappings":";;;;;;;AAAA;AAA4B;AAErB,MAAMA,gBAAgB,GAAG,QAAQ;AAAC;AAElC,SAASC,cAAc,CAACC,cAAc,EAAE;EAC7C,MAAMC,OAAO,GAAGD,cAAc,CAACE,KAAK,CAAC,CAAC,CAAC;EACvC,OAAOC,eAAM,CAACC,SAAS,CAACH,OAAO,EAAG,KAAIH,gBAAiB,EAAC,CAAC;AAC3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/cli",
3
- "version": "6.0.0-6-next.51",
3
+ "version": "6.0.0-6-next.52",
4
4
  "author": {
5
5
  "name": "Juan Picado",
6
6
  "email": "juanpicado19@gmail.com"
@@ -34,10 +34,10 @@
34
34
  "main": "./build/index.js",
35
35
  "types": "build/index.d.ts",
36
36
  "dependencies": {
37
- "@verdaccio/core": "6.0.0-6-next.51",
38
- "@verdaccio/config": "6.0.0-6-next.51",
39
- "@verdaccio/logger": "6.0.0-6-next.19",
40
- "@verdaccio/node-api": "6.0.0-6-next.51",
37
+ "@verdaccio/core": "6.0.0-6-next.52",
38
+ "@verdaccio/config": "6.0.0-6-next.52",
39
+ "@verdaccio/logger": "6.0.0-6-next.20",
40
+ "@verdaccio/node-api": "6.0.0-6-next.52",
41
41
  "clipanion": "3.1.0",
42
42
  "envinfo": "7.8.1",
43
43
  "kleur": "3.0.3",