From 42ce2c75ab7bd3118cc193bea45ced6bb717fd4a Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Tue, 13 Oct 2026 21:47:04 +0800 Subject: [PATCH] fix(plugin): keep the shared launcher owner outside shipped source trees --- package.json | 2 +- {src/process => scripts/lib}/packageRunnerCommand.d.mts | 0 {src/process => scripts/lib}/packageRunnerCommand.mjs | 0 scripts/plugin-mcp-launcher.mjs | 2 +- src/application/ClientRegistrationIdentity.ts | 2 +- tsconfig.build.json | 5 ++--- 6 files changed, 5 insertions(+), 6 deletions(-) rename {src/process => scripts/lib}/packageRunnerCommand.d.mts (100%) rename {src/process => scripts/lib}/packageRunnerCommand.mjs (100%) diff --git a/package.json b/package.json index b38f5c149..0bc15c982 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "bridge/mitmproxy/capture.py", "scripts/rea.mjs", "scripts/plugin-mcp-launcher.mjs", - "src/process/packageRunnerCommand.mjs", + "scripts/lib/packageRunnerCommand.mjs", "scripts/electron-active-hook.cjs", "scripts/electron-active-hook-boundaries.cjs", "scripts/hopper-demo-x11.py", diff --git a/src/process/packageRunnerCommand.d.mts b/scripts/lib/packageRunnerCommand.d.mts similarity index 100% rename from src/process/packageRunnerCommand.d.mts rename to scripts/lib/packageRunnerCommand.d.mts diff --git a/src/process/packageRunnerCommand.mjs b/scripts/lib/packageRunnerCommand.mjs similarity index 100% rename from src/process/packageRunnerCommand.mjs rename to scripts/lib/packageRunnerCommand.mjs diff --git a/scripts/plugin-mcp-launcher.mjs b/scripts/plugin-mcp-launcher.mjs index 87772d7dc..71198caf9 100644 --- a/scripts/plugin-mcp-launcher.mjs +++ b/scripts/plugin-mcp-launcher.mjs @@ -5,7 +5,7 @@ import { mkdtemp, rm } from "node:fs/promises"; import { constants, tmpdir } from "node:os"; import { join } from "node:path"; -import { packageRunnerCommand } from "../src/process/packageRunnerCommand.mjs"; +import { packageRunnerCommand } from "./lib/packageRunnerCommand.mjs"; // The manifest owns this exact package pin; args[1] remains release-managed. // No build, dependency installation or ambient latest-version lookup is needed diff --git a/src/application/ClientRegistrationIdentity.ts b/src/application/ClientRegistrationIdentity.ts index 53cf4ca4f..24bd4a80e 100644 --- a/src/application/ClientRegistrationIdentity.ts +++ b/src/application/ClientRegistrationIdentity.ts @@ -2,7 +2,7 @@ import { basename, isAbsolute, resolve } from "node:path"; import { valid } from "semver"; import { PRODUCT_IDENTITY } from "../identity.js"; -import { packageRunnerCommand } from "../process/packageRunnerCommand.mjs"; +import { packageRunnerCommand } from "../../scripts/lib/packageRunnerCommand.mjs"; /** Package runners whose pinned launcher setup can register. */ export type PackageRunner = "npx" | "bunx"; diff --git a/tsconfig.build.json b/tsconfig.build.json index e9675b4bc..1601f3a0a 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -2,10 +2,9 @@ "extends": "./tsconfig.json", "compilerOptions": { "rootDir": "src", - "types": ["node"], - "allowJs": true + "types": ["node"] }, - "include": ["src/**/*.ts", "src/process/packageRunnerCommand.mjs"], + "include": ["src/**/*.ts"], "exclude": [ "src/**/*.fixture.ts", "src/**/*.test.ts",