camstack 1.2.143 → 1.2.144
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.
package/dist/cli.js
CHANGED
|
@@ -38,7 +38,7 @@ async function runServe(args) {
|
|
|
38
38
|
...typeof values.data === "string" ? { data: values.data } : {}
|
|
39
39
|
};
|
|
40
40
|
Object.assign(process.env, buildServeEnv(opts));
|
|
41
|
-
await import("./launcher-
|
|
41
|
+
await import("./launcher-25V2QKN6.js");
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// src/commands/agent.ts
|
|
@@ -83,7 +83,7 @@ async function runAgent(args) {
|
|
|
83
83
|
...typeof values.port === "string" ? { port: values.port } : {}
|
|
84
84
|
};
|
|
85
85
|
Object.assign(process.env, buildAgentEnv(opts));
|
|
86
|
-
await import("./launcher-
|
|
86
|
+
await import("./launcher-25V2QKN6.js");
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// src/commands/setup.ts
|
|
@@ -263394,6 +263394,7 @@ var require_server_root = __commonJS({
|
|
|
263394
263394
|
devUploadsDir: /* @__PURE__ */ __name(() => devUploadsDir, "devUploadsDir"),
|
|
263395
263395
|
emptyServerRootState: /* @__PURE__ */ __name(() => emptyServerRootState, "emptyServerRootState"),
|
|
263396
263396
|
findMissingNativePrebuilds: /* @__PURE__ */ __name(() => findMissingNativePrebuilds, "findMissingNativePrebuilds"),
|
|
263397
|
+
findUnappliedClosurePatches: /* @__PURE__ */ __name(() => findUnappliedClosurePatches, "findUnappliedClosurePatches"),
|
|
263397
263398
|
isDevChannelVersion: /* @__PURE__ */ __name(() => isDevChannelVersion, "isDevChannelVersion"),
|
|
263398
263399
|
isHostExternal: /* @__PURE__ */ __name(() => isHostExternal, "isHostExternal"),
|
|
263399
263400
|
isServerRootState: /* @__PURE__ */ __name(() => isServerRootState, "isServerRootState"),
|
|
@@ -263798,6 +263799,58 @@ var require_server_root = __commonJS({
|
|
|
263798
263799
|
return missing;
|
|
263799
263800
|
}
|
|
263800
263801
|
__name(findMissingNativePrebuilds, "findMissingNativePrebuilds");
|
|
263802
|
+
var CLOSURE_PATCH_PAYLOAD = [
|
|
263803
|
+
"node_modules",
|
|
263804
|
+
"@camstack",
|
|
263805
|
+
"server",
|
|
263806
|
+
"dist",
|
|
263807
|
+
"closure-patches"
|
|
263808
|
+
];
|
|
263809
|
+
var CLOSURE_PATCH_MANIFEST = "patch-reach.json";
|
|
263810
|
+
function fileContains(file, marker) {
|
|
263811
|
+
try {
|
|
263812
|
+
return fs3.readFileSync(file, "utf-8").includes(marker);
|
|
263813
|
+
} catch {
|
|
263814
|
+
return false;
|
|
263815
|
+
}
|
|
263816
|
+
}
|
|
263817
|
+
__name(fileContains, "fileContains");
|
|
263818
|
+
function findUnappliedClosurePatches(closureDir) {
|
|
263819
|
+
const payloadDir = path3.join(closureDir, ...CLOSURE_PATCH_PAYLOAD);
|
|
263820
|
+
let manifest;
|
|
263821
|
+
try {
|
|
263822
|
+
const raw = JSON.parse(fs3.readFileSync(path3.join(payloadDir, CLOSURE_PATCH_MANIFEST), "utf-8"));
|
|
263823
|
+
if (typeof raw !== "object" || raw === null) return [];
|
|
263824
|
+
manifest = raw;
|
|
263825
|
+
} catch {
|
|
263826
|
+
return [];
|
|
263827
|
+
}
|
|
263828
|
+
if (!Array.isArray(manifest.patches)) return [];
|
|
263829
|
+
const nm = path3.join(closureDir, "node_modules");
|
|
263830
|
+
const missing = [];
|
|
263831
|
+
for (const raw of manifest.patches) {
|
|
263832
|
+
if (raw.reach !== "closure-postinstall") continue;
|
|
263833
|
+
const pkg = raw.package;
|
|
263834
|
+
const markers = raw.markers;
|
|
263835
|
+
if (typeof pkg !== "string" || typeof markers !== "object" || markers === null) continue;
|
|
263836
|
+
const pkgDir = path3.join(nm, pkg);
|
|
263837
|
+
if (!fs3.existsSync(pkgDir)) {
|
|
263838
|
+
continue;
|
|
263839
|
+
}
|
|
263840
|
+
for (const [rel, list] of Object.entries(markers)) {
|
|
263841
|
+
if (!Array.isArray(list)) continue;
|
|
263842
|
+
const target = path3.join(pkgDir, ...rel.split("/"));
|
|
263843
|
+
for (const marker of list) {
|
|
263844
|
+
if (typeof marker !== "string") continue;
|
|
263845
|
+
if (!fileContains(target, marker)) {
|
|
263846
|
+
missing.push(`${pkg}/${rel}: ${marker}`);
|
|
263847
|
+
}
|
|
263848
|
+
}
|
|
263849
|
+
}
|
|
263850
|
+
}
|
|
263851
|
+
return missing;
|
|
263852
|
+
}
|
|
263853
|
+
__name(findUnappliedClosurePatches, "findUnappliedClosurePatches");
|
|
263801
263854
|
function rmrf(target) {
|
|
263802
263855
|
try {
|
|
263803
263856
|
fs3.rmSync(target, {
|
|
@@ -264734,6 +264787,10 @@ var require_server_root = __commonJS({
|
|
|
264734
264787
|
if (missingNatives.length > 0) {
|
|
264735
264788
|
throw new Error(`staged closure missing native prebuilds: ${missingNatives.join(", ")} \u2014 refusing to arm a swap that would break the forked runners`);
|
|
264736
264789
|
}
|
|
264790
|
+
const unpatched = findUnappliedClosurePatches(stagingDir);
|
|
264791
|
+
if (unpatched.length > 0) {
|
|
264792
|
+
throw new Error(`staged closure did not apply its shipped patches: ${unpatched.join(", ")} \u2014 refusing to arm a swap into an unpatched closure`);
|
|
264793
|
+
}
|
|
264737
264794
|
return stagingDir;
|
|
264738
264795
|
} catch (err) {
|
|
264739
264796
|
await fs6.promises.rm(stagingDir, {
|