@teneo-protocol/cli 2.0.24 → 2.0.26
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/install.mjs +5 -2
- package/package.json +1 -1
package/install.mjs
CHANGED
|
@@ -69,13 +69,16 @@ try {
|
|
|
69
69
|
copyFileSync(join(cliDir, "daemon.ts"), join(INSTALL_DIR, "daemon.ts"));
|
|
70
70
|
log("Copied teneo.ts and daemon.ts");
|
|
71
71
|
|
|
72
|
-
// Install npm dependencies
|
|
72
|
+
// Install npm dependencies — clean lock file on updates to avoid stale version resolution
|
|
73
73
|
if (!existsSync(join(INSTALL_DIR, "package.json"))) {
|
|
74
74
|
run("npm init -y", { cwd: INSTALL_DIR });
|
|
75
75
|
}
|
|
76
|
+
if (alreadyInstalled) {
|
|
77
|
+
try { run(`rm -f ${join(INSTALL_DIR, "package-lock.json")}`, { cwd: INSTALL_DIR }); } catch {}
|
|
78
|
+
}
|
|
76
79
|
|
|
77
80
|
log("Installing npm dependencies (this may take a minute)...");
|
|
78
|
-
run(`npm install --prefer-offline ${DEPS.join(" ")}`, {
|
|
81
|
+
run(`npm install ${alreadyInstalled ? "" : "--prefer-offline "}${DEPS.join(" ")}`, {
|
|
79
82
|
cwd: INSTALL_DIR,
|
|
80
83
|
env: { ...process.env, NODE_OPTIONS: "--max-old-space-size=512" },
|
|
81
84
|
});
|
package/package.json
CHANGED