@timber-js/app 0.2.0-alpha.226 → 0.2.0-alpha.228
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/_chunks/{actions-B1xSIv32.js → actions-DprvPi7O.js} +3 -3
- package/dist/_chunks/{actions-B1xSIv32.js.map → actions-DprvPi7O.js.map} +1 -1
- package/dist/_chunks/{build-output-helper-B7wWGTfR.js → build-output-helper-5UsltK-S.js} +29 -2
- package/dist/_chunks/build-output-helper-5UsltK-S.js.map +1 -0
- package/dist/_chunks/{cache-api-DsSXA4Sp.js → cache-api-BjE-nNC0.js} +4 -4
- package/dist/_chunks/{cache-api-DsSXA4Sp.js.map → cache-api-BjE-nNC0.js.map} +1 -1
- package/dist/_chunks/chains-BS8fQYao.js +1 -0
- package/dist/_chunks/{chains-Dgm3PrMe.js → chains-DaDEXv0c.js} +2 -2
- package/dist/_chunks/{chains-Dgm3PrMe.js.map → chains-DaDEXv0c.js.map} +1 -1
- package/dist/_chunks/{classify--_kINHQV.js → classify-BuIifN5v.js} +2 -2
- package/dist/_chunks/{classify--_kINHQV.js.map → classify-BuIifN5v.js.map} +1 -1
- package/dist/_chunks/{cli-check-B33yhAPa.js → cli-check-B_fDvxhs.js} +3 -3
- package/dist/_chunks/{cli-check-B33yhAPa.js.map → cli-check-B_fDvxhs.js.map} +1 -1
- package/dist/_chunks/{cli-schema-sync-uq72EZmD.js → cli-schema-sync-CUIk0G2X.js} +1 -1
- package/dist/_chunks/{cli-schema-sync-DIPurq7X.js → cli-schema-sync-D9OLUUFv.js} +2 -2
- package/dist/_chunks/{cli-schema-sync-DIPurq7X.js.map → cli-schema-sync-D9OLUUFv.js.map} +1 -1
- package/dist/_chunks/{client-dep-entries-CP7AkMCM.js → client-dep-entries-COuyF8-c.js} +2 -2
- package/dist/_chunks/{client-dep-entries-CP7AkMCM.js.map → client-dep-entries-COuyF8-c.js.map} +1 -1
- package/dist/_chunks/{cloudflare-B75X6u4O.js → cloudflare-_2fhxQE8.js} +4 -20
- package/dist/_chunks/{cloudflare-B75X6u4O.js.map → cloudflare-_2fhxQE8.js.map} +1 -1
- package/dist/_chunks/{convention-lint-hZwz5wd4.js → convention-lint-BHY0d5AQ.js} +4 -13
- package/dist/_chunks/convention-lint-BHY0d5AQ.js.map +1 -0
- package/dist/_chunks/{dev-server-B7o4As0l.js → dev-server-BaM7q3pr.js} +2 -2
- package/dist/_chunks/{dev-server-B7o4As0l.js.map → dev-server-BaM7q3pr.js.map} +1 -1
- package/dist/_chunks/dev-server-NnGosJ06.js +1 -0
- package/dist/_chunks/{flight-source-node-0Tp6evlz.js → flight-source-node-CZJ9Drb7.js} +2 -2
- package/dist/_chunks/{flight-source-node-0Tp6evlz.js.map → flight-source-node-CZJ9Drb7.js.map} +1 -1
- package/dist/_chunks/{json-lossy-check-DVkLUlfC.js → json-lossy-check-BNwKrm2R.js} +2 -2
- package/dist/_chunks/{json-lossy-check-DVkLUlfC.js.map → json-lossy-check-BNwKrm2R.js.map} +1 -1
- package/dist/_chunks/{live-graph-BcVjQ1Te.js → live-graph-DiRVmRrC.js} +4 -4
- package/dist/_chunks/{live-graph-BcVjQ1Te.js.map → live-graph-DiRVmRrC.js.map} +1 -1
- package/dist/_chunks/{logger-CWk44DLp.js → logger-DRMij51J.js} +4 -4
- package/dist/_chunks/logger-DRMij51J.js.map +1 -0
- package/dist/_chunks/{node-response-B9aviPDa.js → node-response-C-dQn-0N.js} +2 -2
- package/dist/_chunks/{node-response-B9aviPDa.js.map → node-response-C-dQn-0N.js.map} +1 -1
- package/dist/_chunks/{poison-scan-DJYxZc_7.js → poison-scan-CqPGN0ru.js} +2 -2
- package/dist/_chunks/{poison-scan-DJYxZc_7.js.map → poison-scan-CqPGN0ru.js.map} +1 -1
- package/dist/_chunks/route-methods-Dk2kZc0n.js +36 -0
- package/dist/_chunks/route-methods-Dk2kZc0n.js.map +1 -0
- package/dist/_chunks/{scanner-CJC-ScJU.js → scanner-C__vsQ8d.js} +2 -2
- package/dist/_chunks/{scanner-CJC-ScJU.js.map → scanner-C__vsQ8d.js.map} +1 -1
- package/dist/_chunks/{sizeof-DG4W40lv.js → sizeof-DcEcQaSL.js} +2 -2
- package/dist/_chunks/{sizeof-DG4W40lv.js.map → sizeof-DcEcQaSL.js.map} +1 -1
- package/dist/_chunks/{walkers-DIE203ir.js → walkers-D6KY4jyS.js} +3 -3
- package/dist/_chunks/{walkers-DIE203ir.js.map → walkers-D6KY4jyS.js.map} +1 -1
- package/dist/adapters/cloudflare-dev.js +1 -1
- package/dist/adapters/cloudflare-kv-cache.js +2 -2
- package/dist/adapters/cloudflare.d.ts +0 -7
- package/dist/adapters/cloudflare.d.ts.map +1 -1
- package/dist/adapters/cloudflare.js +1 -1
- package/dist/adapters/nitro.d.ts.map +1 -1
- package/dist/adapters/nitro.js +6 -5
- package/dist/adapters/nitro.js.map +1 -1
- package/dist/adapters/shared.d.ts +18 -0
- package/dist/adapters/shared.d.ts.map +1 -1
- package/dist/analyze/crawl-entry.js +3 -3
- package/dist/analyze/graph-command.js +2 -2
- package/dist/cache/index.js +2 -2
- package/dist/cache/stores/memory.js +1 -1
- package/dist/cli.js +3 -3
- package/dist/index.js +7 -7
- package/dist/routing/convention-lint.d.ts.map +1 -1
- package/dist/routing/index.js +2 -2
- package/dist/rsc-runtime/rsc.d.ts +2 -2
- package/dist/rsc-runtime/rsc.d.ts.map +1 -1
- package/dist/rsc-runtime/server-reference-load-error.d.ts +14 -0
- package/dist/rsc-runtime/server-reference-load-error.d.ts.map +1 -0
- package/dist/rsc-runtime/server-references.d.ts +11 -0
- package/dist/rsc-runtime/server-references.d.ts.map +1 -1
- package/dist/server/action-handler.d.ts +7 -5
- package/dist/server/action-handler.d.ts.map +1 -1
- package/dist/server/csrf.d.ts +1 -1
- package/dist/server/csrf.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/internal.d.ts +2 -1
- package/dist/server/internal.d.ts.map +1 -1
- package/dist/server/internal.js +22 -24
- package/dist/server/internal.js.map +1 -1
- package/dist/server/route-handler.d.ts +1 -2
- package/dist/server/route-handler.d.ts.map +1 -1
- package/dist/server/route-methods.d.ts +23 -0
- package/dist/server/route-methods.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/adapters/cloudflare.ts +7 -19
- package/src/adapters/nitro.ts +12 -5
- package/src/adapters/shared.ts +31 -0
- package/src/routing/convention-lint.ts +1 -3
- package/src/rsc-runtime/rsc.ts +8 -7
- package/src/rsc-runtime/server-reference-load-error.ts +16 -0
- package/src/rsc-runtime/server-references.ts +63 -1
- package/src/server/action-handler.ts +36 -17
- package/src/server/csrf.ts +11 -3
- package/src/server/internal.ts +2 -1
- package/src/server/route-handler.ts +8 -19
- package/src/server/route-methods.ts +37 -0
- package/src/server/tracing.ts +3 -3
- package/dist/_chunks/build-output-helper-B7wWGTfR.js.map +0 -1
- package/dist/_chunks/chains-CwOr3Myj.js +0 -1
- package/dist/_chunks/convention-lint-hZwz5wd4.js.map +0 -1
- package/dist/_chunks/dev-server-hZzmbMvK.js +0 -1
- package/dist/_chunks/logger-CWk44DLp.js.map +0 -1
|
@@ -5,4 +5,15 @@
|
|
|
5
5
|
* function.
|
|
6
6
|
*/
|
|
7
7
|
export declare function loadServerAction(id: string): Promise<unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* plugin-rsc's `decodeReply`, rejecting with `ServerReferenceLoadError` when
|
|
10
|
+
* a server function among the arguments names a module that fails to load.
|
|
11
|
+
*/
|
|
12
|
+
export declare function decodeReply(body: string | FormData): Promise<unknown[]>;
|
|
13
|
+
/**
|
|
14
|
+
* plugin-rsc's `decodeAction`, rejecting with `ServerReferenceLoadError`
|
|
15
|
+
* when the form's action, or a server function bound to it, names a module
|
|
16
|
+
* that fails to load.
|
|
17
|
+
*/
|
|
18
|
+
export declare function decodeAction(body: FormData): Promise<() => Promise<void>>;
|
|
8
19
|
//# sourceMappingURL=server-references.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-references.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/server-references.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server-references.d.ts","sourceRoot":"","sources":["../../src/rsc-runtime/server-references.ts"],"names":[],"mappings":"AAqEA;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAKnE;AAqCD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAIvE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAEzE"}
|
|
@@ -49,11 +49,13 @@ export declare function isActionRequest(req: Request): boolean;
|
|
|
49
49
|
* with `formState` — React's `decodeFormState` of the result, present
|
|
50
50
|
* only when the submitted form used `useActionState` — handed to SSR
|
|
51
51
|
* and hydration, where React gives it to the hook that submitted.
|
|
52
|
-
* - `error`: the action threw
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
52
|
+
* - `error`: the action threw, or a module it needs (its own, or the one a
|
|
53
|
+
* server function bound to it lives in) failed to load. The page is
|
|
54
|
+
* rendered again with the error in place of the page component, so the
|
|
55
|
+
* route's nearest error page answers, with the status the pipeline gives
|
|
56
|
+
* any unhandled error. The JS path rejects the action for the same
|
|
57
|
+
* throw, and answers the load failure with a 500, so both reach an
|
|
58
|
+
* error boundary.
|
|
57
59
|
*
|
|
58
60
|
* Carries two cookie-related snapshots taken before the action's ALS scope
|
|
59
61
|
* exits, so the rerender pipeline (which establishes its own fresh cookie
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-handler.d.ts","sourceRoot":"","sources":["../../src/server/action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GA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,GAAG,IAAI,CAAC,CA4F9C"}
|
package/dist/server/csrf.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export type CsrfResult = {
|
|
|
61
61
|
* origin derived from the scheme and `Host`.
|
|
62
62
|
* 4. Neither header → allow: not a browser, so no ambient cookies to abuse.
|
|
63
63
|
*
|
|
64
|
-
* Safe methods (GET, HEAD, OPTIONS) and `csrf: false` always pass.
|
|
64
|
+
* Safe methods (GET, HEAD, OPTIONS, QUERY) and `csrf: false` always pass.
|
|
65
65
|
*/
|
|
66
66
|
export declare function validateCsrf(req: Request, config: CsrfConfig): CsrfResult;
|
|
67
67
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csrf.d.ts","sourceRoot":"","sources":["../../src/server/csrf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAOH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,wDAAwD;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,qEAAqE;AACrE,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,iBAAiB,CAAC;AAEtB;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,GAAG,CAAC;IACZ,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"csrf.d.ts","sourceRoot":"","sources":["../../src/server/csrf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAOH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,wDAAwD;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,qEAAqE;AACrE,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,iBAAiB,CAAC;AAEtB;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,GAAG,CAAC;IACZ,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG,aAAa,CAAC;AAgDtD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAsDzE;AA+ED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,GAAG,QAAQ,CAatF"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as addSpanEvent, D as getSpanId, I as isDenySignal, L as isRedirectSignal, M as withSpan, O as getTraceId, S as isDevMode, x as isDebug } from "../_chunks/logger-
|
|
1
|
+
import { C as addSpanEvent, D as getSpanId, I as isDenySignal, L as isRedirectSignal, M as withSpan, O as getTraceId, S as isDevMode, x as isDebug } from "../_chunks/logger-DRMij51J.js";
|
|
2
2
|
import { t as formatSize } from "../_chunks/format-DuPOoXUP.js";
|
|
3
|
-
import { _ as getHeaders, a as parseFormData, c as deny, d as waitUntil, i as coerce, l as redirect, n as revalidatePath, p as getCookieJar, r as revalidateTag, u as redirectExternal, y as getSegmentParams } from "../_chunks/actions-
|
|
3
|
+
import { _ as getHeaders, a as parseFormData, c as deny, d as waitUntil, i as coerce, l as redirect, n as revalidatePath, p as getCookieJar, r as revalidateTag, u as redirectExternal, y as getSegmentParams } from "../_chunks/actions-DprvPi7O.js";
|
|
4
4
|
// src/shared/redirect-type.ts
|
|
5
5
|
/**
|
|
6
6
|
* Next.js redirect type discriminator.
|
|
@@ -36,7 +36,8 @@ export type { TimberLogger } from './logger.ts';
|
|
|
36
36
|
export { loadInstrumentation, callOnRequestError, hasOnRequestError } from './instrumentation.ts';
|
|
37
37
|
export type { InstrumentationOnRequestError, InstrumentationRequestInfo, InstrumentationErrorContext, } from './instrumentation.ts';
|
|
38
38
|
export { handleRouteRequest, resolveAllowedMethods } from './route-handler.ts';
|
|
39
|
-
export type { RouteModule, RouteHandler
|
|
39
|
+
export type { RouteModule, RouteHandler } from './route-handler.ts';
|
|
40
|
+
export type { HttpMethod } from './route-methods.ts';
|
|
40
41
|
export { RenderTimeoutError } from './render-timeout.ts';
|
|
41
42
|
export type { RenderTimeout } from './render-timeout.ts';
|
|
42
43
|
export { __prebuilt, getPrebuiltRegistration, getPrebuiltRegistry } from './prebuilt-runtime.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/server/internal.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,EAAE,cA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ACb,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAClG,YAAY,EACV,6BAA6B,EAC7B,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjG,YAAY,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAClG,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/server/internal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as drainWithDeadline, d as isAbortError, f as releaseReason, i as withResponseInit, n as discardResponseBody, o as concatBytes, p as onAbortUntil, r as nodeBodyOps, u as wrapResponseWithStreamTiming } from "../_chunks/node-response-
|
|
1
|
+
import { c as drainWithDeadline, d as isAbortError, f as releaseReason, i as withResponseInit, n as discardResponseBody, o as concatBytes, p as onAbortUntil, r as nodeBodyOps, u as wrapResponseWithStreamTiming } from "../_chunks/node-response-C-dQn-0N.js";
|
|
2
2
|
import { i as resolveRenderTimeoutMs, r as RenderTimeoutError, t as DEFAULT_RENDER_TIMEOUT_MS } from "../_chunks/render-timeout-MrrqD1wd.js";
|
|
3
3
|
import { n as isRscContentType, r as isRscRequest } from "../_chunks/rsc-media-type-m8jz9u6_.js";
|
|
4
4
|
import { i as getMetadataRouteServePath, n as classifyMetadataRoute, r as getMetadataRouteAutoLink, t as METADATA_ROUTE_CONVENTIONS } from "../_chunks/metadata-routes-BL26HCDd.js";
|
|
@@ -7,11 +7,12 @@ import { _ as wasInvalidatedSince, a as devEntryKey, c as getDevSeed, d as isDev
|
|
|
7
7
|
import { n as classifyUrlSegment, r as effectiveUrlSegment } from "../_chunks/segment-classify-Ho8jXWeC.js";
|
|
8
8
|
import { t as computeSegmentTreePaths } from "../_chunks/segment-keys-Y60KNc8C.js";
|
|
9
9
|
import { i as requestContextAls, n as prebuiltCaptureAls, o as timingAls, t as earlyHintsSenderAls } from "../_chunks/als-registry-DpygwCp0.js";
|
|
10
|
-
import { A as runWithTraceId, E as getOtelTraceId, F as isControlFlowSignal, I as isDenySignal, L as isRedirectSignal, M as withSpan, O as getTraceId, T as generateTraceId, _ as logWaitUntilRejected, b as swallow, c as logMiddlewareShortCircuit, d as logRequestCompleted, f as logRequestReceived, g as logSwrRefetchFailed, h as logSlowRequest, i as logCsrfRejected, j as setSpanAttribute, k as replaceTraceId, l as logProxyError, m as logRouteSetupError, n as logCacheMiss, p as logRouteError, s as logMiddlewareError, t as getLogger, u as logRenderError, v as logWaitUntilUnsupported, x as isDebug, y as setLogger } from "../_chunks/logger-
|
|
10
|
+
import { A as runWithTraceId, E as getOtelTraceId, F as isControlFlowSignal, I as isDenySignal, L as isRedirectSignal, M as withSpan, O as getTraceId, T as generateTraceId, _ as logWaitUntilRejected, b as swallow, c as logMiddlewareShortCircuit, d as logRequestCompleted, f as logRequestReceived, g as logSwrRefetchFailed, h as logSlowRequest, i as logCsrfRejected, j as setSpanAttribute, k as replaceTraceId, l as logProxyError, m as logRouteSetupError, n as logCacheMiss, p as logRouteError, s as logMiddlewareError, t as getLogger, u as logRenderError, v as logWaitUntilUnsupported, x as isDebug, y as setLogger } from "../_chunks/logger-DRMij51J.js";
|
|
11
|
+
import { n as isHttpMethod, t as HTTP_METHODS } from "../_chunks/route-methods-Dk2kZc0n.js";
|
|
11
12
|
import { i as collectRouteModulepreloads, n as collectRouteCss, r as collectRouteFonts } from "../_chunks/build-manifest-Y4jl7nwU.js";
|
|
12
13
|
import { i as isRscCacheKeyShape, n as RSC_KEY_PARAM, r as appVisibleSearch, s as rscCacheKey, t as RSC_KEY_HEADERS } from "../_chunks/rsc-cache-key-D0cb0Gmc.js";
|
|
13
|
-
import { C as setMatchedSegmentPath, E as runOutsideReactCacheScope, S as runWithSegmentParams, T as setSegmentParams, b as markResponseFlushed, f as getCookie, g as getHeader, h as applyRequestHeaderOverlay, i as coerce, m as getSetCookieHeaders, o as DenySignal, s as RedirectSignal, t as executeAction, v as getSearchParams, w as setMutableCookieContext, x as runWithRequestContext, y as getSegmentParams } from "../_chunks/actions-
|
|
14
|
-
import { _ as getWaitUntil, a as storeOverlayEntry, c as lookupArtifactSeed, d as checkVersionSkew, g as observeKeyDiscipline, i as overlayKey, l as setPrebuiltPayloadSource, n as lookupOverlay, o as hasPrebuiltPayloadSource, r as mayStoreRerender, s as isParamIndependent, u as applyReloadHeaders } from "../_chunks/cache-api-
|
|
14
|
+
import { C as setMatchedSegmentPath, E as runOutsideReactCacheScope, S as runWithSegmentParams, T as setSegmentParams, b as markResponseFlushed, f as getCookie, g as getHeader, h as applyRequestHeaderOverlay, i as coerce, m as getSetCookieHeaders, o as DenySignal, s as RedirectSignal, t as executeAction, v as getSearchParams, w as setMutableCookieContext, x as runWithRequestContext, y as getSegmentParams } from "../_chunks/actions-DprvPi7O.js";
|
|
15
|
+
import { _ as getWaitUntil, a as storeOverlayEntry, c as lookupArtifactSeed, d as checkVersionSkew, g as observeKeyDiscipline, i as overlayKey, l as setPrebuiltPayloadSource, n as lookupOverlay, o as hasPrebuiltPayloadSource, r as mayStoreRerender, s as isParamIndependent, u as applyReloadHeaders } from "../_chunks/cache-api-BjE-nNC0.js";
|
|
15
16
|
import { n as createSingleflight } from "../_chunks/singleflight-CzoOVB9Y.js";
|
|
16
17
|
import { l as TIMBER_ERROR_HEADER, t as StatusPageMarker } from "../_chunks/status-page-marker-C8POawuF.js";
|
|
17
18
|
import { n as toBracketKey } from "../_chunks/resolve-schema-B-aCuTu3.js";
|
|
@@ -300,11 +301,20 @@ var CSRF_REJECT_VALUE = "csrf";
|
|
|
300
301
|
* See design/08-forms-and-actions.md §"CSRF Protection"
|
|
301
302
|
* See design/13-security.md §"Security Testing Checklist" #6
|
|
302
303
|
*/
|
|
303
|
-
/**
|
|
304
|
+
/**
|
|
305
|
+
* HTTP methods that are considered safe (no mutation). `QUERY` (RFC 10008)
|
|
306
|
+
* is safe by definition, is not a CORS-safelisted method, so a cross-origin
|
|
307
|
+
* browser `QUERY` is preflighted, and HTML forms cannot send it: a cross-site
|
|
308
|
+
* page cannot make a browser send one with the user's cookies unless the
|
|
309
|
+
* app's own CORS policy allows it. A handler
|
|
310
|
+
* that mutates on `QUERY` breaks the method's contract, as one that mutates
|
|
311
|
+
* on `GET` does.
|
|
312
|
+
*/
|
|
304
313
|
var SAFE_METHODS = /* @__PURE__ */ new Set([
|
|
305
314
|
"GET",
|
|
306
315
|
"HEAD",
|
|
307
|
-
"OPTIONS"
|
|
316
|
+
"OPTIONS",
|
|
317
|
+
"QUERY"
|
|
308
318
|
]);
|
|
309
319
|
/**
|
|
310
320
|
* `Sec-Fetch-Site` values that mean the browser itself vouches for the
|
|
@@ -346,7 +356,7 @@ function deriveRequestScheme(req) {
|
|
|
346
356
|
* origin derived from the scheme and `Host`.
|
|
347
357
|
* 4. Neither header → allow: not a browser, so no ambient cookies to abuse.
|
|
348
358
|
*
|
|
349
|
-
* Safe methods (GET, HEAD, OPTIONS) and `csrf: false` always pass.
|
|
359
|
+
* Safe methods (GET, HEAD, OPTIONS, QUERY) and `csrf: false` always pass.
|
|
350
360
|
*/
|
|
351
361
|
function validateCsrf(req, config) {
|
|
352
362
|
if (SAFE_METHODS.has(req.method)) return { ok: true };
|
|
@@ -1342,16 +1352,6 @@ function stripHeadBody(response, method) {
|
|
|
1342
1352
|
});
|
|
1343
1353
|
}
|
|
1344
1354
|
// src/server/route-handler.ts
|
|
1345
|
-
/** All recognized HTTP method export names. */
|
|
1346
|
-
var HTTP_METHODS = [
|
|
1347
|
-
"GET",
|
|
1348
|
-
"POST",
|
|
1349
|
-
"PUT",
|
|
1350
|
-
"PATCH",
|
|
1351
|
-
"DELETE",
|
|
1352
|
-
"HEAD",
|
|
1353
|
-
"OPTIONS"
|
|
1354
|
-
];
|
|
1355
1355
|
/**
|
|
1356
1356
|
* Resolve the full list of allowed methods for a route module.
|
|
1357
1357
|
*
|
|
@@ -1366,10 +1366,8 @@ function resolveAllowedMethods(mod) {
|
|
|
1366
1366
|
if (method === "HEAD" || method === "OPTIONS") continue;
|
|
1367
1367
|
if (mod[method]) methods.push(method);
|
|
1368
1368
|
}
|
|
1369
|
-
if (mod.GET
|
|
1370
|
-
|
|
1371
|
-
if (!mod.OPTIONS) methods.push("OPTIONS");
|
|
1372
|
-
else methods.push("OPTIONS");
|
|
1369
|
+
if (mod.GET || mod.HEAD) methods.push("HEAD");
|
|
1370
|
+
methods.push("OPTIONS");
|
|
1373
1371
|
return methods;
|
|
1374
1372
|
}
|
|
1375
1373
|
/**
|
|
@@ -1379,7 +1377,7 @@ function resolveAllowedMethods(mod) {
|
|
|
1379
1377
|
* and merges response headers from ctx.headers.
|
|
1380
1378
|
*/
|
|
1381
1379
|
async function handleRouteRequest(mod, ctx) {
|
|
1382
|
-
const method = ctx.req.method
|
|
1380
|
+
const method = ctx.req.method;
|
|
1383
1381
|
const allowHeader = resolveAllowedMethods(mod).join(", ");
|
|
1384
1382
|
if (method === "OPTIONS") {
|
|
1385
1383
|
if (mod.OPTIONS) return runHandler(mod.OPTIONS, ctx);
|
|
@@ -1392,7 +1390,7 @@ async function handleRouteRequest(mod, ctx) {
|
|
|
1392
1390
|
if (mod.HEAD) return stripHeadBody(await runHandler(mod.HEAD, ctx), method);
|
|
1393
1391
|
if (mod.GET) return stripHeadBody(await runHandler(mod.GET, ctx), method);
|
|
1394
1392
|
}
|
|
1395
|
-
const handler = mod[method];
|
|
1393
|
+
const handler = isHttpMethod(method) ? mod[method] : void 0;
|
|
1396
1394
|
if (!handler) return mergeResponseHeaders(new Response(null, {
|
|
1397
1395
|
status: 405,
|
|
1398
1396
|
headers: { Allow: allowHeader }
|
|
@@ -4457,7 +4455,7 @@ function noteWrapperRender(innerId, options, props) {
|
|
|
4457
4455
|
}
|
|
4458
4456
|
}
|
|
4459
4457
|
// src/server/flight-source.ts
|
|
4460
|
-
var nodeFlight = typeof process !== "undefined" && process.release?.name === "node" && !(typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") ? await import("../_chunks/flight-source-node-
|
|
4458
|
+
var nodeFlight = typeof process !== "undefined" && process.release?.name === "node" && !(typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") ? await import("../_chunks/flight-source-node-CZJ9Drb7.js") : null;
|
|
4461
4459
|
/** The Node helpers, which a `kind: 'node'` source can only exist alongside. */
|
|
4462
4460
|
function requireNodeFlight() {
|
|
4463
4461
|
if (!nodeFlight) throw new Error("[timber] a Node Flight source reached a runtime without node:stream");
|