release: WRNexusJS 0.5.10

This commit is contained in:
2026-07-30 13:36:29 +05:30
parent 8fc6f15402
commit d1b0c55b53
159 changed files with 7509 additions and 604 deletions
+16
View File
@@ -9,6 +9,22 @@ import {
stableStringify,
} from "../src/index.ts";
test("derives the shared workspace root domain from configured public app origins", async () => {
const previous = process.env.WRNEXUS_WORKSPACE_ORIGINS;
process.env.WRNEXUS_WORKSPACE_ORIGINS = JSON.stringify({
admin: "https://admin.staging.example.com",
citizen: "https://citizen.staging.example.com",
sso: "https://sso.staging.example.com",
});
try {
const { workspaceRootDomain } = await import("../src/workspace.ts");
expect(workspaceRootDomain()).toBe("staging.example.com");
} finally {
if (previous === undefined) delete process.env.WRNEXUS_WORKSPACE_ORIGINS;
else process.env.WRNEXUS_WORKSPACE_ORIGINS = previous;
}
});
function context(url: string, headers: HeadersInit = {}) {
const parsed = new URL(url);
return createContext(new Request(parsed, { headers }), parsed);