@bonsae/nrg 0.18.4 → 0.18.5

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.
@@ -2181,13 +2181,16 @@ module.exports = settings;
2181
2181
  }
2182
2182
  resolveNodeRedEntryPoint() {
2183
2183
  this.logger.info(`Resolving ${this.nodeRedCommand} entry point...`);
2184
- const localEntry = this.resolveFromLocalNodeModules();
2185
- if (localEntry) {
2186
- this.logger.info(`Resolved from local node_modules: ${localEntry}`);
2187
- return localEntry;
2184
+ const hasExplicitVersion = this.options.runtime?.version !== void 0 && this.options.runtime.version !== "latest";
2185
+ if (!hasExplicitVersion) {
2186
+ const localEntry = this.resolveFromLocalNodeModules();
2187
+ if (localEntry) {
2188
+ this.logger.info(`Resolved from local node_modules: ${localEntry}`);
2189
+ return localEntry;
2190
+ }
2188
2191
  }
2189
2192
  this.logger.info(
2190
- `Not found locally, downloading via npx (this may take a while)...`
2193
+ hasExplicitVersion ? `Using configured version (${this.options.runtime.version}), downloading via npx...` : `Not found locally, downloading via npx (this may take a while)...`
2191
2194
  );
2192
2195
  const resolverScript = path10.join(
2193
2196
  os.tmpdir(),
package/vite/index.js CHANGED
@@ -399,13 +399,16 @@ module.exports = settings;
399
399
  }
400
400
  resolveNodeRedEntryPoint() {
401
401
  this.logger.info(`Resolving ${this.nodeRedCommand} entry point...`);
402
- const localEntry = this.resolveFromLocalNodeModules();
403
- if (localEntry) {
404
- this.logger.info(`Resolved from local node_modules: ${localEntry}`);
405
- return localEntry;
402
+ const hasExplicitVersion = this.options.runtime?.version !== void 0 && this.options.runtime.version !== "latest";
403
+ if (!hasExplicitVersion) {
404
+ const localEntry = this.resolveFromLocalNodeModules();
405
+ if (localEntry) {
406
+ this.logger.info(`Resolved from local node_modules: ${localEntry}`);
407
+ return localEntry;
408
+ }
406
409
  }
407
410
  this.logger.info(
408
- `Not found locally, downloading via npx (this may take a while)...`
411
+ hasExplicitVersion ? `Using configured version (${this.options.runtime.version}), downloading via npx...` : `Not found locally, downloading via npx (this may take a while)...`
409
412
  );
410
413
  const resolverScript = path2.join(
411
414
  os.tmpdir(),