Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -31,9 +31,9 @@ const EMPTY_CHUNK_ALLOWLIST = new Set([
"api.embed.forms._formKey.submit",
"api.leads.capture",
"api.metrics",
"api.password-policy-remind",
"api.status",
"api.tenants._tenant.plugins",
"auth.password-policy-remind",
"callback",
"dry-run",
"healthcheck",
@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import { getManualChunkName } from "./manualChunks";
import { getChunkFileName, getManualChunkName } from "./manualChunks";
describe("manual chunk boundaries", () => {
it.each([
@@ -10,10 +10,9 @@ describe("manual chunk boundaries", () => {
["/repo/node_modules/clsx/dist/clsx.mjs", "vendor-core-utils"],
["/repo/node_modules/tailwind-merge/dist/lib/index.mjs", "vendor-core-utils"],
["/repo/node_modules/class-variance-authority/dist/index.mjs", "vendor-core-utils"],
["/repo/node_modules/tslib/tslib.es6.mjs", "vendor-tslib"],
["/repo/node_modules/recharts/es6/index.js", "vendor-charts"],
["/repo/node_modules/d3-shape/src/index.js", "vendor-charts"],
["/repo/node_modules/@monaco-editor/react/dist/index.mjs", "vendor-monaco"],
["/repo/node_modules/monaco-editor/esm/vs/editor/editor.api.js", "vendor-monaco"],
["/repo/node_modules/marked/lib/marked.esm.js", "vendor-markdown"],
["/repo/node_modules/katex/dist/katex.mjs", "vendor-markdown"],
["/repo/node_modules/@tiptap/react/dist/index.js", "vendor-editor-tiptap"],
@@ -28,11 +27,10 @@ describe("manual chunk boundaries", () => {
expect(getManualChunkName(id)).toBe(chunkName);
});
it("supports Windows-like node_modules paths from Rollup ids", () => {
expect(getManualChunkName("C:\\repo\\node_modules\\monaco-editor\\esm\\vs\\editor\\editor.api.js")).toBe("vendor-monaco");
});
it.each([
"/repo/node_modules/@monaco-editor/react/dist/index.mjs",
"/repo/node_modules/monaco-editor/esm/vs/editor/editor.api.js",
"C:\\repo\\node_modules\\monaco-editor\\esm\\vs\\editor\\editor.api.js",
"/repo/apps/web/app/components/monaco-editor/FakeEditor.tsx",
"/repo/apps/web/app/routes/workflows/workflow-builder.tsx",
"/repo/node_modules/streamdown/dist/index.js",
@@ -47,3 +45,12 @@ describe("manual chunk boundaries", () => {
expect(getManualChunkName(id)).toBeUndefined();
});
});
describe("lazy runtime chunk filenames", () => {
it("gives Monaco and PDF.js descendants stable lazy-runtime prefixes", () => {
expect(getChunkFileName(["/repo/node_modules/monaco-editor/esm/vs/editor/editor.api.js"])).toBe("assets/lazy-monaco-[name]-[hash].js");
expect(getChunkFileName(["C:\\repo\\node_modules\\@monaco-editor\\react\\dist\\index.mjs"])).toBe("assets/lazy-monaco-[name]-[hash].js");
expect(getChunkFileName(["/repo/node_modules/pdfjs-dist/build/pdf.mjs"])).toBe("assets/lazy-pdfjs-[name]-[hash].js");
expect(getChunkFileName(["/repo/apps/web/app/root.tsx"])).toBe("assets/[name]-[hash].js");
});
});
@@ -3,9 +3,16 @@ const NODE_MODULES_SEGMENT = "/node_modules/";
const CHUNK_MATCHERS: Array<{ chunkName: string; packages: string[] }> = [
{ chunkName: "vendor-react", packages: ["react", "react-dom", "react-router", "scheduler", "use-sync-external-store"] },
{ chunkName: "vendor-core-utils", packages: ["clsx", "tailwind-merge", "class-variance-authority"] },
// Keep the shared TypeScript runtime helpers out of lazily loaded vendor
// chunks. Otherwise Rollup can pull a 1+ MiB AWS chunk into SSR startup just
// because the main bundle also needs `__assign`/`__extends`.
{ chunkName: "vendor-tslib", packages: ["tslib"] },
{ chunkName: "vendor-charts", packages: ["recharts", "victory-vendor", "d3-", "d3"] },
{ chunkName: "vendor-markdown", packages: ["marked", "katex"] },
{ chunkName: "vendor-monaco", packages: ["@monaco-editor/react", "monaco-editor"] },
// Monaco is already behind a client-only dynamic import. Let Rollup keep
// that complete dependency graph at the lazy boundary: assigning it to a
// manual chunk can absorb Vite's preload helper and make the editor part of
// every route's static graph.
{ chunkName: "vendor-editor-tiptap", packages: ["@tiptap/"] },
{ chunkName: "vendor-editor-prosemirror", packages: ["prosemirror-"] },
{ chunkName: "vendor-pdf", packages: ["@react-pdf/renderer"] },
@@ -44,3 +51,14 @@ export function getManualChunkName(id: string): string | undefined {
return undefined;
}
export function getChunkFileName(moduleIds: readonly string[]): string {
const normalizedIds = moduleIds.map(normalizeModuleId);
if (normalizedIds.some((id) => id.includes("/node_modules/monaco-editor/") || id.includes("/node_modules/@monaco-editor/react/"))) {
return "assets/lazy-monaco-[name]-[hash].js";
}
if (normalizedIds.some((id) => id.includes("/node_modules/pdfjs-dist/"))) {
return "assets/lazy-pdfjs-[name]-[hash].js";
}
return "assets/[name]-[hash].js";
}
@@ -0,0 +1,17 @@
// @vitest-environment node
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { describe, expect, test } from "vitest";
describe("Tailwind and Subframe theme integration", () => {
test("addresses the Subframe white scale by shade in typography rules", () => {
const testDir = path.dirname(fileURLToPath(import.meta.url));
const config = fs.readFileSync(path.resolve(testDir, "../../../../../tailwind.config.ts"), "utf8");
const theme = fs.readFileSync(path.resolve(testDir, "../../ui/theme.css"), "utf8");
expect(theme).toContain("--color-white-1000:");
expect(config).toContain('theme("colors.white.1000")');
expect(config).not.toMatch(/theme\(["']colors\.white["']\)/);
});
});
@@ -9,7 +9,7 @@ describe("vite config integration wiring", () => {
it("wires the manual chunk helper into Rollup output without running a build", async () => {
const source = await readViteConfigSource();
expect(source).toContain('import { getManualChunkName } from "./app/utils/build/manualChunks";');
expect(source).toMatch(/import\s*\{[^}]*\bgetManualChunkName\b[^}]*\}\s*from\s*"\.\/app\/utils\/build\/manualChunks";/u);
expect(source).toMatch(/rollupOptions:\s*{[\s\S]*output:\s*{[\s\S]*manualChunks:\s*getManualChunkName/);
});