this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

rename files to kebab-case

+18 -16
+11 -9
builder/src/build/build-worker/index.ts
··· 1 - import { NextjsAppPaths } from "../../nextjsPaths"; 1 + import { NextjsAppPaths } from "../../nextjs-paths"; 2 2 import { build, Plugin } from "esbuild"; 3 3 import { readdirSync, readFileSync, writeFileSync } from "node:fs"; 4 4 import { cp, readFile, writeFile } from "node:fs/promises"; 5 5 6 - import { patchRequire } from "./patches/investigated/patchRequire"; 7 - import { patchUrl } from "./patches/investigated/patchUrl"; 8 - import { copyTemplates } from "./patches/investigated/copyTemplates"; 6 + import { patchRequire } from "./patches/investigated/patch-require"; 7 + import { patchUrl } from "./patches/investigated/patch-url"; 8 + import { copyTemplates } from "./patches/investigated/copy-templates"; 9 9 10 - import { patchReadFile } from "./patches/to-investigate/patchReadFile"; 11 - import { patchFindDir } from "./patches/to-investigate/patchFindDir"; 12 - import { inlineNextRequire } from "./patches/to-investigate/inlineNextRequire"; 13 - import { inlineEvalManifest } from "./patches/to-investigate/inlineEvalManifest"; 14 - import { patchWranglerDeps } from "./patches/to-investigate/wranglerDeps"; 10 + import { patchReadFile } from "./patches/to-investigate/patch-read-file"; 11 + import { patchFindDir } from "./patches/to-investigate/patch-find-dir"; 12 + import { inlineNextRequire } from "./patches/to-investigate/inline-next-require"; 13 + import { inlineEvalManifest } from "./patches/to-investigate/inline-eval-manifest"; 14 + import { patchWranglerDeps } from "./patches/to-investigate/wrangler-deps"; 15 15 16 16 /** 17 17 * Using the Next.js build output in the `.next` directory builds a workerd compatible output ··· 92 92 globalThis.__dirname ??= ""; 93 93 94 94 // Do not crash on cache not supported 95 + // https://github.com/cloudflare/workerd/pull/2434 96 + // compatibility flag "cache_option_enabled" -> does not support "force-cache" 95 97 let isPatchedAlready = globalThis.fetch.__nextPatched; 96 98 const curFetch = globalThis.fetch; 97 99 globalThis.fetch = (input, init) => {
+1 -1
builder/src/build/build-worker/patches/investigated/copyTemplates.ts builder/src/build/build-worker/patches/investigated/copy-templates.ts
··· 1 1 import path from "node:path"; 2 - import { NextjsAppPaths } from "../../../../nextjsPaths"; 2 + import { NextjsAppPaths } from "../../../../nextjs-paths"; 3 3 import { cpSync } from "node:fs"; 4 4 5 5 /**
builder/src/build/build-worker/patches/investigated/patchRequire.ts builder/src/build/build-worker/patches/investigated/patch-require.ts
builder/src/build/build-worker/patches/investigated/patchUrl.ts builder/src/build/build-worker/patches/investigated/patch-url.ts
+1 -1
builder/src/build/build-worker/patches/to-investigate/inlineEvalManifest.ts builder/src/build/build-worker/patches/to-investigate/inline-eval-manifest.ts
··· 1 1 import { globSync } from "glob"; 2 - import { NextjsAppPaths } from "../../../../nextjsPaths"; 2 + import { NextjsAppPaths } from "../../../../nextjs-paths"; 3 3 4 4 /** 5 5 * `evalManifest` relies on readFileSync so we need to patch the function so that it instead returns the content of the manifest files
+1 -1
builder/src/build/build-worker/patches/to-investigate/inlineNextRequire.ts builder/src/build/build-worker/patches/to-investigate/inline-next-require.ts
··· 1 1 import { readFileSync, existsSync } from "node:fs"; 2 - import { NextjsAppPaths } from "../../../../nextjsPaths"; 2 + import { NextjsAppPaths } from "../../../../nextjs-paths"; 3 3 4 4 /** 5 5 * The following avoid various Next.js specific files `require`d at runtime since we can just read
+1 -1
builder/src/build/build-worker/patches/to-investigate/patchFindDir.ts builder/src/build/build-worker/patches/to-investigate/patch-find-dir.ts
··· 1 - import { NextjsAppPaths } from "../../../../nextjsPaths"; 1 + import { NextjsAppPaths } from "../../../../nextjs-paths"; 2 2 import { existsSync } from "node:fs"; 3 3 4 4 /**
+1 -1
builder/src/build/build-worker/patches/to-investigate/patchReadFile.ts builder/src/build/build-worker/patches/to-investigate/patch-read-file.ts
··· 1 1 import { readFileSync } from "node:fs"; 2 2 import { globSync } from "glob"; 3 - import { NextjsAppPaths } from "../../../../nextjsPaths"; 3 + import { NextjsAppPaths } from "../../../../nextjs-paths"; 4 4 5 5 export function patchReadFile( 6 6 code: string,
+1 -1
builder/src/build/build-worker/patches/to-investigate/wranglerDeps.ts builder/src/build/build-worker/patches/to-investigate/wrangler-deps.ts
··· 1 1 import path from "node:path"; 2 2 import fs, { writeFileSync } from "node:fs"; 3 - import { NextjsAppPaths } from "../../../../nextjsPaths"; 3 + import { NextjsAppPaths } from "../../../../nextjs-paths"; 4 4 5 5 export function patchWranglerDeps(paths: NextjsAppPaths) { 6 6 console.log("# patchWranglerDeps");
+1 -1
builder/src/build/index.ts
··· 1 1 import { rm } from "node:fs/promises"; 2 2 import { buildNextjsApp } from "./build-next-app"; 3 3 import { buildWorker } from "./build-worker"; 4 - import { getNextjsAppPaths } from "../nextjsPaths"; 4 + import { getNextjsAppPaths } from "../nextjs-paths"; 5 5 import path from "node:path"; 6 6 import { fileURLToPath } from "node:url"; 7 7 import { cpSync, rmSync } from "node:fs";
builder/src/nextjsPaths.ts builder/src/nextjs-paths.ts