@neon-rs/cli 0.0.49 → 0.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +27 -24
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -10212,10 +10212,10 @@ exports.bin = bin;
10212
10212
 
10213
10213
  /***/ }),
10214
10214
 
10215
- /***/ 5818:
10215
+ /***/ 3659:
10216
10216
  /***/ ((module) => {
10217
10217
 
10218
- module.exports = eval("require")("@cargo-messages/darwin-64");
10218
+ module.exports = eval("require")("@cargo-messages/darwin-x64");
10219
10219
 
10220
10220
 
10221
10221
  /***/ }),
@@ -10309,18 +10309,19 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util");
10309
10309
 
10310
10310
  const { currentTarget } = __nccwpck_require__(1401);
10311
10311
 
10312
- let addon;
10313
- switch (currentTarget()) {
10314
- case 'darwin-x64': addon = __nccwpck_require__(5818); break;
10315
- default: throw new Error(`no binary @cargo-messages module found for ${currentTarget()}`);
10316
- }
10312
+ let saved = null;
10317
10313
 
10318
- const {
10319
- fromStdin,
10320
- fromFile,
10321
- findArtifact,
10322
- findFileByCrateType
10323
- } = addon;
10314
+ function addon() {
10315
+ if (saved) {
10316
+ return saved;
10317
+ }
10318
+ const target = currentTarget();
10319
+ switch (target) {
10320
+ case 'darwin-x64': saved = __nccwpck_require__(3659); break;
10321
+ default: throw new Error(`no binary @cargo-messages module found for ${target}`);
10322
+ }
10323
+ return addon();
10324
+ }
10324
10325
 
10325
10326
  const PRIVATE = {};
10326
10327
 
@@ -10337,7 +10338,7 @@ class CargoArtifact {
10337
10338
  }
10338
10339
 
10339
10340
  findFileByCrateType(crateType) {
10340
- return findFileByCrateType(this._kernel, crateType);
10341
+ return addon().findFileByCrateType(this._kernel, crateType);
10341
10342
  }
10342
10343
  }
10343
10344
 
@@ -10347,12 +10348,12 @@ class CargoMessages {
10347
10348
  this._mount = options.mount || null;
10348
10349
  this._manifestPath = options.manifestPath || null;
10349
10350
  this._kernel = options.file
10350
- ? fromFile(options.file, this._mount, this._manifestPath)
10351
- : fromStdin(this._mount, this._manifestPath);
10351
+ ? addon().fromFile(options.file, this._mount, this._manifestPath)
10352
+ : addon().fromStdin(this._mount, this._manifestPath);
10352
10353
  }
10353
10354
 
10354
10355
  findArtifact(crateName) {
10355
- const found = findArtifact(this._kernel, crateName);
10356
+ const found = addon().findArtifact(this._kernel, crateName);
10356
10357
  return found
10357
10358
  ? new CargoArtifact(PRIVATE, found)
10358
10359
  : null;
@@ -10449,8 +10450,6 @@ var __webpack_exports__ = {};
10449
10450
  // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
10450
10451
  (() => {
10451
10452
 
10452
- // EXTERNAL MODULE: external "node:module"
10453
- var external_node_module_ = __nccwpck_require__(2033);
10454
10453
  // EXTERNAL MODULE: ../../node_modules/command-line-commands/index.js
10455
10454
  var command_line_commands = __nccwpck_require__(5908);
10456
10455
  var command_line_commands_default = /*#__PURE__*/__nccwpck_require__.n(command_line_commands);
@@ -15262,7 +15261,7 @@ var CommandName;
15262
15261
  CommandName["Dist"] = "dist";
15263
15262
  CommandName["PackBuild"] = "pack-build";
15264
15263
  CommandName["InstallBuilds"] = "install-builds";
15265
- })(CommandName = CommandName || (CommandName = {}));
15264
+ })(CommandName || (CommandName = {}));
15266
15265
  ;
15267
15266
  function isCommandName(s) {
15268
15267
  const keys = Object.values(CommandName);
@@ -15365,13 +15364,17 @@ function printError(e) {
15365
15364
 
15366
15365
  ;// CONCATENATED MODULE: ./src/index.ts
15367
15366
 
15368
- const absoluteRequire = (0,external_node_module_.createRequire)(import.meta.url);
15369
- global['require'] = function (spec) {
15370
- return absoluteRequire(spec);
15371
- };
15372
15367
 
15373
15368
 
15369
+ /*
15370
+ import { createRequire } from 'node:module';
15371
+
15372
+ const absoluteRequire = createRequire(import.meta.url);
15374
15373
 
15374
+ global['require'] = function(spec: string) {
15375
+ return absoluteRequire(spec);
15376
+ } as any;
15377
+ */
15375
15378
  class Cli {
15376
15379
  parse() {
15377
15380
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neon-rs/cli",
3
- "version": "0.0.49",
3
+ "version": "0.0.52",
4
4
  "description": "Command-line build tool for Neon modules.",
5
5
  "type": "module",
6
6
  "exports": "./index.js",