stack/apps/backend/scripts
Devin AI e971fd8fcd fix: patch required-server-files manifest to include CJS boundary marker
Workaround for vercel/next.js#91661 — Next.js 16.2 omits .next/package.json
from the required-server-files manifest, so Vercel's serverless functions
don't get the CJS boundary marker. Without it, Node.js resolves the project's
"type": "module" and treats the compiled server bundles as ESM, breaking
require() calls at runtime.

This adds a postbuild script that patches the manifest to include the file,
matching the upstream fix in vercel/next.js#93612 (only in canary as of 16.2.6).

The previous approach of removing "type": "module" broke the codegen step
which uses tsx/esbuild and needs ESM for top-level await support.

Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
2026-05-20 19:07:19 +00:00
..
verify-data-integrity [Refactor] [Fix] Remove default prod creation (#1350) 2026-05-15 10:38:33 -07:00
backfill-internal-free-plans.ts [Feat] new scripts on migrate/seed/init run for internal (#1421) 2026-05-12 16:05:45 -07:00
benchmark-internal-metrics.ts Fix ClickHouse OOM in MAU query + optimize /internal/metrics route (#1344) 2026-04-19 22:57:46 -07:00
bulldozer-payments-init.ts Make Bulldozer SQL statements deterministic 2026-04-18 16:43:26 -07:00
clickhouse-migrations.ts clickhouse new syncs and verify-data (#1304) 2026-04-08 14:43:22 -07:00
db-migrations.ts [Feat] new scripts on migrate/seed/init run for internal (#1421) 2026-05-12 16:05:45 -07:00
db-migrations.tsdown.config.ts Fix Docker build 2026-03-09 10:49:42 -07:00
generate-keys.ts Split backend and dashboard (#83) 2024-06-18 15:49:31 +02:00
generate-migration-imports.ts Auto migration (#526) 2025-07-24 02:38:37 +02:00
generate-openapi-fumadocs.ts New setup (#1413) 2026-05-06 12:03:06 -07:00
generate-private-sign-up-risk-engine.ts private files n sm build shit (#1276) 2026-03-23 12:31:36 -07:00
generate-route-info.ts fixes? 2025-12-12 17:29:57 -08:00
patch-required-server-files.mjs fix: patch required-server-files manifest to include CJS boundary marker 2026-05-20 19:07:19 +00:00
regen-internal-subscriptions-to-latest.ts [Feat] new scripts on migrate/seed/init run for internal (#1421) 2026-05-12 16:05:45 -07:00
run-bulldozer-studio.ts Make Bulldozer SQL statements deterministic 2026-04-18 16:43:26 -07:00
run-cron-jobs.ts Payments bulldozer txn rework (#1315) 2026-04-17 22:11:21 +00:00
run-email-queue.ts Speed up tests (#1063) 2025-12-28 11:25:04 -08:00