@neon-rs/cli 0.0.23 → 0.0.25

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 +8 -18
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -15140,20 +15140,18 @@ class PackBuild {
15140
15140
 
15141
15141
 
15142
15142
  const install_builds_OPTIONS = [
15143
- { name: 'bundle', alias: 'b', type: String, defaultValue: null },
15144
- { name: 'no-bundle', alias: 'B', type: String, defaultValue: null }
15143
+ { name: 'bundle', alias: 'b', type: String, defaultValue: null }
15145
15144
  ];
15146
15145
  class InstallBuilds {
15147
15146
  static summary() { return 'Install dependencies on prebuilds in package.json.'; }
15148
- static syntax() { return 'neon install-builds [-b <file>|-B]'; }
15147
+ static syntax() { return 'neon install-builds [-b <file>]'; }
15149
15148
  static options() {
15150
15149
  return [
15151
- { name: '-b, --bundle <file>', summary: 'File to generate bundling metadata. (Default: .targets)' },
15150
+ { name: '-b, --bundle <file>', summary: 'File to generate bundling metadata.' },
15152
15151
  {
15153
15152
  name: '',
15154
15153
  summary: 'This generated file ensures support for bundlers (e.g. @vercel/ncc), which rely on static analysis to detect and enable any addons used by the library.'
15155
- },
15156
- { name: '-B, --no-bundle', summary: 'Do not generate bundling metadata.' }
15154
+ }
15157
15155
  ];
15158
15156
  }
15159
15157
  static seeAlso() {
@@ -15164,14 +15162,7 @@ class InstallBuilds {
15164
15162
  _bundle;
15165
15163
  constructor(argv) {
15166
15164
  const options = dist_default()(install_builds_OPTIONS, { argv });
15167
- if (options.bundle && options['no-bundle']) {
15168
- throw new Error("Options --bundle and --no-bundle cannot both be enabled.");
15169
- }
15170
- this._bundle = options['no-bundle']
15171
- ? null
15172
- : !options.bundle
15173
- ? '.targets'
15174
- : options.bundle;
15165
+ this._bundle = options.bundle || null;
15175
15166
  }
15176
15167
  async run() {
15177
15168
  const manifest = JSON.parse(await promises_namespaceObject.readFile(external_node_path_namespaceObject.join(process.cwd(), 'package.json'), { encoding: 'utf8' }));
@@ -15194,11 +15185,10 @@ class InstallBuilds {
15194
15185
  // analyzable by bundler analyses, so this module provides an exhaustive
15195
15186
  // static list for those analyses.
15196
15187
 
15197
- return;
15198
-
15188
+ if (0) {
15199
15189
  `;
15200
- const requires = targets.map(name => `require('${name}');`).join('\n');
15201
- await promises_namespaceObject.writeFile(this._bundle, PREAMBLE + requires + '\n');
15190
+ const requires = targets.map(name => ` require('${name}');`).join('\n');
15191
+ await promises_namespaceObject.writeFile(this._bundle, PREAMBLE + requires + '\n}\n');
15202
15192
  }
15203
15193
  }
15204
15194
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neon-rs/cli",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "Command-line build tool for Neon modules.",
5
5
  "type": "module",
6
6
  "exports": "./index.js",