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

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.
@@ -0,0 +1,23 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ exports.__toESM = __toESM;
package/build/cli.js CHANGED
@@ -1,38 +1,28 @@
1
- "use strict";
2
-
3
- var _clipanion = require("clipanion");
4
- var _core = require("@verdaccio/core");
5
- var _info = require("./commands/info");
6
- var _init = require("./commands/init");
7
- var _version = require("./commands/version");
8
- var _utils = require("./utils");
9
- function _toArray(r) { return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest(); }
10
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
- function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
14
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
15
- if (process.getuid && process.getuid() === 0) {
16
- _core.warningUtils.emit(_core.warningUtils.Codes.VERWAR001);
17
- }
18
- if (!(0, _utils.isVersionValid)(process.version)) {
19
- throw new Error("Verdaccio requires at least Node.js v".concat(_utils.MIN_NODE_VERSION, " or higher and you have installed ").concat(process.version, ", \n please upgrade your Node.js distribution"));
20
- }
21
- var _process$argv = _toArray(process.argv),
22
- node = _process$argv[0],
23
- app = _process$argv[1],
24
- args = _process$argv.slice(2);
25
- var cli = new _clipanion.Cli({
26
- binaryLabel: "verdaccio",
27
- binaryName: "".concat(node, " ").concat(app),
28
- binaryVersion: _core.pkgUtils.getPackageJson(__dirname, '..').version
1
+ require("./_virtual/_rolldown/runtime.js");
2
+ const require_info = require("./commands/info.js");
3
+ const require_init = require("./commands/init.js");
4
+ const require_version = require("./commands/version.js");
5
+ const require_utils = require("./utils.js");
6
+ let clipanion = require("clipanion");
7
+ let _verdaccio_core = require("@verdaccio/core");
8
+ //#region src/cli.ts
9
+ if (process.getuid && process.getuid() === 0) _verdaccio_core.warningUtils.emit(_verdaccio_core.warningUtils.Codes.VERWAR001);
10
+ if (!require_utils.isVersionValid(process.version)) throw new Error(`Verdaccio requires at least Node.js v${require_utils.MIN_NODE_VERSION} or higher and you have installed ${process.version},
11
+ please upgrade your Node.js distribution`);
12
+ var [node, app, ...args] = process.argv;
13
+ var cli = new clipanion.Cli({
14
+ binaryLabel: `verdaccio`,
15
+ binaryName: `${node} ${app}`,
16
+ binaryVersion: _verdaccio_core.pkgUtils.getPackageJson(__dirname, "..").version
29
17
  });
30
- cli.register(_info.InfoCommand);
31
- cli.register(_init.InitCommand);
32
- cli.register(_version.VersionCommand);
33
- cli.runExit(args, _clipanion.Cli.defaultContext);
34
- process.on('uncaughtException', function (err) {
35
- console.error("uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \n".concat(err.stack));
36
- process.exit(1);
18
+ cli.register(require_info.InfoCommand);
19
+ cli.register(require_init.InitCommand);
20
+ cli.register(require_version.VersionCommand);
21
+ cli.runExit(args, clipanion.Cli.defaultContext);
22
+ process.on("uncaughtException", function(err) {
23
+ console.error(`uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \n${err.stack}`);
24
+ process.exit(1);
37
25
  });
26
+ //#endregion
27
+
38
28
  //# sourceMappingURL=cli.js.map
package/build/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","names":["_clipanion","require","_core","_info","_init","_version","_utils","_toArray","r","_arrayWithHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","t","toString","call","slice","constructor","name","Array","from","test","length","e","n","Symbol","iterator","isArray","process","getuid","warningUtils","emit","Codes","VERWAR001","isVersionValid","version","Error","concat","MIN_NODE_VERSION","_process$argv","argv","node","app","args","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 `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;AAA2D,SAAAM,SAAAC,CAAA,WAAAC,eAAA,CAAAD,CAAA,KAAAE,gBAAA,CAAAF,CAAA,KAAAG,2BAAA,CAAAH,CAAA,KAAAI,gBAAA;AAAA,SAAAA,iBAAA,cAAAC,SAAA;AAAA,SAAAF,4BAAAH,CAAA,EAAAM,CAAA,QAAAN,CAAA,2BAAAA,CAAA,SAAAO,iBAAA,CAAAP,CAAA,EAAAM,CAAA,OAAAE,CAAA,MAAAC,QAAA,CAAAC,IAAA,CAAAV,CAAA,EAAAW,KAAA,6BAAAH,CAAA,IAAAR,CAAA,CAAAY,WAAA,KAAAJ,CAAA,GAAAR,CAAA,CAAAY,WAAA,CAAAC,IAAA,aAAAL,CAAA,cAAAA,CAAA,GAAAM,KAAA,CAAAC,IAAA,CAAAf,CAAA,oBAAAQ,CAAA,+CAAAQ,IAAA,CAAAR,CAAA,IAAAD,iBAAA,CAAAP,CAAA,EAAAM,CAAA;AAA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AC,CAAChB;AAC1D,CAAC,CAAC;AAEFS,GAAG,CAACQ,QAAQ,CAACC,iBAAW,CAAC;AACzBT,GAAG,CAACQ,QAAQ,CAACE,iBAAW,CAAC;AACzBV,GAAG,CAACQ,QAAQ,CAACG,uBAAc,CAAC;AAC5BX,GAAG,CAACY,OAAO,CAACb,IAAI,EAAEE,cAAG,CAACY,cAAc,CAAC;AAErC7B,OAAO,CAAC8B,EAAE,CAAC,mBAAmB,EAAE,UAAUC,GAAG,EAAE;EAC7CC,OAAO,CAACC,KAAK,8FAAAxB,MAAA,CACkFsB,GAAG,CAACG,KAAK,CACxG,CAAC;EACDlC,OAAO,CAACmC,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC","ignoreList":[]}
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 { 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 `uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \\n${err.stack}`\n );\n process.exit(1);\n});\n"],"mappings":";;;;;;;;AASA,IAAI,QAAQ,UAAU,QAAQ,QAAQ,KAAK,EACzC,iBAAA,aAAa,KAAK,gBAAA,aAAa,MAAM,UAAU;AAGjD,IAAI,CAAC,cAAA,eAAe,QAAQ,QAAQ,CAClC,OAAM,IAAI,MACR,wCAAwC,cAAA,iBAAiB,oCAAoC,QAAQ,QAAQ;8CAE9G;AAGH,IAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,QAAQ;AAErC,IAAM,MAAM,IAAI,UAAA,IAAI;CAClB,aAAa;CACb,YAAY,GAAG,KAAK,GAAG;CACvB,eAAe,gBAAA,SAAS,eAAe,WAAW,KAAK,CAAC;CACzD,CAAC;AAEF,IAAI,SAAS,aAAA,YAAY;AACzB,IAAI,SAAS,aAAA,YAAY;AACzB,IAAI,SAAS,gBAAA,eAAe;AAC5B,IAAI,QAAQ,MAAM,UAAA,IAAI,eAAe;AAErC,QAAQ,GAAG,qBAAqB,SAAU,KAAK;AAC7C,SAAQ,MACN,6FAA6F,IAAI,QAClG;AACD,SAAQ,KAAK,EAAE;EACf"}
package/build/cli.mjs ADDED
@@ -0,0 +1,27 @@
1
+ import { InfoCommand } from "./commands/info.mjs";
2
+ import { InitCommand } from "./commands/init.mjs";
3
+ import { VersionCommand } from "./commands/version.mjs";
4
+ import { MIN_NODE_VERSION, isVersionValid } from "./utils.mjs";
5
+ import { Cli } from "clipanion";
6
+ import { pkgUtils, warningUtils } from "@verdaccio/core";
7
+ //#region src/cli.ts
8
+ if (process.getuid && process.getuid() === 0) warningUtils.emit(warningUtils.Codes.VERWAR001);
9
+ if (!isVersionValid(process.version)) throw new Error(`Verdaccio requires at least Node.js v${MIN_NODE_VERSION} or higher and you have installed ${process.version},
10
+ please upgrade your Node.js distribution`);
11
+ var [node, app, ...args] = process.argv;
12
+ var cli = new Cli({
13
+ binaryLabel: `verdaccio`,
14
+ binaryName: `${node} ${app}`,
15
+ binaryVersion: pkgUtils.getPackageJson(__dirname, "..").version
16
+ });
17
+ cli.register(InfoCommand);
18
+ cli.register(InitCommand);
19
+ cli.register(VersionCommand);
20
+ cli.runExit(args, Cli.defaultContext);
21
+ process.on("uncaughtException", function(err) {
22
+ console.error(`uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \n${err.stack}`);
23
+ process.exit(1);
24
+ });
25
+ //#endregion
26
+
27
+ //# sourceMappingURL=cli.mjs.map
@@ -0,0 +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 { 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 `uncaught exception, please report (https://github.com/verdaccio/verdaccio/issues) this: \\n${err.stack}`\n );\n process.exit(1);\n});\n"],"mappings":";;;;;;;AASA,IAAI,QAAQ,UAAU,QAAQ,QAAQ,KAAK,EACzC,cAAa,KAAK,aAAa,MAAM,UAAU;AAGjD,IAAI,CAAC,eAAe,QAAQ,QAAQ,CAClC,OAAM,IAAI,MACR,wCAAwC,iBAAiB,oCAAoC,QAAQ,QAAQ;8CAE9G;AAGH,IAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,QAAQ;AAErC,IAAM,MAAM,IAAI,IAAI;CAClB,aAAa;CACb,YAAY,GAAG,KAAK,GAAG;CACvB,eAAe,SAAS,eAAe,WAAW,KAAK,CAAC;CACzD,CAAC;AAEF,IAAI,SAAS,YAAY;AACzB,IAAI,SAAS,YAAY;AACzB,IAAI,SAAS,eAAe;AAC5B,IAAI,QAAQ,MAAM,IAAI,eAAe;AAErC,QAAQ,GAAG,qBAAqB,SAAU,KAAK;AAC7C,SAAQ,MACN,6FAA6F,IAAI,QAClG;AACD,SAAQ,KAAK,EAAE;EACf"}
@@ -1,68 +1,34 @@
1
- "use strict";
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.js");
2
+ let clipanion = require("clipanion");
3
+ let envinfo = require("envinfo");
4
+ envinfo = require_runtime.__toESM(envinfo);
5
+ //#region src/commands/info.ts
6
+ var InfoCommand = class extends clipanion.Command {
7
+ static paths = [[`--info`], [`-i`]];
8
+ async execute() {
9
+ this.context.stdout.write("\nEnvironment Info:");
10
+ const data = await envinfo.default.run({
11
+ System: ["OS", "CPU"],
12
+ Binaries: [
13
+ "node",
14
+ "yarn",
15
+ "npm",
16
+ "pnpm"
17
+ ],
18
+ Virtualization: ["Docker"],
19
+ Browsers: [
20
+ "Chrome",
21
+ "Edge",
22
+ "Firefox",
23
+ "Safari"
24
+ ],
25
+ npmGlobalPackages: ["verdaccio"]
26
+ });
27
+ this.context.stdout.write(data);
28
+ process.exit(0);
29
+ }
30
+ };
31
+ //#endregion
32
+ exports.InfoCommand = InfoCommand;
2
33
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.InfoCommand = void 0;
7
- var _clipanion = require("clipanion");
8
- var _envinfo = _interopRequireDefault(require("envinfo"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
- function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
12
- function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
13
- function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
14
- function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
15
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
20
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
21
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
22
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
23
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
24
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
25
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
26
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
27
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
28
- var InfoCommand = exports.InfoCommand = /*#__PURE__*/function (_Command) {
29
- function InfoCommand() {
30
- _classCallCheck(this, InfoCommand);
31
- return _callSuper(this, InfoCommand, arguments);
32
- }
33
- _inherits(InfoCommand, _Command);
34
- return _createClass(InfoCommand, [{
35
- key: "execute",
36
- value: function () {
37
- var _execute = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
38
- var data;
39
- return _regenerator().w(function (_context) {
40
- while (1) switch (_context.n) {
41
- case 0:
42
- this.context.stdout.write('\nEnvironment Info:');
43
- _context.n = 1;
44
- return _envinfo["default"].run({
45
- System: ['OS', 'CPU'],
46
- Binaries: ['node', 'yarn', 'npm', 'pnpm'],
47
- Virtualization: ['Docker'],
48
- Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],
49
- npmGlobalPackages: ['verdaccio']
50
- });
51
- case 1:
52
- data = _context.v;
53
- this.context.stdout.write(data);
54
- process.exit(0);
55
- case 2:
56
- return _context.a(2);
57
- }
58
- }, _callee, this);
59
- }));
60
- function execute() {
61
- return _execute.apply(this, arguments);
62
- }
63
- return execute;
64
- }()
65
- }]);
66
- }(_clipanion.Command);
67
- _defineProperty(InfoCommand, "paths", [["--info"], ["-i"]]);
68
34
  //# sourceMappingURL=info.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"info.js","names":["_clipanion","require","_envinfo","_interopRequireDefault","e","__esModule","_typeof","o","Symbol","iterator","constructor","prototype","_regenerator","t","r","n","toStringTag","i","c","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","w","m","defineProperty","_regeneratorDefine","_invoke","enumerable","configurable","writable","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","_classCallCheck","_defineProperties","_toPropertyKey","key","_createClass","_callSuper","_getPrototypeOf","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","_assertThisInitialized","ReferenceError","Boolean","valueOf","_inherits","_setPrototypeOf","_defineProperty","_toPrimitive","toPrimitive","String","Number","InfoCommand","exports","_Command","_execute","_callee","data","_context","context","stdout","write","envinfo","run","System","Binaries","Virtualization","Browsers","npmGlobalPackages","process","exit","execute","Command"],"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,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8B,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,gBAAAA,CAAA;AAAA,SAAAE,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC,CAAA;AAAA,SAAAK,aAAA,IAA9B,uKAAAR,CAAA,EAAAS,CAAA,EAAAC,CAAA,wBAAAN,MAAA,GAAAA,MA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AD,SAAA;MAAA;MAAA,OAAP6C,OAAO;IAAA;EAAA;AAAA,EAHWC,kBAAO;AAAAzB,eAAA,CAA3BK,WAAW,WACA,CAAC,UAAU,EAAE,MAAM,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"info.js","names":[],"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":";;;;;AAGA,IAAa,cAAb,cAAiC,UAAA,QAAQ;CACvC,OAAc,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC;CAE1C,MAAa,UAAyB;AACpC,OAAK,QAAQ,OAAO,MAAM,sBAAsB;EAChD,MAAM,OAAO,MAAM,QAAA,QAAQ,IAAI;GAC7B,QAAQ,CAAC,MAAM,MAAM;GACrB,UAAU;IAAC;IAAQ;IAAQ;IAAO;IAAO;GACzC,gBAAgB,CAAC,SAAS;GAC1B,UAAU;IAAC;IAAU;IAAQ;IAAW;IAAS;GACjD,mBAAmB,CAAC,YAAY;GACjC,CAAC;AAEF,OAAK,QAAQ,OAAO,MAAM,KAAK;AAC/B,UAAQ,KAAK,EAAE"}
@@ -0,0 +1,32 @@
1
+ import { Command } from "clipanion";
2
+ import envinfo from "envinfo";
3
+ //#region src/commands/info.ts
4
+ var InfoCommand = class extends Command {
5
+ static paths = [[`--info`], [`-i`]];
6
+ async execute() {
7
+ this.context.stdout.write("\nEnvironment Info:");
8
+ const data = await envinfo.run({
9
+ System: ["OS", "CPU"],
10
+ Binaries: [
11
+ "node",
12
+ "yarn",
13
+ "npm",
14
+ "pnpm"
15
+ ],
16
+ Virtualization: ["Docker"],
17
+ Browsers: [
18
+ "Chrome",
19
+ "Edge",
20
+ "Firefox",
21
+ "Safari"
22
+ ],
23
+ npmGlobalPackages: ["verdaccio"]
24
+ });
25
+ this.context.stdout.write(data);
26
+ process.exit(0);
27
+ }
28
+ };
29
+ //#endregion
30
+ export { InfoCommand };
31
+
32
+ //# sourceMappingURL=info.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.mjs","names":[],"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":";;;AAGA,IAAa,cAAb,cAAiC,QAAQ;CACvC,OAAc,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC;CAE1C,MAAa,UAAyB;AACpC,OAAK,QAAQ,OAAO,MAAM,sBAAsB;EAChD,MAAM,OAAO,MAAM,QAAQ,IAAI;GAC7B,QAAQ,CAAC,MAAM,MAAM;GACrB,UAAU;IAAC;IAAQ;IAAQ;IAAO;IAAO;GACzC,gBAAgB,CAAC,SAAS;GAC1B,UAAU;IAAC;IAAU;IAAQ;IAAW;IAAS;GACjD,mBAAmB,CAAC,YAAY;GACjC,CAAC;AAEF,OAAK,QAAQ,OAAO,MAAM,KAAK;AAC/B,UAAQ,KAAK,EAAE"}
@@ -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("clipanion").Usage;
6
+ static usage: import('clipanion').Usage;
7
7
  private config;
8
8
  private initLogger;
9
9
  execute(): Promise<void>;
@@ -1,108 +1,61 @@
1
- "use strict";
1
+ require("../_virtual/_rolldown/runtime.js");
2
+ let clipanion = require("clipanion");
3
+ let _verdaccio_core = require("@verdaccio/core");
4
+ let _verdaccio_config = require("@verdaccio/config");
5
+ let _verdaccio_logger = require("@verdaccio/logger");
6
+ let _verdaccio_node_api = require("@verdaccio/node-api");
7
+ var InitCommand = class extends clipanion.Command {
8
+ static paths = [clipanion.Command.Default];
9
+ port = clipanion.Option.String("-l,-p,--listen,--port", { description: "host:port number to listen on (default: localhost:4873)" });
10
+ static usage = clipanion.Command.Usage({
11
+ description: `launch the server`,
12
+ details: `
13
+ This start the registry in the default port.
14
+
15
+ When used without arguments, it:
16
+
17
+ - bootstrap the server at the port \`4873\`
18
+
19
+ The optional arguments are:
20
+
21
+ - \`-l | --listen | -p | --port\` to switch the default server port,
22
+ - \`-c | --config\` to define a different configuration path location,
23
+
24
+ `,
25
+ examples: [
26
+ [`Runs the server with the default configuration`, `verdaccio`],
27
+ [`Runs the server in the port 5000`, `verdaccio --listen 5000`],
28
+ [`Runs the server by using a different absolute location of the configuration file`, `verdaccio --config /home/user/verdaccio/config.yaml`]
29
+ ]
30
+ });
31
+ config = clipanion.Option.String("-c,--config", { description: "use this configuration file (default: ./config.yaml)" });
32
+ initLogger(logConfig) {
33
+ if (logConfig.logs) {
34
+ logConfig.log = logConfig.logs;
35
+ _verdaccio_core.warningUtils.emit(_verdaccio_core.warningUtils.Codes.VERWAR002);
36
+ }
37
+ (0, _verdaccio_logger.setup)(logConfig.log);
38
+ }
39
+ async execute() {
40
+ try {
41
+ const configPathLocation = (0, _verdaccio_config.findConfigFile)(this.config);
42
+ const configParsed = (0, _verdaccio_config.parseConfigFile)(configPathLocation);
43
+ this.initLogger(configParsed);
44
+ _verdaccio_logger.logger.info({ file: configPathLocation }, "using config file: @{file}");
45
+ const { web } = configParsed;
46
+ process.title = web?.title || "verdaccio";
47
+ const { version, name } = _verdaccio_core.pkgUtils.getPackageJson(__dirname, "../..");
48
+ await (0, _verdaccio_node_api.initServer)(configParsed, this.port, version, name);
49
+ const logLevel = configParsed.log?.level || "default";
50
+ _verdaccio_logger.logger.info({ logLevel }, "log level: @{logLevel}");
51
+ _verdaccio_logger.logger.info("server started");
52
+ } catch (err) {
53
+ console.error(err);
54
+ process.exit(1);
55
+ }
56
+ }
57
+ };
58
+ //#endregion
59
+ exports.InitCommand = InitCommand;
2
60
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.InitCommand = exports.DEFAULT_PROCESS_NAME = void 0;
7
- var _clipanion = require("clipanion");
8
- var _config = require("@verdaccio/config");
9
- var _core = require("@verdaccio/core");
10
- var _logger = require("@verdaccio/logger");
11
- var _nodeApi = require("@verdaccio/node-api");
12
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
- function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
14
- function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
15
- function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
16
- function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
17
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
18
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
19
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
20
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
21
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
22
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
23
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
25
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
26
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
27
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
28
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
29
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
30
- var DEFAULT_PROCESS_NAME = exports.DEFAULT_PROCESS_NAME = 'verdaccio';
31
- var InitCommand = exports.InitCommand = /*#__PURE__*/function (_Command) {
32
- function InitCommand() {
33
- var _this;
34
- _classCallCheck(this, InitCommand);
35
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
36
- args[_key] = arguments[_key];
37
- }
38
- _this = _callSuper(this, InitCommand, [].concat(args));
39
- _defineProperty(_this, "port", _clipanion.Option.String('-l,-p,--listen,--port', {
40
- description: 'host:port number to listen on (default: localhost:4873)'
41
- }));
42
- _defineProperty(_this, "config", _clipanion.Option.String('-c,--config', {
43
- description: 'use this configuration file (default: ./config.yaml)'
44
- }));
45
- return _this;
46
- }
47
- _inherits(InitCommand, _Command);
48
- return _createClass(InitCommand, [{
49
- key: "initLogger",
50
- value: function initLogger(logConfig) {
51
- if (logConfig.logs) {
52
- logConfig.log = logConfig.logs;
53
- _core.warningUtils.emit(_core.warningUtils.Codes.VERWAR002);
54
- }
55
- (0, _logger.setup)(logConfig.log);
56
- }
57
- }, {
58
- key: "execute",
59
- value: function () {
60
- var _execute = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
61
- var _configParsed$log, configPathLocation, configParsed, web, _pkgUtils$getPackageJ, version, name, logLevel, _t;
62
- return _regenerator().w(function (_context) {
63
- while (1) switch (_context.p = _context.n) {
64
- case 0:
65
- _context.p = 0;
66
- configPathLocation = (0, _config.findConfigFile)(this.config);
67
- configParsed = (0, _config.parseConfigFile)(configPathLocation);
68
- this.initLogger(configParsed);
69
- _logger.logger.info({
70
- file: configPathLocation
71
- }, 'using config file: @{file}');
72
- web = configParsed.web;
73
- process.title = (web === null || web === void 0 ? void 0 : web.title) || DEFAULT_PROCESS_NAME;
74
- _pkgUtils$getPackageJ = _core.pkgUtils.getPackageJson(__dirname, '../..'), version = _pkgUtils$getPackageJ.version, name = _pkgUtils$getPackageJ.name;
75
- _context.n = 1;
76
- return (0, _nodeApi.initServer)(configParsed, this.port, version, name);
77
- case 1:
78
- logLevel = ((_configParsed$log = configParsed.log) === null || _configParsed$log === void 0 ? void 0 : _configParsed$log.level) || 'default';
79
- _logger.logger.info({
80
- logLevel: logLevel
81
- }, 'log level: @{logLevel}');
82
- _logger.logger.info('server started');
83
- _context.n = 3;
84
- break;
85
- case 2:
86
- _context.p = 2;
87
- _t = _context.v;
88
- console.error(_t);
89
- process.exit(1);
90
- case 3:
91
- return _context.a(2);
92
- }
93
- }, _callee, this, [[0, 2]]);
94
- }));
95
- function execute() {
96
- return _execute.apply(this, arguments);
97
- }
98
- return execute;
99
- }()
100
- }]);
101
- }(_clipanion.Command);
102
- _defineProperty(InitCommand, "paths", [_clipanion.Command.Default]);
103
- _defineProperty(InitCommand, "usage", _clipanion.Command.Usage({
104
- description: "launch the server",
105
- 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 ",
106
- examples: [["Runs the server with the default configuration", "verdaccio"], ["Runs the server in the port 5000", "verdaccio --listen 5000"], ["Runs the server by using a different absolute location of the configuration file", "verdaccio --config /home/user/verdaccio/config.yaml"]]
107
- }));
108
61
  //# sourceMappingURL=init.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","names":["_clipanion","require","_config","_core","_logger","_nodeApi","_typeof","o","Symbol","iterator","constructor","prototype","_regenerator","e","t","r","n","toStringTag","i","c","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","w","m","defineProperty","_regeneratorDefine","_invoke","enumerable","configurable","writable","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","_classCallCheck","_defineProperties","_toPropertyKey","key","_createClass","_callSuper","_getPrototypeOf","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","_assertThisInitialized","ReferenceError","Boolean","valueOf","_inherits","_setPrototypeOf","_defineProperty","_toPrimitive","toPrimitive","String","Number","DEFAULT_PROCESS_NAME","exports","InitCommand","_Command","_this","_len","args","Array","_key","concat","Option","description","initLogger","logConfig","logs","log","warningUtils","emit","Codes","VERWAR002","setup","_execute","_callee","_configParsed$log","configPathLocation","configParsed","web","_pkgUtils$getPackageJ","version","name","logLevel","_t","_context","findConfigFile","config","parseConfigFile","logger","info","file","process","title","pkgUtils","getPackageJson","__dirname","initServer","port","level","console","error","exit","execute","Command","Default","Usage","details","examples"],"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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CAAC,CAAC","ignoreList":[]}
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({ logLev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AQ,KAAK,EAAE"}
@@ -0,0 +1,60 @@
1
+ import { Command, Option } from "clipanion";
2
+ import { pkgUtils, warningUtils } from "@verdaccio/core";
3
+ import { findConfigFile, parseConfigFile } from "@verdaccio/config";
4
+ import { logger, setup } from "@verdaccio/logger";
5
+ import { initServer } from "@verdaccio/node-api";
6
+ var InitCommand = class extends Command {
7
+ static paths = [Command.Default];
8
+ port = Option.String("-l,-p,--listen,--port", { description: "host:port number to listen on (default: localhost:4873)" });
9
+ static usage = Command.Usage({
10
+ description: `launch the server`,
11
+ details: `
12
+ This start the registry in the default port.
13
+
14
+ When used without arguments, it:
15
+
16
+ - bootstrap the server at the port \`4873\`
17
+
18
+ The optional arguments are:
19
+
20
+ - \`-l | --listen | -p | --port\` to switch the default server port,
21
+ - \`-c | --config\` to define a different configuration path location,
22
+
23
+ `,
24
+ examples: [
25
+ [`Runs the server with the default configuration`, `verdaccio`],
26
+ [`Runs the server in the port 5000`, `verdaccio --listen 5000`],
27
+ [`Runs the server by using a different absolute location of the configuration file`, `verdaccio --config /home/user/verdaccio/config.yaml`]
28
+ ]
29
+ });
30
+ config = Option.String("-c,--config", { description: "use this configuration file (default: ./config.yaml)" });
31
+ initLogger(logConfig) {
32
+ if (logConfig.logs) {
33
+ logConfig.log = logConfig.logs;
34
+ warningUtils.emit(warningUtils.Codes.VERWAR002);
35
+ }
36
+ setup(logConfig.log);
37
+ }
38
+ async execute() {
39
+ try {
40
+ const configPathLocation = findConfigFile(this.config);
41
+ const configParsed = parseConfigFile(configPathLocation);
42
+ this.initLogger(configParsed);
43
+ logger.info({ file: configPathLocation }, "using config file: @{file}");
44
+ const { web } = configParsed;
45
+ process.title = web?.title || "verdaccio";
46
+ const { version, name } = pkgUtils.getPackageJson(__dirname, "../..");
47
+ await initServer(configParsed, this.port, version, name);
48
+ const logLevel = configParsed.log?.level || "default";
49
+ logger.info({ logLevel }, "log level: @{logLevel}");
50
+ logger.info("server started");
51
+ } catch (err) {
52
+ console.error(err);
53
+ process.exit(1);
54
+ }
55
+ }
56
+ };
57
+ //#endregion
58
+ export { InitCommand };
59
+
60
+ //# sourceMappingURL=init.mjs.map
@@ -0,0 +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,57 +1,16 @@
1
- "use strict";
1
+ require("../_virtual/_rolldown/runtime.js");
2
+ let clipanion = require("clipanion");
3
+ let _verdaccio_core = require("@verdaccio/core");
4
+ //#region src/commands/version.ts
5
+ var VersionCommand = class extends clipanion.Command {
6
+ static paths = [[`--version`], [`-v`]];
7
+ async execute() {
8
+ const { version } = _verdaccio_core.pkgUtils.getPackageJson(__dirname, "../..");
9
+ this.context.stdout.write(`v${version}\n`);
10
+ process.exit(0);
11
+ }
12
+ };
13
+ //#endregion
14
+ exports.VersionCommand = VersionCommand;
2
15
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.VersionCommand = void 0;
7
- var _clipanion = require("clipanion");
8
- var _core = require("@verdaccio/core");
9
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
- function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
11
- function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
12
- function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
13
- function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
14
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
18
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
19
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
20
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
22
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
23
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
24
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
25
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
26
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
27
- var VersionCommand = exports.VersionCommand = /*#__PURE__*/function (_Command) {
28
- function VersionCommand() {
29
- _classCallCheck(this, VersionCommand);
30
- return _callSuper(this, VersionCommand, arguments);
31
- }
32
- _inherits(VersionCommand, _Command);
33
- return _createClass(VersionCommand, [{
34
- key: "execute",
35
- value: function () {
36
- var _execute = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
37
- var _pkgUtils$getPackageJ, version;
38
- return _regenerator().w(function (_context) {
39
- while (1) switch (_context.n) {
40
- case 0:
41
- _pkgUtils$getPackageJ = _core.pkgUtils.getPackageJson(__dirname, '../..'), version = _pkgUtils$getPackageJ.version;
42
- this.context.stdout.write("v".concat(version, "\n"));
43
- process.exit(0);
44
- case 1:
45
- return _context.a(2);
46
- }
47
- }, _callee, this);
48
- }));
49
- function execute() {
50
- return _execute.apply(this, arguments);
51
- }
52
- return execute;
53
- }()
54
- }]);
55
- }(_clipanion.Command);
56
- _defineProperty(VersionCommand, "paths", [["--version"], ["-v"]]);
57
16
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":["_clipanion","require","_core","_typeof","o","Symbol","iterator","constructor","prototype","_regenerator","e","t","r","n","toStringTag","i","c","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","w","m","defineProperty","_regeneratorDefine","_invoke","enumerable","configurable","writable","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","_classCallCheck","_defineProperties","_toPropertyKey","key","_createClass","_callSuper","_getPrototypeOf","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","_assertThisInitialized","ReferenceError","Boolean","valueOf","_inherits","_setPrototypeOf","_defineProperty","_toPrimitive","toPrimitive","String","Number","VersionCommand","exports","_Command","_execute","_callee","_pkgUtils$getPackageJ","version","_context","pkgUtils","getPackageJson","__dirname","context","stdout","write","concat","process","exit","execute","Command"],"sources":["../../src/commands/version.ts"],"sourcesContent":["import { 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":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAA2C,SAAAE,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CA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]}
1
+ {"version":3,"file":"version.js","names":[],"sources":["../../src/commands/version.ts"],"sourcesContent":["import { 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":";;;;AAIA,IAAa,iBAAb,cAAoC,UAAA,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC;CAEtC,MAAM,UAAU;EACd,MAAM,EAAE,YAAY,gBAAA,SAAS,eAAe,WAAW,QAAQ;AAC/D,OAAK,QAAQ,OAAO,MAAM,IAAI,QAAQ,IAAI;AAC1C,UAAQ,KAAK,EAAE"}
@@ -0,0 +1,15 @@
1
+ import { Command } from "clipanion";
2
+ import { pkgUtils } from "@verdaccio/core";
3
+ //#region src/commands/version.ts
4
+ var VersionCommand = class extends Command {
5
+ static paths = [[`--version`], [`-v`]];
6
+ async execute() {
7
+ const { version } = pkgUtils.getPackageJson(__dirname, "../..");
8
+ this.context.stdout.write(`v${version}\n`);
9
+ process.exit(0);
10
+ }
11
+ };
12
+ //#endregion
13
+ export { VersionCommand };
14
+
15
+ //# sourceMappingURL=version.mjs.map
@@ -0,0 +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\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":";;;AAIA,IAAa,iBAAb,cAAoC,QAAQ;CAC1C,OAAO,QAAQ,CAAC,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC;CAEtC,MAAM,UAAU;EACd,MAAM,EAAE,YAAY,SAAS,eAAe,WAAW,QAAQ;AAC/D,OAAK,QAAQ,OAAO,MAAM,IAAI,QAAQ,IAAI;AAC1C,UAAQ,KAAK,EAAE"}
package/build/index.js CHANGED
@@ -1,4 +1,5 @@
1
- "use strict";
2
-
3
- require('./cli');
4
- //# sourceMappingURL=index.js.map
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ require("./cli.js");
@@ -0,0 +1 @@
1
+ import "./cli.mjs";
package/build/utils.js CHANGED
@@ -1,15 +1,14 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.MIN_NODE_VERSION = void 0;
7
- exports.isVersionValid = isVersionValid;
8
- var _semver = _interopRequireDefault(require("semver"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
- var MIN_NODE_VERSION = exports.MIN_NODE_VERSION = '24.0.0';
1
+ const require_runtime = require("./_virtual/_rolldown/runtime.js");
2
+ let semver = require("semver");
3
+ semver = require_runtime.__toESM(semver);
4
+ //#region src/utils.ts
5
+ var MIN_NODE_VERSION = "24.0.0";
11
6
  function isVersionValid(processVersion) {
12
- var version = processVersion.slice(1);
13
- return _semver["default"].satisfies(version, ">=".concat(MIN_NODE_VERSION));
7
+ const version = processVersion.slice(1);
8
+ return semver.default.satisfies(version, `>=${MIN_NODE_VERSION}`);
14
9
  }
10
+ //#endregion
11
+ exports.MIN_NODE_VERSION = MIN_NODE_VERSION;
12
+ exports.isVersionValid = isVersionValid;
13
+
15
14
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["_semver","_interopRequireDefault","require","e","__esModule","MIN_NODE_VERSION","exports","isVersionValid","processVersion","version","slice","semver","satisfies","concat"],"sources":["../src/utils.ts"],"sourcesContent":["import semver from 'semver';\n\nexport const MIN_NODE_VERSION = '24.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,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4B,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,gBAAAA,CAAA;AAErB,IAAME,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,QAAQ;AAEjC,SAASE,cAAcA,CAACC,cAAc,EAAE;EAC7C,IAAMC,OAAO,GAAGD,cAAc,CAACE,KAAK,CAAC,CAAC,CAAC;EACvC,OAAOC,kBAAM,CAACC,SAAS,CAACH,OAAO,OAAAI,MAAA,CAAOR,gBAAgB,CAAE,CAAC;AAC3D","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../src/utils.ts"],"sourcesContent":["import semver from 'semver';\n\nexport const MIN_NODE_VERSION = '24.0.0';\n\nexport function isVersionValid(processVersion) {\n const version = processVersion.slice(1);\n return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);\n}\n"],"mappings":";;;;AAEA,IAAa,mBAAmB;AAEhC,SAAgB,eAAe,gBAAgB;CAC7C,MAAM,UAAU,eAAe,MAAM,EAAE;AACvC,QAAO,OAAA,QAAO,UAAU,SAAS,KAAK,mBAAmB"}
@@ -0,0 +1,11 @@
1
+ import semver from "semver";
2
+ //#region src/utils.ts
3
+ var MIN_NODE_VERSION = "24.0.0";
4
+ function isVersionValid(processVersion) {
5
+ const version = processVersion.slice(1);
6
+ return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);
7
+ }
8
+ //#endregion
9
+ export { MIN_NODE_VERSION, isVersionValid };
10
+
11
+ //# sourceMappingURL=utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.mjs","names":[],"sources":["../src/utils.ts"],"sourcesContent":["import semver from 'semver';\n\nexport const MIN_NODE_VERSION = '24.0.0';\n\nexport function isVersionValid(processVersion) {\n const version = processVersion.slice(1);\n return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);\n}\n"],"mappings":";;AAEA,IAAa,mBAAmB;AAEhC,SAAgB,eAAe,gBAAgB;CAC7C,MAAM,UAAU,eAAe,MAAM,EAAE;AACvC,QAAO,OAAO,UAAU,SAAS,KAAK,mBAAmB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/cli",
3
- "version": "9.0.0-next-9.2",
3
+ "version": "9.0.0-next-9.4",
4
4
  "author": {
5
5
  "name": "Juan Picado",
6
6
  "email": "juanpicado19@gmail.com"
@@ -37,16 +37,16 @@
37
37
  "main": "./build/index.js",
38
38
  "types": "build/index.d.ts",
39
39
  "dependencies": {
40
- "@verdaccio/config": "9.0.0-next-9.2",
41
- "@verdaccio/core": "9.0.0-next-9.2",
42
- "@verdaccio/logger": "9.0.0-next-9.2",
43
- "@verdaccio/node-api": "9.0.0-next-9.2",
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",
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.0",
49
+ "@verdaccio/types": "14.0.0-next-9.1",
50
50
  "ts-node": "10.9.2",
51
51
  "vitest": "3.2.4"
52
52
  },
@@ -54,14 +54,25 @@
54
54
  "type": "opencollective",
55
55
  "url": "https://opencollective.com/verdaccio"
56
56
  },
57
+ "module": "./build/index.mjs",
58
+ "exports": {
59
+ ".": {
60
+ "import": {
61
+ "types": "./build/index.d.ts",
62
+ "default": "./build/index.mjs"
63
+ },
64
+ "require": {
65
+ "types": "./build/index.d.ts",
66
+ "default": "./build/index.js"
67
+ }
68
+ },
69
+ "./build/*": "./build/*"
70
+ },
57
71
  "scripts": {
58
72
  "clean": "rimraf ./build",
59
73
  "test": "vitest run",
60
- "type-check": "tsc --noEmit -p tsconfig.build.json",
61
- "build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
62
- "build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
63
- "watch": "pnpm build:js --F --watch",
64
- "build": "pnpm run build:js && pnpm run build:types",
74
+ "watch": "vite build --watch",
75
+ "build": "vite build",
65
76
  "start": "ts-node src/index.ts"
66
77
  }
67
78
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["require"],"sources":["../src/index.ts"],"sourcesContent":["require('./cli');\n"],"mappings":";;AAAAA,OAAO,CAAC,OAAO,CAAC","ignoreList":[]}