diff --git a/Dockerfile b/Dockerfile index 68856898568..a3d536a3dbf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,6 +63,7 @@ COPY openclaw.mjs ./ COPY ui/package.json ./ui/package.json COPY patches ./patches COPY scripts/postinstall-bundled-plugins.mjs scripts/preinstall-package-manager-warning.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/ +COPY scripts/lib/bundled-runtime-deps-install.mjs ./scripts/lib/bundled-runtime-deps-install.mjs COPY scripts/lib/package-dist-imports.mjs ./scripts/lib/package-dist-imports.mjs COPY --from=ext-deps /out/ ./${OPENCLAW_BUNDLED_PLUGIN_DIR}/ diff --git a/package.json b/package.json index 4e4b49777be..d802d9ba85a 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "skills/", "scripts/npm-runner.mjs", "scripts/preinstall-package-manager-warning.mjs", + "scripts/lib/bundled-runtime-deps-install.mjs", "scripts/lib/package-dist-imports.mjs", "scripts/postinstall-bundled-plugins.mjs", "scripts/windows-cmd-helpers.mjs" diff --git a/scripts/docker/cleanup-smoke/Dockerfile b/scripts/docker/cleanup-smoke/Dockerfile index b7b37d2ecb8..9ae0fef7aed 100644 --- a/scripts/docker/cleanup-smoke/Dockerfile +++ b/scripts/docker/cleanup-smoke/Dockerfile @@ -20,6 +20,7 @@ COPY packages ./packages COPY extensions ./extensions COPY patches ./patches COPY scripts/postinstall-bundled-plugins.mjs scripts/preinstall-package-manager-warning.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/ +COPY scripts/lib/bundled-runtime-deps-install.mjs ./scripts/lib/bundled-runtime-deps-install.mjs COPY scripts/lib/package-dist-imports.mjs ./scripts/lib/package-dist-imports.mjs RUN --mount=type=cache,id=openclaw-pnpm-store,target=/root/.local/share/pnpm/store,sharing=locked \ corepack enable \ diff --git a/scripts/openclaw-npm-release-check.ts b/scripts/openclaw-npm-release-check.ts index a9cf59493d2..b45e37374b1 100644 --- a/scripts/openclaw-npm-release-check.ts +++ b/scripts/openclaw-npm-release-check.ts @@ -66,6 +66,7 @@ const MAX_CALVER_DISTANCE_DAYS = 2; const REQUIRED_PACKED_PATHS = [ PACKAGE_DIST_INVENTORY_RELATIVE_PATH, "dist/control-ui/index.html", + "scripts/lib/bundled-runtime-deps-install.mjs", ...WORKSPACE_TEMPLATE_PACK_PATHS, ]; const CONTROL_UI_ASSET_PREFIX = "dist/control-ui/assets/"; diff --git a/scripts/release-check.ts b/scripts/release-check.ts index 758536d583c..764bdf1e978 100755 --- a/scripts/release-check.ts +++ b/scripts/release-check.ts @@ -71,6 +71,7 @@ const requiredPathGroups = [ ...WORKSPACE_TEMPLATE_PACK_PATHS, "scripts/npm-runner.mjs", "scripts/preinstall-package-manager-warning.mjs", + "scripts/lib/bundled-runtime-deps-install.mjs", "scripts/lib/package-dist-imports.mjs", "scripts/postinstall-bundled-plugins.mjs", "dist/plugin-sdk/compat.js", diff --git a/src/dockerfile.test.ts b/src/dockerfile.test.ts index 751d29303f0..5aa781df259 100644 --- a/src/dockerfile.test.ts +++ b/src/dockerfile.test.ts @@ -78,13 +78,18 @@ describe("Dockerfile", () => { const dockerfile = await readFile(dockerfilePath, "utf8"); const installIndex = dockerfile.indexOf("pnpm install --frozen-lockfile"); const postinstallIndex = dockerfile.indexOf("COPY scripts/postinstall-bundled-plugins.mjs"); + const runtimeDepsHelperIndex = dockerfile.indexOf( + "COPY scripts/lib/bundled-runtime-deps-install.mjs ./scripts/lib/bundled-runtime-deps-install.mjs", + ); const distImportHelperIndex = dockerfile.indexOf( "COPY scripts/lib/package-dist-imports.mjs ./scripts/lib/package-dist-imports.mjs", ); expect(postinstallIndex).toBeGreaterThan(-1); + expect(runtimeDepsHelperIndex).toBeGreaterThan(-1); expect(distImportHelperIndex).toBeGreaterThan(-1); expect(postinstallIndex).toBeLessThan(installIndex); + expect(runtimeDepsHelperIndex).toBeLessThan(installIndex); expect(distImportHelperIndex).toBeLessThan(installIndex); }); diff --git a/test/openclaw-npm-release-check.test.ts b/test/openclaw-npm-release-check.test.ts index 4b86971345e..1516a4654a0 100644 --- a/test/openclaw-npm-release-check.test.ts +++ b/test/openclaw-npm-release-check.test.ts @@ -27,6 +27,7 @@ import { const REQUIRED_PACKED_PATHS = [ PACKAGE_DIST_INVENTORY_RELATIVE_PATH, + "scripts/lib/bundled-runtime-deps-install.mjs", ...WORKSPACE_TEMPLATE_PACK_PATHS, ] as const; diff --git a/test/release-check.test.ts b/test/release-check.test.ts index 2a0f8bfbb4f..e8655ba205e 100644 --- a/test/release-check.test.ts +++ b/test/release-check.test.ts @@ -583,6 +583,7 @@ describe("collectMissingPackPaths", () => { "dist/control-ui/index.html", "scripts/npm-runner.mjs", "scripts/preinstall-package-manager-warning.mjs", + "scripts/lib/bundled-runtime-deps-install.mjs", "scripts/lib/package-dist-imports.mjs", "scripts/postinstall-bundled-plugins.mjs", "dist/task-registry-control.runtime.js", @@ -615,6 +616,7 @@ describe("collectMissingPackPaths", () => { ...WORKSPACE_TEMPLATE_PACK_PATHS, "scripts/npm-runner.mjs", "scripts/preinstall-package-manager-warning.mjs", + "scripts/lib/bundled-runtime-deps-install.mjs", "scripts/lib/package-dist-imports.mjs", "scripts/postinstall-bundled-plugins.mjs", "dist/plugin-sdk/root-alias.cjs",