Complete V1 RC deployment capability gates

This commit is contained in:
mes123456
2026-08-15 01:01:23 -04:00
parent a3f3071c03
commit 17ab961485
37 changed files with 2031 additions and 184 deletions

View File

@@ -4,12 +4,13 @@ import react from "@vitejs/plugin-react";
import fs from "node:fs";
// @ts-expect-error The runtime is Node; this project intentionally avoids a browser dependency on Node types.
import path from "node:path";
// @ts-expect-error The runtime is Node; this project intentionally avoids a browser dependency on Node types.
import { fileURLToPath } from "node:url";
const isolationHeaders = {
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp",
"Cross-Origin-Resource-Policy": "same-origin",
};
const deploymentContract = JSON.parse(
fs.readFileSync(path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../docs/web/deployment-contract.json"), "utf8"),
) as { responseHeaders: { allResponses: Record<string, string> } };
const isolationHeaders = deploymentContract.responseHeaders.allResponses;
function preserveIsolationHeaders(): Plugin {
const install = (server: { middlewares: { use: (handler: (request: unknown, response: { setHeader: (name: string, value: string) => void }, next: () => void) => void) => void } }) => {