@reckona/mreact-router 0.0.159 → 0.0.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.d.ts +6 -0
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js.map +1 -1
- package/dist/adapters/aws-lambda.d.ts +29 -0
- package/dist/adapters/aws-lambda.d.ts.map +1 -1
- package/dist/adapters/aws-lambda.js.map +1 -1
- package/dist/adapters/cloudflare.d.ts +78 -0
- package/dist/adapters/cloudflare.d.ts.map +1 -1
- package/dist/adapters/cloudflare.js.map +1 -1
- package/dist/adapters/edge.d.ts +6 -0
- package/dist/adapters/edge.d.ts.map +1 -1
- package/dist/adapters/edge.js.map +1 -1
- package/dist/adapters/node.d.ts +7 -0
- package/dist/adapters/node.d.ts.map +1 -1
- package/dist/adapters/node.js.map +1 -1
- package/dist/adapters/static.d.ts +6 -0
- package/dist/adapters/static.d.ts.map +1 -1
- package/dist/adapters/static.js.map +1 -1
- package/dist/app-router-globals.d.ts +6 -0
- package/dist/app-router-globals.d.ts.map +1 -1
- package/dist/app-router-globals.js.map +1 -1
- package/dist/assets.d.ts +18 -0
- package/dist/assets.d.ts.map +1 -1
- package/dist/assets.js +6 -0
- package/dist/assets.js.map +1 -1
- package/dist/build.d.ts +30 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +4 -0
- package/dist/build.js.map +1 -1
- package/dist/cache-stats.d.ts +3 -0
- package/dist/cache-stats.d.ts.map +1 -1
- package/dist/cache-stats.js.map +1 -1
- package/dist/cache.d.ts +15 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js.map +1 -1
- package/dist/cli-options.d.ts.map +1 -1
- package/dist/cli-options.js +2 -0
- package/dist/cli-options.js.map +1 -1
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +15 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/cookies.d.ts +3 -0
- package/dist/cookies.d.ts.map +1 -1
- package/dist/cookies.js.map +1 -1
- package/dist/csrf.d.ts +12 -0
- package/dist/csrf.d.ts.map +1 -1
- package/dist/csrf.js +12 -0
- package/dist/csrf.js.map +1 -1
- package/dist/deferred.d.ts +9 -0
- package/dist/deferred.d.ts.map +1 -1
- package/dist/deferred.js +6 -0
- package/dist/deferred.js.map +1 -1
- package/dist/dev-server.d.ts +3 -0
- package/dist/dev-server.d.ts.map +1 -1
- package/dist/dev-server.js.map +1 -1
- package/dist/file-conventions.d.ts +3 -0
- package/dist/file-conventions.d.ts.map +1 -1
- package/dist/file-conventions.js.map +1 -1
- package/dist/i18n.d.ts +15 -0
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +6 -0
- package/dist/i18n.js.map +1 -1
- package/dist/import-policy.d.ts +3 -0
- package/dist/import-policy.d.ts.map +1 -1
- package/dist/import-policy.js.map +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/link.d.ts +34 -0
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js.map +1 -1
- package/dist/logger.d.ts +33 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/multipart.d.ts +15 -0
- package/dist/multipart.d.ts.map +1 -1
- package/dist/multipart.js +3 -0
- package/dist/multipart.js.map +1 -1
- package/dist/native-escape.d.ts +3 -0
- package/dist/native-escape.d.ts.map +1 -1
- package/dist/native-escape.js +3 -0
- package/dist/native-escape.js.map +1 -1
- package/dist/navigation-state.d.ts +15 -0
- package/dist/navigation-state.d.ts.map +1 -1
- package/dist/navigation-state.js +6 -0
- package/dist/navigation-state.js.map +1 -1
- package/dist/navigation.d.ts +9 -0
- package/dist/navigation.d.ts.map +1 -1
- package/dist/navigation.js +6 -0
- package/dist/navigation.js.map +1 -1
- package/dist/prerender-store.d.ts +21 -0
- package/dist/prerender-store.d.ts.map +1 -1
- package/dist/prerender-store.js +9 -0
- package/dist/prerender-store.js.map +1 -1
- package/dist/render.d.ts +12 -0
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +3 -0
- package/dist/render.js.map +1 -1
- package/dist/routes.d.ts +30 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +6 -0
- package/dist/routes.js.map +1 -1
- package/dist/runtime-cache.d.ts +4 -0
- package/dist/runtime-cache.d.ts.map +1 -1
- package/dist/runtime-cache.js +3 -0
- package/dist/runtime-cache.js.map +1 -1
- package/dist/runtime-state.d.ts +3 -0
- package/dist/runtime-state.d.ts.map +1 -1
- package/dist/runtime-state.js +3 -0
- package/dist/runtime-state.js.map +1 -1
- package/dist/serve.d.ts +24 -0
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +6 -0
- package/dist/serve.js.map +1 -1
- package/dist/session.d.ts +12 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js.map +1 -1
- package/dist/stream-list.d.ts +12 -0
- package/dist/stream-list.d.ts.map +1 -1
- package/dist/stream-list.js +3 -0
- package/dist/stream-list.js.map +1 -1
- package/dist/trace.d.ts +30 -0
- package/dist/trace.d.ts.map +1 -1
- package/dist/trace.js +6 -0
- package/dist/trace.js.map +1 -1
- package/dist/typed-routes.d.ts +33 -0
- package/dist/typed-routes.d.ts.map +1 -1
- package/dist/typed-routes.js.map +1 -1
- package/dist/types.d.ts +72 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/upgrade.d.ts +3 -0
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js.map +1 -1
- package/dist/vite.d.ts +21 -0
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +15 -0
- package/dist/vite.js.map +1 -1
- package/package.json +11 -11
- package/src/actions.ts +6 -0
- package/src/adapters/aws-lambda.ts +29 -0
- package/src/adapters/cloudflare.ts +78 -0
- package/src/adapters/edge.ts +6 -0
- package/src/adapters/node.ts +7 -0
- package/src/adapters/static.ts +6 -0
- package/src/app-router-globals.ts +6 -0
- package/src/assets.ts +18 -0
- package/src/build.ts +38 -0
- package/src/cache-stats.ts +3 -0
- package/src/cache.ts +15 -0
- package/src/cli-options.ts +2 -0
- package/src/cli.ts +1 -0
- package/src/config.ts +15 -0
- package/src/cookies.ts +3 -0
- package/src/csrf.ts +12 -0
- package/src/deferred.ts +9 -0
- package/src/dev-server.ts +3 -0
- package/src/file-conventions.ts +3 -0
- package/src/i18n.ts +15 -0
- package/src/import-policy.ts +3 -0
- package/src/index.ts +19 -0
- package/src/link.ts +34 -0
- package/src/logger.ts +33 -0
- package/src/multipart.ts +15 -0
- package/src/native-escape.ts +3 -0
- package/src/navigation-state.ts +15 -0
- package/src/navigation.ts +9 -0
- package/src/prerender-store.ts +21 -0
- package/src/render.ts +12 -0
- package/src/routes.ts +30 -0
- package/src/runtime-cache.ts +5 -0
- package/src/runtime-state.ts +3 -0
- package/src/serve.ts +24 -0
- package/src/session.ts +12 -0
- package/src/stream-list.ts +12 -0
- package/src/trace.ts +30 -0
- package/src/typed-routes.ts +33 -0
- package/src/types.ts +72 -0
- package/src/upgrade.ts +3 -0
- package/src/vite.ts +21 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws-lambda.js","sourceRoot":"","sources":["../../src/adapters/aws-lambda.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAI1C,OAAO,EACL,uCAAuC,GAExC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,a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, readFile, readlink, symlink } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport type { AppRouterServerActionOptions } from \"../actions.js\";\nimport type { AppRouterCache } from \"../cache.js\";\nimport type { AppRouterImportPolicy } from \"../import-policy.js\";\nimport {\n normalizeBuiltAppRuntimePreloadStrategy,\n type NormalizedBuiltAppRuntimePreloadStrategy,\n} from \"../preload-policy.js\";\nimport {\n emitRouterLog,\n logDurationMs,\n logError,\n logNow,\n requestLogFields,\n type AppRouterLogger,\n type RouterRequestLogFields,\n} from \"../logger.js\";\nimport type { AppRouterResponseHook } from \"../render.js\";\nimport type { RouterInstrumentation } from \"../trace.js\";\n\nexport type { RouterInstrumentation } from \"../trace.js\";\nexport type { AppRouterImportPolicy } from \"../import-policy.js\";\nimport {\n createBuiltRequestRuntime,\n preloadBuiltAppRuntime,\n resolveRequestHost,\n warnIfImplicitHostTrust,\n type AppRouterPrerenderStore,\n type RequestHostPolicy,\n type ResponseSinkStrategy,\n} from \"../serve.js\";\n\nexport interface AwsLambdaHttpEventV2 {\n body?: string | undefined;\n cookies?: string[] | undefined;\n headers?: Record<string, string | undefined> | undefined;\n isBase64Encoded?: boolean | undefined;\n rawPath?: string | undefined;\n rawQueryString?: string | undefined;\n requestContext?: {\n http?: {\n method?: string | undefined;\n protocol?: string | undefined;\n } | undefined;\n } | undefined;\n version?: \"2.0\" | string | undefined;\n}\n\nexport interface AwsLambdaHttpResultV2 {\n body: string;\n cookies?: string[] | undefined;\n headers?: Record<string, string> | undefined;\n isBase64Encoded: boolean;\n statusCode: number;\n}\n\nexport interface AwsLambdaStreamingResponseMetadata {\n cookies?: string[] | undefined;\n headers: Record<string, string>;\n statusCode: number;\n}\n\nexport interface AwsLambdaStreamingResponseStream {\n destroy?: ((error?: unknown) => void) | undefined;\n end(): void;\n once?: ((event: \"drain\", listener: () => void) => unknown) | undefined;\n write(chunk: string | Uint8Array): boolean;\n}\n\nexport interface AwsLambdaRequestHandlerOptions {\n allowedHosts?: readonly string[] | undefined;\n errorHandler?:\n | ((error: unknown) => {\n body: string;\n headers?: Record<string, string>;\n status: number;\n })\n | undefined;\n hostPolicy?: RequestHostPolicy | undefined;\n hostname?: string | undefined;\n importPolicy?: AwsLambdaImportPolicy | undefined;\n instrumentation?: RouterInstrumentation | undefined;\n logger?: AppRouterLogger | undefined;\n onResponse?: AppRouterResponseHook | undefined;\n outDir: string;\n preload?: AwsLambdaPreloadStrategy | undefined;\n prerenderStore?: AppRouterPrerenderStore | undefined;\n routeCache?: AppRouterCache | undefined;\n runtimeDir?: string | undefined;\n serverActions?: AppRouterServerActionOptions | undefined;\n sinkStrategy?: ResponseSinkStrategy | undefined;\n timings?: boolean | undefined;\n trustForwardedProto?: boolean | undefined;\n}\n\nexport type AwsLambdaImportPolicy =\n | AppRouterImportPolicy\n | \"generated\"\n | { fromManifest: true };\n\nexport type AwsLambdaPreloadStrategy =\n | \"all\"\n | \"hot-route-requests\"\n | \"middleware\"\n | \"none\"\n | {\n mode: \"all\" | \"hot-route-requests\" | \"hot-routes\" | \"middleware\" | \"none\";\n routes?: readonly string[] | undefined;\n wait?: \"background\" | \"before-render\" | \"first-request\" | undefined;\n };\n\ntype NormalizedAwsLambdaPreloadStrategy = NormalizedBuiltAppRuntimePreloadStrategy;\n\ntype AwsLambdaDefaultPreloadMode = \"all\" | \"middleware\";\n\nexport type AwsLambdaRequestHandler = (\n event: AwsLambdaHttpEventV2,\n) => Promise<AwsLambdaHttpResultV2>;\n\nexport type AwsLambdaStreamingRequestHandler<TContext = unknown> = (\n event: AwsLambdaHttpEventV2,\n responseStream: AwsLambdaStreamingResponseStream,\n context: TContext,\n) => Promise<void>;\n\n/**\n * Creates a buffered AWS Lambda HTTP API v2 handler for built app-router output.\n *\n * The handler materializes runtime files under `/tmp` by default, starts middleware-focused background preload, applies the generated import policy when requested, and returns API Gateway v2 response objects.\n */\nexport function createAwsLambdaRequestHandler(\n options: AwsLambdaRequestHandlerOptions,\n): AwsLambdaRequestHandler {\n warnIfImplicitHostTrust(options);\n const runtimeDirPromise = prepareAwsLambdaRuntimeDir(options);\n const runtimePreloadPromise = startAwsLambdaRuntimePreload(\n options,\n runtimeDirPromise,\n \"middleware\",\n );\n void runtimePreloadPromise?.catch(() => {});\n\n return createAwsLambdaRequestHandlerFromRuntime(\n options,\n runtimeDirPromise,\n runtimePreloadPromise,\n \"middleware\",\n );\n}\n\n/**\n * Creates a buffered AWS Lambda handler after eagerly preparing and preloading the built runtime.\n *\n * Use this when startup code can await preload work before the first request instead of letting the first invocation share that cost.\n */\nexport async function createPreloadedAwsLambdaRequestHandler(\n options: AwsLambdaRequestHandlerOptions,\n): Promise<AwsLambdaRequestHandler> {\n warnIfImplicitHostTrust(options);\n const runtimeDir = await prepareAwsLambdaRuntimeDir(options);\n await preloadAwsLambdaRuntime(options, runtimeDir);\n\n return createAwsLambdaRequestHandlerFromRuntime(options, Promise.resolve(runtimeDir));\n}\n\nfunction createAwsLambdaRequestHandlerFromRuntime(\n options: AwsLambdaRequestHandlerOptions,\n runtimeDirPromise: Promise<string>,\n runtimePreloadPromise?: Promise<void> | undefined,\n defaultPreloadMode: AwsLambdaDefaultPreloadMode = \"all\",\n): AwsLambdaRequestHandler {\n return async (event) => {\n const startedAt = logNow();\n const phases = createAwsLambdaTimingPhases(options);\n const eventToRequestStartedAt = phaseStartedAt(phases);\n const request = eventToRequest(event, options);\n finishPhase(phases, eventToRequestStartedAt, \"eventToRequestMs\");\n const logFields = requestLogFields(request, \"aws-lambda\");\n emitRouterLog(options.logger, \"info\", {\n ...logFields,\n type: \"router:request:start\",\n });\n\n try {\n const runtimeDirStartedAt = phaseStartedAt(phases);\n const runtimeDir = await runtimeDirPromise;\n finishPhase(phases, runtimeDirStartedAt, \"runtimeDirMs\");\n await waitForAwsLambdaRuntimePreload(\n options,\n runtimePreloadPromise,\n phases,\n defaultPreloadMode,\n );\n const importPolicy = await resolveAwsLambdaImportPolicy(options);\n const renderStartedAt = phaseStartedAt(phases);\n const builtRuntime = await createBuiltRequestRuntime({\n immutableRuntime: true,\n importPolicy,\n outDir: options.outDir,\n runtimeDir,\n });\n const preload = awsLambdaRenderPreload(\n options,\n runtimePreloadPromise,\n defaultPreloadMode,\n );\n const response = await builtRuntime.render(request, {\n instrumentation: options.instrumentation,\n logger: awsLambdaRenderLogger(options),\n onResponse: options.onResponse,\n ...(preload === undefined ? {} : { preload }),\n prerenderStore: options.prerenderStore,\n routeCache: options.routeCache,\n serverActions: options.serverActions,\n ...(options.sinkStrategy === undefined ? {} : { sinkStrategy: options.sinkStrategy }),\n });\n finishPhase(phases, renderStartedAt, \"renderMs\");\n const responseSerializationStartedAt = phaseStartedAt(phases);\n const result = await responseToLambdaResult(response, phases);\n finishPhase(phases, responseSerializationStartedAt, \"responseSerializationMs\");\n emitRouterLog(options.logger, \"info\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n status: result.statusCode,\n type: \"router:request:end\",\n });\n emitAwsLambdaTiming(options, logFields, result.statusCode, startedAt, phases);\n\n return result;\n } catch (error) {\n emitRouterLog(options.logger, \"error\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n error: logError(error),\n type: \"router:request:error\",\n });\n\n const payload = options.errorHandler\n ? options.errorHandler(error)\n : { body: \"Internal Server Error\", status: 500 };\n const response = await applyAwsLambdaResponseHook(\n new Response(payload.body, {\n headers: {\n \"content-type\": \"text/plain; charset=utf-8\",\n ...payload.headers,\n },\n status: payload.status,\n }),\n options,\n request,\n );\n\n return await responseToLambdaResult(response, phases);\n }\n };\n}\n\n/**\n * Creates an AWS Lambda streaming response handler for built app-router output.\n *\n * Use this with Lambda response streaming runtimes when HTML or route responses should be written progressively instead of buffered into an API Gateway result.\n */\nexport function createAwsLambdaStreamingRequestHandler<TContext = unknown>(\n options: AwsLambdaRequestHandlerOptions,\n): AwsLambdaStreamingRequestHandler<TContext> {\n warnIfImplicitHostTrust(options);\n const runtime = awsLambdaRuntime();\n const runtimeDirPromise = prepareAwsLambdaRuntimeDir(options);\n const runtimePreloadPromise = startAwsLambdaRuntimePreload(\n options,\n runtimeDirPromise,\n \"middleware\",\n );\n void runtimePreloadPromise?.catch(() => {});\n\n return createAwsLambdaStreamingRequestHandlerFromRuntime(\n options,\n runtime,\n runtimeDirPromise,\n runtimePreloadPromise,\n \"middleware\",\n );\n}\n\n/**\n * Creates a streaming AWS Lambda handler after eagerly preparing and preloading the built runtime.\n */\nexport async function createPreloadedAwsLambdaStreamingRequestHandler<TContext = unknown>(\n options: AwsLambdaRequestHandlerOptions,\n): Promise<AwsLambdaStreamingRequestHandler<TContext>> {\n warnIfImplicitHostTrust(options);\n const runtime = awsLambdaRuntime();\n const runtimeDir = await prepareAwsLambdaRuntimeDir(options);\n await preloadAwsLambdaRuntime(options, runtimeDir);\n\n return createAwsLambdaStreamingRequestHandlerFromRuntime<TContext>(\n options,\n runtime,\n Promise.resolve(runtimeDir),\n );\n}\n\nfunction startAwsLambdaRuntimePreload(\n options: AwsLambdaRequestHandlerOptions,\n runtimeDirPromise: Promise<string>,\n defaultMode: AwsLambdaDefaultPreloadMode = \"all\",\n): Promise<void> | undefined {\n const preload = normalizeAwsLambdaPreload(options.preload, defaultMode);\n if (preload.mode === \"none\") {\n return undefined;\n }\n\n return runtimeDirPromise.then((runtimeDir) =>\n preloadAwsLambdaRuntime(options, runtimeDir, defaultMode),\n );\n}\n\nasync function preloadAwsLambdaRuntime(\n options: AwsLambdaRequestHandlerOptions,\n runtimeDir: string,\n defaultMode: AwsLambdaDefaultPreloadMode = \"all\",\n): Promise<void> {\n const preload = normalizeAwsLambdaPreload(options.preload, defaultMode);\n if (preload.mode === \"none\") {\n return;\n }\n\n const importPolicy = await resolveAwsLambdaImportPolicy(options);\n await preloadBuiltAppRuntime({\n importPolicy,\n outDir: options.outDir,\n preload,\n runtimeDir,\n });\n}\n\nasync function waitForAwsLambdaRuntimePreload(\n options: AwsLambdaRequestHandlerOptions,\n runtimePreloadPromise: Promise<void> | undefined,\n phases: Record<string, number> | undefined,\n defaultMode: AwsLambdaDefaultPreloadMode,\n): Promise<void> {\n const preload = normalizeAwsLambdaPreload(options.preload, defaultMode);\n if (preload.wait !== \"first-request\" || runtimePreloadPromise === undefined) {\n return;\n }\n\n const preloadWaitStartedAt = phaseStartedAt(phases);\n try {\n await runtimePreloadPromise;\n } finally {\n finishPhase(phases, preloadWaitStartedAt, \"preloadWaitMs\");\n }\n}\n\nfunction awsLambdaRenderPreload(\n options: AwsLambdaRequestHandlerOptions,\n runtimePreloadPromise: Promise<void> | undefined,\n defaultMode: AwsLambdaDefaultPreloadMode,\n): { promise: Promise<void>; wait: \"before-render\" } | undefined {\n if (\n runtimePreloadPromise === undefined ||\n normalizeAwsLambdaPreload(options.preload, defaultMode).wait !== \"before-render\"\n ) {\n return undefined;\n }\n\n return {\n promise: runtimePreloadPromise,\n wait: \"before-render\",\n };\n}\n\nconst generatedImportPolicyCache = new Map<string, Promise<AppRouterImportPolicy>>();\n\nasync function resolveAwsLambdaImportPolicy(\n options: AwsLambdaRequestHandlerOptions,\n): Promise<AppRouterImportPolicy | undefined> {\n const policy = options.importPolicy;\n\n if (policy === undefined) {\n return undefined;\n }\n\n if (policy === \"generated\") {\n return await readGeneratedAwsLambdaImportPolicy(options.outDir);\n }\n\n if (isGeneratedAwsLambdaImportPolicyReference(policy) && policy.fromManifest === true) {\n return await readGeneratedAwsLambdaImportPolicy(options.outDir);\n }\n\n const configuredPolicy = policy as AppRouterImportPolicy;\n return {\n ...(configuredPolicy.allowedPackages === undefined\n ? {}\n : { allowedPackages: configuredPolicy.allowedPackages }),\n ...(configuredPolicy.allowedSourceDirs === undefined\n ? {}\n : { allowedSourceDirs: configuredPolicy.allowedSourceDirs }),\n ...(configuredPolicy.projectRoot === undefined\n ? {}\n : { projectRoot: configuredPolicy.projectRoot }),\n };\n}\n\nfunction isGeneratedAwsLambdaImportPolicyReference(\n policy: AwsLambdaImportPolicy,\n): policy is { fromManifest: true } {\n return typeof policy === \"object\" && policy !== null && \"fromManifest\" in policy;\n}\n\nasync function readGeneratedAwsLambdaImportPolicy(outDir: string): Promise<AppRouterImportPolicy> {\n const cached = generatedImportPolicyCache.get(outDir);\n if (cached !== undefined) {\n return await cached;\n }\n\n const promise = readGeneratedAwsLambdaImportPolicyInner(outDir);\n generatedImportPolicyCache.set(outDir, promise);\n\n return await promise;\n}\n\nasync function readGeneratedAwsLambdaImportPolicyInner(outDir: string): Promise<AppRouterImportPolicy> {\n const policy = JSON.parse(await readFile(join(outDir, \"server\", \"import-policy.json\"), \"utf8\")) as {\n runtimePackages?: readonly string[] | undefined;\n };\n\n return {\n allowedPackages: policy.runtimePackages ?? [],\n };\n}\n\nfunction normalizeAwsLambdaPreload(\n strategy: AwsLambdaPreloadStrategy | undefined,\n defaultMode: AwsLambdaDefaultPreloadMode = \"all\",\n): NormalizedAwsLambdaPreloadStrategy {\n return normalizeBuiltAppRuntimePreloadStrategy(strategy, defaultMode);\n}\n\nfunction createAwsLambdaStreamingRequestHandlerFromRuntime<TContext = unknown>(\n options: AwsLambdaRequestHandlerOptions,\n runtime: AwsLambdaRuntime,\n runtimeDirPromise: Promise<string>,\n runtimePreloadPromise?: Promise<void> | undefined,\n defaultPreloadMode: AwsLambdaDefaultPreloadMode = \"all\",\n): AwsLambdaStreamingRequestHandler<TContext> {\n return runtime.streamifyResponse(async (event, responseStream, _context) => {\n const startedAt = logNow();\n const phases = createAwsLambdaTimingPhases(options);\n const eventToRequestStartedAt = phaseStartedAt(phases);\n const request = eventToRequest(event, options);\n finishPhase(phases, eventToRequestStartedAt, \"eventToRequestMs\");\n const logFields = requestLogFields(request, \"aws-lambda\");\n emitRouterLog(options.logger, \"info\", {\n ...logFields,\n type: \"router:request:start\",\n });\n\n try {\n const runtimeDirStartedAt = phaseStartedAt(phases);\n const runtimeDir = await runtimeDirPromise;\n finishPhase(phases, runtimeDirStartedAt, \"runtimeDirMs\");\n await waitForAwsLambdaRuntimePreload(\n options,\n runtimePreloadPromise,\n phases,\n defaultPreloadMode,\n );\n const importPolicy = await resolveAwsLambdaImportPolicy(options);\n const renderStartedAt = phaseStartedAt(phases);\n const builtRuntime = await createBuiltRequestRuntime({\n immutableRuntime: true,\n importPolicy,\n outDir: options.outDir,\n runtimeDir,\n });\n const preload = awsLambdaRenderPreload(\n options,\n runtimePreloadPromise,\n defaultPreloadMode,\n );\n const response = await builtRuntime.render(request, {\n instrumentation: options.instrumentation,\n logger: awsLambdaRenderLogger(options),\n onResponse: options.onResponse,\n ...(preload === undefined ? {} : { preload }),\n prerenderStore: options.prerenderStore,\n routeCache: options.routeCache,\n serverActions: options.serverActions,\n ...(options.sinkStrategy === undefined ? {} : { sinkStrategy: options.sinkStrategy }),\n });\n finishPhase(phases, renderStartedAt, \"renderMs\");\n const responseStreamingStartedAt = phaseStartedAt(phases);\n await streamResponseToLambda(response, responseStream, runtime, phases);\n finishPhase(phases, responseStreamingStartedAt, \"responseStreamingMs\");\n emitRouterLog(options.logger, \"info\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n status: response.status,\n type: \"router:request:end\",\n });\n emitAwsLambdaTiming(options, logFields, response.status, startedAt, phases);\n } catch (error) {\n emitRouterLog(options.logger, \"error\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n error: logError(error),\n type: \"router:request:error\",\n });\n\n const payload = options.errorHandler\n ? options.errorHandler(error)\n : { body: \"Internal Server Error\", status: 500 };\n const response = await applyAwsLambdaResponseHook(\n new Response(payload.body, {\n headers: {\n \"content-type\": \"text/plain; charset=utf-8\",\n ...payload.headers,\n },\n status: payload.status,\n }),\n options,\n request,\n );\n\n await streamResponseToLambda(response, responseStream, runtime, phases);\n }\n });\n}\n\nasync function applyAwsLambdaResponseHook(\n response: Response,\n options: Pick<AwsLambdaRequestHandlerOptions, \"onResponse\">,\n request: Request,\n): Promise<Response> {\n const hooked = await options.onResponse?.(response, { request });\n\n return hooked instanceof Response ? hooked : response;\n}\n\nasync function prepareAwsLambdaRuntimeDir(options: {\n outDir: string;\n runtimeDir?: string | undefined;\n}): Promise<string> {\n const runtimeDir = options.runtimeDir ?? defaultAwsLambdaRuntimeDir(options.outDir);\n\n await mkdir(runtimeDir, { recursive: true });\n await linkAwsLambdaNodeModules({\n outDir: options.outDir,\n runtimeDir,\n });\n\n return runtimeDir;\n}\n\nasync function linkAwsLambdaNodeModules(options: {\n outDir: string;\n runtimeDir: string;\n}): Promise<void> {\n const source = join(dirname(options.outDir), \"node_modules\");\n const target = join(options.runtimeDir, \"node_modules\");\n\n try {\n await access(source);\n } catch {\n return;\n }\n\n try {\n const stats = await lstat(target);\n\n if (!stats.isSymbolicLink()) {\n return;\n }\n\n if ((await readlink(target)) === source) {\n return;\n }\n\n return;\n } catch {\n // Missing target: create it below.\n }\n\n try {\n await symlink(source, target, \"dir\");\n } catch (error) {\n if (!isNodeErrorCode(error, \"EEXIST\")) {\n throw error;\n }\n }\n}\n\nfunction defaultAwsLambdaRuntimeDir(outDir: string): string {\n return join(tmpdir(), \"mreact-router\", hashText(outDir), \"runtime\");\n}\n\nfunction hashText(value: string): string {\n return createHash(\"sha256\").update(value).digest(\"hex\").slice(0, 16);\n}\n\nfunction isNodeErrorCode(error: unknown, code: string): boolean {\n return (\n typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n (error as { code?: unknown }).code === code\n );\n}\n\nfunction eventToRequest(\n event: AwsLambdaHttpEventV2,\n options: AwsLambdaRequestHandlerOptions,\n): Request {\n const headers = eventHeaders(event);\n const rawHost = lambdaRequestHost(headers, options);\n const host = resolveRequestHost({\n allowedHosts: options.allowedHosts,\n fallbackHost: options.hostname ?? \"lambda.local\",\n hostPolicy: lambdaHostPolicy(options),\n rawHost: rawHost ?? undefined,\n });\n const protocol = lambdaRequestProtocol(event, headers, options);\n const rawPath = event.rawPath === undefined || event.rawPath === \"\" ? \"/\" : event.rawPath;\n const rawQueryString =\n event.rawQueryString === undefined || event.rawQueryString === \"\"\n ? \"\"\n : `?${event.rawQueryString}`;\n const method = event.requestContext?.http?.method ?? \"GET\";\n const init: RequestInit = {\n headers,\n method,\n };\n\n if (method !== \"GET\" && method !== \"HEAD\" && event.body !== undefined) {\n init.body =\n event.isBase64Encoded === true ? Buffer.from(event.body, \"base64\") : event.body;\n }\n\n return new Request(`${protocol}://${host}${rawPath}${rawQueryString}`, init);\n}\n\nfunction lambdaRequestHost(\n headers: Headers,\n options: AwsLambdaRequestHandlerOptions,\n): string | null {\n if (options.hostPolicy === \"trusted-proxy\") {\n return firstForwardedValue(headers.get(\"x-forwarded-host\")) ?? headers.get(\"host\");\n }\n\n return headers.get(\"host\");\n}\n\nfunction lambdaHostPolicy(\n options: AwsLambdaRequestHandlerOptions,\n): RequestHostPolicy | undefined {\n return options.hostPolicy ?? (process.env.NODE_ENV === \"production\" ? \"strict\" : undefined);\n}\n\nfunction lambdaRequestProtocol(\n event: AwsLambdaHttpEventV2,\n headers: Headers,\n options: AwsLambdaRequestHandlerOptions,\n): \"http\" | \"https\" {\n if (options.trustForwardedProto === true) {\n return normalizeRequestProtocol(firstForwardedValue(headers.get(\"x-forwarded-proto\")));\n }\n\n return normalizeRequestProtocol(event.requestContext?.http?.protocol);\n}\n\nfunction normalizeRequestProtocol(value: string | undefined): \"http\" | \"https\" {\n if (value === undefined || value === \"\") {\n return \"https\";\n }\n\n const normalized = value.toLowerCase();\n return normalized === \"http\" || normalized.startsWith(\"http/\") ? \"http\" : \"https\";\n}\n\nfunction eventHeaders(event: AwsLambdaHttpEventV2): Headers {\n const headers = new Headers();\n\n for (const [name, value] of Object.entries(event.headers ?? {})) {\n if (value !== undefined) {\n headers.set(name, value);\n }\n }\n\n if (event.cookies !== undefined && event.cookies.length > 0 && !headers.has(\"cookie\")) {\n headers.set(\"cookie\", event.cookies.join(\"; \"));\n }\n\n return headers;\n}\n\nasync function responseToLambdaResult(\n response: Response,\n phases?: Record<string, number> | undefined,\n): Promise<AwsLambdaHttpResultV2> {\n const headers: Record<string, string> = {};\n response.headers.forEach((value, key) => {\n if (key !== \"set-cookie\") {\n headers[key] = value;\n }\n });\n\n const cookies = responseCookies(response.headers);\n\n if (response.body === null) {\n return {\n body: \"\",\n ...(cookies.length === 0 ? {} : { cookies }),\n headers,\n isBase64Encoded: false,\n statusCode: response.status,\n };\n }\n\n const streamDrainStartedAt = phaseStartedAt(phases);\n const bytes = await drainBufferedResponseBody(response.body, phases);\n addPhaseDuration(phases, streamDrainStartedAt, \"streamDrainMs\");\n\n const bodyEncodeStartedAt = phaseStartedAt(phases);\n const contentType = response.headers.get(\"content-type\");\n const text = isTextContentType(contentType);\n const result = {\n body: text ? bytes.toString(\"utf8\") : bytes.toString(\"base64\"),\n ...(cookies.length === 0 ? {} : { cookies }),\n headers,\n isBase64Encoded: !text,\n statusCode: response.status,\n };\n addPhaseDuration(phases, bodyEncodeStartedAt, \"bodyEncodeMs\");\n\n return result;\n}\n\nasync function drainBufferedResponseBody(\n body: ReadableStream<Uint8Array>,\n phases?: Record<string, number> | undefined,\n): Promise<Buffer> {\n const reader = body.getReader();\n const chunks: Uint8Array[] = [];\n let byteLength = 0;\n\n while (true) {\n const readStartedAt = phaseStartedAt(phases);\n const result = await reader.read();\n addPhaseDuration(phases, readStartedAt, \"streamReadMs\");\n\n if (result.done) {\n break;\n }\n\n chunks.push(result.value);\n byteLength += result.value.byteLength;\n }\n\n const concatStartedAt = phaseStartedAt(phases);\n const bytes = concatUint8ArrayChunks(chunks, byteLength);\n addPhaseDuration(phases, concatStartedAt, \"streamConcatMs\");\n\n return bytes;\n}\n\nfunction concatUint8ArrayChunks(chunks: readonly Uint8Array[], byteLength: number): Buffer {\n if (chunks.length === 0 || byteLength === 0) {\n return Buffer.alloc(0);\n }\n\n if (chunks.length === 1) {\n const [chunk] = chunks;\n if (chunk === undefined) {\n return Buffer.alloc(0);\n }\n return Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);\n }\n\n const bytes = Buffer.allocUnsafe(byteLength);\n let offset = 0;\n\n for (const chunk of chunks) {\n bytes.set(chunk, offset);\n offset += chunk.byteLength;\n }\n\n return bytes;\n}\n\nfunction createAwsLambdaTimingPhases(\n options: AwsLambdaRequestHandlerOptions,\n): Record<string, number> | undefined {\n return options.timings === true ? {} : undefined;\n}\n\nfunction awsLambdaRenderLogger(\n options: AwsLambdaRequestHandlerOptions,\n): AppRouterLogger | undefined {\n return options.timings === true ? options.logger : undefined;\n}\n\nfunction phaseStartedAt(phases: Record<string, number> | undefined): number | undefined {\n return phases === undefined ? undefined : logNow();\n}\n\nfunction finishPhase(\n phases: Record<string, number> | undefined,\n startedAt: number | undefined,\n name: string,\n): void {\n if (phases !== undefined && startedAt !== undefined) {\n phases[name] = logDurationMs(startedAt);\n }\n}\n\nfunction addPhaseDuration(\n phases: Record<string, number> | undefined,\n startedAt: number | undefined,\n name: string,\n): void {\n if (phases !== undefined && startedAt !== undefined) {\n phases[name] = (phases[name] ?? 0) + logDurationMs(startedAt);\n }\n}\n\nfunction emitAwsLambdaTiming(\n options: AwsLambdaRequestHandlerOptions,\n logFields: RouterRequestLogFields,\n status: number,\n startedAt: number,\n phases: Record<string, number> | undefined,\n): void {\n if (phases === undefined) {\n return;\n }\n\n emitRouterLog(options.logger, \"debug\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n phases,\n status,\n type: \"router:request:timing\",\n });\n}\n\nasync function streamResponseToLambda(\n response: Response,\n responseStream: AwsLambdaStreamingResponseStream,\n runtime: AwsLambdaRuntime,\n phases?: Record<string, number> | undefined,\n): Promise<void> {\n const stream = runtime.HttpResponseStream.from(\n responseStream,\n responseStreamingMetadata(response),\n );\n\n try {\n if (response.body === null) {\n stream.end();\n return;\n }\n\n const reader = response.body.getReader();\n\n while (true) {\n const streamWaitStartedAt = phaseStartedAt(phases);\n const result = await reader.read();\n addPhaseDuration(phases, streamWaitStartedAt, \"streamWaitMs\");\n\n if (result.done) {\n break;\n }\n\n const streamWriteStartedAt = phaseStartedAt(phases);\n await writeStreamingChunk(stream, result.value);\n addPhaseDuration(phases, streamWriteStartedAt, \"streamWriteMs\");\n }\n\n stream.end();\n } catch (error) {\n if (typeof stream.destroy === \"function\") {\n stream.destroy(error);\n return;\n }\n\n throw error;\n }\n}\n\nfunction responseStreamingMetadata(\n response: Response,\n): AwsLambdaStreamingResponseMetadata {\n const headers: Record<string, string> = {};\n response.headers.forEach((value, key) => {\n if (key !== \"set-cookie\") {\n headers[key] = value;\n }\n });\n\n const cookies = responseCookies(response.headers);\n\n return {\n ...(cookies.length === 0 ? {} : { cookies }),\n headers,\n statusCode: response.status,\n };\n}\n\nasync function writeStreamingChunk(\n stream: AwsLambdaStreamingResponseStream,\n chunk: Uint8Array,\n): Promise<void> {\n if (stream.write(chunk) !== false) {\n return;\n }\n\n if (typeof stream.once !== \"function\") {\n return;\n }\n\n await new Promise<void>((resolve) => {\n stream.once?.(\"drain\", resolve);\n });\n}\n\ninterface AwsLambdaRuntime {\n HttpResponseStream: {\n from(\n responseStream: AwsLambdaStreamingResponseStream,\n metadata: AwsLambdaStreamingResponseMetadata,\n ): AwsLambdaStreamingResponseStream;\n };\n streamifyResponse<TContext>(\n handler: AwsLambdaStreamingRequestHandler<TContext>,\n ): AwsLambdaStreamingRequestHandler<TContext>;\n}\n\nfunction awsLambdaRuntime(): AwsLambdaRuntime {\n const runtime = (globalThis as { awslambda?: Partial<AwsLambdaRuntime> | undefined })\n .awslambda;\n\n if (\n typeof runtime?.streamifyResponse !== \"function\" ||\n typeof runtime.HttpResponseStream?.from !== \"function\"\n ) {\n throw new Error(\n \"AWS Lambda response streaming requires the Node.js Lambda runtime awslambda.streamifyResponse() and awslambda.HttpResponseStream.from().\",\n );\n }\n\n return runtime as AwsLambdaRuntime;\n}\n\nfunction firstForwardedValue(value: string | null): string | undefined {\n const first = value?.split(\",\")[0]?.trim();\n return first === undefined || first === \"\" ? undefined : first;\n}\n\nfunction responseCookies(headers: Headers): string[] {\n const maybeHeaders = headers as Headers & { getSetCookie?: () => string[] };\n if (typeof maybeHeaders.getSetCookie === \"function\") {\n return maybeHeaders.getSetCookie();\n }\n\n const raw = headers.get(\"set-cookie\");\n return raw === null ? [] : splitSetCookieHeader(raw);\n}\n\nfunction splitSetCookieHeader(header: string): string[] {\n const cookies: string[] = [];\n let start = 0;\n let inExpires = false;\n\n for (let index = 0; index < header.length; index += 1) {\n const remaining = header.slice(index).toLowerCase();\n if (remaining.startsWith(\"expires=\")) {\n inExpires = true;\n index += \"expires=\".length - 1;\n continue;\n }\n\n const char = header[index];\n if (char === \";\") {\n inExpires = false;\n continue;\n }\n\n if (char === \",\" && !inExpires) {\n cookies.push(header.slice(start, index).trim());\n start = index + 1;\n }\n }\n\n cookies.push(header.slice(start).trim());\n return cookies.filter((cookie) => cookie.length > 0);\n}\n\nfunction isTextContentType(contentType: string | null): boolean {\n if (contentType === null) {\n return true;\n }\n\n const type = contentType.toLowerCase().split(\";\")[0]?.trim() ?? \"\";\n return (\n type.startsWith(\"text/\") ||\n type === \"application/json\" ||\n type === \"application/javascript\" ||\n type === \"application/x-javascript\" ||\n type === \"application/xml\" ||\n type === \"application/x-www-form-urlencoded\" ||\n type.endsWith(\"+json\") ||\n type.endsWith(\"+xml\")\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"aws-lambda.js","sourceRoot":"","sources":["../../src/adapters/aws-lambda.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAI1C,OAAO,EACL,uCAAuC,GAExC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,aAAa,EACb,aAAa,EACb,QAAQ,EACR,MAAM,EACN,gBAAgB,GAGjB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KAAK,CAAC,CAAC;QAC3B,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,SAAS,GAAG,KAAK,CAAC;YAClB,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAChD,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACzC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,iBAAiB,CAAC,WAA0B;IACnD,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACnE,OAAO,CACL,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACxB,IAAI,KAAK,kBAAkB;QAC3B,IAAI,KAAK,wBAAwB;QACjC,IAAI,KAAK,0BAA0B;QACnC,IAAI,KAAK,iBAAiB;QAC1B,IAAI,KAAK,mCAAmC;QAC5C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QACtB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CACtB,CAAC;AACJ,CAAC","sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { createHash } from \"node:crypto\";\nimport { access, lstat, mkdir, readFile, readlink, symlink } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport type { AppRouterServerActionOptions } from \"../actions.js\";\nimport type { AppRouterCache } from \"../cache.js\";\nimport type { AppRouterImportPolicy } from \"../import-policy.js\";\nimport {\n normalizeBuiltAppRuntimePreloadStrategy,\n type NormalizedBuiltAppRuntimePreloadStrategy,\n} from \"../preload-policy.js\";\nimport {\n emitRouterLog,\n logDurationMs,\n logError,\n logNow,\n requestLogFields,\n type AppRouterLogger,\n type RouterRequestLogFields,\n} from \"../logger.js\";\nimport type { AppRouterResponseHook } from \"../render.js\";\nimport type { RouterInstrumentation } from \"../trace.js\";\n\n/** Re-exports router instrumentation hooks for AWS Lambda handlers. */\nexport type { RouterInstrumentation } from \"../trace.js\";\n/** Re-exports app-router import policy controls for AWS Lambda handlers. */\nexport type { AppRouterImportPolicy } from \"../import-policy.js\";\nimport {\n createBuiltRequestRuntime,\n preloadBuiltAppRuntime,\n resolveRequestHost,\n warnIfImplicitHostTrust,\n type AppRouterPrerenderStore,\n type RequestHostPolicy,\n type ResponseSinkStrategy,\n} from \"../serve.js\";\n\n/**\n * Represents the AWS API Gateway HTTP API v2 event consumed by buffered handlers.\n */\nexport interface AwsLambdaHttpEventV2 {\n body?: string | undefined;\n cookies?: string[] | undefined;\n headers?: Record<string, string | undefined> | undefined;\n isBase64Encoded?: boolean | undefined;\n rawPath?: string | undefined;\n rawQueryString?: string | undefined;\n requestContext?: {\n http?: {\n method?: string | undefined;\n protocol?: string | undefined;\n } | undefined;\n } | undefined;\n version?: \"2.0\" | string | undefined;\n}\n\n/**\n * Represents the AWS API Gateway HTTP API v2 result returned by buffered handlers.\n */\nexport interface AwsLambdaHttpResultV2 {\n body: string;\n cookies?: string[] | undefined;\n headers?: Record<string, string> | undefined;\n isBase64Encoded: boolean;\n statusCode: number;\n}\n\n/**\n * Describes response metadata passed to Lambda streaming response helpers.\n */\nexport interface AwsLambdaStreamingResponseMetadata {\n cookies?: string[] | undefined;\n headers: Record<string, string>;\n statusCode: number;\n}\n\n/**\n * Defines the writable stream interface used by Lambda streaming handlers.\n */\nexport interface AwsLambdaStreamingResponseStream {\n destroy?: ((error?: unknown) => void) | undefined;\n end(): void;\n once?: ((event: \"drain\", listener: () => void) => unknown) | undefined;\n write(chunk: string | Uint8Array): boolean;\n}\n\n/**\n * Configures AWS Lambda request handlers for built app-router output.\n */\nexport interface AwsLambdaRequestHandlerOptions {\n allowedHosts?: readonly string[] | undefined;\n errorHandler?:\n | ((error: unknown) => {\n body: string;\n headers?: Record<string, string>;\n status: number;\n })\n | undefined;\n hostPolicy?: RequestHostPolicy | undefined;\n hostname?: string | undefined;\n importPolicy?: AwsLambdaImportPolicy | undefined;\n instrumentation?: RouterInstrumentation | undefined;\n logger?: AppRouterLogger | undefined;\n onResponse?: AppRouterResponseHook | undefined;\n outDir: string;\n preload?: AwsLambdaPreloadStrategy | undefined;\n prerenderStore?: AppRouterPrerenderStore | undefined;\n routeCache?: AppRouterCache | undefined;\n runtimeDir?: string | undefined;\n serverActions?: AppRouterServerActionOptions | undefined;\n sinkStrategy?: ResponseSinkStrategy | undefined;\n timings?: boolean | undefined;\n trustForwardedProto?: boolean | undefined;\n}\n\n/**\n * Selects how an AWS Lambda handler resolves its app-router import policy.\n */\nexport type AwsLambdaImportPolicy =\n | AppRouterImportPolicy\n | \"generated\"\n | { fromManifest: true };\n\n/**\n * Configures preload behavior for built app-router modules in AWS Lambda.\n */\nexport type AwsLambdaPreloadStrategy =\n | \"all\"\n | \"hot-route-requests\"\n | \"middleware\"\n | \"none\"\n | {\n mode: \"all\" | \"hot-route-requests\" | \"hot-routes\" | \"middleware\" | \"none\";\n routes?: readonly string[] | undefined;\n wait?: \"background\" | \"before-render\" | \"first-request\" | undefined;\n };\n\ntype NormalizedAwsLambdaPreloadStrategy = NormalizedBuiltAppRuntimePreloadStrategy;\n\ntype AwsLambdaDefaultPreloadMode = \"all\" | \"middleware\";\n\n/**\n * Handles one AWS API Gateway HTTP API v2 event with a buffered response.\n */\nexport type AwsLambdaRequestHandler = (\n event: AwsLambdaHttpEventV2,\n) => Promise<AwsLambdaHttpResultV2>;\n\n/**\n * Handles one AWS API Gateway HTTP API v2 event with a Lambda response stream.\n */\nexport type AwsLambdaStreamingRequestHandler<TContext = unknown> = (\n event: AwsLambdaHttpEventV2,\n responseStream: AwsLambdaStreamingResponseStream,\n context: TContext,\n) => Promise<void>;\n\n/**\n * Creates a buffered AWS Lambda HTTP API v2 handler for built app-router output.\n *\n * The handler materializes runtime files under `/tmp` by default, starts middleware-focused background preload, applies the generated import policy when requested, and returns API Gateway v2 response objects.\n */\nexport function createAwsLambdaRequestHandler(\n options: AwsLambdaRequestHandlerOptions,\n): AwsLambdaRequestHandler {\n warnIfImplicitHostTrust(options);\n const runtimeDirPromise = prepareAwsLambdaRuntimeDir(options);\n const runtimePreloadPromise = startAwsLambdaRuntimePreload(\n options,\n runtimeDirPromise,\n \"middleware\",\n );\n void runtimePreloadPromise?.catch(() => {});\n\n return createAwsLambdaRequestHandlerFromRuntime(\n options,\n runtimeDirPromise,\n runtimePreloadPromise,\n \"middleware\",\n );\n}\n\n/**\n * Creates a buffered AWS Lambda handler after eagerly preparing and preloading the built runtime.\n *\n * Use this when startup code can await preload work before the first request instead of letting the first invocation share that cost.\n */\nexport async function createPreloadedAwsLambdaRequestHandler(\n options: AwsLambdaRequestHandlerOptions,\n): Promise<AwsLambdaRequestHandler> {\n warnIfImplicitHostTrust(options);\n const runtimeDir = await prepareAwsLambdaRuntimeDir(options);\n await preloadAwsLambdaRuntime(options, runtimeDir);\n\n return createAwsLambdaRequestHandlerFromRuntime(options, Promise.resolve(runtimeDir));\n}\n\nfunction createAwsLambdaRequestHandlerFromRuntime(\n options: AwsLambdaRequestHandlerOptions,\n runtimeDirPromise: Promise<string>,\n runtimePreloadPromise?: Promise<void> | undefined,\n defaultPreloadMode: AwsLambdaDefaultPreloadMode = \"all\",\n): AwsLambdaRequestHandler {\n return async (event) => {\n const startedAt = logNow();\n const phases = createAwsLambdaTimingPhases(options);\n const eventToRequestStartedAt = phaseStartedAt(phases);\n const request = eventToRequest(event, options);\n finishPhase(phases, eventToRequestStartedAt, \"eventToRequestMs\");\n const logFields = requestLogFields(request, \"aws-lambda\");\n emitRouterLog(options.logger, \"info\", {\n ...logFields,\n type: \"router:request:start\",\n });\n\n try {\n const runtimeDirStartedAt = phaseStartedAt(phases);\n const runtimeDir = await runtimeDirPromise;\n finishPhase(phases, runtimeDirStartedAt, \"runtimeDirMs\");\n await waitForAwsLambdaRuntimePreload(\n options,\n runtimePreloadPromise,\n phases,\n defaultPreloadMode,\n );\n const importPolicy = await resolveAwsLambdaImportPolicy(options);\n const renderStartedAt = phaseStartedAt(phases);\n const builtRuntime = await createBuiltRequestRuntime({\n immutableRuntime: true,\n importPolicy,\n outDir: options.outDir,\n runtimeDir,\n });\n const preload = awsLambdaRenderPreload(\n options,\n runtimePreloadPromise,\n defaultPreloadMode,\n );\n const response = await builtRuntime.render(request, {\n instrumentation: options.instrumentation,\n logger: awsLambdaRenderLogger(options),\n onResponse: options.onResponse,\n ...(preload === undefined ? {} : { preload }),\n prerenderStore: options.prerenderStore,\n routeCache: options.routeCache,\n serverActions: options.serverActions,\n ...(options.sinkStrategy === undefined ? {} : { sinkStrategy: options.sinkStrategy }),\n });\n finishPhase(phases, renderStartedAt, \"renderMs\");\n const responseSerializationStartedAt = phaseStartedAt(phases);\n const result = await responseToLambdaResult(response, phases);\n finishPhase(phases, responseSerializationStartedAt, \"responseSerializationMs\");\n emitRouterLog(options.logger, \"info\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n status: result.statusCode,\n type: \"router:request:end\",\n });\n emitAwsLambdaTiming(options, logFields, result.statusCode, startedAt, phases);\n\n return result;\n } catch (error) {\n emitRouterLog(options.logger, \"error\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n error: logError(error),\n type: \"router:request:error\",\n });\n\n const payload = options.errorHandler\n ? options.errorHandler(error)\n : { body: \"Internal Server Error\", status: 500 };\n const response = await applyAwsLambdaResponseHook(\n new Response(payload.body, {\n headers: {\n \"content-type\": \"text/plain; charset=utf-8\",\n ...payload.headers,\n },\n status: payload.status,\n }),\n options,\n request,\n );\n\n return await responseToLambdaResult(response, phases);\n }\n };\n}\n\n/**\n * Creates an AWS Lambda streaming response handler for built app-router output.\n *\n * Use this with Lambda response streaming runtimes when HTML or route responses should be written progressively instead of buffered into an API Gateway result.\n */\nexport function createAwsLambdaStreamingRequestHandler<TContext = unknown>(\n options: AwsLambdaRequestHandlerOptions,\n): AwsLambdaStreamingRequestHandler<TContext> {\n warnIfImplicitHostTrust(options);\n const runtime = awsLambdaRuntime();\n const runtimeDirPromise = prepareAwsLambdaRuntimeDir(options);\n const runtimePreloadPromise = startAwsLambdaRuntimePreload(\n options,\n runtimeDirPromise,\n \"middleware\",\n );\n void runtimePreloadPromise?.catch(() => {});\n\n return createAwsLambdaStreamingRequestHandlerFromRuntime(\n options,\n runtime,\n runtimeDirPromise,\n runtimePreloadPromise,\n \"middleware\",\n );\n}\n\n/**\n * Creates a streaming AWS Lambda handler after eagerly preparing and preloading the built runtime.\n */\nexport async function createPreloadedAwsLambdaStreamingRequestHandler<TContext = unknown>(\n options: AwsLambdaRequestHandlerOptions,\n): Promise<AwsLambdaStreamingRequestHandler<TContext>> {\n warnIfImplicitHostTrust(options);\n const runtime = awsLambdaRuntime();\n const runtimeDir = await prepareAwsLambdaRuntimeDir(options);\n await preloadAwsLambdaRuntime(options, runtimeDir);\n\n return createAwsLambdaStreamingRequestHandlerFromRuntime<TContext>(\n options,\n runtime,\n Promise.resolve(runtimeDir),\n );\n}\n\nfunction startAwsLambdaRuntimePreload(\n options: AwsLambdaRequestHandlerOptions,\n runtimeDirPromise: Promise<string>,\n defaultMode: AwsLambdaDefaultPreloadMode = \"all\",\n): Promise<void> | undefined {\n const preload = normalizeAwsLambdaPreload(options.preload, defaultMode);\n if (preload.mode === \"none\") {\n return undefined;\n }\n\n return runtimeDirPromise.then((runtimeDir) =>\n preloadAwsLambdaRuntime(options, runtimeDir, defaultMode),\n );\n}\n\nasync function preloadAwsLambdaRuntime(\n options: AwsLambdaRequestHandlerOptions,\n runtimeDir: string,\n defaultMode: AwsLambdaDefaultPreloadMode = \"all\",\n): Promise<void> {\n const preload = normalizeAwsLambdaPreload(options.preload, defaultMode);\n if (preload.mode === \"none\") {\n return;\n }\n\n const importPolicy = await resolveAwsLambdaImportPolicy(options);\n await preloadBuiltAppRuntime({\n importPolicy,\n outDir: options.outDir,\n preload,\n runtimeDir,\n });\n}\n\nasync function waitForAwsLambdaRuntimePreload(\n options: AwsLambdaRequestHandlerOptions,\n runtimePreloadPromise: Promise<void> | undefined,\n phases: Record<string, number> | undefined,\n defaultMode: AwsLambdaDefaultPreloadMode,\n): Promise<void> {\n const preload = normalizeAwsLambdaPreload(options.preload, defaultMode);\n if (preload.wait !== \"first-request\" || runtimePreloadPromise === undefined) {\n return;\n }\n\n const preloadWaitStartedAt = phaseStartedAt(phases);\n try {\n await runtimePreloadPromise;\n } finally {\n finishPhase(phases, preloadWaitStartedAt, \"preloadWaitMs\");\n }\n}\n\nfunction awsLambdaRenderPreload(\n options: AwsLambdaRequestHandlerOptions,\n runtimePreloadPromise: Promise<void> | undefined,\n defaultMode: AwsLambdaDefaultPreloadMode,\n): { promise: Promise<void>; wait: \"before-render\" } | undefined {\n if (\n runtimePreloadPromise === undefined ||\n normalizeAwsLambdaPreload(options.preload, defaultMode).wait !== \"before-render\"\n ) {\n return undefined;\n }\n\n return {\n promise: runtimePreloadPromise,\n wait: \"before-render\",\n };\n}\n\nconst generatedImportPolicyCache = new Map<string, Promise<AppRouterImportPolicy>>();\n\nasync function resolveAwsLambdaImportPolicy(\n options: AwsLambdaRequestHandlerOptions,\n): Promise<AppRouterImportPolicy | undefined> {\n const policy = options.importPolicy;\n\n if (policy === undefined) {\n return undefined;\n }\n\n if (policy === \"generated\") {\n return await readGeneratedAwsLambdaImportPolicy(options.outDir);\n }\n\n if (isGeneratedAwsLambdaImportPolicyReference(policy) && policy.fromManifest === true) {\n return await readGeneratedAwsLambdaImportPolicy(options.outDir);\n }\n\n const configuredPolicy = policy as AppRouterImportPolicy;\n return {\n ...(configuredPolicy.allowedPackages === undefined\n ? {}\n : { allowedPackages: configuredPolicy.allowedPackages }),\n ...(configuredPolicy.allowedSourceDirs === undefined\n ? {}\n : { allowedSourceDirs: configuredPolicy.allowedSourceDirs }),\n ...(configuredPolicy.projectRoot === undefined\n ? {}\n : { projectRoot: configuredPolicy.projectRoot }),\n };\n}\n\nfunction isGeneratedAwsLambdaImportPolicyReference(\n policy: AwsLambdaImportPolicy,\n): policy is { fromManifest: true } {\n return typeof policy === \"object\" && policy !== null && \"fromManifest\" in policy;\n}\n\nasync function readGeneratedAwsLambdaImportPolicy(outDir: string): Promise<AppRouterImportPolicy> {\n const cached = generatedImportPolicyCache.get(outDir);\n if (cached !== undefined) {\n return await cached;\n }\n\n const promise = readGeneratedAwsLambdaImportPolicyInner(outDir);\n generatedImportPolicyCache.set(outDir, promise);\n\n return await promise;\n}\n\nasync function readGeneratedAwsLambdaImportPolicyInner(outDir: string): Promise<AppRouterImportPolicy> {\n const policy = JSON.parse(await readFile(join(outDir, \"server\", \"import-policy.json\"), \"utf8\")) as {\n runtimePackages?: readonly string[] | undefined;\n };\n\n return {\n allowedPackages: policy.runtimePackages ?? [],\n };\n}\n\nfunction normalizeAwsLambdaPreload(\n strategy: AwsLambdaPreloadStrategy | undefined,\n defaultMode: AwsLambdaDefaultPreloadMode = \"all\",\n): NormalizedAwsLambdaPreloadStrategy {\n return normalizeBuiltAppRuntimePreloadStrategy(strategy, defaultMode);\n}\n\nfunction createAwsLambdaStreamingRequestHandlerFromRuntime<TContext = unknown>(\n options: AwsLambdaRequestHandlerOptions,\n runtime: AwsLambdaRuntime,\n runtimeDirPromise: Promise<string>,\n runtimePreloadPromise?: Promise<void> | undefined,\n defaultPreloadMode: AwsLambdaDefaultPreloadMode = \"all\",\n): AwsLambdaStreamingRequestHandler<TContext> {\n return runtime.streamifyResponse(async (event, responseStream, _context) => {\n const startedAt = logNow();\n const phases = createAwsLambdaTimingPhases(options);\n const eventToRequestStartedAt = phaseStartedAt(phases);\n const request = eventToRequest(event, options);\n finishPhase(phases, eventToRequestStartedAt, \"eventToRequestMs\");\n const logFields = requestLogFields(request, \"aws-lambda\");\n emitRouterLog(options.logger, \"info\", {\n ...logFields,\n type: \"router:request:start\",\n });\n\n try {\n const runtimeDirStartedAt = phaseStartedAt(phases);\n const runtimeDir = await runtimeDirPromise;\n finishPhase(phases, runtimeDirStartedAt, \"runtimeDirMs\");\n await waitForAwsLambdaRuntimePreload(\n options,\n runtimePreloadPromise,\n phases,\n defaultPreloadMode,\n );\n const importPolicy = await resolveAwsLambdaImportPolicy(options);\n const renderStartedAt = phaseStartedAt(phases);\n const builtRuntime = await createBuiltRequestRuntime({\n immutableRuntime: true,\n importPolicy,\n outDir: options.outDir,\n runtimeDir,\n });\n const preload = awsLambdaRenderPreload(\n options,\n runtimePreloadPromise,\n defaultPreloadMode,\n );\n const response = await builtRuntime.render(request, {\n instrumentation: options.instrumentation,\n logger: awsLambdaRenderLogger(options),\n onResponse: options.onResponse,\n ...(preload === undefined ? {} : { preload }),\n prerenderStore: options.prerenderStore,\n routeCache: options.routeCache,\n serverActions: options.serverActions,\n ...(options.sinkStrategy === undefined ? {} : { sinkStrategy: options.sinkStrategy }),\n });\n finishPhase(phases, renderStartedAt, \"renderMs\");\n const responseStreamingStartedAt = phaseStartedAt(phases);\n await streamResponseToLambda(response, responseStream, runtime, phases);\n finishPhase(phases, responseStreamingStartedAt, \"responseStreamingMs\");\n emitRouterLog(options.logger, \"info\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n status: response.status,\n type: \"router:request:end\",\n });\n emitAwsLambdaTiming(options, logFields, response.status, startedAt, phases);\n } catch (error) {\n emitRouterLog(options.logger, \"error\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n error: logError(error),\n type: \"router:request:error\",\n });\n\n const payload = options.errorHandler\n ? options.errorHandler(error)\n : { body: \"Internal Server Error\", status: 500 };\n const response = await applyAwsLambdaResponseHook(\n new Response(payload.body, {\n headers: {\n \"content-type\": \"text/plain; charset=utf-8\",\n ...payload.headers,\n },\n status: payload.status,\n }),\n options,\n request,\n );\n\n await streamResponseToLambda(response, responseStream, runtime, phases);\n }\n });\n}\n\nasync function applyAwsLambdaResponseHook(\n response: Response,\n options: Pick<AwsLambdaRequestHandlerOptions, \"onResponse\">,\n request: Request,\n): Promise<Response> {\n const hooked = await options.onResponse?.(response, { request });\n\n return hooked instanceof Response ? hooked : response;\n}\n\nasync function prepareAwsLambdaRuntimeDir(options: {\n outDir: string;\n runtimeDir?: string | undefined;\n}): Promise<string> {\n const runtimeDir = options.runtimeDir ?? defaultAwsLambdaRuntimeDir(options.outDir);\n\n await mkdir(runtimeDir, { recursive: true });\n await linkAwsLambdaNodeModules({\n outDir: options.outDir,\n runtimeDir,\n });\n\n return runtimeDir;\n}\n\nasync function linkAwsLambdaNodeModules(options: {\n outDir: string;\n runtimeDir: string;\n}): Promise<void> {\n const source = join(dirname(options.outDir), \"node_modules\");\n const target = join(options.runtimeDir, \"node_modules\");\n\n try {\n await access(source);\n } catch {\n return;\n }\n\n try {\n const stats = await lstat(target);\n\n if (!stats.isSymbolicLink()) {\n return;\n }\n\n if ((await readlink(target)) === source) {\n return;\n }\n\n return;\n } catch {\n // Missing target: create it below.\n }\n\n try {\n await symlink(source, target, \"dir\");\n } catch (error) {\n if (!isNodeErrorCode(error, \"EEXIST\")) {\n throw error;\n }\n }\n}\n\nfunction defaultAwsLambdaRuntimeDir(outDir: string): string {\n return join(tmpdir(), \"mreact-router\", hashText(outDir), \"runtime\");\n}\n\nfunction hashText(value: string): string {\n return createHash(\"sha256\").update(value).digest(\"hex\").slice(0, 16);\n}\n\nfunction isNodeErrorCode(error: unknown, code: string): boolean {\n return (\n typeof error === \"object\" &&\n error !== null &&\n \"code\" in error &&\n (error as { code?: unknown }).code === code\n );\n}\n\nfunction eventToRequest(\n event: AwsLambdaHttpEventV2,\n options: AwsLambdaRequestHandlerOptions,\n): Request {\n const headers = eventHeaders(event);\n const rawHost = lambdaRequestHost(headers, options);\n const host = resolveRequestHost({\n allowedHosts: options.allowedHosts,\n fallbackHost: options.hostname ?? \"lambda.local\",\n hostPolicy: lambdaHostPolicy(options),\n rawHost: rawHost ?? undefined,\n });\n const protocol = lambdaRequestProtocol(event, headers, options);\n const rawPath = event.rawPath === undefined || event.rawPath === \"\" ? \"/\" : event.rawPath;\n const rawQueryString =\n event.rawQueryString === undefined || event.rawQueryString === \"\"\n ? \"\"\n : `?${event.rawQueryString}`;\n const method = event.requestContext?.http?.method ?? \"GET\";\n const init: RequestInit = {\n headers,\n method,\n };\n\n if (method !== \"GET\" && method !== \"HEAD\" && event.body !== undefined) {\n init.body =\n event.isBase64Encoded === true ? Buffer.from(event.body, \"base64\") : event.body;\n }\n\n return new Request(`${protocol}://${host}${rawPath}${rawQueryString}`, init);\n}\n\nfunction lambdaRequestHost(\n headers: Headers,\n options: AwsLambdaRequestHandlerOptions,\n): string | null {\n if (options.hostPolicy === \"trusted-proxy\") {\n return firstForwardedValue(headers.get(\"x-forwarded-host\")) ?? headers.get(\"host\");\n }\n\n return headers.get(\"host\");\n}\n\nfunction lambdaHostPolicy(\n options: AwsLambdaRequestHandlerOptions,\n): RequestHostPolicy | undefined {\n return options.hostPolicy ?? (process.env.NODE_ENV === \"production\" ? \"strict\" : undefined);\n}\n\nfunction lambdaRequestProtocol(\n event: AwsLambdaHttpEventV2,\n headers: Headers,\n options: AwsLambdaRequestHandlerOptions,\n): \"http\" | \"https\" {\n if (options.trustForwardedProto === true) {\n return normalizeRequestProtocol(firstForwardedValue(headers.get(\"x-forwarded-proto\")));\n }\n\n return normalizeRequestProtocol(event.requestContext?.http?.protocol);\n}\n\nfunction normalizeRequestProtocol(value: string | undefined): \"http\" | \"https\" {\n if (value === undefined || value === \"\") {\n return \"https\";\n }\n\n const normalized = value.toLowerCase();\n return normalized === \"http\" || normalized.startsWith(\"http/\") ? \"http\" : \"https\";\n}\n\nfunction eventHeaders(event: AwsLambdaHttpEventV2): Headers {\n const headers = new Headers();\n\n for (const [name, value] of Object.entries(event.headers ?? {})) {\n if (value !== undefined) {\n headers.set(name, value);\n }\n }\n\n if (event.cookies !== undefined && event.cookies.length > 0 && !headers.has(\"cookie\")) {\n headers.set(\"cookie\", event.cookies.join(\"; \"));\n }\n\n return headers;\n}\n\nasync function responseToLambdaResult(\n response: Response,\n phases?: Record<string, number> | undefined,\n): Promise<AwsLambdaHttpResultV2> {\n const headers: Record<string, string> = {};\n response.headers.forEach((value, key) => {\n if (key !== \"set-cookie\") {\n headers[key] = value;\n }\n });\n\n const cookies = responseCookies(response.headers);\n\n if (response.body === null) {\n return {\n body: \"\",\n ...(cookies.length === 0 ? {} : { cookies }),\n headers,\n isBase64Encoded: false,\n statusCode: response.status,\n };\n }\n\n const streamDrainStartedAt = phaseStartedAt(phases);\n const bytes = await drainBufferedResponseBody(response.body, phases);\n addPhaseDuration(phases, streamDrainStartedAt, \"streamDrainMs\");\n\n const bodyEncodeStartedAt = phaseStartedAt(phases);\n const contentType = response.headers.get(\"content-type\");\n const text = isTextContentType(contentType);\n const result = {\n body: text ? bytes.toString(\"utf8\") : bytes.toString(\"base64\"),\n ...(cookies.length === 0 ? {} : { cookies }),\n headers,\n isBase64Encoded: !text,\n statusCode: response.status,\n };\n addPhaseDuration(phases, bodyEncodeStartedAt, \"bodyEncodeMs\");\n\n return result;\n}\n\nasync function drainBufferedResponseBody(\n body: ReadableStream<Uint8Array>,\n phases?: Record<string, number> | undefined,\n): Promise<Buffer> {\n const reader = body.getReader();\n const chunks: Uint8Array[] = [];\n let byteLength = 0;\n\n while (true) {\n const readStartedAt = phaseStartedAt(phases);\n const result = await reader.read();\n addPhaseDuration(phases, readStartedAt, \"streamReadMs\");\n\n if (result.done) {\n break;\n }\n\n chunks.push(result.value);\n byteLength += result.value.byteLength;\n }\n\n const concatStartedAt = phaseStartedAt(phases);\n const bytes = concatUint8ArrayChunks(chunks, byteLength);\n addPhaseDuration(phases, concatStartedAt, \"streamConcatMs\");\n\n return bytes;\n}\n\nfunction concatUint8ArrayChunks(chunks: readonly Uint8Array[], byteLength: number): Buffer {\n if (chunks.length === 0 || byteLength === 0) {\n return Buffer.alloc(0);\n }\n\n if (chunks.length === 1) {\n const [chunk] = chunks;\n if (chunk === undefined) {\n return Buffer.alloc(0);\n }\n return Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);\n }\n\n const bytes = Buffer.allocUnsafe(byteLength);\n let offset = 0;\n\n for (const chunk of chunks) {\n bytes.set(chunk, offset);\n offset += chunk.byteLength;\n }\n\n return bytes;\n}\n\nfunction createAwsLambdaTimingPhases(\n options: AwsLambdaRequestHandlerOptions,\n): Record<string, number> | undefined {\n return options.timings === true ? {} : undefined;\n}\n\nfunction awsLambdaRenderLogger(\n options: AwsLambdaRequestHandlerOptions,\n): AppRouterLogger | undefined {\n return options.timings === true ? options.logger : undefined;\n}\n\nfunction phaseStartedAt(phases: Record<string, number> | undefined): number | undefined {\n return phases === undefined ? undefined : logNow();\n}\n\nfunction finishPhase(\n phases: Record<string, number> | undefined,\n startedAt: number | undefined,\n name: string,\n): void {\n if (phases !== undefined && startedAt !== undefined) {\n phases[name] = logDurationMs(startedAt);\n }\n}\n\nfunction addPhaseDuration(\n phases: Record<string, number> | undefined,\n startedAt: number | undefined,\n name: string,\n): void {\n if (phases !== undefined && startedAt !== undefined) {\n phases[name] = (phases[name] ?? 0) + logDurationMs(startedAt);\n }\n}\n\nfunction emitAwsLambdaTiming(\n options: AwsLambdaRequestHandlerOptions,\n logFields: RouterRequestLogFields,\n status: number,\n startedAt: number,\n phases: Record<string, number> | undefined,\n): void {\n if (phases === undefined) {\n return;\n }\n\n emitRouterLog(options.logger, \"debug\", {\n ...logFields,\n durationMs: logDurationMs(startedAt),\n phases,\n status,\n type: \"router:request:timing\",\n });\n}\n\nasync function streamResponseToLambda(\n response: Response,\n responseStream: AwsLambdaStreamingResponseStream,\n runtime: AwsLambdaRuntime,\n phases?: Record<string, number> | undefined,\n): Promise<void> {\n const stream = runtime.HttpResponseStream.from(\n responseStream,\n responseStreamingMetadata(response),\n );\n\n try {\n if (response.body === null) {\n stream.end();\n return;\n }\n\n const reader = response.body.getReader();\n\n while (true) {\n const streamWaitStartedAt = phaseStartedAt(phases);\n const result = await reader.read();\n addPhaseDuration(phases, streamWaitStartedAt, \"streamWaitMs\");\n\n if (result.done) {\n break;\n }\n\n const streamWriteStartedAt = phaseStartedAt(phases);\n await writeStreamingChunk(stream, result.value);\n addPhaseDuration(phases, streamWriteStartedAt, \"streamWriteMs\");\n }\n\n stream.end();\n } catch (error) {\n if (typeof stream.destroy === \"function\") {\n stream.destroy(error);\n return;\n }\n\n throw error;\n }\n}\n\nfunction responseStreamingMetadata(\n response: Response,\n): AwsLambdaStreamingResponseMetadata {\n const headers: Record<string, string> = {};\n response.headers.forEach((value, key) => {\n if (key !== \"set-cookie\") {\n headers[key] = value;\n }\n });\n\n const cookies = responseCookies(response.headers);\n\n return {\n ...(cookies.length === 0 ? {} : { cookies }),\n headers,\n statusCode: response.status,\n };\n}\n\nasync function writeStreamingChunk(\n stream: AwsLambdaStreamingResponseStream,\n chunk: Uint8Array,\n): Promise<void> {\n if (stream.write(chunk) !== false) {\n return;\n }\n\n if (typeof stream.once !== \"function\") {\n return;\n }\n\n await new Promise<void>((resolve) => {\n stream.once?.(\"drain\", resolve);\n });\n}\n\ninterface AwsLambdaRuntime {\n HttpResponseStream: {\n from(\n responseStream: AwsLambdaStreamingResponseStream,\n metadata: AwsLambdaStreamingResponseMetadata,\n ): AwsLambdaStreamingResponseStream;\n };\n streamifyResponse<TContext>(\n handler: AwsLambdaStreamingRequestHandler<TContext>,\n ): AwsLambdaStreamingRequestHandler<TContext>;\n}\n\nfunction awsLambdaRuntime(): AwsLambdaRuntime {\n const runtime = (globalThis as { awslambda?: Partial<AwsLambdaRuntime> | undefined })\n .awslambda;\n\n if (\n typeof runtime?.streamifyResponse !== \"function\" ||\n typeof runtime.HttpResponseStream?.from !== \"function\"\n ) {\n throw new Error(\n \"AWS Lambda response streaming requires the Node.js Lambda runtime awslambda.streamifyResponse() and awslambda.HttpResponseStream.from().\",\n );\n }\n\n return runtime as AwsLambdaRuntime;\n}\n\nfunction firstForwardedValue(value: string | null): string | undefined {\n const first = value?.split(\",\")[0]?.trim();\n return first === undefined || first === \"\" ? undefined : first;\n}\n\nfunction responseCookies(headers: Headers): string[] {\n const maybeHeaders = headers as Headers & { getSetCookie?: () => string[] };\n if (typeof maybeHeaders.getSetCookie === \"function\") {\n return maybeHeaders.getSetCookie();\n }\n\n const raw = headers.get(\"set-cookie\");\n return raw === null ? [] : splitSetCookieHeader(raw);\n}\n\nfunction splitSetCookieHeader(header: string): string[] {\n const cookies: string[] = [];\n let start = 0;\n let inExpires = false;\n\n for (let index = 0; index < header.length; index += 1) {\n const remaining = header.slice(index).toLowerCase();\n if (remaining.startsWith(\"expires=\")) {\n inExpires = true;\n index += \"expires=\".length - 1;\n continue;\n }\n\n const char = header[index];\n if (char === \";\") {\n inExpires = false;\n continue;\n }\n\n if (char === \",\" && !inExpires) {\n cookies.push(header.slice(start, index).trim());\n start = index + 1;\n }\n }\n\n cookies.push(header.slice(start).trim());\n return cookies.filter((cookie) => cookie.length > 0);\n}\n\nfunction isTextContentType(contentType: string | null): boolean {\n if (contentType === null) {\n return true;\n }\n\n const type = contentType.toLowerCase().split(\";\")[0]?.trim() ?? \"\";\n return (\n type.startsWith(\"text/\") ||\n type === \"application/json\" ||\n type === \"application/javascript\" ||\n type === \"application/x-javascript\" ||\n type === \"application/xml\" ||\n type === \"application/x-www-form-urlencoded\" ||\n type.endsWith(\"+json\") ||\n type.endsWith(\"+xml\")\n );\n}\n"]}
|
|
@@ -6,19 +6,31 @@ import type { GenerateMetadataContext, RouteMetadata } from "../types.js";
|
|
|
6
6
|
import { type AppRouterLogger } from "../logger.js";
|
|
7
7
|
import type { AppRoute } from "../routes.js";
|
|
8
8
|
import type { AppRouterPrerenderStore } from "../serve.js";
|
|
9
|
+
/**
|
|
10
|
+
* Represents the Cloudflare Worker execution context used by router handlers.
|
|
11
|
+
*/
|
|
9
12
|
export interface CloudflareExecutionContext {
|
|
10
13
|
passThroughOnException(): void;
|
|
11
14
|
waitUntil(promise: Promise<unknown>): void;
|
|
12
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Loads static assets for Cloudflare router requests.
|
|
18
|
+
*/
|
|
13
19
|
export interface CloudflareAssetLoader<Env = unknown> {
|
|
14
20
|
fetch?: ((pathname: string, request: Request, env: Env, context: CloudflareExecutionContext) => Response | Promise<Response | undefined> | undefined) | undefined;
|
|
15
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Provides manifests, environment, and execution context to Cloudflare rendering.
|
|
24
|
+
*/
|
|
16
25
|
export interface CloudflareRenderContext<Env = unknown> {
|
|
17
26
|
clientManifest: CloudflareClientManifest;
|
|
18
27
|
context: CloudflareExecutionContext;
|
|
19
28
|
env: Env;
|
|
20
29
|
serverManifest: BuiltServerManifest;
|
|
21
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Configures a Cloudflare Worker request handler for app-router output.
|
|
33
|
+
*/
|
|
22
34
|
export interface CloudflareRequestHandlerOptions<Env = unknown> {
|
|
23
35
|
assets?: CloudflareAssetLoader<Env> | undefined;
|
|
24
36
|
clientManifest: CloudflareClientManifest;
|
|
@@ -28,26 +40,47 @@ export interface CloudflareRequestHandlerOptions<Env = unknown> {
|
|
|
28
40
|
render?: ((request: Request, context: CloudflareRenderContext<Env>) => Response | Promise<Response>) | undefined;
|
|
29
41
|
serverManifest: BuiltServerManifest;
|
|
30
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Defines the Cloudflare Worker `fetch` handler shape returned by router adapters.
|
|
45
|
+
*/
|
|
31
46
|
export interface CloudflareRequestHandler<Env = unknown> {
|
|
32
47
|
fetch(request: Request, env: Env, context: CloudflareExecutionContext): Promise<Response>;
|
|
33
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Provides route match data to Cloudflare built-route rendering.
|
|
51
|
+
*/
|
|
34
52
|
export interface CloudflareBuiltRouteRenderContext<Env = unknown> extends CloudflareRenderContext<Env> {
|
|
35
53
|
params: Record<string, readonly string[] | string>;
|
|
36
54
|
route: AppRoute;
|
|
37
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Provides loader context to Cloudflare route modules.
|
|
58
|
+
*/
|
|
38
59
|
export interface CloudflareRouteModuleLoaderContext<Env = unknown> extends CloudflareBuiltRouteRenderContext<Env> {
|
|
39
60
|
queryClient: QueryClient;
|
|
40
61
|
request: Request;
|
|
41
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Provides request context to Cloudflare server route handlers.
|
|
65
|
+
*/
|
|
42
66
|
export interface CloudflareServerRouteContext<Env = unknown> extends CloudflareBuiltRouteRenderContext<Env> {
|
|
43
67
|
request: Request;
|
|
44
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Provides props to Cloudflare route module components.
|
|
71
|
+
*/
|
|
45
72
|
export interface CloudflareRouteModuleComponentProps<Data = unknown, Env = unknown> extends CloudflareBuiltRouteRenderContext<Env> {
|
|
46
73
|
data: Data;
|
|
47
74
|
queryClient: QueryClient;
|
|
48
75
|
request: Request;
|
|
49
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Renders a Cloudflare route module response body or `Response`.
|
|
79
|
+
*/
|
|
50
80
|
export type CloudflareRouteModuleComponent<Data = unknown, Env = unknown> = (props: CloudflareRouteModuleComponentProps<Data, Env>) => Response | string | PromiseLike<Response | string>;
|
|
81
|
+
/**
|
|
82
|
+
* Defines the exports accepted from a Cloudflare page route module.
|
|
83
|
+
*/
|
|
51
84
|
export interface CloudflareRouteModule<Data = unknown, Env = unknown> {
|
|
52
85
|
App?: CloudflareRouteModuleComponent<Data, Env> | undefined;
|
|
53
86
|
CloudflareRouteComponent?: CloudflareRouteModuleComponent<Data, Env> | undefined;
|
|
@@ -56,7 +89,13 @@ export interface CloudflareRouteModule<Data = unknown, Env = unknown> {
|
|
|
56
89
|
loader?: ((context: CloudflareRouteModuleLoaderContext<Env>) => Data | PromiseLike<Data>) | undefined;
|
|
57
90
|
metadata?: RouteMetadata | undefined;
|
|
58
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Handles a Cloudflare server route request.
|
|
94
|
+
*/
|
|
59
95
|
export type CloudflareServerRouteHandler<Env = unknown> = (request: Request, context: CloudflareServerRouteContext<Env>) => unknown | PromiseLike<unknown>;
|
|
96
|
+
/**
|
|
97
|
+
* Defines HTTP method exports accepted from a Cloudflare server route module.
|
|
98
|
+
*/
|
|
60
99
|
export interface CloudflareServerRouteModule<Env = unknown> {
|
|
61
100
|
ALL?: CloudflareServerRouteHandler<Env> | undefined;
|
|
62
101
|
DELETE?: CloudflareServerRouteHandler<Env> | undefined;
|
|
@@ -68,17 +107,32 @@ export interface CloudflareServerRouteModule<Env = unknown> {
|
|
|
68
107
|
POST?: CloudflareServerRouteHandler<Env> | undefined;
|
|
69
108
|
PUT?: CloudflareServerRouteHandler<Env> | undefined;
|
|
70
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Provides request context to Cloudflare metadata route modules.
|
|
112
|
+
*/
|
|
71
113
|
export interface CloudflareMetadataRouteContext {
|
|
72
114
|
baseUrl: string;
|
|
73
115
|
host: string;
|
|
74
116
|
params: Record<string, readonly string[] | string>;
|
|
75
117
|
request: Request;
|
|
76
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Defines the default export accepted from a Cloudflare metadata route module.
|
|
121
|
+
*/
|
|
77
122
|
export interface CloudflareMetadataRouteModule {
|
|
78
123
|
default?: ((context: CloudflareMetadataRouteContext) => unknown | PromiseLike<unknown>) | undefined;
|
|
79
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Represents one registered Cloudflare route module entry.
|
|
127
|
+
*/
|
|
80
128
|
export type CloudflareRouteModuleRegistryEntry<Env = unknown> = CloudflareRouteModule<unknown, Env> | CloudflareMetadataRouteModule | CloudflareServerRouteModule<Env>;
|
|
129
|
+
/**
|
|
130
|
+
* Maps generated route module file keys to Cloudflare route modules or lazy loaders.
|
|
131
|
+
*/
|
|
81
132
|
export type CloudflareRouteModuleRegistry<Env = unknown> = Record<string, CloudflareRouteModuleRegistryEntry<Env> | (() => CloudflareRouteModuleRegistryEntry<Env> | PromiseLike<CloudflareRouteModuleRegistryEntry<Env>>)>;
|
|
133
|
+
/**
|
|
134
|
+
* Configures the Cloudflare route module renderer.
|
|
135
|
+
*/
|
|
82
136
|
export interface CloudflareRouteModuleRendererOptions<Env = unknown> {
|
|
83
137
|
document?: ((context: CloudflareRouteModuleComponentProps<unknown, Env> & {
|
|
84
138
|
body: string;
|
|
@@ -86,32 +140,56 @@ export interface CloudflareRouteModuleRendererOptions<Env = unknown> {
|
|
|
86
140
|
}) => Response | string | PromiseLike<Response | string>) | undefined;
|
|
87
141
|
modules: CloudflareRouteModuleRegistry<Env>;
|
|
88
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Represents an import glob of Cloudflare route modules.
|
|
145
|
+
*/
|
|
89
146
|
export type CloudflareRouteModuleGlob<Env = unknown> = Record<string, CloudflareRouteModuleRegistryEntry<Env> | (() => CloudflareRouteModuleRegistryEntry<Env> | PromiseLike<CloudflareRouteModuleRegistryEntry<Env>>)>;
|
|
147
|
+
/**
|
|
148
|
+
* Configures collection of Cloudflare route modules from a built manifest.
|
|
149
|
+
*/
|
|
90
150
|
export interface CollectCloudflareRouteModulesOptions {
|
|
91
151
|
manifest: BuiltServerManifest;
|
|
92
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Configures a Cloudflare request handler that renders matched built routes.
|
|
155
|
+
*/
|
|
93
156
|
export interface CloudflareBuiltRequestHandlerOptions<Env = unknown> extends Omit<CloudflareRequestHandlerOptions<Env>, "render"> {
|
|
94
157
|
renderRoute?: ((request: Request, context: CloudflareBuiltRouteRenderContext<Env>) => Response | Promise<Response>) | undefined;
|
|
95
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Describes client assets and route metadata used by Cloudflare handlers.
|
|
161
|
+
*/
|
|
96
162
|
export interface CloudflareClientManifest {
|
|
97
163
|
assets?: readonly string[] | undefined;
|
|
98
164
|
publicAssets?: readonly string[] | undefined;
|
|
99
165
|
routes: ClientRouteManifestEntry[];
|
|
100
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Represents a Cloudflare asset binding with a `fetch` method.
|
|
169
|
+
*/
|
|
101
170
|
export interface CloudflareAssetBinding {
|
|
102
171
|
fetch(request: Request): Response | Promise<Response>;
|
|
103
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Configures static asset loading from a Cloudflare asset binding.
|
|
175
|
+
*/
|
|
104
176
|
export interface CloudflareStaticAssetLoaderOptions<Env = unknown> {
|
|
105
177
|
binding: CloudflareAssetBinding | ((env: Env) => CloudflareAssetBinding | Promise<CloudflareAssetBinding | undefined> | undefined);
|
|
106
178
|
clientManifest: CloudflareClientManifest;
|
|
107
179
|
extraPaths?: readonly string[] | undefined;
|
|
108
180
|
prefix?: string | undefined;
|
|
109
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Defines the Cloudflare Cache API subset used by prerender stores.
|
|
184
|
+
*/
|
|
110
185
|
export interface CloudflareCache {
|
|
111
186
|
delete(request: Request | string): boolean | Promise<boolean>;
|
|
112
187
|
match(request: Request | string): Response | Promise<Response | undefined> | undefined;
|
|
113
188
|
put(request: Request | string, response: Response): void | Promise<void>;
|
|
114
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Configures a Cloudflare Cache API backed prerender store.
|
|
192
|
+
*/
|
|
115
193
|
export interface CloudflarePrerenderStoreOptions {
|
|
116
194
|
cache: CloudflareCache;
|
|
117
195
|
keyOrigin?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../../src/adapters/cloudflare.ts"],"names":[],"mappings":"AAAA,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