void 1.1.11 → 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-R35a4Oa8.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-VHmiKZmP.mjs → auth-link-C87vGXM-.mjs} +5 -5
- package/dist/{auth-router-O_Wrs5kg.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-CMZiMn46.mjs → build-cmd-ex1g-j_e.mjs} +4 -4
- package/dist/{cache-TZ5Ab3d7.mjs → cache-oHzrnY3z.mjs} +4 -4
- package/dist/{cancel-deploy-DXoR6oC3.mjs → cancel-deploy-viAMD0Q_.mjs} +3 -3
- package/dist/cf-build-output-BJHuSsVN.mjs +1 -0
- package/dist/{cf-build-output-Bc8i3dzE.mjs → cf-build-output-BhVxldCw.mjs} +75 -10
- package/dist/{cf-user-agent-ChjQp2MU.mjs → cf-command-values-ByHk0xg4.mjs} +6 -16
- package/dist/cf-worker-settings-BECvvTVd.mjs +37 -0
- package/dist/cli/cli.mjs +139 -35
- package/dist/cli/cloudflare-operation-process.mjs +65 -18
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/{client-GuSO3v_x.mjs → client-BEkdj1kx.mjs} +58 -13
- 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-ZSErUl6Y.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-DH3GedbV.mjs → cloudflare-operations-Dh9dEHJj.mjs} +17 -7
- package/dist/{cloudflare-operations-Cm8lVx7W.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-yQuLbuiJ.mjs → connect-k7R2rPVA.mjs} +6 -6
- package/dist/{create-project-CGOo_OL_.mjs → create-project-DTuy-l0z.mjs} +1 -1
- package/dist/{create-project-DEEWJX_M.mjs → create-project-DV71ol5d.mjs} +4 -4
- package/dist/{db-COI-yTJE.mjs → db-DVOkLH5X.mjs} +79 -23
- package/dist/{delete-PgN6L_9N.mjs → delete-BbP5eopu.mjs} +4 -4
- package/dist/{deploy-DsW-PrRQ.mjs → deploy-7H32EnUs.mjs} +220 -95
- package/dist/deploy-CE0Ev0Ob.mjs +2 -0
- package/dist/{deploy-managed-static-Dqz06S2u.mjs → deploy-managed-static-DlvcvnQT.mjs} +74 -28
- package/dist/{deploy-transport-nY3vLXPL.mjs → deploy-transport-BzGEj0Ge.mjs} +2 -2
- package/dist/deploy.d.mts +22 -1
- package/dist/deploy.mjs +49 -8
- 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-DKlNI0SR.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-C0s3OvJk.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-BX2JFsgF.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/{fetch-DHLOuPyk.d.mts → fetch-CUX0tB78.d.mts} +14 -1
- package/dist/fetch-CtESUYWd.mjs +26 -0
- package/dist/{fetch-error-Dj3crt0e.mjs → fetch-error-Bw0n-IY-.mjs} +1 -1
- package/dist/{fetch-stream-PGgz4uGz.mjs → fetch-stream-BspOeTAI.mjs} +1 -1
- package/dist/{fetch-stream-CNxOrBdP.d.mts → fetch-stream-DfkAzZf-.d.mts} +1 -1
- package/dist/{gen-Bj6ZkOcI.mjs → gen-BfmcIi2g.mjs} +5 -5
- package/dist/gen-NrOlWZaG.mjs +1 -0
- package/dist/{github-cmd-DQDryS-5.mjs → github-cmd-CY9LUqLh.mjs} +4 -4
- package/dist/{handler-_PqY82xe.d.mts → handler-BbkSPzGF.d.mts} +91 -9
- package/dist/{headers-Bi4bOAwp.mjs → headers-D522zd0A.mjs} +2 -2
- package/dist/help-BeAFFE5C.mjs +1 -0
- package/dist/{help-D49SL_lN.mjs → help-CxSlPpzJ.mjs} +83 -12
- package/dist/{inbound-BuTfm11U.mjs → inbound-VrOLqwZY.mjs} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +125 -124
- package/dist/{info-Bxunp14X.mjs → info-7VDlhtyy.mjs} +4 -4
- package/dist/{init-DyTEY04s.mjs → init-DxYyOs4-.mjs} +103 -43
- package/dist/{link-CgOVn9EC.mjs → link-Ddmod1dZ.mjs} +5 -5
- package/dist/{list-CUfD9RSb.mjs → list-MogaugiO.mjs} +5 -5
- package/dist/{live-DJONVlQK.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-BJvGW5Eu.mjs → login-Cttnagmm.mjs} +4 -4
- package/dist/login-DgDwlKc_.mjs +1 -0
- package/dist/{logs-DeizBI4j.mjs → logs-CAszUWZI.mjs} +4 -4
- package/dist/{migrate-8rk56vV8.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-CA5QQyvE.mjs → operator-cmd-skshjMGl.mjs} +4 -4
- package/dist/output-BW9uK099.mjs +1 -0
- package/dist/{output-Ba6ZbrzY.mjs → output-BpgYODYx.mjs} +16 -4
- package/dist/pages/client.d.mts +2 -2
- package/dist/pages/client.mjs +48 -25
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +4 -4
- package/dist/pages/islands-plugin.d.mts +43 -5
- package/dist/pages/islands-plugin.mjs +100 -28
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.d.mts +2 -2
- package/dist/pages/serialize.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-CZaY812e.mjs → platform-auth-config-C-pm5Qzx.mjs} +6 -6
- package/dist/{platform-auth-protection-U9HCqoXv.mjs → platform-auth-protection-SHhvim1L.mjs} +4 -4
- package/dist/{platform-auth-recovery-B0BV2hfV.mjs → platform-auth-recovery-DXVWs-wA.mjs} +4 -4
- package/dist/{platform-cmd-CXrjk4fb.mjs → platform-cmd-D5I1beUX.mjs} +7 -7
- package/dist/{platform-cmd-D9lwFpcl.mjs → platform-cmd-PiNRkopU.mjs} +1 -1
- package/dist/{platform-domain-CXyq-68_.mjs → platform-domain-jpmBfZeb.mjs} +4 -4
- package/dist/{platform-lifecycle-Dz2cJsLX.mjs → platform-lifecycle-DH3Yr1qQ.mjs} +1 -1
- package/dist/{platform-lifecycle-D0TdyXbN.mjs → platform-lifecycle-DyKmuNY6.mjs} +405 -44
- package/dist/{platform-management-CnXhgxTM.mjs → platform-management--vDwSn35.mjs} +49 -5
- package/dist/{platform-management-BvgbusqL.mjs → platform-management-7m-PLaPJ.mjs} +1 -1
- package/dist/{platform-plans-config-BWn1S2Rv.mjs → platform-plans-config-CeydDSj0.mjs} +2 -2
- package/dist/{platform-recovery-CH_fThW6.mjs → platform-recovery-BiNpZZab.mjs} +2 -2
- package/dist/{platform-setup-YvN9VQXV.mjs → platform-setup-Ca53gtt0.mjs} +3 -2
- package/dist/{plugin-inference-Bekzjuqw.mjs → plugin-inference-DUjCd55H.mjs} +145 -218
- package/dist/{prepare-2XD6kh77.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-CpLYflCH.mjs → project-cmd-DA4K5faU.mjs} +18 -18
- package/dist/{project-team-CTSY7W7Q.mjs → project-team-CQBNveX3.mjs} +4 -4
- package/dist/{project-token-Cybtlfbl.mjs → project-token-CCalFyQf.mjs} +4 -4
- package/dist/{project-zero-trust-DKOtqyvu.mjs → project-zero-trust-DPnkiEuT.mjs} +4 -4
- package/dist/{protocol-B8sI8dRD.d.mts → protocol-BBDpJz3G.d.mts} +3 -1
- package/dist/{protocol-RNP0u7UY.mjs → protocol-DimNxVRr.mjs} +42 -17
- package/dist/{provision-UcYjpTRh.mjs → provision-BFLCrnUp.mjs} +1 -1
- package/dist/{provision-BuifYvLc.mjs → provision-DtROpNNI.mjs} +6 -5
- package/dist/{requests-Ryiazz9i.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-Or0EV3rP.mjs → rollback-CXS1tAa-.mjs} +10 -9
- 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/client-react.d.mts +2 -2
- package/dist/runtime/client-react.mjs +3 -3
- package/dist/runtime/client-solid.d.mts +2 -2
- package/dist/runtime/client-solid.mjs +3 -3
- package/dist/runtime/client-svelte.d.mts +2 -2
- package/dist/runtime/client-svelte.mjs +3 -3
- package/dist/runtime/client-vue.d.mts +2 -2
- package/dist/runtime/client-vue.mjs +3 -3
- package/dist/runtime/client.d.mts +2 -2
- package/dist/runtime/client.mjs +3 -3
- 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/fetch-server.d.mts +8 -0
- package/dist/runtime/fetch-server.mjs +30 -0
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +2 -2
- package/dist/runtime/fetch.d.mts +2 -2
- package/dist/runtime/fetch.mjs +3 -3
- 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-CClHaFxm.mjs → secret-BbXHfLAt.mjs} +6 -6
- package/dist/serialize-DtR8Vwa_.d.mts +18 -0
- package/dist/serialize-YHvlcG3Q.mjs +31 -0
- package/dist/{skills-C_yRTg0g.mjs → skills-CrUO3PJ0.mjs} +1 -1
- package/dist/{subcommand-prompt-Bm3ZlYgA.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-BOigE1xJ.mjs → wrapper-D3sZyh2C.mjs} +5 -3
- package/dist/{ws-CsBNxv86.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/deployment.md +2 -0
- package/docs/guide/edge/headers.md +1 -1
- package/docs/guide/email/domains.md +1 -1
- package/docs/guide/email/receiving.md +1 -1
- package/docs/guide/email/sending.md +3 -3
- package/docs/guide/pages-routing/actions-and-forms.md +1 -1
- package/docs/guide/pages-routing/markdown.md +3 -1
- package/docs/guide/platform/administration/email.md +7 -1
- package/docs/guide/platform/installation/ci.md +2 -0
- package/docs/guide/platform/installation/credentials.md +24 -6
- package/docs/guide/platform/installation/domains.md +16 -0
- package/docs/guide/platform/installation/maintenance.md +32 -2
- package/docs/guide/platform/installation/setup.md +1 -1
- package/docs/guide/self-hosted-platform.md +1 -1
- package/docs/guide/server-routing.md +1 -1
- package/docs/guide/typed-fetch.md +1 -1
- package/docs/integrations/cloudflare.md +2 -1
- package/docs/integrations/frameworks/tanstack-start.md +25 -0
- package/docs/reference/api/deploy.md +35 -3
- 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/database.md +15 -0
- package/docs/reference/cli/platform-installation.md +5 -2
- package/docs/reference/cli/project.md +4 -2
- package/docs/reference/cli/setup.md +17 -0
- package/docs/reference/cli.md +1 -0
- package/docs/reference/config.md +14 -1
- package/docs/reference/resource-inference.md +4 -0
- package/package.json +23 -22
- package/sandbox.Dockerfile +1 -1
- package/schema.json +23 -3
- package/dist/cf-build-output-BU3hqdHu.mjs +0 -1
- package/dist/client-DrdeJgHR.mjs +0 -1
- package/dist/deploy-CxNgEYr4.mjs +0 -2
- package/dist/fetch-sAcwjzLO.mjs +0 -18
- package/dist/gen-DsCukhuw.mjs +0 -1
- package/dist/help-DOFygYi4.mjs +0 -1
- package/dist/login-alAlxw4S.mjs +0 -1
- package/dist/migrate-D2odrAmh.mjs +0 -1
- package/dist/operator-cmd-D7toMPJ9.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/serialize-BtQyaYoC.mjs +0 -20
- package/dist/serialize-CfSwWfF2.d.mts +0 -10
- package/dist/wrangler-DAdxHEzh.mjs +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
|
|
2
2
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { extractPageDataFromHtml } from "@void/isr/core";
|
|
3
4
|
//#region src/prerender-render.ts
|
|
5
|
+
const PAGE_DATA_SCRIPT_ID = "__VOID_PAGE_DATA__";
|
|
4
6
|
function outputFileForPath(path) {
|
|
5
7
|
return path === "/" ? "index.html" : `${path.slice(1)}.html`;
|
|
6
8
|
}
|
|
@@ -102,13 +104,16 @@ async function renderPrerenderPaths(paths, clientDir, fetchPath, fetchPageData,
|
|
|
102
104
|
}
|
|
103
105
|
mkdirSync(dirname(outputPath), { recursive: true });
|
|
104
106
|
writeFileSync(outputPath, html);
|
|
105
|
-
|
|
107
|
+
const embeddedPageData = extractPageDataFromHtml(html);
|
|
108
|
+
let pageData;
|
|
109
|
+
if (embeddedPageData !== null) pageData = JSON.parse(embeddedPageData);
|
|
110
|
+
else if (fetchPageData && html.includes(PAGE_DATA_SCRIPT_ID)) {
|
|
106
111
|
const pageDataResponse = await fetchPageData(path);
|
|
107
|
-
if (pageDataResponse.headers.get("X-VoidPages"))
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
if (pageDataResponse.headers.get("X-VoidPages")) pageData = await pageDataResponse.json();
|
|
113
|
+
}
|
|
114
|
+
if (pageData !== void 0) {
|
|
115
|
+
mkdirSync(dirname(pageDataPath), { recursive: true });
|
|
116
|
+
writeFileSync(pageDataPath, JSON.stringify(pageData));
|
|
112
117
|
}
|
|
113
118
|
result.rendered.push(path);
|
|
114
119
|
onResult?.(path, outputFile);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as outputFileForPath, n as readPrerenderPathsResponse, r as renderPrerenderPaths } from "./prerender-render-
|
|
1
|
+
export { t as outputFileForPath, n as readPrerenderPathsResponse, r as renderPrerenderPaths } from "./prerender-render-Cijv7UFo.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, s as getSiteDomain } 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 { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-BpgYODYx.mjs";
|
|
6
6
|
//#region src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
8
8
|
console.log();
|
|
@@ -38,77 +38,77 @@ async function runProjectsCommand(root) {
|
|
|
38
38
|
async function runProjectCommand(root, args) {
|
|
39
39
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
40
40
|
if (args.subcommand === "status") {
|
|
41
|
-
const { runListCommand } = await import("./list-
|
|
41
|
+
const { runListCommand } = await import("./list-MogaugiO.mjs");
|
|
42
42
|
return runListCommand(root, args.name || void 0);
|
|
43
43
|
}
|
|
44
44
|
if (args.subcommand === "link") {
|
|
45
45
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
46
|
-
const { runLink } = await import("./link-
|
|
46
|
+
const { runLink } = await import("./link-Ddmod1dZ.mjs");
|
|
47
47
|
return runLink(root, args.name || void 0);
|
|
48
48
|
}
|
|
49
49
|
if (args.subcommand === "list") {
|
|
50
50
|
if (cloudflare) {
|
|
51
|
-
const { runListCommand } = await import("./list-
|
|
51
|
+
const { runListCommand } = await import("./list-MogaugiO.mjs");
|
|
52
52
|
return runListCommand(root);
|
|
53
53
|
}
|
|
54
54
|
return runProjectsCommand(root);
|
|
55
55
|
}
|
|
56
56
|
if (args.subcommand === "token") {
|
|
57
57
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
58
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
58
|
+
const { runProjectTokenCommand } = await import("./project-token-CCalFyQf.mjs");
|
|
59
59
|
return runProjectTokenCommand(root, args);
|
|
60
60
|
}
|
|
61
61
|
if (args.subcommand === "team") {
|
|
62
62
|
if (args.action === "") {
|
|
63
|
-
const { printHelpPage } = await import("./help-
|
|
63
|
+
const { printHelpPage } = await import("./help-BeAFFE5C.mjs");
|
|
64
64
|
printHelpPage(["project", "team"]);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
68
68
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
69
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
69
|
+
const { runProjectTeamCommand } = await import("./project-team-CQBNveX3.mjs");
|
|
70
70
|
return runProjectTeamCommand(root, args);
|
|
71
71
|
}
|
|
72
72
|
if (args.subcommand === "zero-trust") {
|
|
73
73
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
74
74
|
if (args.action === "") {
|
|
75
|
-
const { printHelpPage } = await import("./help-
|
|
75
|
+
const { printHelpPage } = await import("./help-BeAFFE5C.mjs");
|
|
76
76
|
printHelpPage(["project", "zero-trust"]);
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
const action = args.action;
|
|
80
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-
|
|
80
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust-DPnkiEuT.mjs");
|
|
81
81
|
return runProjectZeroTrustCommand(root, {
|
|
82
82
|
...args,
|
|
83
83
|
action
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
if (args.subcommand === "logs") {
|
|
87
|
-
const { runLogsCommand } = await import("./logs-
|
|
87
|
+
const { runLogsCommand } = await import("./logs-CAszUWZI.mjs");
|
|
88
88
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
89
89
|
}
|
|
90
90
|
if (args.subcommand === "requests") {
|
|
91
91
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
92
|
-
const { runRequestsCommand } = await import("./requests-
|
|
92
|
+
const { runRequestsCommand } = await import("./requests-BpH0kImL.mjs");
|
|
93
93
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
94
94
|
}
|
|
95
95
|
if (args.subcommand === "rollback") {
|
|
96
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
97
|
-
return runRollbackCommand(root, args.deployId || void 0);
|
|
96
|
+
const { runRollbackCommand } = await import("./rollback-CXS1tAa-.mjs");
|
|
97
|
+
return runRollbackCommand(root, args.deployId || void 0, args.platform);
|
|
98
98
|
}
|
|
99
99
|
if (args.subcommand === "cancel") {
|
|
100
100
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
101
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
101
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-viAMD0Q_.mjs");
|
|
102
102
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
103
103
|
}
|
|
104
104
|
if (args.subcommand === "delete") {
|
|
105
105
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
106
|
-
const { runDeleteCommand } = await import("./delete-
|
|
106
|
+
const { runDeleteCommand } = await import("./delete-BbP5eopu.mjs");
|
|
107
107
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
108
108
|
}
|
|
109
109
|
if (args.subcommand === "purge-cache") {
|
|
110
110
|
if (cloudflare) throw new Error("project: `void project purge-cache` is available only for projects hosted on a Void platform. For a direct Cloudflare deploy, redeploy or purge the configured ISR KV namespace.");
|
|
111
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
111
|
+
const { runPurgeCacheCommand } = await import("./cache-oHzrnY3z.mjs");
|
|
112
112
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
|
|
2
2
|
import { c as getToken, i as getAccountCredential } from "./auth-B6iOCjKI.mjs";
|
|
3
|
-
import { H as outro, L as log } from "./dist-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
3
|
+
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-BpgYODYx.mjs";
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-team.ts
|
|
8
8
|
function clean(value) {
|
|
9
9
|
return (value ?? "—").replace(/[\u0000-\u001f\u007f]/g, " ");
|
|
@@ -1,9 +1,9 @@
|
|
|
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 {
|
|
6
|
-
import { r as requireProjectBySlug } from "./resolve-project-
|
|
3
|
+
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-BpgYODYx.mjs";
|
|
6
|
+
import { r as requireProjectBySlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-token.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const humanToken = getToken(root);
|
|
@@ -1,9 +1,9 @@
|
|
|
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 {
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
3
|
+
import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
|
|
5
|
+
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-BpgYODYx.mjs";
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
|
|
7
7
|
//#region src/cli/project-zero-trust.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -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-_PqY82xe.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,7 +1,8 @@
|
|
|
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
|
-
import {
|
|
5
|
+
import { i as escapeScriptJson, r as serializePageData } from "./serialize-YHvlcG3Q.mjs";
|
|
5
6
|
//#region src/pages/protocol.ts
|
|
6
7
|
const POWERED_BY = { "X-Powered-By": "Void" };
|
|
7
8
|
const RENDER_ERROR_ASSET_TAGS_KEY = "__voidPageAssetTags";
|
|
@@ -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";
|
|
@@ -455,6 +455,7 @@ function createDefaultRunWrangler(root, options) {
|
|
|
455
455
|
const teardownDeadlineMs = options?.signalTeardownDeadlineMs ?? confirmGraceMs + SIGNAL_TEARDOWN_DEADLINE_MARGIN_MS;
|
|
456
456
|
return (args, opts) => new Promise((resolvePromise, rejectPromise) => {
|
|
457
457
|
const parallelWorkerUpload = options?.parallelWorkerUpload === true && args.type === "versions.upload";
|
|
458
|
+
const interactive = (args.type === "versions.upload" || args.type === "worker.deploy") && args.interactive === true;
|
|
458
459
|
if (activeTeardown !== void 0) {
|
|
459
460
|
rejectPromise(/* @__PURE__ */ new Error(`provision: refusing to spawn a Cloudflare operation process — a fatal ${activeTeardown.signal} is being handled and this process is terminating; no new Cloudflare operation may start.`));
|
|
460
461
|
return;
|
|
@@ -474,7 +475,7 @@ function createDefaultRunWrangler(root, options) {
|
|
|
474
475
|
}),
|
|
475
476
|
...opts.suppressLogs ? { WRANGLER_WRITE_LOGS: "false" } : {}
|
|
476
477
|
},
|
|
477
|
-
stdio: [
|
|
478
|
+
stdio: interactive ? "inherit" : [
|
|
478
479
|
opts.input === void 0 ? "ignore" : "pipe",
|
|
479
480
|
"pipe",
|
|
480
481
|
"pipe"
|
|
@@ -556,7 +557,7 @@ function createDefaultRunWrangler(root, options) {
|
|
|
556
557
|
settled = true;
|
|
557
558
|
clearTimeout(commandTimer);
|
|
558
559
|
deregisterSelf();
|
|
559
|
-
resolvePromise(decodeCloudflareOperationResult(result));
|
|
560
|
+
resolvePromise(interactive ? result : decodeCloudflareOperationResult(result));
|
|
560
561
|
};
|
|
561
562
|
const quarantine = (detail) => {
|
|
562
563
|
if (settled) return;
|
|
@@ -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,13 +1,13 @@
|
|
|
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
|
-
async function runRollbackCommand(root, deployId) {
|
|
7
|
+
async function runRollbackCommand(root, deployId, explicitPlatform) {
|
|
8
8
|
console.log();
|
|
9
9
|
const platform = readDeploymentPlatform(root);
|
|
10
|
-
if (platform === "cloudflare") return runCloudflareRollback(root, deployId);
|
|
10
|
+
if (explicitPlatform === "cloudflare" || platform === "cloudflare") return runCloudflareRollback(root, deployId, platform !== "cloudflare");
|
|
11
11
|
if (platform === "none") throw new Error("rollback: Deployment is disabled. Run `void init` to choose a platform.");
|
|
12
12
|
const token = getToken(root);
|
|
13
13
|
if (!token) {
|
|
@@ -73,8 +73,8 @@ async function runRollbackCommand(root, deployId) {
|
|
|
73
73
|
process.exit(1);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
async function runCloudflareRollback(root, deployId) {
|
|
77
|
-
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
76
|
+
async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
|
|
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);
|
|
@@ -116,7 +116,7 @@ async function runCloudflareRollback(root, deployId) {
|
|
|
116
116
|
await confirmRollbackOrExit();
|
|
117
117
|
} else {
|
|
118
118
|
const targetSet = new Set(target.metadata.migrations);
|
|
119
|
-
await confirmUnrevertedMigrations(current.metadata.migrations.filter((migration) => !targetSet.has(migration)), "version");
|
|
119
|
+
await confirmUnrevertedMigrations(current.metadata.migrations.filter((migration) => !targetSet.has(migration)), "version", restorePlatformFlag);
|
|
120
120
|
}
|
|
121
121
|
const spinner = createSpinner();
|
|
122
122
|
spinner.start("Rolling back...");
|
|
@@ -139,11 +139,12 @@ async function confirmRollbackOrExit() {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
/** List migrations the rollback will not revert and ask before continuing. */
|
|
142
|
-
async function confirmUnrevertedMigrations(migrationDiff, noun) {
|
|
142
|
+
async function confirmUnrevertedMigrations(migrationDiff, noun, restorePlatformFlag = false) {
|
|
143
143
|
if (migrationDiff.length === 0) return;
|
|
144
144
|
log.warn(`The current database has ${formatCount(migrationDiff.length, "migration")} applied after this ${noun}:`);
|
|
145
145
|
for (const migration of migrationDiff) log.message(` ${dim("•")} ${migration}`);
|
|
146
146
|
log.message(dim("Rolling back will NOT revert these migrations. The older code will run against the current schema."));
|
|
147
|
+
if (noun === "version") log.message(dim(`For D1, \`void db restore${restorePlatformFlag ? " --platform cloudflare" : ""} --bookmark <bookmark>\` undoes them with the restore point deploy printed before migrating. Restore points expire after 7 days on Workers Free and 30 days on Paid; undo older migrations with a new migration.`));
|
|
147
148
|
await confirmRollbackOrExit();
|
|
148
149
|
}
|
|
149
150
|
//#endregion
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
|
|
2
2
|
import { n as createAuthClient, t as auth } from "../auth-client-react-7GFffu8R.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
3
|
+
import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
|
|
4
|
+
import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
2
|
-
import {
|
|
3
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
|
|
2
|
+
import { n as fetch } from "../fetch-CtESUYWd.mjs";
|
|
3
|
+
import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
|
|
4
4
|
import { n as createAuthClient, t as auth } from "../auth-client-react-CMLwT2xI.mjs";
|
|
5
5
|
export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
|
|
2
2
|
import { n as createAuthClient, t as auth } from "../auth-client-solid-DyTFL4cq.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
3
|
+
import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
|
|
4
|
+
import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
2
|
-
import {
|
|
3
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
|
|
2
|
+
import { n as fetch } from "../fetch-CtESUYWd.mjs";
|
|
3
|
+
import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
|
|
4
4
|
import { n as createAuthClient, t as auth } from "../auth-client-solid-UoreJWZG.mjs";
|
|
5
5
|
export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
|
|
2
2
|
import { n as createAuthClient, t as auth } from "../auth-client-svelte-zetW0KIH.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
3
|
+
import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
|
|
4
|
+
import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
2
|
-
import {
|
|
3
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
|
|
2
|
+
import { n as fetch } from "../fetch-CtESUYWd.mjs";
|
|
3
|
+
import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
|
|
4
4
|
import { n as createAuthClient, t as auth } from "../auth-client-svelte-Cv_WvrRk.mjs";
|
|
5
5
|
export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
|
|
2
2
|
import { n as createAuthClient, t as auth } from "../auth-client-vue-bChShbQP.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
3
|
+
import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
|
|
4
|
+
import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
2
|
-
import {
|
|
3
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
|
|
2
|
+
import { n as fetch } from "../fetch-CtESUYWd.mjs";
|
|
3
|
+
import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
|
|
4
4
|
import { n as createAuthClient, t as auth } from "../auth-client-vue-CFk7Xbv3.mjs";
|
|
5
5
|
export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
|
|
2
2
|
import { n as createAuthClient, t as auth } from "../auth-client-Bawdj38n.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
3
|
+
import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
|
|
4
|
+
import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
|
|
5
5
|
export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|
package/dist/runtime/client.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FetchError } from "../fetch-error-
|
|
2
|
-
import {
|
|
3
|
-
import { t as fetchStream } from "../fetch-stream-
|
|
1
|
+
import { t as FetchError } from "../fetch-error-Bw0n-IY-.mjs";
|
|
2
|
+
import { n as fetch } from "../fetch-CtESUYWd.mjs";
|
|
3
|
+
import { t as fetchStream } from "../fetch-stream-BspOeTAI.mjs";
|
|
4
4
|
import { n as createAuthClient, t as auth } from "../auth-client-BWBT8HLp.mjs";
|
|
5
5
|
export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
|