openclaw/scripts/docker/copy-bootstrap-scripts.mjs
Galin Iliev db01f6d520
feat: prepare cloud workers for enterprise repositories (#160108)
Support host-bound GitHub Enterprise discovery and repository defaults with presence-aware prepared cloud workers.

Preserve current identity and repository authority through clone, publication, cached reads and worker preparation. Keep explicit user destinations and supported Git URLs, separate public GitHub issuer paths, and retain cleanup, activation and stop-deadline guarantees.

Validated with exact-head CI, focused lifecycle/identity/UI regressions and native review. The maintainer also reports validation in an existing deployment; that evidence is distinct from the agent-run local and CI checks.

Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com>
2026-10-03 07:42:18 -07:00

17 lines
672 B
JavaScript

import { copyFileSync, mkdirSync, readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const root = fileURLToPath(new URL("../../", import.meta.url));
const target = process.argv[2];
if (!target) {
throw new Error("Usage: copy-bootstrap-scripts.mjs <output-directory>");
}
const { files } = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
for (const file of files) {
if (file.startsWith("scripts/") && !file.includes("*") && !file.endsWith("/")) {
const output = join(target, file);
mkdirSync(dirname(output), { recursive: true });
copyFileSync(join(root, file), output);
}
}