@neon-rs/cli 0.0.49 → 0.0.50

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 +18 -17
  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;
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.50",
4
4
  "description": "Command-line build tool for Neon modules.",
5
5
  "type": "module",
6
6
  "exports": "./index.js",