@infinitedusky/indusk-mcp 1.2.4 → 1.2.7
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.
|
@@ -279,20 +279,28 @@ export async function extensionsUpdate(projectRoot, names) {
|
|
|
279
279
|
// If source is npm, update the installed package FIRST so we get the latest
|
|
280
280
|
if (source.startsWith("npm:")) {
|
|
281
281
|
const pkg = source.slice(4);
|
|
282
|
-
|
|
282
|
+
// Detect package manager
|
|
283
|
+
const pm = existsSync(join(projectRoot, "pnpm-lock.yaml"))
|
|
284
|
+
? "pnpm"
|
|
285
|
+
: existsSync(join(projectRoot, "yarn.lock"))
|
|
286
|
+
? "yarn"
|
|
287
|
+
: "npm";
|
|
288
|
+
const addCmd = pm === "pnpm"
|
|
289
|
+
? `pnpm add -D ${pkg}@latest`
|
|
290
|
+
: pm === "yarn"
|
|
291
|
+
? `yarn add -D ${pkg}@latest`
|
|
292
|
+
: `npm install -D ${pkg}@latest`;
|
|
293
|
+
console.info(` ${name}: running ${addCmd}...`);
|
|
283
294
|
try {
|
|
284
|
-
execSync(
|
|
295
|
+
execSync(addCmd, {
|
|
285
296
|
cwd: projectRoot,
|
|
286
297
|
timeout: 60000,
|
|
287
|
-
|
|
298
|
+
encoding: "utf-8",
|
|
288
299
|
});
|
|
289
300
|
console.info(` ${name}: package updated`);
|
|
290
301
|
}
|
|
291
|
-
catch
|
|
292
|
-
|
|
293
|
-
const detail = err.stderr?.trim() || err.message || "unknown error";
|
|
294
|
-
console.info(` ${name}: package update failed: ${detail}`);
|
|
295
|
-
console.info(` ${name}: run manually: pnpm add ${pkg}@latest`);
|
|
302
|
+
catch {
|
|
303
|
+
console.info(` ${name}: auto-update failed. Run manually: ${addCmd}`);
|
|
296
304
|
}
|
|
297
305
|
}
|
|
298
306
|
// Then fetch the latest manifest (from the now-updated package)
|