@neon-rs/cli 0.1.72 → 0.1.73

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 +84 -8
  2. package/package.json +8 -8
package/index.js CHANGED
@@ -40240,7 +40240,7 @@ which.sync = whichSync
40240
40240
 
40241
40241
  /***/ }),
40242
40242
 
40243
- /***/ 3129:
40243
+ /***/ 5065:
40244
40244
  /***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
40245
40245
 
40246
40246
 
@@ -40256,8 +40256,6 @@ __nccwpck_require__.d(__webpack_exports__, {
40256
40256
 
40257
40257
  ;// CONCATENATED MODULE: external "node:fs"
40258
40258
  const external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs");
40259
- // EXTERNAL MODULE: external "node:fs/promises"
40260
- var promises_ = __nccwpck_require__(3977);
40261
40259
  // EXTERNAL MODULE: ../node_modules/command-line-args/dist/index.js
40262
40260
  var dist = __nccwpck_require__(7898);
40263
40261
  var dist_default = /*#__PURE__*/__nccwpck_require__.n(dist);
@@ -40270,6 +40268,11 @@ var lib = __nccwpck_require__(3993);
40270
40268
  var manifest_lib = __nccwpck_require__(347);
40271
40269
  // EXTERNAL MODULE: ../node_modules/@neon-rs/manifest/lib/platform.mjs
40272
40270
  var lib_platform = __nccwpck_require__(8140);
40271
+ // EXTERNAL MODULE: ../node_modules/@neon-rs/artifact/lib/index.cjs
40272
+ var artifact_lib = __nccwpck_require__(8893);
40273
+ ;// CONCATENATED MODULE: ../node_modules/@neon-rs/artifact/lib/index.mjs
40274
+
40275
+
40273
40276
  ;// CONCATENATED MODULE: ./src/commands/dist.ts
40274
40277
 
40275
40278
 
@@ -40426,8 +40429,7 @@ class Dist {
40426
40429
  const { option, path } = await this._out;
40427
40430
  this.log(`output type = ${option}`);
40428
40431
  this.log(`output file = ${path}`);
40429
- // FIXME: needs all the logic of cargo-cp-artifact (timestamp check, M1 workaround, async, errors)
40430
- await (0,promises_.copyFile)(file, path);
40432
+ await (0,artifact_lib.copyArtifact)(file, path);
40431
40433
  }
40432
40434
  }
40433
40435
 
@@ -41966,6 +41968,8 @@ function execaNode(scriptPath, args, options = {}) {
41966
41968
  );
41967
41969
  }
41968
41970
 
41971
+ // EXTERNAL MODULE: external "node:fs/promises"
41972
+ var promises_ = __nccwpck_require__(3977);
41969
41973
  ;// CONCATENATED MODULE: ./src/commands/bump.ts
41970
41974
 
41971
41975
 
@@ -42856,7 +42860,7 @@ __nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __we
42856
42860
  /* harmony import */ var command_line_commands__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(5046);
42857
42861
  /* harmony import */ var command_line_commands__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(command_line_commands__WEBPACK_IMPORTED_MODULE_0__);
42858
42862
  /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(9050);
42859
- /* harmony import */ var _command_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(3129);
42863
+ /* harmony import */ var _command_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(5065);
42860
42864
  /* harmony import */ var node_module__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(2033);
42861
42865
  /* harmony import */ var node_module__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nccwpck_require__.n(node_module__WEBPACK_IMPORTED_MODULE_3__);
42862
42866
 
@@ -45885,8 +45889,8 @@ const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
45885
45889
 
45886
45890
  /* harmony default export */ const chalk_source = (chalk);
45887
45891
 
45888
- // EXTERNAL MODULE: ./src/command.ts + 35 modules
45889
- var command = __nccwpck_require__(3129);
45892
+ // EXTERNAL MODULE: ./src/command.ts + 36 modules
45893
+ var command = __nccwpck_require__(5065);
45890
45894
  // EXTERNAL MODULE: ./src/commands/show.ts + 4 modules
45891
45895
  var show = __nccwpck_require__(6264);
45892
45896
  ;// CONCATENATED MODULE: ./src/print.ts
@@ -60868,6 +60872,78 @@ module.exports = (__nccwpck_require__(8372)/* .proxy */ .sj)({
60868
60872
  });
60869
60873
 
60870
60874
 
60875
+ /***/ }),
60876
+
60877
+ /***/ 8893:
60878
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
60879
+
60880
+
60881
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
60882
+ if (k2 === undefined) k2 = k;
60883
+ var desc = Object.getOwnPropertyDescriptor(m, k);
60884
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
60885
+ desc = { enumerable: true, get: function() { return m[k]; } };
60886
+ }
60887
+ Object.defineProperty(o, k2, desc);
60888
+ }) : (function(o, m, k, k2) {
60889
+ if (k2 === undefined) k2 = k;
60890
+ o[k2] = m[k];
60891
+ }));
60892
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
60893
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
60894
+ }) : function(o, v) {
60895
+ o["default"] = v;
60896
+ });
60897
+ var __importStar = (this && this.__importStar) || function (mod) {
60898
+ if (mod && mod.__esModule) return mod;
60899
+ var result = {};
60900
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
60901
+ __setModuleDefault(result, mod);
60902
+ return result;
60903
+ };
60904
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
60905
+ exports.copyArtifact = exports.isNewer = void 0;
60906
+ const fs = __importStar(__nccwpck_require__(3977));
60907
+ const path = __importStar(__nccwpck_require__(9411));
60908
+ async function isNewer(filename, outputFile) {
60909
+ try {
60910
+ const prevStats = await fs.stat(outputFile);
60911
+ const nextStats = await fs.stat(filename);
60912
+ return nextStats.mtime > prevStats.mtime;
60913
+ }
60914
+ catch (_err) { }
60915
+ return true;
60916
+ }
60917
+ exports.isNewer = isNewer;
60918
+ async function copyArtifact(src, dest) {
60919
+ if (!(await isNewer(src, dest))) {
60920
+ return;
60921
+ }
60922
+ const destDir = path.dirname(dest);
60923
+ await fs.mkdir(destDir, { recursive: true });
60924
+ // Apple Silicon (M1, etc.) requires shared libraries to be signed. However,
60925
+ // the macOS code signing cache isn't cleared when overwriting a file.
60926
+ // Deleting the file before copying works around the issue.
60927
+ //
60928
+ // Unfortunately, this workaround is incomplete because the file must be
60929
+ // deleted from the location it is loaded. If further steps in the user's
60930
+ // build process copy or move the file in place, the code signing cache
60931
+ // will not be cleared.
60932
+ //
60933
+ // https://github.com/neon-bindings/neon/issues/911
60934
+ if (path.extname(dest) === ".node") {
60935
+ try {
60936
+ await fs.unlink(dest);
60937
+ }
60938
+ catch (_e) {
60939
+ // Ignore errors; the file might not exist
60940
+ }
60941
+ }
60942
+ await fs.copyFile(src, dest);
60943
+ }
60944
+ exports.copyArtifact = copyArtifact;
60945
+
60946
+
60871
60947
  /***/ }),
60872
60948
 
60873
60949
  /***/ 9173:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neon-rs/cli",
3
- "version": "0.1.72",
3
+ "version": "0.1.73",
4
4
  "description": "Command-line build tool for Neon modules.",
5
5
  "type": "module",
6
6
  "exports": "./index.js",
@@ -27,12 +27,12 @@
27
27
  },
28
28
  "homepage": "https://github.com/dherman/neon-rs#readme",
29
29
  "optionalDependencies": {
30
- "@cargo-messages/android-arm-eabi": "0.1.71",
31
- "@cargo-messages/darwin-arm64": "0.1.71",
32
- "@cargo-messages/darwin-x64": "0.1.71",
33
- "@cargo-messages/linux-arm-gnueabihf": "0.1.71",
34
- "@cargo-messages/linux-x64-gnu": "0.1.71",
35
- "@cargo-messages/win32-arm64-msvc": "0.1.71",
36
- "@cargo-messages/win32-x64-msvc": "0.1.71"
30
+ "@cargo-messages/android-arm-eabi": "0.1.72",
31
+ "@cargo-messages/darwin-arm64": "0.1.72",
32
+ "@cargo-messages/darwin-x64": "0.1.72",
33
+ "@cargo-messages/linux-arm-gnueabihf": "0.1.72",
34
+ "@cargo-messages/linux-x64-gnu": "0.1.72",
35
+ "@cargo-messages/win32-arm64-msvc": "0.1.72",
36
+ "@cargo-messages/win32-x64-msvc": "0.1.72"
37
37
  }
38
38
  }