@verdaccio/cli 9.0.0-next-9.8 → 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.
@@ -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)" });
@@ -46,7 +48,7 @@ var InitCommand = class extends clipanion.Command {
46
48
  process.title = web?.title || "verdaccio";
47
49
  const currentDir = typeof __dirname !== "undefined" ? __dirname : {}.dirname;
48
50
  const { version, name } = _verdaccio_core.pkgUtils.getPackageJson(currentDir, "../..");
49
- await (0, _verdaccio_node_api.initServer)(configParsed, this.port, version, name);
51
+ await (0, _verdaccio_node_api.initServer)(configParsed, this.port, version, name, _verdaccio_server.default);
50
52
  const logLevel = configParsed.log?.level || "default";
51
53
  _verdaccio_logger.logger.info({ logLevel }, "log level: @{logLevel}");
52
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 currentDir = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname;\n const { version, name } = pkgUtils.getPackageJson(currentDir, '../..');\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,aAAa,OAAO,cAAc,cAAc,YAAA,EAAA,CAAwB;GAC9E,MAAM,EAAE,SAAS,SAAS,gBAAA,SAAS,eAAe,YAAY,QAAQ;AAEtE,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 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":";;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
@@ -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)" });
@@ -45,7 +46,7 @@ var InitCommand = class extends Command {
45
46
  process.title = web?.title || "verdaccio";
46
47
  const currentDir = typeof __dirname !== "undefined" ? __dirname : import.meta.dirname;
47
48
  const { version, name } = pkgUtils.getPackageJson(currentDir, "../..");
48
- await initServer(configParsed, this.port, version, name);
49
+ await initServer(configParsed, this.port, version, name, startServer);
49
50
  const logLevel = configParsed.log?.level || "default";
50
51
  logger.info({ logLevel }, "log level: @{logLevel}");
51
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 currentDir = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname;\n const { version, name } = pkgUtils.getPackageJson(currentDir, '../..');\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,aAAa,OAAO,cAAc,cAAc,YAAY,OAAO,KAAK;GAC9E,MAAM,EAAE,SAAS,SAAS,SAAS,eAAe,YAAY,QAAQ;AAEtE,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 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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/cli",
3
- "version": "9.0.0-next-9.8",
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.8",
41
- "@verdaccio/core": "9.0.0-next-9.8",
42
- "@verdaccio/logger": "9.0.0-next-9.8",
43
- "@verdaccio/node-api": "9.0.0-next-9.8",
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"