substrate-ai 0.1.17 → 0.1.18
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/dist/cli/index.js +5 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -390,7 +390,7 @@ const logger$30 = createLogger("init");
|
|
|
390
390
|
* When true, prefix suggested commands with `npx `.
|
|
391
391
|
*/
|
|
392
392
|
function isNpxInvocation() {
|
|
393
|
-
return process.env["
|
|
393
|
+
return process.env["npm_command"] === "exec";
|
|
394
394
|
}
|
|
395
395
|
const INIT_EXIT_SUCCESS = 0;
|
|
396
396
|
const INIT_EXIT_ERROR = 1;
|
|
@@ -15811,7 +15811,10 @@ function checkForUpdatesInBackground(currentVersion) {
|
|
|
15811
15811
|
const { createVersionManager } = await import("../version-manager-impl-C0G2CEHB.js");
|
|
15812
15812
|
const vm = createVersionManager();
|
|
15813
15813
|
const result = await vm.checkForUpdates();
|
|
15814
|
-
if (result.updateAvailable)
|
|
15814
|
+
if (result.updateAvailable) {
|
|
15815
|
+
const pfx = process.env["npm_command"] === "exec" ? "npx " : "";
|
|
15816
|
+
process.stderr.write(`\nUpdate available: ${result.currentVersion} → ${result.latestVersion}. Run \`${pfx}substrate upgrade\` to update.\n`);
|
|
15817
|
+
}
|
|
15815
15818
|
}).catch(() => {});
|
|
15816
15819
|
}
|
|
15817
15820
|
/** Main entry point */
|