@neon-rs/cli 0.0.117 → 0.0.119

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 +116 -12
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -10221,13 +10221,6 @@ function wrappy (fn, cb) {
10221
10221
  }
10222
10222
 
10223
10223
 
10224
- /***/ }),
10225
-
10226
- /***/ 5969:
10227
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
10228
-
10229
- module.exports = eval("require")("@cargo-messages/linux-x64-gnu")
10230
-
10231
10224
  /***/ }),
10232
10225
 
10233
10226
  /***/ 5193:
@@ -10260,6 +10253,14 @@ module.exports = eval("require")("@cargo-messages/darwin-x64");
10260
10253
  module.exports = eval("require")("@cargo-messages/linux-arm-gnueabihf");
10261
10254
 
10262
10255
 
10256
+ /***/ }),
10257
+
10258
+ /***/ 9301:
10259
+ /***/ ((module) => {
10260
+
10261
+ module.exports = eval("require")("@cargo-messages/linux-x64-gnu");
10262
+
10263
+
10263
10264
  /***/ }),
10264
10265
 
10265
10266
  /***/ 9329:
@@ -10413,7 +10414,7 @@ module.exports = (__nccwpck_require__(4371)/* .lazy */ .Vo)({
10413
10414
  'aarch64-pc-windows-msvc': () => __nccwpck_require__(9329),
10414
10415
  'darwin-x64': () => __nccwpck_require__(5583),
10415
10416
  'darwin-arm64': () => __nccwpck_require__(5111),
10416
- 'linux-x64-gnu': () => __nccwpck_require__(5969),
10417
+ 'linux-x64-gnu': () => __nccwpck_require__(9301),
10417
10418
  'linux-arm-gnueabihf': () => __nccwpck_require__(6698),
10418
10419
  'android-arm-eabi': () => __nccwpck_require__(5193)
10419
10420
  }, [
@@ -13558,12 +13559,10 @@ class Dist {
13558
13559
  }
13559
13560
  }
13560
13561
 
13561
- ;// CONCATENATED MODULE: external "node:path"
13562
- const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path");
13563
- // EXTERNAL MODULE: ./node_modules/temp/lib/temp.js
13564
- var temp = __nccwpck_require__(8023);
13565
13562
  ;// CONCATENATED MODULE: external "node:buffer"
13566
13563
  const external_node_buffer_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:buffer");
13564
+ ;// CONCATENATED MODULE: external "node:path"
13565
+ const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path");
13567
13566
  ;// CONCATENATED MODULE: external "node:child_process"
13568
13567
  const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process");
13569
13568
  // EXTERNAL MODULE: ./node_modules/cross-spawn/index.js
@@ -15093,6 +15092,107 @@ function execaNode(scriptPath, args, options = {}) {
15093
15092
  );
15094
15093
  }
15095
15094
 
15095
+ ;// CONCATENATED MODULE: ./src/commands/bump.ts
15096
+
15097
+
15098
+
15099
+
15100
+ const bump_OPTIONS = [
15101
+ { name: 'verbose', alias: 'v', type: Boolean, defaultValue: false },
15102
+ { name: 'dir', alias: 'd', type: String, defaultValue: null },
15103
+ { name: 'workspaces', type: Boolean, defaultValue: false },
15104
+ { name: 'binaries', alias: 'b', type: String, defaultValue: null }
15105
+ ];
15106
+ async function subdirs(dir) {
15107
+ const entries = await promises_namespaceObject.readdir(dir);
15108
+ let dirs = [];
15109
+ for (const entry of entries) {
15110
+ if ((await promises_namespaceObject.stat(entry)).isDirectory()) {
15111
+ dirs.push(entry);
15112
+ }
15113
+ }
15114
+ return dirs;
15115
+ }
15116
+ class Bump {
15117
+ static summary() { return 'Portably bump package versions in a project tree.'; }
15118
+ static syntax() { return 'neon bump [-v] (-d <dir>|--workspaces|-b <dir>) [<version>|major|minor|patch]'; }
15119
+ static options() {
15120
+ return [
15121
+ { name: '-d, --dir <dir>', summary: 'Run `npm version <version>` in another directory.' },
15122
+ { name: '--workspaces', summary: 'Run `npm version --workspaces <version>` in the current directory.' },
15123
+ { name: '-b, --binaries <dir>', summary: 'Run `npm version --force <version>` on all binary packages in <dir>.' },
15124
+ { name: '', summary: 'The --force parameter causes npm to ignore `os` and `cpu` constraints in the binary packages\' manifests that might not match the current system.' },
15125
+ { name: '<version>', summary: 'The new package version. (Default: $npm_package_version)' },
15126
+ { name: '-v, --verbose', summary: 'Enable verbose logging. (Default: false)' }
15127
+ ];
15128
+ }
15129
+ static seeAlso() {
15130
+ return [
15131
+ { name: 'npm version', summary: '<https://docs.npmjs.com/cli/commands/npm-version>' }
15132
+ ];
15133
+ }
15134
+ constructor(argv) {
15135
+ const options = dist_default()(bump_OPTIONS, { argv, partial: true });
15136
+ this._verbose = options.verbose;
15137
+ this._dir = options.dir || null;
15138
+ this._workspaces = options.workspaces;
15139
+ this._binaries = options.binaries || null;
15140
+ if ([this._dir, this._workspaces, this._binaries].filter(x => !!x).length > 1) {
15141
+ throw new Error("Only one of --dir, --workspaces, or --binaries can be specified.");
15142
+ }
15143
+ this._version = (!options._unknown || !options._unknown.length)
15144
+ ? process.env.npm_package_version
15145
+ : options[0];
15146
+ }
15147
+ log(msg) {
15148
+ if (this._verbose) {
15149
+ console.error("[neon bump] " + msg);
15150
+ }
15151
+ }
15152
+ async bumpDir(dir) {
15153
+ this.log(`CWD=${dir} npm version ${this._version}`);
15154
+ const result = await execa('npm', ['version', this._version], { cwd: dir, shell: true });
15155
+ if (result.exitCode !== 0) {
15156
+ console.error(result.stderr);
15157
+ process.exit(result.exitCode);
15158
+ }
15159
+ }
15160
+ async bumpWorkspaces() {
15161
+ this.log(`npm version --workspaces ${this._version}`);
15162
+ const result = await execa('npm', ['version', "--workspaces", this._version], { shell: true });
15163
+ if (result.exitCode !== 0) {
15164
+ console.error(result.stderr);
15165
+ process.exit(result.exitCode);
15166
+ }
15167
+ }
15168
+ async bumpBinaries(binaries) {
15169
+ const binariesPath = external_node_path_namespaceObject.join(...binaries.split('/'));
15170
+ const dirs = await subdirs(binariesPath);
15171
+ for (const dir of dirs) {
15172
+ const dirPath = external_node_path_namespaceObject.join(binariesPath, dir);
15173
+ this.log(`CWD=${dirPath} npm version --force ${this._version}`);
15174
+ const result = await execa('npm', ['version', "--force", this._version], { cwd: dirPath, shell: true });
15175
+ if (result.exitCode !== 0) {
15176
+ console.error(result.stderr);
15177
+ process.exit(result.exitCode);
15178
+ }
15179
+ }
15180
+ }
15181
+ async run() {
15182
+ if (this._dir) {
15183
+ await this.bumpDir(this._dir);
15184
+ }
15185
+ else if (this._workspaces) {
15186
+ await this.bumpWorkspaces();
15187
+ }
15188
+ else if (this._binaries) {
15189
+ await this.bumpBinaries(this._binaries);
15190
+ }
15191
+ }
15192
+ }
15193
+
15194
+ // EXTERNAL MODULE: ./node_modules/temp/lib/temp.js
15195
+ var temp = __nccwpck_require__(8023);
15096
15196
  ;// CONCATENATED MODULE: ./data/rust.json
15097
15197
  const rust_namespaceObject = JSON.parse('{"aarch64-apple-darwin":"darwin-arm64","x86_64-apple-darwin":"darwin-x64","aarch64-apple-ios":"ios-arm64","x86_64-apple-ios":"ios-x64","aarch64-linux-android":"android-arm64","armv7-linux-androideabi":"android-arm-eabi","i686-linux-android":"android-ia32","x86_64-linux-android":"android-x64","aarch64-pc-windows-msvc":"win32-arm64-msvc","i686-pc-windows-gnu":"win32-ia32-gnu","i686-pc-windows-msvc":"win32-ia32-msvc","x86_64-pc-windows-gnu":"win32-x64-gnu","x86_64-pc-windows-msvc":"win32-x64-msvc","aarch64-unknown-linux-gnu":"linux-arm64-gnu","aarch64-unknown-linux-musl":"linux-arm64-musl","arm-unknown-linux-gnueabihf":"linux-arm-gnueabihf","arm-unknown-linux-musleabihf":"linux-arm-musleabihf","armv7-unknown-linux-gnueabihf":"linux-arm-gnueabihf","armv7-unknown-linux-musleabihf":"linux-arm-musleabihf","i686-unknown-linux-gnu":"linux-ia32-gnu","i686-unknown-linux-musl":"linux-ia32-musl","mips-unknown-linux-gnu":"linux-mips-gnu","mips-unknown-linux-musl":"linux-mips-musl","mips64-unknown-linux-gnuabi64":"linux-mips64-gnuabi64","mips64-unknown-linux-muslabi64":"linux-mips64-muslabi64","mips64el-unknown-linux-gnuabi64":"linux-mips64el-gnuabi64","mips64el-unknown-linux-muslabi64":"linux-mips64el-muslabi64","mipsel-unknown-linux-gnu":"linux-mipsel-gnu","mipsel-unknown-linux-musl":"linux-mipsel-musl","powerpc-unknown-linux-gnu":"linux-powerpc-gnu","powerpc64-unknown-linux-gnu":"linux-powerpc64-gnu","powerpc64le-unknown-linux-gnu":"linux-powerpc64le-gnu","riscv64gc-unknown-linux-gnu":"linux-riscv64gc-gnu","s390x-unknown-linux-gnu":"linux-s390x-gnu","sparc64-unknown-linux-gnu":"linux-sparc64-gnu","x86_64-unknown-linux-gnu":"linux-x64-gnu","x86_64-unknown-linux-gnux32":"linux-x64-gnux32","x86_64-unknown-linux-musl":"linux-x64-musl","i686-unknown-freebsd":"freebsd-ia32","x86_64-unknown-freebsd":"freebsd-x64"}');
15098
15198
  ;// CONCATENATED MODULE: ./data/node.json
@@ -15349,10 +15449,12 @@ class Help {
15349
15449
 
15350
15450
 
15351
15451
 
15452
+
15352
15453
  var CommandName;
15353
15454
  (function (CommandName) {
15354
15455
  CommandName["Help"] = "help";
15355
15456
  CommandName["Dist"] = "dist";
15457
+ CommandName["Bump"] = "bump";
15356
15458
  CommandName["PackBuild"] = "pack-build";
15357
15459
  CommandName["InstallBuilds"] = "install-builds";
15358
15460
  })(CommandName || (CommandName = {}));
@@ -15370,6 +15472,7 @@ function asCommandName(name) {
15370
15472
  const COMMANDS = {
15371
15473
  [CommandName.Help]: Help,
15372
15474
  [CommandName.Dist]: Dist,
15475
+ [CommandName.Bump]: Bump,
15373
15476
  [CommandName.PackBuild]: PackBuild,
15374
15477
  [CommandName.InstallBuilds]: InstallBuilds
15375
15478
  };
@@ -15380,6 +15483,7 @@ function summaries() {
15380
15483
  return [
15381
15484
  { name: CommandName.Help, summary: Help.summary() },
15382
15485
  { name: CommandName.Dist, summary: Dist.summary() },
15486
+ { name: CommandName.Bump, summary: Bump.summary() },
15383
15487
  { name: CommandName.PackBuild, summary: PackBuild.summary() },
15384
15488
  { name: CommandName.InstallBuilds, summary: InstallBuilds.summary() }
15385
15489
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neon-rs/cli",
3
- "version": "0.0.117",
3
+ "version": "0.0.119",
4
4
  "description": "Command-line build tool for Neon modules.",
5
5
  "type": "module",
6
6
  "exports": "./index.js",