fix: type-safe nitro editor helpers and stabilize deploy build
Local Build and Deploy / deploy (push) Failing after 29s

Rewrite getNested/updateNested without fragile any/Json inference, clear stale .next types before build, and skip env refine during compile.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-18 19:57:33 +02:00
1 parent 1273f9aa46
commit b22725d3a9
3 files changed
+57 -30

No files matched your search

+4
View File
@@ -66,6 +66,10 @@ jobs:
pnpm test pnpm test
# 7. Next.js Build # 7. Next.js Build
# Skip env refine during compile/page-data; runtime still validates via env.ts.
# Drop stale generated types that can diverge from source after incremental builds.
rm -rf .next/types .next/dev
export SKIP_ENV_VALIDATION=1
pnpm build pnpm build
# 8. Fix ownership: Build first, THEN set permissions for the web server # 8. Fix ownership: Build first, THEN set permissions for the web server
File diff suppressed because it is too large. Load diff
+3 -1
View File
@@ -9,8 +9,10 @@ describe("production deploy workflow", () => {
); );
it("preserves the Next.js incremental build cache", () => { it("preserves the Next.js incremental build cache", () => {
expect(workflow).not.toMatch(/rm\s+-rf[^\n]*\.next/); // May clear .next/types or .next/dev, but must not wipe the whole .next tree.
expect(workflow).not.toMatch(/rm\s+-rf\s+\.next(?:\s|$)/);
expect(workflow).toContain("pnpm install --frozen-lockfile"); expect(workflow).toContain("pnpm install --frozen-lockfile");
expect(workflow).toContain("SKIP_ENV_VALIDATION=1");
}); });
it("does not override onlyBuiltDependencies (uses pnpm-workspace.yaml)", () => { it("does not override onlyBuiltDependencies (uses pnpm-workspace.yaml)", () => {