mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix(build): pin synthetic auth runtime dist entry
This commit is contained in:
@@ -81,6 +81,13 @@ function readGatewayRunLoopSource(): string {
|
||||
return readFileSync(new URL("../cli/gateway-cli/run-loop.ts", import.meta.url), "utf8");
|
||||
}
|
||||
|
||||
function readPiModelDiscoveryCacheSource(): string {
|
||||
return readFileSync(
|
||||
new URL("../agents/pi-embedded-runner/model-discovery-cache.ts", import.meta.url),
|
||||
"utf8",
|
||||
);
|
||||
}
|
||||
|
||||
describe("tsdown config", () => {
|
||||
it("keeps core, plugin runtime, plugin-sdk, bundled root plugins, and bundled hooks in one dist graph", () => {
|
||||
const distGraph = requireUnifiedDistGraph();
|
||||
@@ -150,9 +157,15 @@ describe("tsdown config", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps synthetic auth refs behind one stable runtime dist entry", () => {
|
||||
it("keeps PI model discovery synthetic auth refs behind one stable runtime dist entry", () => {
|
||||
const distGraph = requireUnifiedDistGraph();
|
||||
const importSpecifiers = [
|
||||
...readPiModelDiscoveryCacheSource().matchAll(
|
||||
/from ["']([^"']*synthetic-auth\.runtime\.js)["']/gu,
|
||||
),
|
||||
].map((match) => match[1]);
|
||||
|
||||
expect(importSpecifiers).toEqual(["../../plugins/synthetic-auth.runtime.js"]);
|
||||
expect(entrySources(distGraph)["plugins/synthetic-auth.runtime"]).toBe(
|
||||
"src/plugins/synthetic-auth.runtime.ts",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user