@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.
- package/README.md +38 -45
- package/package.json +1 -1
- package/server/index.cjs +10 -1
- package/server/resources/nrg-client.js +502 -499
- package/test/client/e2e/index.js +8 -5
- package/vite/index.js +8 -5
package/test/client/e2e/index.js
CHANGED
|
@@ -2181,13 +2181,16 @@ module.exports = settings;
|
|
|
2181
2181
|
}
|
|
2182
2182
|
resolveNodeRedEntryPoint() {
|
|
2183
2183
|
this.logger.info(`Resolving ${this.nodeRedCommand} entry point...`);
|
|
2184
|
-
const
|
|
2185
|
-
if (
|
|
2186
|
-
this.
|
|
2187
|
-
|
|
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
|
|
403
|
-
if (
|
|
404
|
-
this.
|
|
405
|
-
|
|
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(),
|