@verdaccio/cli 9.0.0-next-9.4 → 9.0.0-next-9.5

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.
@@ -29,18 +29,18 @@ var InitCommand = class extends clipanion.Command {
29
29
  ]
30
30
  });
31
31
  config = clipanion.Option.String("-c,--config", { description: "use this configuration file (default: ./config.yaml)" });
32
- initLogger(logConfig) {
32
+ async initLogger(logConfig) {
33
33
  if (logConfig.logs) {
34
34
  logConfig.log = logConfig.logs;
35
35
  _verdaccio_core.warningUtils.emit(_verdaccio_core.warningUtils.Codes.VERWAR002);
36
36
  }
37
- (0, _verdaccio_logger.setup)(logConfig.log);
37
+ await (0, _verdaccio_logger.setup)(logConfig.log);
38
38
  }
39
39
  async execute() {
40
40
  try {
41
41
  const configPathLocation = (0, _verdaccio_config.findConfigFile)(this.config);
42
42
  const configParsed = (0, _verdaccio_config.parseConfigFile)(configPathLocation);
43
- this.initLogger(configParsed);
43
+ await this.initLogger(configParsed);
44
44
  _verdaccio_logger.logger.info({ file: configPathLocation }, "using config file: @{file}");
45
45
  const { web } = configParsed;
46
46
  process.title = web?.title || "verdaccio";
@@ -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 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":";;;;;;AAUA,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,WAAmB,WAAuB;AACxC,MAAI,UAAU,MAAM;AAClB,aAAU,MAAM,UAAU;AAC1B,mBAAA,aAAa,KAAK,gBAAA,aAAa,MAAM,UAAU;;AAEjD,GAAA,GAAA,kBAAA,OAAM,UAAU,IAAwB;;CAG1C,MAAa,UAAU;AACrB,MAAI;GACF,MAAM,sBAAA,GAAA,kBAAA,gBAAoC,KAAK,OAAiB;GAChE,MAAM,gBAAA,GAAA,kBAAA,iBAA+B,mBAAmB;AACxD,QAAK,WAAW,aAAa;AAC7B,qBAAA,OAAO,KAAK,EAAE,MAAM,oBAAoB,EAAE,6BAA6B;GACvE,MAAM,EAAE,QAAQ;AAEhB,WAAQ,QAAQ,KAAK,SAAA;GAErB,MAAM,EAAE,SAAS,SAAS,gBAAA,SAAS,eAAe,WAAW,QAAQ;AAErE,UAAA,GAAA,oBAAA,YAAiB,cAAc,KAAK,MAAgB,SAAmB,KAAe;GAEtF,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"}
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(__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":";;;;;;AAUA,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,EAAE,SAAS,SAAS,gBAAA,SAAS,eAAe,WAAW,QAAQ;AAErE,UAAA,GAAA,oBAAA,YAAiB,cAAc,KAAK,MAAgB,SAAmB,KAAe;GAEtF,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"}
@@ -28,18 +28,18 @@ var InitCommand = class extends Command {
28
28
  ]
29
29
  });
30
30
  config = Option.String("-c,--config", { description: "use this configuration file (default: ./config.yaml)" });
31
- initLogger(logConfig) {
31
+ async initLogger(logConfig) {
32
32
  if (logConfig.logs) {
33
33
  logConfig.log = logConfig.logs;
34
34
  warningUtils.emit(warningUtils.Codes.VERWAR002);
35
35
  }
36
- setup(logConfig.log);
36
+ await setup(logConfig.log);
37
37
  }
38
38
  async execute() {
39
39
  try {
40
40
  const configPathLocation = findConfigFile(this.config);
41
41
  const configParsed = parseConfigFile(configPathLocation);
42
- this.initLogger(configParsed);
42
+ await this.initLogger(configParsed);
43
43
  logger.info({ file: configPathLocation }, "using config file: @{file}");
44
44
  const { web } = configParsed;
45
45
  process.title = web?.title || "verdaccio";
@@ -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 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":";;;;;AAUA,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,WAAmB,WAAuB;AACxC,MAAI,UAAU,MAAM;AAClB,aAAU,MAAM,UAAU;AAC1B,gBAAa,KAAK,aAAa,MAAM,UAAU;;AAEjD,QAAM,UAAU,IAAwB;;CAG1C,MAAa,UAAU;AACrB,MAAI;GACF,MAAM,qBAAqB,eAAe,KAAK,OAAiB;GAChE,MAAM,eAAe,gBAAgB,mBAAmB;AACxD,QAAK,WAAW,aAAa;AAC7B,UAAO,KAAK,EAAE,MAAM,oBAAoB,EAAE,6BAA6B;GACvE,MAAM,EAAE,QAAQ;AAEhB,WAAQ,QAAQ,KAAK,SAAA;GAErB,MAAM,EAAE,SAAS,SAAS,SAAS,eAAe,WAAW,QAAQ;AAErE,SAAM,WAAW,cAAc,KAAK,MAAgB,SAAmB,KAAe;GAEtF,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"}
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(__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":";;;;;AAUA,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,EAAE,SAAS,SAAS,SAAS,eAAe,WAAW,QAAQ;AAErE,SAAM,WAAW,cAAc,KAAK,MAAgB,SAAmB,KAAe;GAEtF,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/cli",
3
- "version": "9.0.0-next-9.4",
3
+ "version": "9.0.0-next-9.5",
4
4
  "author": {
5
5
  "name": "Juan Picado",
6
6
  "email": "juanpicado19@gmail.com"
@@ -37,18 +37,18 @@
37
37
  "main": "./build/index.js",
38
38
  "types": "build/index.d.ts",
39
39
  "dependencies": {
40
- "@verdaccio/config": "9.0.0-next-9.4",
41
- "@verdaccio/core": "9.0.0-next-9.4",
42
- "@verdaccio/logger": "9.0.0-next-9.4",
43
- "@verdaccio/node-api": "9.0.0-next-9.4",
40
+ "@verdaccio/config": "9.0.0-next-9.5",
41
+ "@verdaccio/core": "9.0.0-next-9.5",
42
+ "@verdaccio/logger": "9.0.0-next-9.5",
43
+ "@verdaccio/node-api": "9.0.0-next-9.5",
44
44
  "clipanion": "4.0.0-rc.4",
45
45
  "envinfo": "7.19.0",
46
46
  "semver": "7.7.4"
47
47
  },
48
48
  "devDependencies": {
49
- "@verdaccio/types": "14.0.0-next-9.1",
49
+ "@verdaccio/types": "14.0.0-next-9.2",
50
50
  "ts-node": "10.9.2",
51
- "vitest": "3.2.4"
51
+ "vitest": "4.1.0"
52
52
  },
53
53
  "funding": {
54
54
  "type": "opencollective",