@wular/pnext 0.1.5 → 0.1.7
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/bin/pnext +9 -2
- package/dist/server/_chunks/aliases-j47a10ce.js +44 -0
- package/dist/server/_chunks/analyze-arswqe6s.js +445 -0
- package/dist/server/_chunks/boot-af0mv3dy.js +36 -0
- package/dist/server/_chunks/build-spy3dxp4.js +84 -0
- package/dist/server/_chunks/build-t9h0hec3.js +3550 -0
- package/dist/server/_chunks/build-tier-m7yvqz61.js +2472 -0
- package/dist/server/_chunks/compile-53j02j27.js +22 -0
- package/dist/server/_chunks/config-1yzwexq6.js +27 -0
- package/dist/server/_chunks/config-n2z7yxps.js +22 -0
- package/dist/server/_chunks/create-meec9hs6.js +134 -0
- package/dist/server/_chunks/dev-fjmqg6en.js +220 -0
- package/dist/server/_chunks/esbuild-yyktfrtt.js +15 -0
- package/dist/server/_chunks/generate-n9sh6hzt.js +21 -0
- package/dist/server/_chunks/index-0374j2b9.js +66 -0
- package/dist/server/_chunks/index-06nyqntx.js +213 -0
- package/dist/server/_chunks/index-1011cscr.js +5263 -0
- package/dist/server/_chunks/index-11sfk4hb.js +170 -0
- package/dist/server/_chunks/index-20ppawv7.js +297 -0
- package/dist/server/_chunks/index-2dv4y4wd.js +1065 -0
- package/dist/server/_chunks/index-2vz0wzdn.js +59 -0
- package/dist/server/_chunks/index-2wfv4kvx.js +182 -0
- package/dist/server/_chunks/index-357na4a8.js +109 -0
- package/dist/server/_chunks/index-3b3at80h.js +109 -0
- package/dist/server/_chunks/index-3tf1xjsp.js +6166 -0
- package/dist/server/_chunks/index-3xbr4eyv.js +105 -0
- package/dist/server/_chunks/index-4399bvd2.js +18 -0
- package/dist/server/_chunks/index-4hgjrqh7.js +851 -0
- package/dist/server/_chunks/index-4q2gbfwk.js +2530 -0
- package/dist/server/_chunks/index-4t92hdxd.js +172 -0
- package/dist/server/_chunks/index-4zzebszd.js +10 -0
- package/dist/server/_chunks/index-5gyr4emz.js +107 -0
- package/dist/server/_chunks/index-5hr4062s.js +70 -0
- package/dist/server/_chunks/index-68m3mwbd.js +84 -0
- package/dist/server/_chunks/index-6b009mt0.js +56 -0
- package/dist/server/_chunks/index-6e4fqv30.js +588 -0
- package/dist/server/_chunks/index-6gex3pfa.js +15 -0
- package/dist/server/_chunks/index-6kp9r0d9.js +11 -0
- package/dist/server/_chunks/index-6q7zvrap.js +134 -0
- package/dist/server/_chunks/index-73z4esab.js +38 -0
- package/dist/server/_chunks/index-79ngvam8.js +60 -0
- package/dist/server/_chunks/index-7wc9n8be.js +25 -0
- package/dist/server/_chunks/index-8k7pfejn.js +1599 -0
- package/dist/server/_chunks/index-8kcxdfya.js +206 -0
- package/dist/server/_chunks/index-91x12ykq.js +274 -0
- package/dist/server/_chunks/index-9ch50vtq.js +18 -0
- package/dist/server/_chunks/index-9hx2641q.js +28 -0
- package/dist/server/_chunks/index-9n2914ww.js +535 -0
- package/dist/server/_chunks/index-9ych9ma8.js +207 -0
- package/dist/server/_chunks/index-b6wtkdp4.js +24 -0
- package/dist/server/_chunks/index-bcws5eh2.js +35 -0
- package/dist/server/_chunks/index-c0g2wf3z.js +92 -0
- package/dist/server/_chunks/index-cf4rvxv6.js +95 -0
- package/dist/server/_chunks/index-cjgqs13g.js +65 -0
- package/dist/server/_chunks/index-ckkdpht5.js +41 -0
- package/dist/server/_chunks/index-cyfednwb.js +87 -0
- package/dist/server/_chunks/index-danncfhy.js +311 -0
- package/dist/server/_chunks/index-dg0f05zs.js +199 -0
- package/dist/server/_chunks/index-e3a6yx84.js +18 -0
- package/dist/server/_chunks/index-e88tyv35.js +45 -0
- package/dist/server/_chunks/index-eajaspjk.js +1253 -0
- package/dist/server/_chunks/index-eeaanp2e.js +483 -0
- package/dist/server/_chunks/index-egykcqg3.js +101 -0
- package/dist/server/_chunks/index-en7n9f7m.js +22 -0
- package/dist/server/_chunks/index-ezgj0tr1.js +88 -0
- package/dist/server/_chunks/index-fkp000p1.js +590 -0
- package/dist/server/_chunks/index-fn1chkkd.js +214 -0
- package/dist/server/_chunks/index-fp8r0sqs.js +64 -0
- package/dist/server/_chunks/index-ggk2j965.js +9432 -0
- package/dist/server/_chunks/index-grta8ap3.js +238 -0
- package/dist/server/_chunks/index-h2a70tg4.js +7 -0
- package/dist/server/_chunks/index-h4xy648y.js +51 -0
- package/dist/server/_chunks/index-hkdfj58q.js +92 -0
- package/dist/server/_chunks/index-j2zrcp1k.js +66 -0
- package/dist/server/_chunks/index-jcsjq3d1.js +20 -0
- package/dist/server/_chunks/index-jepjvcrf.js +198 -0
- package/dist/server/_chunks/index-jks0x0a1.js +14 -0
- package/dist/server/_chunks/index-jx7bqvw1.js +57 -0
- package/dist/server/_chunks/index-k1g3epw0.js +1299 -0
- package/dist/server/_chunks/index-knp0s912.js +7 -0
- package/dist/server/_chunks/index-kq8kpzye.js +472 -0
- package/dist/server/_chunks/index-kqyy1d4f.js +50 -0
- package/dist/server/_chunks/index-kresp2n8.js +445 -0
- package/dist/server/_chunks/index-ms9v9tnx.js +31 -0
- package/dist/server/_chunks/index-n4hxpng2.js +11 -0
- package/dist/server/_chunks/index-ncnes8c6.js +17 -0
- package/dist/server/_chunks/index-nqh3xhdc.js +57 -0
- package/dist/server/_chunks/index-nyrba2kr.js +4130 -0
- package/dist/server/_chunks/index-p77b4kcx.js +296 -0
- package/dist/server/_chunks/index-pym1cezq.js +39 -0
- package/dist/server/_chunks/index-q738kkhj.js +100 -0
- package/dist/server/_chunks/index-qjj6gddn.js +54 -0
- package/dist/server/_chunks/index-qm6kmhqs.js +110 -0
- package/dist/server/_chunks/index-qn4z5s3c.js +819 -0
- package/dist/server/_chunks/index-qpwsgt3a.js +158 -0
- package/dist/server/_chunks/index-r97ptz1q.js +97 -0
- package/dist/server/_chunks/index-ras0sdab.js +26 -0
- package/dist/server/_chunks/index-rcs322t1.js +19 -0
- package/dist/server/_chunks/index-rn8dyr1f.js +126 -0
- package/dist/server/_chunks/index-rt9qq1va.js +4 -0
- package/dist/server/_chunks/index-rthrsed5.js +356 -0
- package/dist/server/_chunks/index-sctcgyvv.js +185 -0
- package/dist/server/_chunks/index-sjpckxqn.js +213 -0
- package/dist/server/_chunks/index-sq3kvz3g.js +200 -0
- package/dist/server/_chunks/index-stbk3jhn.js +31 -0
- package/dist/server/_chunks/index-sv8m6789.js +266 -0
- package/dist/server/_chunks/index-tgcakdxc.js +125 -0
- package/dist/server/_chunks/index-tgsfjmep.js +74 -0
- package/dist/server/_chunks/index-tq0pc7eg.js +154 -0
- package/dist/server/_chunks/index-tq1f96v7.js +51 -0
- package/dist/server/_chunks/index-tqn2qnnn.js +241 -0
- package/dist/server/_chunks/index-tvqkq6e6.js +128 -0
- package/dist/server/_chunks/index-v1ags1na.js +132 -0
- package/dist/server/_chunks/index-vvmmknm1.js +1431 -0
- package/dist/server/_chunks/index-vvq7rqtn.js +329 -0
- package/dist/server/_chunks/index-vz0km5qk.js +33 -0
- package/dist/server/_chunks/index-w6h8m6vp.js +138 -0
- package/dist/server/_chunks/index-web361b8.js +138 -0
- package/dist/server/_chunks/index-wpfhfbs4.js +194 -0
- package/dist/server/_chunks/index-x0y005nh.js +283 -0
- package/dist/server/_chunks/index-x3yn4ywm.js +22 -0
- package/dist/server/_chunks/index-x93hv0sc.js +271 -0
- package/dist/server/_chunks/index-xvj80c3a.js +30 -0
- package/dist/server/_chunks/index-xywjg2vc.js +100 -0
- package/dist/server/_chunks/index-y2jr2n72.js +152 -0
- package/dist/server/_chunks/index-y36a0ybw.js +57 -0
- package/dist/server/_chunks/index-ye9hmsvf.js +47 -0
- package/dist/server/_chunks/index-yhxkxghe.js +56 -0
- package/dist/server/_chunks/index-ym67zqxp.js +130 -0
- package/dist/server/_chunks/index-ytjvpbm2.js +736 -0
- package/dist/server/_chunks/index-yz54pxrh.js +960 -0
- package/dist/server/_chunks/index-z4z9zv3b.js +733 -0
- package/dist/server/_chunks/index-z84ab1w0.js +1270 -0
- package/dist/server/_chunks/index-z88qv16t.js +11 -0
- package/dist/server/_chunks/index-zqpqyg8p.js +666 -0
- package/dist/server/_chunks/loader-7yw0j98z.js +78 -0
- package/dist/server/_chunks/modules-jn8bmbn8.js +74 -0
- package/dist/server/_chunks/pipeline-yy9jhydf.js +832 -0
- package/dist/server/_chunks/production-jar9ztm3.js +44 -0
- package/dist/server/_chunks/proxy-config-j84dgksn.js +21 -0
- package/dist/server/_chunks/proxy-w1d0wmsn.js +33 -0
- package/dist/server/_chunks/router-k1reahfn.js +498 -0
- package/dist/server/_chunks/routes-2s277fc6.js +64 -0
- package/dist/server/_chunks/run-pvd8bs1t.js +696 -0
- package/dist/server/_chunks/server-mt4a994c.js +1835 -0
- package/dist/server/_chunks/tsconfig-defaults-1nb3308g.js +20 -0
- package/dist/server/_chunks/typegen-0qr0459b.js +35 -0
- package/dist/server/api/client-cache.js +14 -0
- package/dist/server/cli/index.js +378 -0
- package/dist/server/cli/start.js +137 -0
- package/dist/server/client/reference.js +16 -0
- package/dist/server/compat/next/cache.js +56 -0
- package/dist/server/compat/next/canonical-url.js +13 -0
- package/dist/server/compat/next/client-cache.js +57 -0
- package/dist/server/compat/next/client-navigation.js +232 -0
- package/dist/server/compat/next/client-only.js +1 -0
- package/dist/server/compat/next/client-script.js +178 -0
- package/dist/server/compat/next/client-server.js +34 -0
- package/dist/server/compat/next/config-headers.js +32 -0
- package/dist/server/compat/next/config-loader.js +25 -0
- package/dist/server/compat/next/config.js +10 -0
- package/dist/server/compat/next/constants.js +18 -0
- package/dist/server/compat/next/custom-server.js +10 -0
- package/dist/server/compat/next/dist/client/components/app-router-headers.js +48 -0
- package/dist/server/compat/next/dist/server/web/spec-extension/revalidate.js +27 -0
- package/dist/server/compat/next/dist/server/web/spec-extension/unstable-cache.js +25 -0
- package/dist/server/compat/next/dist/server/web/spec-extension/unstable-no-store.js +25 -0
- package/dist/server/compat/next/dynamic.js +32 -0
- package/dist/server/compat/next/error.js +112 -0
- package/dist/server/compat/next/font/cache.js +14 -0
- package/dist/server/compat/next/font/google.js +3 -0
- package/dist/server/compat/next/font/index.js +1 -0
- package/dist/server/compat/next/font/local.js +22 -0
- package/dist/server/compat/next/font/runtime-client.js +33 -0
- package/dist/server/compat/next/font/runtime.js +41 -0
- package/dist/server/compat/next/font/shared.js +22 -0
- package/dist/server/compat/next/form.js +129 -0
- package/dist/server/compat/next/head.js +10 -0
- package/dist/server/compat/next/headers.js +30 -0
- package/dist/server/compat/next/image/client.js +11 -0
- package/dist/server/compat/next/image/config.js +18 -0
- package/dist/server/compat/next/image/optimizer.js +25 -0
- package/dist/server/compat/next/image/patterns.js +12 -0
- package/dist/server/compat/next/image/props.js +16 -0
- package/dist/server/compat/next/image/shared.js +86 -0
- package/dist/server/compat/next/image/static-metadata.js +32 -0
- package/dist/server/compat/next/image/validate.js +8 -0
- package/dist/server/compat/next/image.js +59 -0
- package/dist/server/compat/next/index.js +1 -0
- package/dist/server/compat/next/legacy-image.js +78 -0
- package/dist/server/compat/next/legacy-request-apis.js +24 -0
- package/dist/server/compat/next/link-transform.js +14 -0
- package/dist/server/compat/next/link.js +14 -0
- package/dist/server/compat/next/navigation.js +190 -0
- package/dist/server/compat/next/offline.js +45 -0
- package/dist/server/compat/next/og.js +8 -0
- package/dist/server/compat/next/preferred-region.js +8 -0
- package/dist/server/compat/next/redirects.js +30 -0
- package/dist/server/compat/next/resource-hints.js +30 -0
- package/dist/server/compat/next/rewrites.js +41 -0
- package/dist/server/compat/next/root-params.js +121 -0
- package/dist/server/compat/next/route-state.js +23 -0
- package/dist/server/compat/next/router.js +103 -0
- package/dist/server/compat/next/script.js +37 -0
- package/dist/server/compat/next/server-only.js +1 -0
- package/dist/server/compat/next/server.js +131 -0
- package/dist/server/compat/next/svgr.js +14 -0
- package/dist/server/compat/next/telemetry.js +10 -0
- package/dist/server/compat/next/usage.js +13 -0
- package/dist/server/compat/next/user-agent.js +12 -0
- package/dist/server/compat/next/web-vitals.js +35 -0
- package/dist/server/compat/react/action-state.js +11 -0
- package/dist/server/compat/react/client-lite.js +83 -0
- package/dist/server/compat/react/client.js +131 -0
- package/dist/server/compat/react/compiler-runtime.js +42 -0
- package/dist/server/compat/react/dom-client.js +106 -0
- package/dist/server/compat/react/dom-react-server.js +37 -0
- package/dist/server/compat/react/dom-server.js +40 -0
- package/dist/server/compat/react/dom.js +52 -0
- package/dist/server/compat/react/hooks-extra.js +12 -0
- package/dist/server/compat/react/internals.js +14 -0
- package/dist/server/compat/react/parity.js +11 -0
- package/dist/server/compat/react/preact.js +113 -0
- package/dist/server/compat/react/react-server.js +133 -0
- package/dist/server/compat/react/router-shim.js +8 -0
- package/dist/server/compat/react/server-component-use.js +14 -0
- package/dist/server/compat/react/server-inserted-html.js +14 -0
- package/dist/server/compat/react/server.js +194 -0
- package/dist/server/compat/react/style-values.js +10 -0
- package/dist/server/compat/react/use.js +10 -0
- package/dist/server/compat/react/view-transition.js +12 -0
- package/dist/server/generation.json +1 -0
- package/package.json +4 -1
- package/src/api/dynamic.tsx +2 -0
- package/src/api/server.ts +24 -6
- package/src/cli/adapters/vercel-warm.ts +315 -61
- package/src/cli/adapters/vercel.ts +348 -71
- package/src/cli/build.ts +58 -33
- package/src/cli/index.ts +23 -10
- package/src/cli/serve/entry.ts +21 -159
- package/src/cli/serve/immutable.ts +31 -0
- package/src/cli/serve/pipeline.ts +82 -84
- package/src/cli/start.ts +3 -1
- package/src/client/chunk-fold.ts +19 -6
- package/src/client/react-tier.ts +3 -2
- package/src/client/reference-stub.ts +21 -2
- package/src/compat/actions/client-plugin.ts +4 -2
- package/src/compat/actions/config.ts +6 -5
- package/src/compat/actions/extensions.ts +2 -3
- package/src/compat/aliases.ts +8 -1
- package/src/compat/bundler/config.ts +88 -0
- package/src/compat/bundler/optimize-package-imports.ts +86 -26
- package/src/compat/bundler/relay-transform.ts +15 -3
- package/src/compat/cache-control.ts +16 -8
- package/src/compat/css/modules.ts +18 -5
- package/src/compat/lifecycle/error-funnel.ts +1 -1
- package/src/compat/lifecycle/instrumentation.ts +117 -24
- package/src/compat/lifecycle/testmode.ts +3 -2
- package/src/compat/next/config-loader.ts +137 -13
- package/src/compat/next/font/runtime.ts +22 -2
- package/src/compat/next/og.ts +3 -3
- package/src/compat/next/usage.ts +3 -2
- package/src/compat/pages/api.ts +83 -14
- package/src/compat/pages/router.ts +30 -14
- package/src/compat/register/bundler.ts +3 -1
- package/src/compat/register/middleware.ts +1 -1
- package/src/compat/register/otel.ts +5 -9
- package/src/compat/register/render.ts +3 -1
- package/src/compat/register/use-cache.ts +3 -1
- package/src/compat/release.ts +46 -0
- package/src/compat/segment/serve.ts +1 -1
- package/src/compat/validation/validate.ts +10 -7
- package/src/config.ts +51 -7
- package/src/css/assets.ts +213 -0
- package/src/css/build.ts +174 -238
- package/src/dev/server.ts +27 -8
- package/src/extensions.ts +4 -0
- package/src/render/hooks.ts +13 -0
- package/src/render/renderer.ts +52 -32
- package/src/request/context.ts +9 -0
- package/src/resolve/dynamic.ts +3 -1
- package/src/resolve/imports.ts +12 -52
- package/src/resolve/package-json.ts +56 -0
- package/src/resolve/scan-facts.ts +65 -0
- package/src/routing/href.ts +10 -3
- package/src/routing/match.ts +287 -0
- package/src/routing/metadata-files.ts +19 -5
- package/src/routing/proxy-config.ts +137 -0
- package/src/routing/proxy.ts +35 -134
- package/src/routing/routes.ts +22 -281
- package/src/runtime/fingerprint.ts +23 -8
- package/src/runtime/load.ts +170 -0
- package/src/runtime/loader.ts +215 -43
- package/src/runtime/module-cache.ts +13 -0
- package/src/runtime/modules.ts +370 -81
- package/src/runtime/prebundle.ts +81 -0
- package/src/runtime/production.ts +391 -0
- package/src/runtime/release-graph.ts +334 -0
- package/src/runtime/vendor-build.ts +724 -13
- package/src/runtime/vendor.ts +16 -3
- package/src/types.ts +2 -0
- package/src/utils/fs.ts +89 -3
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
contentType,
|
|
4
|
+
withForwardedHeaders
|
|
5
|
+
} from "./index-5hr4062s.js";
|
|
6
|
+
import {
|
|
7
|
+
immutableAssetPath,
|
|
8
|
+
immutableCacheControl
|
|
9
|
+
} from "./index-rcs322t1.js";
|
|
10
|
+
import {
|
|
11
|
+
handleRouteModule,
|
|
12
|
+
routeParamsFromPath
|
|
13
|
+
} from "./index-qpwsgt3a.js";
|
|
14
|
+
import {
|
|
15
|
+
isPprShellUpgradeEligible,
|
|
16
|
+
metadataRouteHandlerModule,
|
|
17
|
+
renderGlobalNotFoundResponse,
|
|
18
|
+
renderPageResponse,
|
|
19
|
+
renderPageWithStatus
|
|
20
|
+
} from "./index-3tf1xjsp.js";
|
|
21
|
+
import {
|
|
22
|
+
normalizePathname,
|
|
23
|
+
parseNavState,
|
|
24
|
+
selectRouteForRequest
|
|
25
|
+
} from "./index-jepjvcrf.js";
|
|
26
|
+
import {
|
|
27
|
+
applyProxyResponse,
|
|
28
|
+
createProxyRunner
|
|
29
|
+
} from "./index-kq8kpzye.js";
|
|
30
|
+
import {
|
|
31
|
+
importModuleOnce,
|
|
32
|
+
registerServerRuntime,
|
|
33
|
+
serverBundleTargetForRuntime
|
|
34
|
+
} from "./index-3xbr4eyv.js";
|
|
35
|
+
import {
|
|
36
|
+
publishEmittedAssets
|
|
37
|
+
} from "./index-y2jr2n72.js";
|
|
38
|
+
import {
|
|
39
|
+
getRenderSpanExtensions
|
|
40
|
+
} from "./index-web361b8.js";
|
|
41
|
+
import"./index-ye9hmsvf.js";
|
|
42
|
+
import {
|
|
43
|
+
setRequestRuntime
|
|
44
|
+
} from "./index-z88qv16t.js";
|
|
45
|
+
import"./index-yhxkxghe.js";
|
|
46
|
+
import"./index-fkp000p1.js";
|
|
47
|
+
import"./index-p77b4kcx.js";
|
|
48
|
+
import {
|
|
49
|
+
exactNameIndex,
|
|
50
|
+
hasExactName,
|
|
51
|
+
resolveManifest
|
|
52
|
+
} from "./index-20ppawv7.js";
|
|
53
|
+
import"./index-vz0km5qk.js";
|
|
54
|
+
import {
|
|
55
|
+
abortUpstreamFetchOnDisconnect,
|
|
56
|
+
bootstrapCompat
|
|
57
|
+
} from "./index-5gyr4emz.js";
|
|
58
|
+
import {
|
|
59
|
+
loadConfig,
|
|
60
|
+
pathToFileHref
|
|
61
|
+
} from "./index-x93hv0sc.js";
|
|
62
|
+
import {
|
|
63
|
+
markErrorLogged
|
|
64
|
+
} from "./index-jcsjq3d1.js";
|
|
65
|
+
import {
|
|
66
|
+
attachRelease,
|
|
67
|
+
releaseModuleHref
|
|
68
|
+
} from "./index-tqn2qnnn.js";
|
|
69
|
+
import"./index-ras0sdab.js";
|
|
70
|
+
import {
|
|
71
|
+
flushWorkUnit,
|
|
72
|
+
flushWorkUnitOnClose,
|
|
73
|
+
getWorkUnit,
|
|
74
|
+
runWithWorkUnit,
|
|
75
|
+
setPhase,
|
|
76
|
+
setWorkUnitRelease,
|
|
77
|
+
setWorkUnitRoute
|
|
78
|
+
} from "./index-grta8ap3.js";
|
|
79
|
+
import"./index-kresp2n8.js";
|
|
80
|
+
import"./index-e3a6yx84.js";
|
|
81
|
+
import"./index-pym1cezq.js";
|
|
82
|
+
import {
|
|
83
|
+
finalizeResponse,
|
|
84
|
+
getProxyExtensions,
|
|
85
|
+
getRenderExtensions,
|
|
86
|
+
getRequestExtensions,
|
|
87
|
+
reportRequestError,
|
|
88
|
+
runInitHooks,
|
|
89
|
+
setRequestExtensions,
|
|
90
|
+
withRouteRuntime
|
|
91
|
+
} from "./index-zqpqyg8p.js";
|
|
92
|
+
import"./index-qjj6gddn.js";
|
|
93
|
+
import"./index-4399bvd2.js";
|
|
94
|
+
import"./index-rt9qq1va.js";
|
|
95
|
+
|
|
96
|
+
// src/cli/serve/pipeline.ts
|
|
97
|
+
import { existsSync } from "fs";
|
|
98
|
+
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
99
|
+
import { stat } from "fs/promises";
|
|
100
|
+
import path from "path";
|
|
101
|
+
import { constants as zlibConstants, createGzip, gzipSync } from "zlib";
|
|
102
|
+
import { Readable } from "stream";
|
|
103
|
+
import {
|
|
104
|
+
canonicalTrailingSlashPath,
|
|
105
|
+
malformedUrlResponse,
|
|
106
|
+
repeatedSlashRedirect,
|
|
107
|
+
trailingSlashRedirect
|
|
108
|
+
} from "../../../src/routing/href.ts";
|
|
109
|
+
import { runWithCacheScope } from "../../../src/request/cache.ts";
|
|
110
|
+
async function createRequestHandler(options = {}) {
|
|
111
|
+
const config = options.config ?? await loadConfig(options.root, { serve: true });
|
|
112
|
+
await bootstrapCompat(config);
|
|
113
|
+
const manifestPath = path.join(config.outPath, "manifest.json");
|
|
114
|
+
const manifest = resolveManifest(options.manifest ?? JSON.parse(await readFile(manifestPath, "utf8")), config.outPath, config.root);
|
|
115
|
+
const release = attachRelease(config);
|
|
116
|
+
release.staticMetadataFiles = manifest.staticMetadataFiles;
|
|
117
|
+
const handlerHrefs = new Map(manifest.routes.filter((route) => route.kind === "handler").map((route) => [
|
|
118
|
+
route.id,
|
|
119
|
+
releaseModuleHref(release, "server", serverBundleTargetForRuntime(route.segmentConfig?.runtime), route.file)
|
|
120
|
+
]));
|
|
121
|
+
const persistManifest = async () => {
|
|
122
|
+
const stored = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
123
|
+
stored.staticFiles = manifest.staticFiles;
|
|
124
|
+
await writeFile(manifestPath, `${JSON.stringify(stored, null, 2)}
|
|
125
|
+
`);
|
|
126
|
+
};
|
|
127
|
+
runInitHooks(config);
|
|
128
|
+
publishEmittedAssets(config.outPath, manifest.assetNames);
|
|
129
|
+
const exactNames = exactNameIndex(config.outPath);
|
|
130
|
+
setRequestRuntime({ config, routes: manifest.routes, dev: false });
|
|
131
|
+
const proxyRunner = createProxyRunner(config, {
|
|
132
|
+
compiledModuleHref: manifest.proxyModule ? pathToFileHref(path.resolve(config.outPath, manifest.proxyModule)) : undefined,
|
|
133
|
+
released: release.proxy
|
|
134
|
+
});
|
|
135
|
+
const routesById = new Map(manifest.routes.map((route) => [route.id, route]));
|
|
136
|
+
const nextCompat = Boolean(config.compat?.next);
|
|
137
|
+
const regenerating = new Map;
|
|
138
|
+
async function regenerateStaticFile(pathname, file, relative, metadata, reason) {
|
|
139
|
+
if (!metadata.routeId)
|
|
140
|
+
return;
|
|
141
|
+
const route = routesById.get(metadata.routeId);
|
|
142
|
+
if (!route)
|
|
143
|
+
return;
|
|
144
|
+
await runWithWorkUnit("render", async () => {
|
|
145
|
+
setWorkUnitRelease(release);
|
|
146
|
+
const url = new URL(`http://pnext.local${pathname}`);
|
|
147
|
+
const params = routeParamsFromPath(route, pathname);
|
|
148
|
+
const fetchCache = route.segmentConfig?.fetchCache;
|
|
149
|
+
try {
|
|
150
|
+
if (route.kind === "handler") {
|
|
151
|
+
setWorkUnitRoute("route-handler", "isr", { revalidateReason: reason });
|
|
152
|
+
setPhase("handler");
|
|
153
|
+
await registerServerRuntime(config, route.sourceFiles);
|
|
154
|
+
const module = await importModuleOnce(handlerHrefs.get(route.id));
|
|
155
|
+
const rendered = await getRenderExtensions().collectRenderMeta(() => withRouteRuntime(route.segmentConfig?.runtime, () => runWithCacheScope(() => handleRouteModule(module, new Request(url), params, { routeFile: route.file }))), { fetchCache, blockingStaleFetches: true, route: pathname, handler: true });
|
|
156
|
+
if (rendered.value.status >= 500)
|
|
157
|
+
return;
|
|
158
|
+
await writeFile(file, new Uint8Array(await rendered.value.arrayBuffer()));
|
|
159
|
+
manifest.staticFiles[relative] = {
|
|
160
|
+
...metadata,
|
|
161
|
+
status: rendered.value.status,
|
|
162
|
+
headers: [...rendered.value.headers.entries()],
|
|
163
|
+
...rendered.tags.length > 0 ? { tags: rendered.tags } : {}
|
|
164
|
+
};
|
|
165
|
+
} else {
|
|
166
|
+
setWorkUnitRoute("html", "isr", { revalidateReason: reason });
|
|
167
|
+
setPhase("render");
|
|
168
|
+
const rendered = await getRenderExtensions().collectRenderMeta(() => withRouteRuntime(route.segmentConfig?.runtime, () => renderPageWithStatus({
|
|
169
|
+
config,
|
|
170
|
+
route,
|
|
171
|
+
params,
|
|
172
|
+
url,
|
|
173
|
+
...route.usesRequest ? { request: new Request(url) } : {},
|
|
174
|
+
staticMetadataFiles: manifest.staticMetadataFiles,
|
|
175
|
+
staticModuleMetadata: manifest.staticModuleMetadata,
|
|
176
|
+
staticRouteMetadata: manifest.staticRouteMetadata
|
|
177
|
+
})), { fetchCache, blockingStaleFetches: true, route: pathname });
|
|
178
|
+
if (rendered.value.status >= 500)
|
|
179
|
+
return;
|
|
180
|
+
await writeFile(file, rendered.value.html);
|
|
181
|
+
manifest.staticFiles[relative] = {
|
|
182
|
+
...metadata,
|
|
183
|
+
status: rendered.value.status,
|
|
184
|
+
...rendered.tags.length > 0 ? { tags: rendered.tags } : {}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
} catch (error) {
|
|
188
|
+
const unit = getWorkUnit();
|
|
189
|
+
await reportRequestError(error, { method: "GET", url: url.href, headers: new Headers }, {
|
|
190
|
+
phase: unit?.phase,
|
|
191
|
+
routeKind: unit?.routeKind,
|
|
192
|
+
...unit?.responseHints ?? {}
|
|
193
|
+
});
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function runRegeneration(pathname, file, relative, metadata, reason) {
|
|
199
|
+
const existing = regenerating.get(file);
|
|
200
|
+
if (existing)
|
|
201
|
+
return existing;
|
|
202
|
+
const task = regenerateStaticFile(pathname, file, relative, metadata, reason).catch((error) => {
|
|
203
|
+
console.warn(`pnext start: background revalidate failed for ${pathname}:`, error);
|
|
204
|
+
}).finally(() => {
|
|
205
|
+
regenerating.delete(file);
|
|
206
|
+
});
|
|
207
|
+
regenerating.set(file, task);
|
|
208
|
+
return task;
|
|
209
|
+
}
|
|
210
|
+
function scheduleRegen(pathname, file, relative, metadata) {
|
|
211
|
+
runRegeneration(pathname, file, relative, metadata, "stale");
|
|
212
|
+
}
|
|
213
|
+
setRequestExtensions({
|
|
214
|
+
onDemandRevalidatePath: async (pathname) => {
|
|
215
|
+
const built = await builtFileInfo(config.outPath, pathname, manifest.staticFiles, false, exactNames);
|
|
216
|
+
if (!built?.metadata)
|
|
217
|
+
return;
|
|
218
|
+
await runRegeneration(pathname, built.file, built.relative, built.metadata, "on-demand");
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
async function renderNotFound(request) {
|
|
222
|
+
const built = await maybeBuiltFile(config.outPath, "/404", manifest.staticFiles, request.method, request.headers, nextCompat, manifest.publicAssets, exactNames);
|
|
223
|
+
if (built) {
|
|
224
|
+
setWorkUnitRoute("html", "static");
|
|
225
|
+
const headers = new Headers(built.headers);
|
|
226
|
+
headers.set("x-nextjs-cache", "HIT");
|
|
227
|
+
if (!hasBuildCapturedCacheControl(manifest.staticFiles?.["404.html"])) {
|
|
228
|
+
headers.delete("cache-control");
|
|
229
|
+
}
|
|
230
|
+
headers.delete("content-length");
|
|
231
|
+
return compressResponse(new Response(built.body, { status: 404, headers }), request);
|
|
232
|
+
}
|
|
233
|
+
return compressResponse(await renderGlobalNotFoundResponse({
|
|
234
|
+
config,
|
|
235
|
+
url: new URL(request.url),
|
|
236
|
+
request,
|
|
237
|
+
staticMetadataFiles: manifest.staticMetadataFiles,
|
|
238
|
+
staticModuleMetadata: manifest.staticModuleMetadata,
|
|
239
|
+
staticRouteMetadata: manifest.staticRouteMetadata
|
|
240
|
+
}), request);
|
|
241
|
+
}
|
|
242
|
+
return function handleRequest(request, server) {
|
|
243
|
+
return runWithWorkUnit("render", async () => {
|
|
244
|
+
const unit = getWorkUnit();
|
|
245
|
+
setWorkUnitRelease(release);
|
|
246
|
+
try {
|
|
247
|
+
const raw = await handle(request, server);
|
|
248
|
+
const finalized = await finalizeResponse(raw, { method: request.method, url: new URL(request.url), headers: request.headers }, {
|
|
249
|
+
routeKind: unit?.routeKind ?? "html",
|
|
250
|
+
routeMode: unit?.routeMode,
|
|
251
|
+
hints: unit?.responseHints
|
|
252
|
+
});
|
|
253
|
+
const response = maybeCloseNodeFetchConnection(finalized, request);
|
|
254
|
+
abortUpstreamFetchOnDisconnect(response.body, request.signal);
|
|
255
|
+
return flushWorkUnitOnClose(response, unit, request.signal);
|
|
256
|
+
} catch (error) {
|
|
257
|
+
await reportRequestError(error, { method: request.method, url: request.url, headers: request.headers }, { phase: unit?.phase, routeKind: unit?.routeKind });
|
|
258
|
+
if (markErrorLogged(error)) {
|
|
259
|
+
console.error(`pnext start: request failed for ${request.url}:`, error);
|
|
260
|
+
}
|
|
261
|
+
flushWorkUnit(unit);
|
|
262
|
+
return new Response("Internal Server Error", { status: 500 });
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
};
|
|
266
|
+
async function handle(request, server) {
|
|
267
|
+
const badRequest = malformedUrlResponse(request);
|
|
268
|
+
if (badRequest)
|
|
269
|
+
return badRequest;
|
|
270
|
+
request = withForwardedHeaders(request, server);
|
|
271
|
+
const requestedUrl = new URL(request.url);
|
|
272
|
+
const slashRedirect = repeatedSlashRedirect(requestedUrl);
|
|
273
|
+
if (slashRedirect)
|
|
274
|
+
return slashRedirect;
|
|
275
|
+
const assetStripped = stripAssetPrefix(request, config.assetPrefix);
|
|
276
|
+
if (assetStripped)
|
|
277
|
+
request = assetStripped;
|
|
278
|
+
if (config.basePath && !assetStripped) {
|
|
279
|
+
const stripped = stripBasePath(request, config.basePath);
|
|
280
|
+
if (!stripped) {
|
|
281
|
+
const answered = await runOutsideBasePathInterceptors(request, config);
|
|
282
|
+
if (answered instanceof Response)
|
|
283
|
+
return answered;
|
|
284
|
+
const rewritten2 = answered && stripBasePath(answered.request, config.basePath);
|
|
285
|
+
if (!rewritten2)
|
|
286
|
+
return await renderNotFound(request);
|
|
287
|
+
request = rewritten2;
|
|
288
|
+
} else {
|
|
289
|
+
request = stripped;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
const skipProxyNormalize = getProxyExtensions().skipUrlNormalize();
|
|
293
|
+
if (nextCompat && !skipProxyNormalize) {
|
|
294
|
+
request = normalizeDataRequest(request, config) ?? request;
|
|
295
|
+
}
|
|
296
|
+
const bypassToken = getRequestExtensions().revalidateBypassToken();
|
|
297
|
+
const revalidateBypass = Boolean(bypassToken && request.headers.get("x-prerender-revalidate") === bypassToken);
|
|
298
|
+
const canonicalRedirect = trailingSlashRedirect(config, requestedUrl);
|
|
299
|
+
if (canonicalRedirect)
|
|
300
|
+
return canonicalRedirect;
|
|
301
|
+
const canonicalUrl = new URL(request.url);
|
|
302
|
+
const canonicalHeaders = request.headers;
|
|
303
|
+
let proxyResponse;
|
|
304
|
+
const proxyResult = revalidateBypass ? undefined : await proxyRunner(request);
|
|
305
|
+
if (proxyResult instanceof Response)
|
|
306
|
+
return proxyResult;
|
|
307
|
+
if (proxyResult) {
|
|
308
|
+
request = proxyResult.request;
|
|
309
|
+
proxyResponse = proxyResult.response;
|
|
310
|
+
}
|
|
311
|
+
if (nextCompat && skipProxyNormalize) {
|
|
312
|
+
request = normalizeDataRequest(request, config) ?? request;
|
|
313
|
+
}
|
|
314
|
+
for (const interceptor of getRequestExtensions().interceptors) {
|
|
315
|
+
const result = await interceptor(request, { config });
|
|
316
|
+
if (result instanceof Response)
|
|
317
|
+
return applyProxyResponse(compressResponse(result, request), proxyResponse);
|
|
318
|
+
if (result)
|
|
319
|
+
request = result.request;
|
|
320
|
+
}
|
|
321
|
+
let url = new URL(request.url);
|
|
322
|
+
const rewritten = url.href !== canonicalUrl.href;
|
|
323
|
+
const canonicalRequestUrl = new URL(canonicalUrl);
|
|
324
|
+
canonicalRequestUrl.search = url.search;
|
|
325
|
+
const canonicalRequest = canonicalRequestUrl.href === request.url ? request : new Request(canonicalRequestUrl, { headers: canonicalHeaders });
|
|
326
|
+
const method = request.method.toUpperCase();
|
|
327
|
+
const nav = parseNavState(request);
|
|
328
|
+
const selection = selectRouteForRequest(manifest.routes, url.pathname, nav);
|
|
329
|
+
const softDynamic = Boolean(nav && selection?.route.kind === "page" && (selection.route.slotDirs?.length || selection.route.synthetic || selection.route.interception || selection.childrenPath !== normalizePathname(url.pathname)));
|
|
330
|
+
const pprDocumentResume = selection?.route.kind === "page" && selection.route.ppr;
|
|
331
|
+
const draftBypass = hasDraftBypassCookie(request.headers);
|
|
332
|
+
const built = method === "GET" || method === "HEAD" ? await builtFileInfo(config.outPath, url.pathname, manifest.staticFiles, nextCompat, exactNames) : null;
|
|
333
|
+
const hardStaticStale = built !== null && !isImmutableAssetFile(built.relative) && getRequestExtensions().staticStaleness(url.pathname, built.mtimeMs, built.metadata?.tags ?? []);
|
|
334
|
+
const staleReason = built ? getRequestExtensions().staticStalenessReason(url.pathname, built.mtimeMs, built.metadata?.tags ?? []) ?? "on-demand" : undefined;
|
|
335
|
+
const softStale = staleReason === "soft";
|
|
336
|
+
const staleOnDemand = hardStaticStale && !softStale;
|
|
337
|
+
const hardExpired = built?.metadata?.expireSeconds !== undefined && isHtmlPageFile(built.file) && Date.now() - built.mtimeMs >= built.metadata.expireSeconds * 1000;
|
|
338
|
+
const builtIsPageHtml = built !== null && isHtmlPageFile(built.file);
|
|
339
|
+
if (built && !staleOnDemand && !(softDynamic && builtIsPageHtml) && !(pprDocumentResume && builtIsPageHtml) && !hardExpired && !revalidateBypass) {
|
|
340
|
+
const servedBuilt = built;
|
|
341
|
+
const metadata = built.metadata;
|
|
342
|
+
const route = metadata?.routeId ? routesById.get(metadata.routeId) : undefined;
|
|
343
|
+
if (route?.segmentConfig?.runtime === "edge" || route?.segmentConfig?.runtime === "experimental-edge") {
|
|
344
|
+
withRouteRuntime(route.segmentConfig.runtime, () => {
|
|
345
|
+
return;
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
const staticFile = await maybeBuiltFile(config.outPath, url.pathname, manifest.staticFiles, request.method, request.headers, nextCompat, manifest.publicAssets, exactNames);
|
|
349
|
+
if (staticFile && !(draftBypass && isHtmlResponse(staticFile))) {
|
|
350
|
+
const staticMode = servedBuilt.metadata?.revalidateSeconds !== undefined ? "isr" : "static";
|
|
351
|
+
setWorkUnitRoute(isHtmlResponse(staticFile) ? "html" : "static-asset", staticMode, servedBuilt.metadata?.revalidateSeconds !== undefined ? { revalidateSeconds: servedBuilt.metadata.revalidateSeconds } : undefined);
|
|
352
|
+
if (isHtmlResponse(staticFile) && !hasBuildCapturedCacheControl(servedBuilt.metadata)) {
|
|
353
|
+
staticFile.headers.delete("cache-control");
|
|
354
|
+
}
|
|
355
|
+
if (servedBuilt.metadata) {
|
|
356
|
+
const servedTtl = servedBuilt.metadata.revalidateSeconds;
|
|
357
|
+
const expired = softStale || servedTtl !== undefined && Date.now() - servedBuilt.mtimeMs >= servedTtl * 1000;
|
|
358
|
+
if (expired) {
|
|
359
|
+
scheduleRegen(url.pathname, servedBuilt.file, servedBuilt.relative, servedBuilt.metadata);
|
|
360
|
+
staticFile.headers.set("x-nextjs-cache", "STALE");
|
|
361
|
+
} else {
|
|
362
|
+
staticFile.headers.set("x-nextjs-cache", "HIT");
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return applyProxyResponse(compressResponse(staticFile, request), proxyResponse);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
if (url.pathname.startsWith("/_next/static/") && !built) {
|
|
369
|
+
setWorkUnitRoute("static-asset");
|
|
370
|
+
return applyProxyResponse(new Response("Not Found", {
|
|
371
|
+
status: 404,
|
|
372
|
+
headers: {
|
|
373
|
+
"cache-control": "private, no-cache, no-store, max-age=0, must-revalidate",
|
|
374
|
+
"content-type": "text/plain;charset=utf-8"
|
|
375
|
+
}
|
|
376
|
+
}), proxyResponse);
|
|
377
|
+
}
|
|
378
|
+
const stalePage = built && (staleOnDemand || hardExpired) && isHtmlPageFile(built.file) ? built.file : null;
|
|
379
|
+
const matched = selection;
|
|
380
|
+
if (!matched) {
|
|
381
|
+
return applyProxyResponse(await renderNotFound(canonicalRequest), proxyResponse);
|
|
382
|
+
}
|
|
383
|
+
if (matched.route.kind === "handler") {
|
|
384
|
+
setWorkUnitRoute("route-handler", staleOnDemand ? "isr" : routeModeOf(matched.route), responseHintsFor(matched.route, staleReason));
|
|
385
|
+
setPhase("handler");
|
|
386
|
+
const renderedHandler = await getRenderExtensions().collectRenderMeta(() => handleRoute(config, matched.route, handlerHrefs.get(matched.route.id), canonicalRequest, matched.params), {
|
|
387
|
+
fetchCache: matched.route.segmentConfig?.fetchCache,
|
|
388
|
+
refreshFetches: staleOnDemand,
|
|
389
|
+
route: url.pathname,
|
|
390
|
+
handler: true
|
|
391
|
+
});
|
|
392
|
+
const handlerResponse = renderedHandler.value;
|
|
393
|
+
if (built && staleOnDemand && !stalePage && method === "GET" && handlerResponse.status === 200) {
|
|
394
|
+
try {
|
|
395
|
+
await writeFile(built.file, new Uint8Array(await handlerResponse.clone().arrayBuffer()));
|
|
396
|
+
handlerResponse.headers.set("x-nextjs-cache", "MISS");
|
|
397
|
+
} catch {}
|
|
398
|
+
}
|
|
399
|
+
if (!built && matched.route.hasStaticParams && matched.route.segmentConfig?.dynamic !== "force-dynamic" && matched.route.segmentConfig?.revalidate !== 0 && method === "GET" && handlerResponse.status < 500) {
|
|
400
|
+
const file = lazyStaticHandlerPath(config.outPath, url.pathname);
|
|
401
|
+
try {
|
|
402
|
+
if (!file)
|
|
403
|
+
throw new Error("unsafe path");
|
|
404
|
+
await mkdir(path.dirname(file), { recursive: true });
|
|
405
|
+
await writeFile(file, new Uint8Array(await handlerResponse.clone().arrayBuffer()));
|
|
406
|
+
const relative = path.relative(path.join(config.outPath, "public"), file).split(path.sep).join("/");
|
|
407
|
+
const routeRevalidate = matched.route.segmentConfig?.revalidate;
|
|
408
|
+
const revalidateSeconds = typeof routeRevalidate === "number" && routeRevalidate > 0 ? renderedHandler.revalidateSeconds === undefined ? routeRevalidate : Math.min(routeRevalidate, renderedHandler.revalidateSeconds) : renderedHandler.revalidateSeconds;
|
|
409
|
+
manifest.staticFiles ??= {};
|
|
410
|
+
manifest.staticFiles[relative] = {
|
|
411
|
+
status: handlerResponse.status,
|
|
412
|
+
headers: [...handlerResponse.headers.entries()],
|
|
413
|
+
routeId: matched.route.id,
|
|
414
|
+
...revalidateSeconds !== undefined ? { revalidateSeconds } : {},
|
|
415
|
+
...renderedHandler.tags.length > 0 ? { tags: renderedHandler.tags } : {}
|
|
416
|
+
};
|
|
417
|
+
await persistManifest();
|
|
418
|
+
handlerResponse.headers.set("x-nextjs-cache", "MISS");
|
|
419
|
+
} catch {}
|
|
420
|
+
}
|
|
421
|
+
return applyProxyResponse(handlerResponse, proxyResponse);
|
|
422
|
+
}
|
|
423
|
+
if (matched.route.segmentConfig?.dynamic === "error" && matched.route.usesRequest) {
|
|
424
|
+
return applyProxyResponse(new Response(`Page with dynamic = "error" encountered dynamic data method on ${url.pathname}`, { status: 500 }), proxyResponse);
|
|
425
|
+
}
|
|
426
|
+
if (!dynamicParamsAllowed(matched.route, matched.params)) {
|
|
427
|
+
return applyProxyResponse(await renderNotFound(canonicalRequest), proxyResponse);
|
|
428
|
+
}
|
|
429
|
+
const forceStaticRoute = matched.route.segmentConfig?.dynamic === "force-static";
|
|
430
|
+
const renderUrl = forceStaticRoute ? new URL(canonicalUrl.pathname, canonicalUrl.origin) : canonicalRequestUrl;
|
|
431
|
+
const renderRequest = forceStaticRoute ? new Request(renderUrl) : method === "POST" ? new Request(canonicalRequest.url, { headers: canonicalRequest.headers }) : canonicalRequest;
|
|
432
|
+
const pageRevalidateReason = stalePage ? staleReason : hardExpired ? "on-demand" : undefined;
|
|
433
|
+
setWorkUnitRoute("html", pageRevalidateReason ? "isr" : routeModeOf(matched.route), responseHintsFor(matched.route, pageRevalidateReason));
|
|
434
|
+
const renderMatchedPage = () => withRouteRuntime(matched.route.segmentConfig?.runtime, () => renderPageResponse({
|
|
435
|
+
config,
|
|
436
|
+
route: matched.route,
|
|
437
|
+
params: matched.params,
|
|
438
|
+
url: renderUrl,
|
|
439
|
+
request: renderRequest,
|
|
440
|
+
staticMetadataFiles: manifest.staticMetadataFiles,
|
|
441
|
+
staticModuleMetadata: manifest.staticModuleMetadata,
|
|
442
|
+
staticRouteMetadata: manifest.staticRouteMetadata,
|
|
443
|
+
...nav || rewritten ? {
|
|
444
|
+
nav: {
|
|
445
|
+
...nav ? { soft: true, state: nav } : {},
|
|
446
|
+
childrenPath: matched.childrenPath,
|
|
447
|
+
targetPath: matched.targetPath
|
|
448
|
+
}
|
|
449
|
+
} : {}
|
|
450
|
+
}));
|
|
451
|
+
const renderedPage = await getRenderExtensions().collectRenderMeta(renderMatchedPage, {
|
|
452
|
+
fetchCache: matched.route.segmentConfig?.fetchCache,
|
|
453
|
+
refreshFetches: Boolean(stalePage),
|
|
454
|
+
route: url.pathname
|
|
455
|
+
});
|
|
456
|
+
const renderRevalidateSeconds = renderedPage.revalidateSeconds ?? (typeof matched.route.segmentConfig?.revalidate === "number" ? matched.route.segmentConfig.revalidate : undefined);
|
|
457
|
+
const renderWasDynamic = matched.route.mode === "dynamic" || matched.route.usesRequest || renderedPage.noStore === true;
|
|
458
|
+
if (renderRevalidateSeconds !== undefined && renderRevalidateSeconds > 0 && !renderWasDynamic) {
|
|
459
|
+
setWorkUnitRoute("html", "isr", {
|
|
460
|
+
...getWorkUnit()?.responseHints ?? {},
|
|
461
|
+
revalidateSeconds: renderRevalidateSeconds
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
const pageResponse = renderedPage.value;
|
|
465
|
+
if (matched.route.linkHeader && !pageResponse.headers.has("link")) {
|
|
466
|
+
pageResponse.headers.set("link", matched.route.linkHeader);
|
|
467
|
+
}
|
|
468
|
+
const cacheLifeHeaders = cacheLifeResponseHeaders(matched.route.cacheLife);
|
|
469
|
+
if (cacheLifeHeaders.length > 0 && matched.route.kind === "page") {
|
|
470
|
+
for (const [key, value] of cacheLifeHeaders) {
|
|
471
|
+
if (key === "cache-control" && pageResponse.headers.has("cache-control"))
|
|
472
|
+
continue;
|
|
473
|
+
pageResponse.headers.set(key, value);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
const lazyStaticCapable = matched.route.kind === "page" && !isPprShellUpgradeEligible(config, matched.route, url) && (forceStaticRoute || !matched.route.usesRequest && matched.route.segmentConfig?.runtime !== "edge" && (matched.route.hasStaticParams || matched.route.mode === "static"));
|
|
477
|
+
if (!stalePage && !built && !nav && !draftBypass && lazyStaticCapable && !renderedPage.noStore && method === "GET" && url.search === "" && pageResponse.status === 200 && (pageResponse.headers.get("content-type") ?? "").includes("text/html")) {
|
|
478
|
+
try {
|
|
479
|
+
const file = lazyStaticHtmlPath(config.outPath, url.pathname);
|
|
480
|
+
if (!file)
|
|
481
|
+
throw new Error("unsafe path");
|
|
482
|
+
await mkdir(path.dirname(file), { recursive: true });
|
|
483
|
+
await writeFile(file, await pageResponse.clone().text());
|
|
484
|
+
const relative = path.relative(path.join(config.outPath, "public"), file).split(path.sep).join("/");
|
|
485
|
+
manifest.staticFiles ??= {};
|
|
486
|
+
manifest.staticFiles[relative] = {
|
|
487
|
+
status: 200,
|
|
488
|
+
headers: [
|
|
489
|
+
...matched.route.linkHeader ? [["link", matched.route.linkHeader]] : [],
|
|
490
|
+
...cacheLifeHeaders
|
|
491
|
+
],
|
|
492
|
+
routeId: matched.route.id,
|
|
493
|
+
kind: "page",
|
|
494
|
+
...renderedPage.revalidateSeconds !== undefined ? { revalidateSeconds: renderedPage.revalidateSeconds } : {},
|
|
495
|
+
...matched.route.cacheLife?.expireSeconds !== undefined ? { expireSeconds: matched.route.cacheLife.expireSeconds } : {},
|
|
496
|
+
...matched.route.cacheLife?.staleSeconds !== undefined ? { staleSeconds: matched.route.cacheLife.staleSeconds } : {},
|
|
497
|
+
...renderedPage.tags.length > 0 ? { tags: renderedPage.tags } : {}
|
|
498
|
+
};
|
|
499
|
+
pageResponse.headers.set("x-nextjs-cache", "MISS");
|
|
500
|
+
} catch {}
|
|
501
|
+
}
|
|
502
|
+
if (stalePage && !nav && !softDynamic && !draftBypass && method === "GET" && pageResponse.status === 200 && (pageResponse.headers.get("content-type") ?? "").includes("text/html")) {
|
|
503
|
+
try {
|
|
504
|
+
await writeFile(stalePage, await pageResponse.clone().text());
|
|
505
|
+
pageResponse.headers.set("x-nextjs-cache", "MISS");
|
|
506
|
+
} catch {}
|
|
507
|
+
}
|
|
508
|
+
if (revalidateBypass) {
|
|
509
|
+
if (built && method === "GET" && pageResponse.status === 200 && (pageResponse.headers.get("content-type") ?? "").includes("text/html")) {
|
|
510
|
+
try {
|
|
511
|
+
await writeFile(built.file, await pageResponse.clone().text());
|
|
512
|
+
} catch {}
|
|
513
|
+
}
|
|
514
|
+
pageResponse.headers.set("x-nextjs-cache", "REVALIDATED");
|
|
515
|
+
}
|
|
516
|
+
return applyProxyResponse(compressResponse(pageResponse, request), proxyResponse);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
function normalizeDataRequest(request, config) {
|
|
520
|
+
const method = request.method.toUpperCase();
|
|
521
|
+
if (method !== "GET" && method !== "HEAD")
|
|
522
|
+
return null;
|
|
523
|
+
const url = new URL(request.url);
|
|
524
|
+
const match = /^\/_next\/data\/[^/]+(\/.+)\.json$/.exec(url.pathname);
|
|
525
|
+
if (!match)
|
|
526
|
+
return null;
|
|
527
|
+
const page = match[1] === "/index" ? "/" : match[1];
|
|
528
|
+
url.pathname = canonicalTrailingSlashPath(page, Boolean(config.trailingSlash));
|
|
529
|
+
const headers = new Headers(request.headers);
|
|
530
|
+
headers.set("x-nextjs-data", "1");
|
|
531
|
+
return new Request(url, { method, headers });
|
|
532
|
+
}
|
|
533
|
+
async function runOutsideBasePathInterceptors(request, config) {
|
|
534
|
+
for (const interceptor of getRequestExtensions().outsideBasePathInterceptors) {
|
|
535
|
+
const result = await interceptor(request, { config, outsideBasePath: true });
|
|
536
|
+
if (result)
|
|
537
|
+
return result;
|
|
538
|
+
}
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
function stripBasePath(request, basePath) {
|
|
542
|
+
const url = new URL(request.url);
|
|
543
|
+
const { pathname } = url;
|
|
544
|
+
if (pathname !== basePath && !pathname.startsWith(`${basePath}/`))
|
|
545
|
+
return null;
|
|
546
|
+
url.pathname = pathname.slice(basePath.length) || "/";
|
|
547
|
+
return new Request(url, request);
|
|
548
|
+
}
|
|
549
|
+
function stripAssetPrefix(request, assetPrefix) {
|
|
550
|
+
if (!assetPrefix)
|
|
551
|
+
return null;
|
|
552
|
+
let prefixValue = assetPrefix;
|
|
553
|
+
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(assetPrefix)) {
|
|
554
|
+
prefixValue = new URL(assetPrefix).pathname;
|
|
555
|
+
}
|
|
556
|
+
const prefix = `/${prefixValue.replace(/^\/+|\/+$/g, "")}`;
|
|
557
|
+
if (prefix === "/")
|
|
558
|
+
return null;
|
|
559
|
+
const url = new URL(request.url);
|
|
560
|
+
const { pathname } = url;
|
|
561
|
+
if (!pathname.startsWith(`${prefix}/assets/`) && !pathname.startsWith(`${prefix}/_next/static/`)) {
|
|
562
|
+
return null;
|
|
563
|
+
}
|
|
564
|
+
url.pathname = pathname.slice(prefix.length);
|
|
565
|
+
return new Request(url, request);
|
|
566
|
+
}
|
|
567
|
+
function maybeCloseNodeFetchConnection(response, request) {
|
|
568
|
+
const userAgent = request.headers.get("user-agent") ?? "";
|
|
569
|
+
if (!userAgent.includes("node-fetch"))
|
|
570
|
+
return response;
|
|
571
|
+
response.headers.set("connection", "close");
|
|
572
|
+
return response;
|
|
573
|
+
}
|
|
574
|
+
async function handleRoute(config, route, href, request, params) {
|
|
575
|
+
return withRouteRuntime(route.segmentConfig?.runtime, async () => {
|
|
576
|
+
await registerServerRuntime(config, route.sourceFiles);
|
|
577
|
+
const spans = getRenderSpanExtensions();
|
|
578
|
+
const module = await spans.withFindPageComponentsSpan(route.route, async () => {
|
|
579
|
+
const imported = await importModuleOnce(href);
|
|
580
|
+
return metadataRouteHandlerModule(imported, route) ?? imported;
|
|
581
|
+
});
|
|
582
|
+
return spans.withRouteHandlerSpan(route.route, () => runWithCacheScope(() => handleRouteModule(module, request, params, { routeFile: route.file })));
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
function hasDraftBypassCookie(headers) {
|
|
586
|
+
return /(?:^|;\s*)__prerender_bypass=/.test(headers.get("cookie") ?? "");
|
|
587
|
+
}
|
|
588
|
+
function isHtmlResponse(response) {
|
|
589
|
+
return (response.headers.get("content-type") ?? "").includes("text/html");
|
|
590
|
+
}
|
|
591
|
+
function routeModeOf(route) {
|
|
592
|
+
if (route.segmentConfig?.dynamic === "force-dynamic")
|
|
593
|
+
return "dynamic";
|
|
594
|
+
const revalidate = route.segmentConfig?.revalidate;
|
|
595
|
+
if (typeof revalidate === "number" && revalidate > 0)
|
|
596
|
+
return "isr";
|
|
597
|
+
return route.mode === "static" ? "static" : "dynamic";
|
|
598
|
+
}
|
|
599
|
+
function responseHintsFor(route, revalidateReason) {
|
|
600
|
+
const runtime = route.segmentConfig?.runtime;
|
|
601
|
+
const revalidate = route.segmentConfig?.revalidate;
|
|
602
|
+
if (!revalidateReason && !runtime && typeof revalidate !== "number")
|
|
603
|
+
return;
|
|
604
|
+
return {
|
|
605
|
+
...revalidateReason ? { revalidateReason } : {},
|
|
606
|
+
...runtime ? { runtime } : {},
|
|
607
|
+
...typeof revalidate === "number" && revalidate > 0 ? { revalidateSeconds: revalidate } : {}
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
function hasBuildCapturedCacheControl(metadata) {
|
|
611
|
+
return (metadata?.headers ?? []).some(([key]) => key.toLowerCase() === "cache-control");
|
|
612
|
+
}
|
|
613
|
+
async function builtFileInfo(outPath, pathname, staticFiles = {}, nextStaticFallback = false, exactNames) {
|
|
614
|
+
const file = await firstFile(path.join(outPath, "public"), builtFileCandidates(outPath, pathname, nextStaticFallback), exactNames);
|
|
615
|
+
if (!file)
|
|
616
|
+
return null;
|
|
617
|
+
const publicPath = path.join(outPath, "public");
|
|
618
|
+
const fileStat = await stat(file);
|
|
619
|
+
const relative = path.relative(publicPath, file).split(path.sep).join("/");
|
|
620
|
+
return { file, relative, mtimeMs: fileStat.mtimeMs, metadata: staticFiles[relative] };
|
|
621
|
+
}
|
|
622
|
+
function builtFileCandidates(outPath, pathname, nextStaticFallback = false) {
|
|
623
|
+
const publicPath = path.join(outPath, "public");
|
|
624
|
+
const trimmed = pathname.replace(/^\/+/, "");
|
|
625
|
+
if (pathname === "/")
|
|
626
|
+
return [path.join(publicPath, "index.html")];
|
|
627
|
+
const candidates = [
|
|
628
|
+
path.join(publicPath, trimmed, "index.html"),
|
|
629
|
+
path.join(publicPath, trimmed),
|
|
630
|
+
path.join(publicPath, `${trimmed.replace(/\/+$/, "")}.html`)
|
|
631
|
+
];
|
|
632
|
+
try {
|
|
633
|
+
const decoded = decodeURIComponent(trimmed);
|
|
634
|
+
if (decoded !== trimmed && !decoded.split("/").some((seg) => seg === ".." || seg === "")) {
|
|
635
|
+
candidates.push(path.join(publicPath, decoded, "index.html"), path.join(publicPath, `${decoded.replace(/\/+$/, "")}.html`));
|
|
636
|
+
}
|
|
637
|
+
} catch {}
|
|
638
|
+
if (nextStaticFallback && trimmed.startsWith("_next/static/")) {
|
|
639
|
+
const asset = trimmed.slice("_next/static/".length);
|
|
640
|
+
candidates.push(path.join(publicPath, "assets", asset));
|
|
641
|
+
}
|
|
642
|
+
return candidates;
|
|
643
|
+
}
|
|
644
|
+
function lazyStaticHtmlPath(outPath, pathname) {
|
|
645
|
+
const publicPath = path.join(outPath, "public");
|
|
646
|
+
const file = pathname === "/" ? path.join(publicPath, "index.html") : path.join(publicPath, pathname.replace(/^\/+|\/+$/g, ""), "index.html");
|
|
647
|
+
const relative = path.relative(publicPath, file);
|
|
648
|
+
if (relative.startsWith("..") || path.isAbsolute(relative))
|
|
649
|
+
return null;
|
|
650
|
+
return file;
|
|
651
|
+
}
|
|
652
|
+
function lazyStaticHandlerPath(outPath, pathname) {
|
|
653
|
+
if (pathname === "/")
|
|
654
|
+
return null;
|
|
655
|
+
const publicPath = path.join(outPath, "public");
|
|
656
|
+
const file = path.join(publicPath, pathname.replace(/^\/+|\/+$/g, ""));
|
|
657
|
+
const relative = path.relative(publicPath, file);
|
|
658
|
+
if (relative.startsWith("..") || path.isAbsolute(relative))
|
|
659
|
+
return null;
|
|
660
|
+
return file;
|
|
661
|
+
}
|
|
662
|
+
function isHtmlPageFile(file) {
|
|
663
|
+
return file.endsWith(".html");
|
|
664
|
+
}
|
|
665
|
+
function cacheLifeResponseHeaders(life) {
|
|
666
|
+
if (!life)
|
|
667
|
+
return [];
|
|
668
|
+
const headers = [];
|
|
669
|
+
const { revalidateSeconds, expireSeconds, staleSeconds } = life;
|
|
670
|
+
if (revalidateSeconds !== undefined && expireSeconds !== undefined) {
|
|
671
|
+
const swr = Math.max(0, expireSeconds - revalidateSeconds);
|
|
672
|
+
headers.push(["cache-control", `s-maxage=${revalidateSeconds}, stale-while-revalidate=${swr}`]);
|
|
673
|
+
}
|
|
674
|
+
if (staleSeconds !== undefined)
|
|
675
|
+
headers.push(["x-nextjs-stale-time", String(staleSeconds)]);
|
|
676
|
+
return headers;
|
|
677
|
+
}
|
|
678
|
+
function isImmutableAssetFile(relative) {
|
|
679
|
+
return relative.startsWith("assets/") || relative.startsWith("_next/static/");
|
|
680
|
+
}
|
|
681
|
+
function dynamicParamsAllowed(route, params) {
|
|
682
|
+
const governed = route.segmentConfig?.dynamicParamsFalse;
|
|
683
|
+
if (!governed?.length)
|
|
684
|
+
return true;
|
|
685
|
+
const allowed = route.prerenderedParams ?? [];
|
|
686
|
+
const required = route.segmentConfig?.strictDynamicParams ? [...route.params, ...route.catchAll ? [route.catchAll] : []] : governed;
|
|
687
|
+
return allowed.some((set) => required.every((param) => paramValueEqual(set[param], params[param])));
|
|
688
|
+
}
|
|
689
|
+
function paramValueEqual(a, b) {
|
|
690
|
+
if (a === undefined || b === undefined)
|
|
691
|
+
return false;
|
|
692
|
+
const join = (value) => Array.isArray(value) ? value.join("/") : value;
|
|
693
|
+
return join(a) === join(b);
|
|
694
|
+
}
|
|
695
|
+
async function maybeBuiltFile(outPath, pathname, staticFiles = {}, method = "GET", requestHeaders, nextStaticFallback = false, publicAssets = [], exactNames) {
|
|
696
|
+
const normalizedMethod = method.toUpperCase();
|
|
697
|
+
if (normalizedMethod !== "GET" && normalizedMethod !== "HEAD")
|
|
698
|
+
return null;
|
|
699
|
+
const publicPath = path.join(outPath, "public");
|
|
700
|
+
const file = await firstFile(publicPath, builtFileCandidates(outPath, pathname, nextStaticFallback), exactNames);
|
|
701
|
+
if (!file)
|
|
702
|
+
return null;
|
|
703
|
+
const relative = path.relative(publicPath, file).split(path.sep).join("/");
|
|
704
|
+
const metadata = staticFiles[relative];
|
|
705
|
+
const headers = new Headers(metadata?.headers);
|
|
706
|
+
if (!headers.has("content-type"))
|
|
707
|
+
headers.set("content-type", contentType(file));
|
|
708
|
+
const fileStat = await stat(file);
|
|
709
|
+
const variant = requestHeaders?.get("rsc") === "1" ? "-rsc" : "";
|
|
710
|
+
const etag = `W/"${fileStat.size.toString(16)}-${Math.trunc(fileStat.mtimeMs).toString(16)}${variant}"`;
|
|
711
|
+
if (!headers.has("cache-control")) {
|
|
712
|
+
const immutable = immutableAssetPath(relative) && !publicAssets.includes(relative);
|
|
713
|
+
headers.set("cache-control", immutable ? immutableCacheControl : "no-cache");
|
|
714
|
+
headers.set("etag", etag);
|
|
715
|
+
if (requestHeaders?.get("if-none-match") === etag) {
|
|
716
|
+
return new Response(null, { status: 304, headers });
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
const raw = await readFile(file);
|
|
720
|
+
let body = raw;
|
|
721
|
+
if (compressibleContentType(headers.get("content-type") ?? "") && raw.length > 1024 && acceptsGzip(requestHeaders)) {
|
|
722
|
+
const zipped = cachedGzip(`${file}:${etag}`, raw);
|
|
723
|
+
if (zipped.length < raw.length) {
|
|
724
|
+
body = zipped;
|
|
725
|
+
headers.set("content-encoding", "gzip");
|
|
726
|
+
headers.append("vary", "accept-encoding");
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
return new Response(normalizedMethod === "HEAD" ? null : body, {
|
|
730
|
+
status: metadata?.status ?? 200,
|
|
731
|
+
headers
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
function appendVaryToken(headers, token) {
|
|
735
|
+
const existing = headers.get("vary");
|
|
736
|
+
if (!existing) {
|
|
737
|
+
headers.set("vary", token);
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
const tokens = existing.split(",").map((part) => part.trim().toLowerCase());
|
|
741
|
+
if (tokens.includes(token.toLowerCase()) || tokens.includes("*"))
|
|
742
|
+
return;
|
|
743
|
+
headers.set("vary", `${existing}, ${token}`);
|
|
744
|
+
}
|
|
745
|
+
function compressResponse(response, request) {
|
|
746
|
+
if (!response.body || response.status === 304 || response.status === 204)
|
|
747
|
+
return response;
|
|
748
|
+
if (response.headers.get("content-encoding"))
|
|
749
|
+
return response;
|
|
750
|
+
if (!compressibleContentType(response.headers.get("content-type") ?? ""))
|
|
751
|
+
return response;
|
|
752
|
+
const headers = new Headers(response.headers);
|
|
753
|
+
appendVaryToken(headers, "accept-encoding");
|
|
754
|
+
if (!acceptsGzip(request.headers)) {
|
|
755
|
+
return new Response(response.body, { status: response.status, headers });
|
|
756
|
+
}
|
|
757
|
+
const knownLength = Number(headers.get("content-length"));
|
|
758
|
+
if (Number.isFinite(knownLength) && knownLength <= 1024) {
|
|
759
|
+
return new Response(response.body, { status: response.status, headers });
|
|
760
|
+
}
|
|
761
|
+
headers.set("content-encoding", "gzip");
|
|
762
|
+
headers.delete("content-length");
|
|
763
|
+
return new Response(streamingGzip(response.body), {
|
|
764
|
+
status: response.status,
|
|
765
|
+
headers
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
function streamingGzip(body) {
|
|
769
|
+
const gzip = createGzip();
|
|
770
|
+
const reader = body.getReader();
|
|
771
|
+
(async () => {
|
|
772
|
+
try {
|
|
773
|
+
for (;; ) {
|
|
774
|
+
const { done, value } = await reader.read();
|
|
775
|
+
if (done)
|
|
776
|
+
break;
|
|
777
|
+
gzip.write(value);
|
|
778
|
+
await new Promise((resolve) => gzip.flush(zlibConstants.Z_SYNC_FLUSH, resolve));
|
|
779
|
+
}
|
|
780
|
+
gzip.end();
|
|
781
|
+
} catch (error) {
|
|
782
|
+
gzip.destroy(error);
|
|
783
|
+
reader.cancel(error).catch(() => {
|
|
784
|
+
return;
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
})();
|
|
788
|
+
return Readable.toWeb(gzip);
|
|
789
|
+
}
|
|
790
|
+
function compressibleContentType(type) {
|
|
791
|
+
return /^(text\/|application\/(javascript|json|manifest|xml)|image\/svg)/.test(type);
|
|
792
|
+
}
|
|
793
|
+
function acceptsGzip(requestHeaders) {
|
|
794
|
+
return requestHeaders?.get("accept-encoding")?.includes("gzip") ?? false;
|
|
795
|
+
}
|
|
796
|
+
var gzipCache = new Map;
|
|
797
|
+
var gzipCacheLimit = 512;
|
|
798
|
+
function cachedGzip(key, body) {
|
|
799
|
+
const cached = gzipCache.get(key);
|
|
800
|
+
if (cached)
|
|
801
|
+
return cached;
|
|
802
|
+
const zipped = gzipSync(body, { level: 6 });
|
|
803
|
+
if (gzipCache.size >= gzipCacheLimit) {
|
|
804
|
+
const oldest = gzipCache.keys().next().value;
|
|
805
|
+
if (oldest !== undefined)
|
|
806
|
+
gzipCache.delete(oldest);
|
|
807
|
+
}
|
|
808
|
+
gzipCache.set(key, zipped);
|
|
809
|
+
return zipped;
|
|
810
|
+
}
|
|
811
|
+
async function firstFile(root, files, exactNames) {
|
|
812
|
+
for (const file of files) {
|
|
813
|
+
if (!isInside(root, file))
|
|
814
|
+
continue;
|
|
815
|
+
if (!existsSync(file))
|
|
816
|
+
continue;
|
|
817
|
+
if (exactNames && !hasExactName(exactNames, root, path.relative(root, file)))
|
|
818
|
+
continue;
|
|
819
|
+
if ((await stat(file)).isFile())
|
|
820
|
+
return file;
|
|
821
|
+
}
|
|
822
|
+
return null;
|
|
823
|
+
}
|
|
824
|
+
function isInside(root, file) {
|
|
825
|
+
const relative = path.relative(root, file);
|
|
826
|
+
return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
827
|
+
}
|
|
828
|
+
export {
|
|
829
|
+
compressResponse,
|
|
830
|
+
createRequestHandler,
|
|
831
|
+
maybeBuiltFile
|
|
832
|
+
};
|