void 1.1.12 → 1.2.0
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/{account-cmd-Cj6sCMTk.mjs → account-cmd-CdUll_35.mjs} +5 -5
- package/dist/action-key-XZ9HkWAO.mjs +26 -0
- package/dist/{application-analysis-D7nNmNJb.mjs → application-analysis-fEqoSeMp.mjs} +11 -11
- package/dist/{application-routing-CZH66gXn.mjs → application-routing-DAhNP4u3.mjs} +1 -1
- package/dist/{ast-CPGPjb0V.mjs → ast-CsZ_q_gc.mjs} +6 -1
- package/dist/ast-bindings-C3yaPs1y.mjs +296 -0
- package/dist/{auth-link-Dj7lAC_K.mjs → auth-link-C87vGXM-.mjs} +5 -5
- package/dist/{auth-router-CNsMOFCa.mjs → auth-router-6I81r-ix.mjs} +3 -3
- package/dist/{better-auth-shared-Bv18bB-l.d.mts → better-auth-shared-DVk2DkTW.d.mts} +1 -1
- package/dist/{build-cmd-ByhegwRC.mjs → build-cmd-ex1g-j_e.mjs} +4 -4
- package/dist/{cache-CEFb5ban.mjs → cache-oHzrnY3z.mjs} +4 -4
- package/dist/{cancel-deploy-CaARY26n.mjs → cancel-deploy-viAMD0Q_.mjs} +3 -3
- package/dist/cf-build-output-BJHuSsVN.mjs +1 -0
- package/dist/{cf-build-output-ChEKWan2.mjs → cf-build-output-BhVxldCw.mjs} +4 -3
- package/dist/{cf-command-values-b8OqDoo9.mjs → cf-command-values-ByHk0xg4.mjs} +2 -1
- package/dist/cf-worker-settings-BECvvTVd.mjs +37 -0
- package/dist/cli/cli.mjs +32 -32
- package/dist/cli/cloudflare-operation-process.mjs +23 -13
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/{client-BdzxubTS.mjs → client-BEkdj1kx.mjs} +1 -1
- package/dist/client-BiRDZTSd.mjs +1 -0
- package/dist/{cloudflare-auth-DSvBc1Gu.mjs → cloudflare-auth-Byo_0_N9.mjs} +1 -1
- package/dist/{cloudflare-cmd-D_2-Q-_i.mjs → cloudflare-cmd-DMzCv12s.mjs} +5 -5
- package/dist/{cloudflare-config-rdFOys4X.mjs → cloudflare-config-DchHxPTo.mjs} +1 -1
- package/dist/{cloudflare-connect-BN-k2kD-.mjs → cloudflare-connect-CCRTVg-I.mjs} +3 -3
- package/dist/{cloudflare-operations-D5PLrOqD.mjs → cloudflare-operations-Dh9dEHJj.mjs} +6 -6
- package/dist/{cloudflare-operations-BFLCpUCV.mjs → cloudflare-operations-DsSaw2BT.mjs} +1 -1
- package/dist/{cloudflare-process-CZJ4viYl.mjs → cloudflare-process-8jEYIeim.mjs} +3 -2
- package/dist/{config-DC5llZaI.mjs → config-BIaXIkkv.mjs} +8 -3
- package/dist/{config-DYJV8aEH.mjs → config-BU6hMu1W.mjs} +1 -1
- package/dist/{config-D26zcdKy.mjs → config-DHgSEWT7.mjs} +39 -6
- package/dist/{config-7qoq2p9v.d.mts → config-DQfHOKh9.d.mts} +10 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-C4_m2moF.mjs → connect-k7R2rPVA.mjs} +6 -6
- package/dist/{create-project-CvuYDD-l.mjs → create-project-DTuy-l0z.mjs} +1 -1
- package/dist/{create-project-D8jQTwVQ.mjs → create-project-DV71ol5d.mjs} +4 -4
- package/dist/{db-BsiOAa0A.mjs → db-DVOkLH5X.mjs} +30 -24
- package/dist/{delete-CAma7nFi.mjs → delete-BbP5eopu.mjs} +4 -4
- package/dist/{deploy-D1gIPiAq.mjs → deploy-7H32EnUs.mjs} +114 -71
- package/dist/deploy-CE0Ev0Ob.mjs +2 -0
- package/dist/{deploy-managed-static-B9KVxY3X.mjs → deploy-managed-static-DlvcvnQT.mjs} +15 -15
- package/dist/{deploy-transport-B3mtEi_q.mjs → deploy-transport-BzGEj0Ge.mjs} +2 -2
- package/dist/deploy.mjs +7 -7
- package/dist/{dev-inbox-Rd6j_8vM.mjs → dev-inbox-D0jxye_D.mjs} +1 -1
- package/dist/{dispatch-BAbbn3jg.mjs → dispatch-DoUnxTNo.mjs} +15 -11
- package/dist/{dist-CfgIkieS.mjs → dist-B1PLt4_8.mjs} +1 -1
- package/dist/{dist-BVdsO7Py.mjs → dist-Cor9XGoz.mjs} +94 -200
- package/dist/{dist-Bn8Kodjp.mjs → dist-D15hFhP0.mjs} +1 -1
- package/dist/{domain-BAdwm-QS.mjs → domain-CA2wBgra.mjs} +5 -5
- package/dist/drizzle-9TubSZvI.mjs +1 -0
- package/dist/{email-BcjSyAL0.mjs → email-B9ayYQEG.mjs} +1 -1
- package/dist/{email-MwjA7kaL.mjs → email-DXpCc77w.mjs} +10 -10
- package/dist/{email-cloudflare-etpKiITL.mjs → email-cloudflare-D03g2TkS.mjs} +7 -7
- package/dist/{entry-B_0IhV64.mjs → entry-BEM8ZuGP.mjs} +40 -12
- package/dist/{env-B163-G1s.mjs → env-DgOQ9_8S.mjs} +6 -6
- package/dist/{env-public-CCdykygU.d.mts → env-public-6lqiSD2b.d.mts} +1 -0
- package/dist/{env-types-GRchm5dw.mjs → env-types-BicfKBhV.mjs} +1 -1
- package/dist/{env-validation-CuGfWRJd.mjs → env-validation-BmsdCZEk.mjs} +1 -1
- package/dist/{env-validation-D_KyMdab.mjs → env-validation-Dwq3PJzK.mjs} +3 -3
- package/dist/{gen-CYN3wiov.mjs → gen-BfmcIi2g.mjs} +5 -5
- package/dist/gen-NrOlWZaG.mjs +1 -0
- package/dist/{github-cmd-C8QsnJQs.mjs → github-cmd-CY9LUqLh.mjs} +4 -4
- package/dist/{handler-D5K_yP6T.d.mts → handler-BbkSPzGF.d.mts} +90 -8
- package/dist/{headers-Bi4bOAwp.mjs → headers-D522zd0A.mjs} +2 -2
- package/dist/help-BeAFFE5C.mjs +1 -0
- package/dist/{help-B2sFwn9b.mjs → help-CxSlPpzJ.mjs} +40 -10
- package/dist/{inbound-BuTfm11U.mjs → inbound-VrOLqwZY.mjs} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +91 -57
- package/dist/{info-Bxunp14X.mjs → info-7VDlhtyy.mjs} +4 -4
- package/dist/{init-DGFQMnbk.mjs → init-DxYyOs4-.mjs} +103 -43
- package/dist/{link-CwrfpjIM.mjs → link-Ddmod1dZ.mjs} +5 -5
- package/dist/{list-hKoW5z-b.mjs → list-MogaugiO.mjs} +5 -5
- package/dist/{live-JheIDZKc.d.mts → live-Bt8Y_0bg.d.mts} +1 -1
- package/dist/{local-d1-CpaPbd_L.mjs → local-d1-BHBnKWRb.mjs} +1 -1
- package/dist/{log-vqY3pqwI.mjs → log-BMwmN5Ae.mjs} +2 -2
- package/dist/{login-f2eu2TQh.mjs → login-Cttnagmm.mjs} +4 -4
- package/dist/login-DgDwlKc_.mjs +1 -0
- package/dist/{logs-CEWqD-_B.mjs → logs-CAszUWZI.mjs} +4 -4
- package/dist/{migrate-DYfdWBXt.mjs → migrate-DyT2jJ8y.mjs} +5 -5
- package/dist/migrate-n49ZeS1X.mjs +1 -0
- package/dist/{mime-srOklVVv.mjs → mime-BAyHPskU.mjs} +1 -1
- package/dist/nitro.mjs +3 -3
- package/dist/{node-uN8_zxJr.mjs → node-WB7c2N4L.mjs} +2 -2
- package/dist/operator-cmd-d2MvJOrl.mjs +1 -0
- package/dist/{operator-cmd-DCr_QGMH.mjs → operator-cmd-skshjMGl.mjs} +4 -4
- package/dist/output-BW9uK099.mjs +1 -0
- package/dist/{output-CKguMgr7.mjs → output-BpgYODYx.mjs} +3 -3
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +30 -20
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +3 -3
- package/dist/pages/islands-plugin.mjs +2 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/{parse-filename-CUbj-1MP.mjs → parse-filename-DioPHiR9.mjs} +1 -35
- package/dist/{picocolors-BTps1_gs.mjs → picocolors-BsDfhxIw.mjs} +1 -1
- package/dist/{platform-args-B7ke06up.mjs → platform-args-DVbVClZl.mjs} +12 -4
- package/dist/platform-args-kQrgxScY.mjs +1 -0
- package/dist/{platform-auth-config-qGvEuns3.mjs → platform-auth-config-C-pm5Qzx.mjs} +6 -6
- package/dist/{platform-auth-protection-CyLcD6ot.mjs → platform-auth-protection-SHhvim1L.mjs} +4 -4
- package/dist/{platform-auth-recovery-B2LKI8V2.mjs → platform-auth-recovery-DXVWs-wA.mjs} +4 -4
- package/dist/{platform-cmd-CX7phm7V.mjs → platform-cmd-D5I1beUX.mjs} +7 -7
- package/dist/{platform-cmd-B2ec5eFg.mjs → platform-cmd-PiNRkopU.mjs} +1 -1
- package/dist/{platform-domain-DDNK2y-4.mjs → platform-domain-jpmBfZeb.mjs} +4 -4
- package/dist/{platform-lifecycle-CWc5gr6c.mjs → platform-lifecycle-DH3Yr1qQ.mjs} +1 -1
- package/dist/{platform-lifecycle-3CR98Tg2.mjs → platform-lifecycle-DyKmuNY6.mjs} +28 -17
- package/dist/{platform-management-o3LCCeE4.mjs → platform-management--vDwSn35.mjs} +11 -5
- package/dist/{platform-management-DAE6g2QU.mjs → platform-management-7m-PLaPJ.mjs} +1 -1
- package/dist/{platform-plans-config-CBMZxCep.mjs → platform-plans-config-CeydDSj0.mjs} +2 -2
- package/dist/{platform-recovery-Dmsg7lWA.mjs → platform-recovery-BiNpZZab.mjs} +2 -2
- package/dist/{platform-setup-hFbnWAVQ.mjs → platform-setup-Ca53gtt0.mjs} +3 -2
- package/dist/{plugin-inference-Bekzjuqw.mjs → plugin-inference-DUjCd55H.mjs} +145 -218
- package/dist/{prepare-HKo7Rh5V.mjs → prepare-BcAE5Sdj.mjs} +3 -3
- package/dist/prepare-C4I0f--h.mjs +1 -0
- package/dist/{prepare-DepAGBcV.mjs → prepare-DA-17DhO.mjs} +5 -5
- package/dist/{prerender-render-Bfsumdkv.mjs → prerender-render-Cijv7UFo.mjs} +11 -6
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-8ylYGx-O.mjs → project-cmd-DA4K5faU.mjs} +17 -17
- package/dist/{project-team-Bvpl78we.mjs → project-team-CQBNveX3.mjs} +4 -4
- package/dist/{project-token-QWHoJH2t.mjs → project-token-CCalFyQf.mjs} +4 -4
- package/dist/{project-zero-trust-8tJ-RFvu.mjs → project-zero-trust-DPnkiEuT.mjs} +4 -4
- package/dist/{protocol-Ssc_LhHj.d.mts → protocol-BBDpJz3G.d.mts} +3 -1
- package/dist/{protocol-bAUUkx70.mjs → protocol-DimNxVRr.mjs} +41 -16
- package/dist/{provision-BgXFDv0d.mjs → provision-BFLCrnUp.mjs} +1 -1
- package/dist/{provision-DZKYCEJg.mjs → provision-DtROpNNI.mjs} +3 -3
- package/dist/{requests-Vk5Zyhcy.mjs → requests-BpH0kImL.mjs} +3 -3
- package/dist/resolve-project-DD1vu8s9.mjs +1 -0
- package/dist/{resolve-project-WpwkCB_c.mjs → resolve-project-Xoi6eTWY.mjs} +1 -1
- package/dist/{rollback-CH4yMQys.mjs → rollback-CXS1tAa-.mjs} +4 -4
- package/dist/{rolldown-runtime-DXIUcv95.mjs → rolldown-runtime-3h0WiCiA.mjs} +1 -1
- package/dist/{routing-assets-VkrKIbxE.mjs → routing-assets-DdSFxoLp.mjs} +10 -4
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +4 -4
- package/dist/runtime/email.mjs +3 -3
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/routing.d.mts +17 -76
- package/dist/runtime/routing.mjs +277 -216
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{scan-D2-FcLHs.mjs → scan-8IzYXiU_.mjs} +12 -11
- package/dist/{secret-wr6Sn4Xa.mjs → secret-BbXHfLAt.mjs} +6 -6
- package/dist/{skills-C_yRTg0g.mjs → skills-CrUO3PJ0.mjs} +1 -1
- package/dist/{subcommand-prompt-CNZc4XUd.mjs → subcommand-prompt-D9OhhbGG.mjs} +2 -2
- package/dist/{version-metadata-B1Bm2wSq.mjs → version-metadata-tS39iW09.mjs} +1 -1
- package/dist/wrangler-BLb3_luP.mjs +1 -0
- package/dist/{wrangler-C9XSzrju.mjs → wrangler-F96NnLyb.mjs} +13 -5
- package/dist/{wrapper-DGsYwNi6.mjs → wrapper-D3sZyh2C.mjs} +3 -3
- package/dist/{ws-nnFnAyQb.d.mts → ws-BH-im_tX.d.mts} +1 -1
- package/docs/guide/ai.md +1 -1
- package/docs/guide/database/postgresql.md +1 -1
- package/docs/guide/database.md +26 -0
- package/docs/guide/email/domains.md +1 -1
- package/docs/guide/pages-routing/actions-and-forms.md +1 -1
- package/docs/guide/platform/installation/credentials.md +1 -1
- package/docs/guide/platform/installation/domains.md +16 -0
- package/docs/guide/self-hosted-platform.md +1 -1
- package/docs/guide/server-routing.md +1 -1
- package/docs/integrations/cloudflare.md +1 -0
- package/docs/reference/api/env.md +1 -1
- package/docs/reference/api/rewrites.md +1 -1
- package/docs/reference/api/types.md +1 -0
- package/docs/reference/cli/platform-installation.md +3 -2
- package/docs/reference/cli/setup.md +17 -0
- package/docs/reference/config.md +13 -0
- package/docs/reference/resource-inference.md +4 -0
- package/package.json +22 -22
- package/sandbox.Dockerfile +1 -1
- package/schema.json +23 -3
- package/dist/cf-build-output-Dcmxa-Zm.mjs +0 -1
- package/dist/cf-user-agent-BkEHPDLA.mjs +0 -16
- package/dist/client-DAnfyMe9.mjs +0 -1
- package/dist/deploy-Dc0XsCQj.mjs +0 -2
- package/dist/gen-Cf-RBVg4.mjs +0 -1
- package/dist/help-w-xlx_kq.mjs +0 -1
- package/dist/login-08mBwZfI.mjs +0 -1
- package/dist/migrate-Di-4EuoE.mjs +0 -1
- package/dist/operator-cmd-Bv20yLu2.mjs +0 -1
- package/dist/platform-args-B_LrqEZB.mjs +0 -1
- package/dist/prepare-EVEbQ9n2.mjs +0 -1
- package/dist/resolve-project-PnhzMtY6.mjs +0 -1
- package/dist/wrangler-DAdxHEzh.mjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as HeadDescriptor, t as HeadConfig } from "./head-C8K_iGe6.mjs";
|
|
2
|
-
import { n as CloudBindings, r as CloudContext } from "./handler-D5K_yP6T.mjs";
|
|
3
2
|
import { a as PageRenderMode, t as DevCssAsset } from "./types-7AIz0OZu.mjs";
|
|
3
|
+
import { n as CloudBindings, r as CloudContext } from "./handler-BbkSPzGF.mjs";
|
|
4
4
|
//#region src/pages/protocol.d.ts
|
|
5
5
|
/** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
|
|
6
6
|
declare function safeJsonStringify(value: unknown): string;
|
|
@@ -14,6 +14,8 @@ type PageObject = {
|
|
|
14
14
|
head?: HeadDescriptor;
|
|
15
15
|
deferred?: Array<string>;
|
|
16
16
|
deferredKeys?: Record<string, string>;
|
|
17
|
+
/** Error message per failed deferred group in a prefetch payload. */
|
|
18
|
+
deferredErrors?: Record<string, string>;
|
|
17
19
|
};
|
|
18
20
|
type PageRenderResult = string | ReadableStream<Uint8Array>;
|
|
19
21
|
type PageHandler = ((c: CloudContext) => unknown | Promise<unknown>) | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { n as isConvertedResponse } from "./response-Tn7rU0MV.mjs";
|
|
2
|
+
import { i as searchWithoutActionKey, n as hasActionKey } from "./action-key-XZ9HkWAO.mjs";
|
|
2
3
|
import { i as separateDeferred, n as DEFERRED, t as ValidationError } from "./validation-error-Dg9Recn1.mjs";
|
|
3
4
|
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "./head-D2VF4ApL.mjs";
|
|
4
5
|
import { i as escapeScriptJson, r as serializePageData } from "./serialize-YHvlcG3Q.mjs";
|
|
@@ -131,6 +132,24 @@ async function extractProps(result) {
|
|
|
131
132
|
}
|
|
132
133
|
return result ?? {};
|
|
133
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Run a page loader. Responses from convertReturnValue (withValidator/middleware
|
|
137
|
+
* paths) always flow through to extractProps — they wrap plain return values
|
|
138
|
+
* (objects as 200 JSON, null/undefined as 204, strings as text/html) and must be
|
|
139
|
+
* unwrapped as page props.
|
|
140
|
+
*
|
|
141
|
+
* User-returned Responses: pass through errors/redirects (>= 300) and non-JSON
|
|
142
|
+
* 200s (file downloads, streams). JSON 200s are still extracted as props for
|
|
143
|
+
* backward compat with loaders using c.json().
|
|
144
|
+
*/
|
|
145
|
+
async function runLoader(handler, c) {
|
|
146
|
+
const result = await handler(c);
|
|
147
|
+
if (result instanceof Response && !isConvertedResponse(result)) {
|
|
148
|
+
const contentType = result.headers.get("content-type") || "";
|
|
149
|
+
if (result.status >= 300 || !contentType.includes("application/json")) return result;
|
|
150
|
+
}
|
|
151
|
+
return extractProps(result);
|
|
152
|
+
}
|
|
134
153
|
/** Flatten withValidator's { issues: [{ slot, issues: [{ message, path }] }] } into { field: message } */
|
|
135
154
|
function flattenValidationErrors(body) {
|
|
136
155
|
const errors = {};
|
|
@@ -199,12 +218,9 @@ async function handlePageGet(handler, headFn, c, componentId, renderFn, getAsset
|
|
|
199
218
|
const shared = c.get("shared") ?? {};
|
|
200
219
|
let props = {};
|
|
201
220
|
if (handler) {
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
if (result.status >= 300 || !contentType.includes("application/json")) return result;
|
|
206
|
-
}
|
|
207
|
-
props = await extractProps(result);
|
|
221
|
+
const loaded = await runLoader(handler, c);
|
|
222
|
+
if (loaded instanceof Response) return loaded;
|
|
223
|
+
props = loaded;
|
|
208
224
|
}
|
|
209
225
|
const pageHead = headFn ? headFn(c, props) : void 0;
|
|
210
226
|
const middlewareHead = c.get("headDefaults");
|
|
@@ -229,22 +245,25 @@ async function handlePageGet(handler, headFn, c, componentId, renderFn, getAsset
|
|
|
229
245
|
if (renderMode !== "island" && isPagesRequest(c)) {
|
|
230
246
|
if (c.req.header("purpose") === "prefetch" && hasDeferred) {
|
|
231
247
|
const resolvedProps = { ...immediateProps };
|
|
232
|
-
|
|
248
|
+
let deferredErrors;
|
|
249
|
+
await Promise.all(Object.entries(deferredMap).map(async ([group, { resolver, keys }]) => {
|
|
233
250
|
try {
|
|
234
251
|
const data = await resolver(c);
|
|
235
|
-
if (keys.length === 1) resolvedProps[keys[0]] = data;
|
|
252
|
+
if (keys.length === 1) resolvedProps[keys[0]] = data ?? null;
|
|
236
253
|
else {
|
|
237
|
-
const obj = data;
|
|
254
|
+
const obj = typeof data === "object" && data !== null ? data : {};
|
|
238
255
|
for (const key of keys) resolvedProps[key] = obj[key];
|
|
239
256
|
}
|
|
240
|
-
} catch {
|
|
241
|
-
|
|
257
|
+
} catch (err) {
|
|
258
|
+
(deferredErrors ??= {})[group] = deferredErrorMessage(err, options?.dev === true);
|
|
259
|
+
for (const key of keys) delete resolvedProps[key];
|
|
242
260
|
}
|
|
243
261
|
}));
|
|
244
262
|
return pageJsonResponse(c, {
|
|
245
263
|
...pageObj,
|
|
246
264
|
props: resolvedProps,
|
|
247
|
-
deferred: void 0
|
|
265
|
+
deferred: void 0,
|
|
266
|
+
...deferredErrors && { deferredErrors }
|
|
248
267
|
});
|
|
249
268
|
}
|
|
250
269
|
if (!hasDeferred) return pageJsonResponse(c, pageObj);
|
|
@@ -254,7 +273,7 @@ async function handlePageGet(handler, headFn, c, componentId, renderFn, getAsset
|
|
|
254
273
|
c.header("Vary", headers.get("Vary"));
|
|
255
274
|
return streamDeferredResponse(JSON.stringify(pageObj) + "\n", deferredMap, c, "application/x-ndjson", options?.dev === true, (group, data) => JSON.stringify({
|
|
256
275
|
__deferred: group,
|
|
257
|
-
data
|
|
276
|
+
data: data ?? null
|
|
258
277
|
}) + "\n", (group, error) => JSON.stringify({
|
|
259
278
|
__deferred: group,
|
|
260
279
|
error
|
|
@@ -298,14 +317,16 @@ async function handlePageMutation(mutationHandler, getHandler, headFn, c, compon
|
|
|
298
317
|
props,
|
|
299
318
|
params: requestParams(c),
|
|
300
319
|
shared,
|
|
301
|
-
url: requestPathWithSearch(c),
|
|
320
|
+
url: hasActionKey(c.req.raw) ? c.req.path + searchWithoutActionKey(new URL(c.req.url).search) : requestPathWithSearch(c),
|
|
302
321
|
errors,
|
|
303
322
|
...head && { head }
|
|
304
323
|
};
|
|
305
324
|
}
|
|
306
325
|
/** Re-run the GET loader and respond with the page, optionally carrying validation errors. */
|
|
307
326
|
async function respondWithPage(errors) {
|
|
308
|
-
const
|
|
327
|
+
const loaded = getHandler ? await runLoader(getHandler, c) : {};
|
|
328
|
+
if (loaded instanceof Response) return loaded;
|
|
329
|
+
const pageObj = buildMutationPageObj(stripDeferred(loaded), errors);
|
|
309
330
|
if (isPagesRequest(c)) return pageJsonResponse(c, pageObj);
|
|
310
331
|
const { html, assetTags } = await renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags);
|
|
311
332
|
return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
@@ -324,7 +345,11 @@ async function handlePageMutation(mutationHandler, getHandler, headFn, c, compon
|
|
|
324
345
|
if (result instanceof Response) {
|
|
325
346
|
const status = result.status;
|
|
326
347
|
if (status >= 300 && status < 400) return result;
|
|
327
|
-
if (status === 400)
|
|
348
|
+
if (status === 400) {
|
|
349
|
+
const body = await result.clone().json().catch(() => null);
|
|
350
|
+
if (Array.isArray(body?.issues)) return respondWithErrors(flattenValidationErrors(body));
|
|
351
|
+
return result;
|
|
352
|
+
}
|
|
328
353
|
if (status !== 204) return result;
|
|
329
354
|
}
|
|
330
355
|
if (renderMode === "island") return Response.json({ success: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-
|
|
1
|
+
export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-DtROpNNI.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
-
import { i as voidWarn, r as voidLog } from "./log-
|
|
3
|
-
import {
|
|
2
|
+
import { i as voidWarn, r as voidLog } from "./log-BMwmN5Ae.mjs";
|
|
3
|
+
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-F96NnLyb.mjs";
|
|
4
4
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
|
|
5
|
-
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-
|
|
5
|
+
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-8jEYIeim.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { closeSync, existsSync, fsyncSync, lstatSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, unlinkSync, writeSync } from "node:fs";
|
|
8
8
|
import { isRecord } from "@void/deploy-core";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { f as import_picocolors, i as dim } from "./output-BpgYODYx.mjs";
|
|
6
6
|
//#region src/cli/requests.ts
|
|
7
7
|
async function runRequestsCommand(root, range, status) {
|
|
8
8
|
console.log();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as inferDefaultSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
3
|
-
import { L as log } from "./dist-
|
|
3
|
+
import { L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/resolve-project.ts
|
|
6
6
|
function getRequestedProjectSlug(options) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import { r as
|
|
3
|
+
import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-BpgYODYx.mjs";
|
|
6
6
|
//#region src/cli/rollback.ts
|
|
7
7
|
async function runRollbackCommand(root, deployId, explicitPlatform) {
|
|
8
8
|
console.log();
|
|
@@ -74,7 +74,7 @@ async function runRollbackCommand(root, deployId, explicitPlatform) {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
|
|
77
|
-
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
77
|
+
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-DsSaw2BT.mjs");
|
|
78
78
|
const context = resolveCloudflareOperationContext(root);
|
|
79
79
|
const status = await readCloudflareWorkerStatus(context);
|
|
80
80
|
const deployedVersionIds = new Set(status.deployedVersionIds);
|
|
@@ -6,7 +6,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
11
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
12
|
key = keys[i];
|
|
@@ -30,6 +30,7 @@ const ASSET_EXTENSIONS = [
|
|
|
30
30
|
];
|
|
31
31
|
function createManifestLoader() {
|
|
32
32
|
let cached = null;
|
|
33
|
+
let pending = null;
|
|
33
34
|
return async (request, env) => {
|
|
34
35
|
if (cached) return cached;
|
|
35
36
|
const injected = globalThis.__VITE_MANIFEST__;
|
|
@@ -39,10 +40,15 @@ function createManifestLoader() {
|
|
|
39
40
|
}
|
|
40
41
|
const assets = env?.ASSETS;
|
|
41
42
|
if (!assets || typeof assets.fetch !== "function") return null;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
pending ??= (async () => {
|
|
44
|
+
const response = await assets.fetch(new Request(new URL("/.vite/manifest.json", request.url).toString()));
|
|
45
|
+
if (!response.ok) return null;
|
|
46
|
+
cached = await response.json();
|
|
47
|
+
return cached;
|
|
48
|
+
})().finally(() => {
|
|
49
|
+
pending = null;
|
|
50
|
+
});
|
|
51
|
+
return pending;
|
|
46
52
|
};
|
|
47
53
|
}
|
|
48
54
|
const BINDING_HINT_SCRIPT = "<script type=\"module\" src=\"/@id/virtual:void/binding-hint\"><\/script>";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-DVk2DkTW.mjs";
|
|
2
2
|
//#region src/runtime/better-auth-mysql.d.ts
|
|
3
3
|
export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
|
|
4
4
|
export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-DVk2DkTW.mjs";
|
|
2
2
|
//#region src/runtime/better-auth-pg.d.ts
|
|
3
3
|
export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
|
|
4
4
|
export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../better-auth-shared-DVk2DkTW.mjs";
|
|
2
2
|
//#region src/runtime/better-auth.d.ts
|
|
3
3
|
export declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
|
|
4
4
|
export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as normalizeEmail, r as buildMime } from "../../mime-
|
|
2
|
-
import { n as compileEmailPattern, t as compareEmailRoutes } from "../../email-
|
|
3
|
-
import { y as registerEmailSink } from "../../dev-inbox-
|
|
4
|
-
import { a as createMessageProxy, n as MAX_INBOUND_HEADERS, t as MAX_INBOUND_BYTES } from "../../inbound-
|
|
1
|
+
import { o as normalizeEmail, r as buildMime } from "../../mime-BAyHPskU.mjs";
|
|
2
|
+
import { n as compileEmailPattern, t as compareEmailRoutes } from "../../email-B9ayYQEG.mjs";
|
|
3
|
+
import { y as registerEmailSink } from "../../dev-inbox-D0jxye_D.mjs";
|
|
4
|
+
import { a as createMessageProxy, n as MAX_INBOUND_HEADERS, t as MAX_INBOUND_BYTES } from "../../inbound-VrOLqwZY.mjs";
|
|
5
5
|
//#region src/runtime/email/testing.ts
|
|
6
6
|
/**
|
|
7
7
|
* Test harnesses for void/email.
|
package/dist/runtime/email.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as bytesToBase64 } from "../base64-DVrOndmI.mjs";
|
|
2
|
-
import { a as newId, n as MimeError, o as normalizeEmail, r as buildMime } from "../mime-
|
|
3
|
-
import { a as DEV_INBOX_ENV_VAR, b as serializeCapturedMessage, c as DEV_INBOX_TOKEN_ENV_VAR, d as captureMessage, h as hasActiveSink, i as DEV_INBOX_CAPTURE_URL, p as dispatchToSinks } from "../dev-inbox-
|
|
2
|
+
import { a as newId, n as MimeError, o as normalizeEmail, r as buildMime } from "../mime-BAyHPskU.mjs";
|
|
3
|
+
import { a as DEV_INBOX_ENV_VAR, b as serializeCapturedMessage, c as DEV_INBOX_TOKEN_ENV_VAR, d as captureMessage, h as hasActiveSink, i as DEV_INBOX_CAPTURE_URL, p as dispatchToSinks } from "../dev-inbox-D0jxye_D.mjs";
|
|
4
4
|
import { o as withTimeout, r as readBoundedJson } from "../email-protocol-D9nTvhCp.mjs";
|
|
5
|
-
import { a as createMessageProxy, c as isForwardableEmailMessage, d as readProjectSlug, f as replyEmail, i as bytesToReadableStream, l as parseEmail, o as defineEmail, p as tryGetRawRuntimeEnv, r as ParseEmailError, s as enactEmailActions, u as readEnvString } from "../inbound-
|
|
5
|
+
import { a as createMessageProxy, c as isForwardableEmailMessage, d as readProjectSlug, f as replyEmail, i as bytesToReadableStream, l as parseEmail, o as defineEmail, p as tryGetRawRuntimeEnv, r as ParseEmailError, s as enactEmailActions, u as readEnvString } from "../inbound-VrOLqwZY.mjs";
|
|
6
6
|
import { isRecord } from "@void/deploy-core";
|
|
7
7
|
//#region src/runtime/email.ts
|
|
8
8
|
function makeError(code, message, cause) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
2
|
import { a as number, c as url, i as json, n as boolean, o as oneOf, r as email, s as string, t as EnvSchema } from "../env-helpers-CyKtOBpj.mjs";
|
|
3
|
-
import { a as _getSchemaDefaults, c as defineEnv, i as _getRegisteredSchema, l as env, n as EnvValidationReport, o as _hasRegisteredSchema, r as ValidatedEnv, s as _validateEnvOnce, t as EnvValidationError, u as validateAllEnv } from "../env-public-
|
|
3
|
+
import { a as _getSchemaDefaults, c as defineEnv, i as _getRegisteredSchema, l as env, n as EnvValidationReport, o as _hasRegisteredSchema, r as ValidatedEnv, s as _validateEnvOnce, t as EnvValidationError, u as validateAllEnv } from "../env-public-6lqiSD2b.mjs";
|
|
4
4
|
export { type EnvSchema, EnvValidationError, EnvValidationReport, ValidatedEnv, _getRegisteredSchema, _getSchemaDefaults, _hasRegisteredSchema, _validateEnvOnce, boolean, defineEnv, email, env, json, number, oneOf, string, url, validateAllEnv };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-
|
|
2
|
+
import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-BbkSPzGF.mjs";
|
|
3
3
|
export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, type Deferred, type HandlerInput, type InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
|
package/dist/runtime/live.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
-
import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-
|
|
2
|
+
import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-Bt8Y_0bg.mjs";
|
|
3
3
|
export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, __setLiveDev, defineLiveStream };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet } from "../protocol-
|
|
1
|
+
import { A as filterInternalBindings, M as createClientAssetTags, N as createManifestLoader, O as createAssetFallback, j as ClientAssetTags, k as createWorkerFetch } from "../handler-BbkSPzGF.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet } from "../protocol-BBDpJz3G.mjs";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
|
-
import { Context,
|
|
4
|
+
import { Context, Hono, MiddlewareHandler } from "hono";
|
|
5
5
|
//#region src/runtime/routing-errors.d.ts
|
|
6
6
|
type ErrorRendererOptions = {
|
|
7
7
|
dev?: boolean;
|
|
@@ -16,78 +16,6 @@ type ErrorRenderer = {
|
|
|
16
16
|
/** Error rendering is shared by generated Pages apps; production never includes exception details. */
|
|
17
17
|
export declare function createErrorRenderer(options: ErrorRendererOptions): ErrorRenderer;
|
|
18
18
|
//#endregion
|
|
19
|
-
//#region src/runtime/routing-worker.d.ts
|
|
20
|
-
type AssetBinding = {
|
|
21
|
-
fetch: (request: Request) => Promise<Response>;
|
|
22
|
-
};
|
|
23
|
-
type RuntimeEnvironment = Record<string, unknown> & {
|
|
24
|
-
ASSETS?: AssetBinding;
|
|
25
|
-
};
|
|
26
|
-
type AssetFallbackOptions = {
|
|
27
|
-
assetsDir?: string;
|
|
28
|
-
serveSpaFallback?: boolean;
|
|
29
|
-
notFound?: "none" | "404-page" | "single-page-application";
|
|
30
|
-
};
|
|
31
|
-
export declare function createAssetFallback(options?: AssetFallbackOptions): (request: Request, env: RuntimeEnvironment, response: Response) => Promise<Response>;
|
|
32
|
-
/** Hide platform capabilities without copying bindings or changing application bindings. */
|
|
33
|
-
export declare function filterInternalBindings<E extends Record<string, unknown>>(env: E, prefixes: Array<string>, exactNames?: Array<string>): E;
|
|
34
|
-
type WorkerFetchOptions = {
|
|
35
|
-
app: {
|
|
36
|
-
fetch: (request: Request, env: RuntimeEnvironment, context: ExecutionContext) => Response | Promise<Response>;
|
|
37
|
-
};
|
|
38
|
-
assets: ReturnType<typeof createAssetFallback>;
|
|
39
|
-
withRawEnv: (env: RuntimeEnvironment, fn: () => Promise<Response>) => Promise<Response>;
|
|
40
|
-
withRuntimeEnv: (env: RuntimeEnvironment, fn: () => Promise<Response>) => Promise<Response>;
|
|
41
|
-
filterBindings: (env: RuntimeEnvironment) => RuntimeEnvironment;
|
|
42
|
-
validateEnv?: (env: RuntimeEnvironment) => Promise<void>;
|
|
43
|
-
/** Authored/generated version metadata binding used to prove the served native version. */
|
|
44
|
-
versionMetadataBinding?: string;
|
|
45
|
-
remoteEnv?: (env: RuntimeEnvironment) => RuntimeEnvironment;
|
|
46
|
-
internalRoute: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext) => Promise<Response | null>;
|
|
47
|
-
collectPrerenderPaths: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext) => Promise<Array<string>>;
|
|
48
|
-
emailReceipt?: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext) => Promise<Response>;
|
|
49
|
-
isr?: {
|
|
50
|
-
deploymentId: string;
|
|
51
|
-
handle: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext, render: (request: Request) => Promise<Response>) => Promise<Response | null>;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
export declare function createWorkerFetch(options: WorkerFetchOptions): (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext) => Promise<Response>;
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/runtime/routing-assets.d.ts
|
|
57
|
-
type ClientAssetTags = {
|
|
58
|
-
css: string;
|
|
59
|
-
preloads: string;
|
|
60
|
-
body: string;
|
|
61
|
-
devCss?: Array<DevCssAsset>;
|
|
62
|
-
};
|
|
63
|
-
type ClientManifest = Record<string, {
|
|
64
|
-
file?: string;
|
|
65
|
-
imports?: Array<string>;
|
|
66
|
-
css?: Array<string>;
|
|
67
|
-
/** Build-proven fingerprinted outputs; absent in older/third-party manifests. */
|
|
68
|
-
immutableFiles?: Array<string>;
|
|
69
|
-
}>;
|
|
70
|
-
type ManifestLoader = (request: Request, env: RuntimeEnvironment) => Promise<ClientManifest | null>;
|
|
71
|
-
export declare function createManifestLoader(): ManifestLoader;
|
|
72
|
-
type ClientAssetOptions = {
|
|
73
|
-
entryId: string;
|
|
74
|
-
entryUrl: string;
|
|
75
|
-
extraEntryId?: string;
|
|
76
|
-
extraEntryUrl?: string;
|
|
77
|
-
pageCssKeys?: Record<string, Array<string>>;
|
|
78
|
-
devRootPhases?: Record<string, Array<Array<string>>>;
|
|
79
|
-
kind: "ssr" | "pages" | "islands";
|
|
80
|
-
dev?: boolean;
|
|
81
|
-
reactRefresh?: boolean;
|
|
82
|
-
devCss?: (request: Request, env: RuntimeEnvironment, options: {
|
|
83
|
-
kind: "pages" | "islands";
|
|
84
|
-
componentId: string;
|
|
85
|
-
rootPhases: Array<Array<string>>;
|
|
86
|
-
}) => Promise<unknown>;
|
|
87
|
-
};
|
|
88
|
-
/** Frameworks supply only client entry IDs and active layout/page roots. */
|
|
89
|
-
export declare function createClientAssetTags(options: ClientAssetOptions, loadManifest?: ManifestLoader): (request: Request, env: RuntimeEnvironment, componentId?: string) => Promise<ClientAssetTags>;
|
|
90
|
-
//#endregion
|
|
91
19
|
//#region src/runtime/routing-pages.d.ts
|
|
92
20
|
type PageGetArguments = Parameters<typeof handlePageGet>;
|
|
93
21
|
type PageModule = {
|
|
@@ -106,6 +34,19 @@ type PageRouteOptions = {
|
|
|
106
34
|
renderOptions: PageGetArguments[7];
|
|
107
35
|
namedActions?: boolean;
|
|
108
36
|
};
|
|
37
|
+
/** Records a handler that answers a route, so the marker can tell it from middleware. */
|
|
38
|
+
export declare function markRouteHandler<T extends Function>(handler: T): T;
|
|
39
|
+
/**
|
|
40
|
+
* Runs before auth and user middleware, so a c.redirect() there leaves the
|
|
41
|
+
* action key out too. It marks the request only when a page with named actions
|
|
42
|
+
* is the route that will answer it, not when a broad page pattern also matches.
|
|
43
|
+
*
|
|
44
|
+
* `matchedRoutes` comes from 'hono/route' of the same Hono copy as the app: it
|
|
45
|
+
* reads the request through a Symbol that each copy defines for itself.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createNamedActionMarker(matchedRoutes: (c: Context) => Array<{
|
|
48
|
+
handler: Function;
|
|
49
|
+
}>): MiddlewareHandler;
|
|
109
50
|
export declare function createPageGetHandler(options: PageRouteOptions): (c: Context) => Promise<Response>;
|
|
110
51
|
export declare function createPageMutationHandler(options: PageRouteOptions): (c: Context) => Promise<Response>;
|
|
111
52
|
export declare function createPagesFallback(options: {
|
|
@@ -175,4 +116,4 @@ export declare function markNoMatch(request: Request, response: Response): Respo
|
|
|
175
116
|
export declare function createHttpRouteHandler(load: () => Promise<Record<string, (c: Context) => unknown>>, method: string): (c: Context) => Promise<Response>;
|
|
176
117
|
export declare function createModuleLoader<T>(load: () => Promise<T>, cache?: boolean): () => Promise<T>;
|
|
177
118
|
//#endregion
|
|
178
|
-
export {};
|
|
119
|
+
export { createAssetFallback, createClientAssetTags, createManifestLoader, createWorkerFetch, filterInternalBindings };
|