@infinitedusky/indusk-mcp 1.2.5 → 1.2.8
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,29 @@ 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 isWorkspace = existsSync(join(projectRoot, "pnpm-workspace.yaml"));
|
|
289
|
+
const addCmd = pm === "pnpm"
|
|
290
|
+
? `pnpm add -D ${isWorkspace ? "-w " : ""}${pkg}@latest`
|
|
291
|
+
: pm === "yarn"
|
|
292
|
+
? `yarn add -D ${pkg}@latest`
|
|
293
|
+
: `npm install -D ${pkg}@latest`;
|
|
294
|
+
console.info(` ${name}: running ${addCmd}...`);
|
|
283
295
|
try {
|
|
284
|
-
execSync(
|
|
296
|
+
execSync(addCmd, {
|
|
285
297
|
cwd: projectRoot,
|
|
286
298
|
timeout: 60000,
|
|
287
|
-
|
|
299
|
+
encoding: "utf-8",
|
|
288
300
|
});
|
|
289
301
|
console.info(` ${name}: package updated`);
|
|
290
302
|
}
|
|
291
|
-
catch
|
|
292
|
-
|
|
293
|
-
const detail = String(err.stderr ?? err.message ?? "unknown error").trim();
|
|
294
|
-
console.info(` ${name}: package update failed: ${detail}`);
|
|
295
|
-
console.info(` ${name}: run manually: pnpm add ${pkg}@latest`);
|
|
303
|
+
catch {
|
|
304
|
+
console.info(` ${name}: auto-update failed. Run manually: ${addCmd}`);
|
|
296
305
|
}
|
|
297
306
|
}
|
|
298
307
|
// Then fetch the latest manifest (from the now-updated package)
|