void 0.21.9 → 0.23.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/README.md +5 -1
- package/dist/{account-cmd-DZZGK80W.mjs → account-cmd-C84Ee8cO.mjs} +5 -5
- package/dist/{scan-ClYmX3sa.mjs → application-analysis-BVsVqc11.mjs} +135 -18
- package/dist/application-routing-B7QEjqSR.mjs +27 -0
- package/dist/{auth-CZuiVsFh.mjs → auth-CCjt0hcq.mjs} +1 -1
- package/dist/{auth-DLNN0D3Z.mjs → auth-CSkdO2Bb.mjs} +4 -47
- package/dist/{auth-link-B_CeugBw.mjs → auth-link-CioEg6uY.mjs} +5 -5
- package/dist/{auth-router-BgEFRuvZ.mjs → auth-router-BsR981d4.mjs} +5 -5
- package/dist/{better-auth-shared-rsBGBvWJ.mjs → better-auth-shared-hy6RPh9W.mjs} +13 -2
- package/dist/{build-cmd-Dpt0jd-x.mjs → build-cmd-LzvNJORH.mjs} +19 -7
- package/dist/{cache-7_UeZdTk.mjs → cache-C4MvnrMH.mjs} +4 -4
- package/dist/{cancel-deploy-D23R1RXT.mjs → cancel-deploy-abUxpP2n.mjs} +4 -4
- package/dist/{cf-build-output-CGT03qCD.mjs → cf-build-output-BPqOT964.mjs} +141 -63
- package/dist/cf-build-output-_0HNWysu.mjs +2 -0
- package/dist/cli/cli.mjs +114 -460
- package/dist/cli/cloudflare-operation-process.mjs +1103 -0
- package/dist/cli/env-schema-probe.d.mts +2 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-Cu7jWiF1.mjs +2 -0
- package/dist/{client-QTl6ko_D.mjs → client-RV8NVeB8.mjs} +165 -21
- package/dist/{cloudflare-auth-C4_GPZr0.mjs → cloudflare-auth-Qdc7tw8F.mjs} +41 -43
- package/dist/{cloudflare-cmd-bSmZ1d5L.mjs → cloudflare-cmd-BcrVyTmJ.mjs} +9 -10
- package/dist/cloudflare-config-Bktvwtpf.mjs +182 -0
- package/dist/{cloudflare-connect-jAwacxxP.mjs → cloudflare-connect-B8uPZ4nx.mjs} +4 -4
- package/dist/{cloudflare-operations-BipGMJ5O.mjs → cloudflare-operations-AiWashgg.mjs} +1 -1
- package/dist/{cloudflare-operations-sMZXpk_S.mjs → cloudflare-operations-fxHb-byx.mjs} +118 -203
- package/dist/{preset-UHj9ARyP.mjs → cloudflare-process-B-wekeR6.mjs} +93 -6
- package/dist/{config-CF69HgXc.d.mts → config-BMHb8RCj.d.mts} +2 -2
- package/dist/{config-CafTW6Cz.mjs → config-Br_JZD6u.mjs} +2 -7
- package/dist/config-C_XRIPx2.mjs +89 -0
- package/dist/{config-s7Xj7tPb.mjs → config-CyQ-wVd7.mjs} +1 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-write-BSduPMY8.mjs → config-write-B1f88wJA.mjs} +1 -1
- package/dist/{connect-BsUSRzln.mjs → connect-Bd4kJd9U.mjs} +6 -6
- package/dist/{create-project-BniEV0OW.mjs → create-project-Boczwj5r.mjs} +1 -1
- package/dist/{create-project-DBfFSZKY.mjs → create-project-bMf6ffLZ.mjs} +9 -5
- package/dist/{db-hRrvZaq_.mjs → db-8uG64XLl.mjs} +26 -26
- package/dist/{delete-D6dZ9B6B.mjs → delete-NvbiyeJf.mjs} +4 -4
- package/dist/{deploy-WaAQez1O.mjs → deploy-DzAIwqNU.mjs} +944 -607
- package/dist/{deploy-DDz7c8LK.mjs → deploy-bjXdFCtn.mjs} +1 -1
- package/dist/{dist-BR1quN_w.mjs → dist-AoCzRTJE.mjs} +226 -60
- package/dist/{dist-C5fND3R0.mjs → dist-BuDuKZJv.mjs} +1 -1
- package/dist/{dist-Dn6nn2IU.mjs → dist-CTBk70IR.mjs} +42 -42
- package/dist/{domain-Dmhvb2oU.mjs → domain-y5Tvydvo.mjs} +5 -5
- package/dist/{email-DFi-s2t4.mjs → email-B3umsW75.mjs} +15 -30
- package/dist/{env-Csi-tMbT.mjs → env-BS6qYHDb.mjs} +6 -6
- package/dist/{env-public-D_6u46fX.d.mts → env-public-BX_r8HR6.d.mts} +2 -1
- package/dist/{env-validation-BB4GkLxn.mjs → env-validation-BPn7vk-V.mjs} +18 -71
- package/dist/{env-validation-BXge7uyK.mjs → env-validation-DbTg7-ar.mjs} +1 -1
- package/dist/{fetch-CXDChK7B.mjs → fetch-BIZJh7vR.mjs} +2 -2
- package/dist/{fetch-stream-AOByI7Ki.mjs → fetch-stream-IvCYKyQL.mjs} +24 -4
- package/dist/{gen-Dz3X1Qab.mjs → gen-B580--vC.mjs} +5 -5
- package/dist/gen-BVaUUumi.mjs +2 -0
- package/dist/{github-cmd-BED3_9JD.mjs → github-cmd-v45BdfKX.mjs} +6 -8
- package/dist/{handler-BXJTXd02.d.mts → handler-CZ4nAylQ.d.mts} +2 -1
- package/dist/{headers-BOg_velo.mjs → headers-DWi2IXWx.mjs} +1 -1
- package/dist/help-DofyZuY7.mjs +2 -0
- package/dist/{help-DC7gdz7L.mjs → help-daGKjXGk.mjs} +268 -666
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +305 -1490
- package/dist/info-B97bTX9N.mjs +113 -0
- package/dist/{init-WO0JlPx8.mjs → init-Bvy7zrBo.mjs} +51 -20
- package/dist/limits-Bq5LG8Id.d.mts +27 -0
- package/dist/limits-Cjuk2VPm.mjs +68 -0
- package/dist/{link-CsHOinF7.mjs → link-CDqqCjFl.mjs} +5 -5
- package/dist/{list-CDb-4bZ1.mjs → list-CZj0dzKY.mjs} +5 -5
- package/dist/{live-CKiJilLr.d.mts → live-Chw1eIMv.d.mts} +1 -1
- package/dist/{local-d1-CC8sKFGu.mjs → local-d1-2CMnpuW_.mjs} +2 -2
- package/dist/login-DYt_An22.mjs +2 -0
- package/dist/{login-DvqXsfGs.mjs → login-UZKFM_u7.mjs} +5 -5
- package/dist/{logs-BdfiOezj.mjs → logs-CUZ6t9t3.mjs} +5 -5
- package/dist/migrate-8_2u55MD.mjs +2 -0
- package/dist/{migrate-B8KuoYsO.mjs → migrate-DHul7PRV.mjs} +5 -4
- package/dist/{node-BM43oz4G.mjs → node-BkyRWRx8.mjs} +2 -2
- package/dist/operator-args-CLgKGlwU.mjs +690 -0
- package/dist/{operator-cmd-03819ATr.mjs → operator-cmd-DBA6dl0m.mjs} +69 -23
- package/dist/output-Dm_A4Tbv.mjs +81 -0
- package/dist/pages/client.d.mts +34 -2
- package/dist/pages/client.mjs +59 -3
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +3 -3
- package/dist/pages/islands-plugin.d.mts +16 -6
- package/dist/pages/islands-plugin.mjs +2 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -308
- package/dist/{parse-filename-DioPHiR9.mjs → parse-filename-CUbj-1MP.mjs} +35 -1
- package/dist/{output-CCH48AMM.mjs → picocolors-BTps1_gs.mjs} +2 -76
- package/dist/plan-D1Q5rf-r.mjs +2 -0
- package/dist/plan-NPpwZ_kc.mjs +58 -0
- package/dist/platform-args-BJdRtlLq.mjs +506 -0
- package/dist/platform-args-D3RXyR6h.mjs +2 -0
- package/dist/{platform-auth-config-z92h63q5.mjs → platform-auth-config-B56E9YP1.mjs} +4 -4
- package/dist/{platform-auth-protection-DeE3yr2R.mjs → platform-auth-protection-BDWO_aER.mjs} +3 -3
- package/dist/{platform-auth-recovery-o_340Ixx.mjs → platform-auth-recovery-1gg4CSRe.mjs} +4 -4
- package/dist/{platform-cmd-C4ZV3Vpy.mjs → platform-cmd-Bt-1w6pY.mjs} +1 -1
- package/dist/{platform-cmd-DNl8WosH.mjs → platform-cmd-DMcQStSc.mjs} +26 -5
- package/dist/{platform-domain-CU1JtJkW.mjs → platform-domain-BNkcz0OB.mjs} +36 -9
- package/dist/{platform-lifecycle-Bc047IeT.mjs → platform-lifecycle-9OyBALhH.mjs} +850 -276
- package/dist/{platform-lifecycle-Bs2qx1E3.mjs → platform-lifecycle-BE6C_jxh.mjs} +1 -1
- package/dist/{platform-management-CVpGI9Y5.mjs → platform-management-CjwLVQwN.mjs} +59 -11
- package/dist/{platform-management-C8tt6D8h.mjs → platform-management-CnyTdcWX.mjs} +1 -1
- package/dist/platform-plans-config-BNGKGr4P.mjs +359 -0
- package/dist/{platform-recovery-dvUaptLr.mjs → platform-recovery-D6KSpuFm.mjs} +2 -2
- package/dist/{plugin-inference-BMfKRSqE.mjs → plugin-inference-CXWnn79A.mjs} +174 -64
- package/dist/{prepare-DyZ-Yok5.mjs → prepare-B5Mkic5u.mjs} +3 -3
- package/dist/{prepare-C3kt3Rst.mjs → prepare-DOsL0CC9.mjs} +4 -20
- package/dist/prepare-cgvDMtSb.mjs +2 -0
- package/dist/{project-cmd-B44I8J_W.mjs → project-cmd-CNzrqvBv.mjs} +30 -16
- package/dist/{project-team-BkbYIsXN.mjs → project-team-DQOWPfQT.mjs} +4 -4
- package/dist/{project-token-C8xEEQnB.mjs → project-token-CTDYU0Cc.mjs} +4 -4
- package/dist/project-zero-trust-BNAkW-_0.mjs +63 -0
- package/dist/{protocol-ZH3jP4a7.d.mts → protocol-CjF_iI9X.d.mts} +2 -2
- package/dist/protocol-U7bfjHmA.mjs +331 -0
- package/dist/{provision-DNtrtaVD.mjs → provision-C4ORE7G7.mjs} +1 -1
- package/dist/{provision-BhreDAOS.mjs → provision-CJFgTZY8.mjs} +111 -215
- package/dist/{requests-DFyhBMaf.mjs → requests-MhxYnau8.mjs} +4 -4
- package/dist/resource-name-C7LVpcRm.mjs +11 -0
- package/dist/{rollback-DHHxXZiS.mjs → rollback-CJ6iSDoU.mjs} +5 -5
- package/dist/route-url-CG7U-cRN.mjs +15 -0
- package/dist/{runner-B8wXwWlo.mjs → runner-CXA9Fh8h.mjs} +1 -1
- package/dist/{runner-p-dMs2UN.mjs → runner-Ol0TNjk6.mjs} +2 -2
- package/dist/runtime/ai.d.mts +12 -8
- package/dist/runtime/ai.mjs +84 -17
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/durable.d.mts +3 -1
- package/dist/runtime/durable.mjs +4 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/kv.mjs +0 -1
- package/dist/runtime/limits.d.mts +2 -0
- package/dist/runtime/limits.mjs +2 -0
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +25 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +62 -42
- package/dist/runtime/route-url.d.mts +4 -0
- package/dist/runtime/route-url.mjs +2 -0
- package/dist/runtime/routing.d.mts +180 -0
- package/dist/runtime/routing.mjs +1082 -0
- package/dist/runtime/sandbox-container.d.mts +3 -0
- package/dist/runtime/sandbox-container.mjs +2 -0
- package/dist/runtime/sandbox.d.mts +4 -32
- package/dist/runtime/sandbox.mjs +151 -75
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +4 -2
- package/dist/runtime/ws-server.mjs +27 -2
- package/dist/runtime/ws.d.mts +2 -2
- package/dist/runtime/ws.mjs +8 -6
- package/dist/sandbox-XZAqzFlG.d.mts +52 -0
- package/dist/sandbox-container-Bo0eiFKz.d.mts +73 -0
- package/dist/sandbox-container-C6ItmVuN.mjs +281 -0
- package/dist/{scan-4tfN-PSn.mjs → scan-C7okrLyM.mjs} +4 -35
- package/dist/{secret-DN9sSNiV.mjs → secret-Dli5fP0B.mjs} +6 -6
- package/dist/{skills-O6FUaizK.mjs → skills-D1II1Juz.mjs} +1 -1
- package/dist/{sse-BaC1jXko.mjs → sse-CQNaDFFV.mjs} +6 -3
- package/dist/{subcommand-prompt-BuGYkAkC.mjs → subcommand-prompt-CY1C4fvl.mjs} +2 -2
- package/dist/validate-Dq_L3s0S.mjs +2 -0
- package/dist/{validate-CIUwFpjB.mjs → validate-ctOrgiS3.mjs} +2 -1
- package/dist/{wrangler-BymcxrRa.mjs → wrangler-7K-bW_DL.mjs} +14 -235
- package/dist/{ws-BwcqizuH.d.mts → ws-CL1w7GXU.d.mts} +13 -2
- package/package.json +48 -33
- package/sandbox.Dockerfile +4 -0
- package/schema.json +10 -22
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +34 -157
- package/skills/void/SKILL.md +50 -133
- package/skills/void/docs/guide/ai.md +94 -84
- package/skills/void/docs/guide/app-types.md +3 -32
- package/skills/void/docs/guide/auth.md +12 -116
- package/skills/void/docs/guide/database/d1.md +9 -54
- package/skills/void/docs/guide/database/mysql.md +1 -1
- package/skills/void/docs/guide/database/postgresql.md +5 -26
- package/skills/void/docs/guide/database.md +23 -75
- package/skills/void/docs/guide/deployment.md +27 -113
- package/skills/void/docs/guide/durable-state.md +43 -18
- package/skills/void/docs/guide/edge/headers.md +3 -47
- package/skills/void/docs/guide/edge/prerendering.md +5 -20
- package/skills/void/docs/guide/edge/redirects.md +11 -64
- package/skills/void/docs/guide/edge/revalidation.md +6 -19
- package/skills/void/docs/guide/edge/rewrites.md +56 -284
- package/skills/void/docs/guide/edge/static-assets.md +23 -72
- package/skills/void/docs/guide/email/domains.md +112 -0
- package/skills/void/docs/guide/email/receiving.md +139 -0
- package/skills/void/docs/guide/email/sending.md +231 -0
- package/skills/void/docs/guide/email.md +13 -619
- package/skills/void/docs/guide/env-migration.md +11 -11
- package/skills/void/docs/guide/env-vars.md +9 -29
- package/skills/void/docs/guide/index.md +0 -15
- package/skills/void/docs/guide/jobs.md +3 -18
- package/skills/void/docs/guide/kv.md +5 -11
- package/skills/void/docs/guide/live.md +5 -56
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +78 -125
- package/skills/void/docs/guide/pages-routing/head.md +10 -10
- package/skills/void/docs/guide/pages-routing/islands.md +6 -36
- package/skills/void/docs/guide/pages-routing/layouts.md +6 -128
- package/skills/void/docs/guide/pages-routing/loaders.md +3 -19
- package/skills/void/docs/guide/pages-routing/markdown.md +13 -171
- package/skills/void/docs/guide/pages-routing/overview.md +7 -17
- package/skills/void/docs/guide/pages-routing/view-transitions.md +1 -1
- package/skills/void/docs/guide/platform/administration/access.md +1 -4
- package/skills/void/docs/guide/platform/administration/email.md +35 -8
- package/skills/void/docs/guide/platform/administration/operations.md +26 -4
- package/skills/void/docs/guide/platform/administration/plans.md +126 -0
- package/skills/void/docs/guide/platform/administration/projects.md +5 -2
- package/skills/void/docs/guide/platform/administration/zero-trust.md +189 -0
- package/skills/void/docs/guide/platform/development/local.md +2 -2
- package/skills/void/docs/guide/platform/development/runtime.md +3 -13
- package/skills/void/docs/guide/platform/development/schema-ci.md +0 -58
- package/skills/void/docs/guide/platform/installation/credentials.md +6 -4
- package/skills/void/docs/guide/platform/installation/domains.md +31 -3
- package/skills/void/docs/guide/platform/installation/first-deployment.md +6 -0
- package/skills/void/docs/guide/platform/installation/maintenance.md +3 -1
- package/skills/void/docs/guide/platform/installation/prerequisites.md +21 -16
- package/skills/void/docs/guide/platform/installation/setup.md +9 -5
- package/skills/void/docs/guide/platform/installation/uninstall.md +17 -2
- package/skills/void/docs/guide/platform-administration.md +2 -0
- package/skills/void/docs/guide/queues.md +7 -9
- package/skills/void/docs/guide/quickstart.md +38 -37
- package/skills/void/docs/guide/remote-dev.md +4 -9
- package/skills/void/docs/guide/sandboxes.md +78 -41
- package/skills/void/docs/guide/server-routing.md +9 -72
- package/skills/void/docs/guide/sse.md +4 -18
- package/skills/void/docs/guide/ssg.md +3 -15
- package/skills/void/docs/guide/ssr.md +14 -62
- package/skills/void/docs/guide/storage.md +9 -4
- package/skills/void/docs/guide/type-safety.md +3 -14
- package/skills/void/docs/guide/typed-fetch.md +3 -7
- package/skills/void/docs/guide/websockets.md +68 -40
- package/skills/void/docs/integrations/agents.md +3 -3
- package/skills/void/docs/integrations/cloudflare.md +85 -316
- package/skills/void/docs/integrations/frameworks/analog.md +5 -64
- package/skills/void/docs/integrations/frameworks/astro.md +4 -73
- package/skills/void/docs/integrations/frameworks/nuxt.md +5 -62
- package/skills/void/docs/integrations/frameworks/overview.md +11 -54
- package/skills/void/docs/integrations/frameworks/react-router.md +5 -60
- package/skills/void/docs/integrations/frameworks/sveltekit.md +6 -65
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +4 -62
- package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -69
- package/skills/void/docs/reference/api/auth.md +156 -0
- package/skills/void/docs/reference/api/client.md +87 -0
- package/skills/void/docs/reference/api/database.md +95 -0
- package/skills/void/docs/reference/api/durable.md +46 -0
- package/skills/void/docs/reference/api/env.md +50 -0
- package/skills/void/docs/reference/api/handlers.md +254 -0
- package/skills/void/docs/reference/api/pages.md +241 -0
- package/skills/void/docs/reference/api/plugin.md +39 -0
- package/skills/void/docs/reference/api/resources.md +109 -0
- package/skills/void/docs/reference/api/rewrites.md +76 -0
- package/skills/void/docs/reference/api/types.md +92 -0
- package/skills/void/docs/reference/api.md +56 -1218
- package/skills/void/docs/reference/cli/auth.md +88 -0
- package/skills/void/docs/reference/cli/database.md +128 -0
- package/skills/void/docs/reference/cli/deploy.md +85 -0
- package/skills/void/docs/reference/cli/domains.md +41 -0
- package/skills/void/docs/reference/cli/email.md +129 -0
- package/skills/void/docs/reference/cli/generate.md +116 -0
- package/skills/void/docs/reference/cli/github.md +189 -0
- package/skills/void/docs/reference/cli/platform-config.md +92 -0
- package/skills/void/docs/reference/cli/platform-email.md +81 -0
- package/skills/void/docs/reference/cli/platform-installation.md +127 -0
- package/skills/void/docs/reference/cli/platform-operations.md +90 -0
- package/skills/void/docs/reference/cli/platform-users.md +89 -0
- package/skills/void/docs/reference/cli/platform-zero-trust.md +45 -0
- package/skills/void/docs/reference/cli/platform.md +70 -0
- package/skills/void/docs/reference/cli/project.md +214 -0
- package/skills/void/docs/reference/cli/secrets.md +76 -0
- package/skills/void/docs/reference/cli/setup.md +70 -0
- package/skills/void/docs/reference/cli.md +33 -1621
- package/skills/void/docs/reference/config.md +26 -32
- package/skills/void/docs/reference/resource-inference.md +3 -58
- package/skills/void/docs/reference/structure.md +14 -41
- package/dist/canonical-json-DuDiiUsQ.mjs +0 -13
- package/dist/cli/cf-compat.mjs +0 -968
- package/dist/client-4cDVv7BO.mjs +0 -2
- package/dist/gen-Vnv2f65C.mjs +0 -2
- package/dist/help-DQMfeKMz.mjs +0 -2
- package/dist/login-DFQk7rbW.mjs +0 -2
- package/dist/migrate-TsHGBnDA.mjs +0 -2
- package/dist/plan-BEZ8VJW0.mjs +0 -256
- package/dist/plan-DpuOr14e.mjs +0 -2
- package/dist/prepare-BZXkjdNe.mjs +0 -2
- package/dist/validate-EKmJWxmy.mjs +0 -2
- /package/dist/cli/{cf-compat.d.mts → cloudflare-operation-process.d.mts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-DUwumHpQ.mjs";
|
|
2
2
|
import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-8KnOVXVd.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
|
-
import { createInterface } from "node:readline/promises";
|
|
5
4
|
import { setTimeout } from "node:timers/promises";
|
|
5
|
+
import { createInterface } from "node:readline/promises";
|
|
6
6
|
//#region src/cli/operator-cmd.ts
|
|
7
7
|
const MAX_RUNTIME_FOLLOW_ROWS = 1e4;
|
|
8
8
|
function printable(value) {
|
|
@@ -137,9 +137,9 @@ async function runAuth(origin, args) {
|
|
|
137
137
|
if (args.action === "login" || args.action === "token" && args.tokenStdin) {
|
|
138
138
|
if (!args.tokenStdin && !process.stdin.isTTY) throw new OperatorClientError("Browser login requires an interactive terminal. Use --token-stdin to exchange an API session.", "interactive_login_required");
|
|
139
139
|
const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
|
|
140
|
-
const { discoverPlatform } = await import("./platform-cmd-
|
|
141
|
-
const { selectPlatformLoginMethod } = await import("./login-
|
|
142
|
-
const { runPlatformLogin } = await import("./auth-
|
|
140
|
+
const { discoverPlatform } = await import("./platform-cmd-Bt-1w6pY.mjs");
|
|
141
|
+
const { selectPlatformLoginMethod } = await import("./login-DYt_An22.mjs");
|
|
142
|
+
const { runPlatformLogin } = await import("./auth-CCjt0hcq.mjs");
|
|
143
143
|
return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.providerExplicit ? args.provider : void 0)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
|
|
144
144
|
})();
|
|
145
145
|
const session = await exchangeOperatorSession(origin, apiToken);
|
|
@@ -199,8 +199,6 @@ async function followOperatorLogs(client, args, signal, pollIntervalMs = 2e3) {
|
|
|
199
199
|
const combined = signal ? AbortSignal.any([signal, controller.signal]) : controller.signal;
|
|
200
200
|
const query = { ...args.query };
|
|
201
201
|
let terminalBuildSince = null;
|
|
202
|
-
let legacyQuietSince = null;
|
|
203
|
-
let legacyQuietSeq = null;
|
|
204
202
|
let previousRuntimeRows = /* @__PURE__ */ new Map();
|
|
205
203
|
let currentRuntimeRows = /* @__PURE__ */ new Map();
|
|
206
204
|
let currentRuntimeRowCount = 0;
|
|
@@ -238,23 +236,11 @@ async function followOperatorLogs(client, args, signal, pollIntervalMs = 2e3) {
|
|
|
238
236
|
if (result.logsComplete !== void 0 && result.logsComplete !== null && typeof result.logsComplete !== "boolean") throw new OperatorClientError("Build log response has an invalid completion state.", "invalid_response");
|
|
239
237
|
if (result.terminal === true) {
|
|
240
238
|
if (result.logsComplete === true) return;
|
|
239
|
+
if (result.logsComplete === null || result.logsComplete === void 0) throw new OperatorClientError("This platform cannot confirm that the final build logs were captured. Upgrade the platform runtime, or read the retained logs without --follow.", "log_completion_unavailable");
|
|
241
240
|
const now = Date.now();
|
|
242
241
|
terminalBuildSince ??= now;
|
|
243
242
|
if (now - terminalBuildSince >= 12e4) throw new OperatorClientError("Build finished, but its log producer did not confirm completion. Retry the command to recover the final log tail.", "invalid_response");
|
|
244
|
-
|
|
245
|
-
if (legacyQuietSeq !== result.lastSeq) {
|
|
246
|
-
legacyQuietSeq = result.lastSeq;
|
|
247
|
-
legacyQuietSince = now;
|
|
248
|
-
} else {
|
|
249
|
-
legacyQuietSince ??= now;
|
|
250
|
-
if (now - legacyQuietSince >= 3e4) return;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
} else {
|
|
254
|
-
terminalBuildSince = null;
|
|
255
|
-
legacyQuietSince = null;
|
|
256
|
-
legacyQuietSeq = null;
|
|
257
|
-
}
|
|
243
|
+
} else terminalBuildSince = null;
|
|
258
244
|
} else {
|
|
259
245
|
if (typeof result.nextCursor === "string" && result.nextCursor) {
|
|
260
246
|
if (result.nextCursor === query.cursor) throw new OperatorClientError("Runtime log pagination did not advance.", "invalid_response");
|
|
@@ -277,9 +263,57 @@ async function followOperatorLogs(client, args, signal, pollIntervalMs = 2e3) {
|
|
|
277
263
|
process.removeListener("SIGINT", stop);
|
|
278
264
|
}
|
|
279
265
|
}
|
|
266
|
+
async function migrateDeploymentAssets(client, origin, args) {
|
|
267
|
+
const target = decodeURIComponent(args.path.slice(13, -15));
|
|
268
|
+
const seenCursors = /* @__PURE__ */ new Set();
|
|
269
|
+
let body = { ...args.body };
|
|
270
|
+
if (typeof body.cursor === "string") seenCursors.add(body.cursor);
|
|
271
|
+
let authorized = false;
|
|
272
|
+
while (true) {
|
|
273
|
+
const preview = await client.request(args.path, {
|
|
274
|
+
method: "POST",
|
|
275
|
+
body: {
|
|
276
|
+
...body,
|
|
277
|
+
dryRun: true
|
|
278
|
+
},
|
|
279
|
+
timeoutMs: args.timeoutMs
|
|
280
|
+
});
|
|
281
|
+
if (preview.dryRun !== true || preview.action !== "deployment.migrate-assets" || preview.target !== target || typeof preview.expected !== "string" || !preview.expected.trim()) throw new OperatorClientError("The server did not return a valid asset migration preview. No asset batch was requested.", "invalid_preview");
|
|
282
|
+
if (!await confirmOperatorMutation(origin, {
|
|
283
|
+
...preview,
|
|
284
|
+
scope: "Copy and verify all remaining asset batches for this deployment; keep original assets."
|
|
285
|
+
}, authorized ? {
|
|
286
|
+
...args,
|
|
287
|
+
yes: true
|
|
288
|
+
} : args)) return;
|
|
289
|
+
authorized = true;
|
|
290
|
+
const result = await client.request(args.path, {
|
|
291
|
+
method: "POST",
|
|
292
|
+
body: {
|
|
293
|
+
...body,
|
|
294
|
+
expected: preview.expected
|
|
295
|
+
},
|
|
296
|
+
timeoutMs: args.timeoutMs
|
|
297
|
+
});
|
|
298
|
+
const nextCursor = result.nextCursor;
|
|
299
|
+
if (result.dryRun !== false || result.action !== "deployment.migrate-assets" || result.target !== target || typeof result.complete !== "boolean" || (result.complete ? nextCursor !== null : typeof nextCursor !== "string" || !nextCursor.trim() || seenCursors.has(nextCursor))) throw new OperatorClientError("The server returned an invalid asset migration continuation. Inspect the deployment before resuming; no batch was retried.", "invalid_response", void 0, {
|
|
300
|
+
target,
|
|
301
|
+
lastSuccessfulCursor: body.cursor ?? null,
|
|
302
|
+
result
|
|
303
|
+
});
|
|
304
|
+
output(result, args.json);
|
|
305
|
+
if (result.complete) return;
|
|
306
|
+
const cursor = nextCursor;
|
|
307
|
+
seenCursors.add(cursor);
|
|
308
|
+
body = {
|
|
309
|
+
...args.body,
|
|
310
|
+
cursor
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
}
|
|
280
314
|
async function runOperatorCommand(args) {
|
|
281
315
|
if (!args.action) {
|
|
282
|
-
const { printHelpPage } = await import("./help-
|
|
316
|
+
const { printHelpPage } = await import("./help-DofyZuY7.mjs");
|
|
283
317
|
printHelpPage(["platform", args.group]);
|
|
284
318
|
return;
|
|
285
319
|
}
|
|
@@ -288,7 +322,8 @@ async function runOperatorCommand(args) {
|
|
|
288
322
|
const client = new OperatorClient(origin, readOperatorToken(origin));
|
|
289
323
|
if (args.method === "POST") {
|
|
290
324
|
if (!args.plan && !args.yes && (!process.stdin.isTTY || !process.stderr.isTTY)) throw new OperatorClientError("Mutations in non-interactive mode require --yes or --plan.", "confirmation_required");
|
|
291
|
-
if (args.
|
|
325
|
+
if (args.group === "deployment" && args.action === "migrate-assets") return migrateDeploymentAssets(client, origin, args);
|
|
326
|
+
if (args.tokenStdin && (args.group === "email" && (args.action === "domain-add" || args.action === "domain-remove") || args.group === "zero-trust" && args.action === "configure")) args = {
|
|
292
327
|
...args,
|
|
293
328
|
body: {
|
|
294
329
|
...args.body,
|
|
@@ -304,11 +339,17 @@ async function runOperatorCommand(args) {
|
|
|
304
339
|
timeoutMs: args.timeoutMs
|
|
305
340
|
});
|
|
306
341
|
if (preview.dryRun !== true || typeof preview.action !== "string" || !Object.hasOwn(preview, "target")) throw new OperatorClientError("The server did not return a valid mutation preview. No change was requested.", "invalid_preview");
|
|
307
|
-
|
|
342
|
+
let recoveryFence = args.group === "email" && args.action === "operation-resolve" ? operationRecoveryFence(preview.target) : {};
|
|
343
|
+
if (args.group === "email" && args.action === "shared-recipient-resolve") {
|
|
344
|
+
const target = preview.target;
|
|
345
|
+
if (!target || typeof target.recoveryFence !== "string" || !/^[a-f0-9]{64}$/.test(target.recoveryFence)) throw new OperatorClientError("The server did not return a valid shared recipient recovery fence. No change was requested.", "invalid_preview");
|
|
346
|
+
recoveryFence = { recoveryFence: target.recoveryFence };
|
|
347
|
+
}
|
|
308
348
|
if (!await confirmOperatorMutation(origin, preview, args)) return;
|
|
309
349
|
const body = {
|
|
310
350
|
...args.body,
|
|
311
351
|
...args.group === "worker" && args.action === "rollback-all" ? { versions: preview.versions } : {},
|
|
352
|
+
...args.group === "project" && args.action === "normalize" ? { expected: preview.changes } : {},
|
|
312
353
|
...recoveryFence
|
|
313
354
|
};
|
|
314
355
|
output(await client.request(args.path, {
|
|
@@ -320,6 +361,11 @@ async function runOperatorCommand(args) {
|
|
|
320
361
|
else {
|
|
321
362
|
const result = await client.request(args.path, { query: args.query });
|
|
322
363
|
if (args.action === "logs" && args.group !== "email") outputLogs(result, args.json);
|
|
364
|
+
else if (args.group === "system" && args.action === "asset-migrations" && !args.json && Array.isArray(result.deployments)) console.log([
|
|
365
|
+
...humanLines({ pagination: result.pagination }),
|
|
366
|
+
"deployments:",
|
|
367
|
+
...eventLines(result.deployments, " ")
|
|
368
|
+
].join("\n"));
|
|
323
369
|
else output(result, args.json);
|
|
324
370
|
if (result.allOk === false) process.exitCode = 1;
|
|
325
371
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
|
|
2
|
+
import { t as require_picocolors } from "./picocolors-BTps1_gs.mjs";
|
|
3
|
+
import { L as spinner, j as log, k as isCI } from "./dist-CTBk70IR.mjs";
|
|
4
|
+
//#region src/cli/output.ts
|
|
5
|
+
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
6
|
+
/** Keep recovery commands on the same CLI when using the local checkout launcher. */
|
|
7
|
+
function cliCommandName() {
|
|
8
|
+
const entryName = process.argv[1]?.split(/[\\/]/).at(-1);
|
|
9
|
+
return entryName === "void-dev" || entryName === "void-dev.cmd" ? "void-dev" : "void";
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Terminal-safe spinner wrapper. In CI and redirected output,
|
|
13
|
+
* `@clack/prompts` spinner emits DEC Private Mode cursor hide/show codes
|
|
14
|
+
* (`\x1b[?25l` / `\x1b[?25h`) that render as text artifacts. This wrapper
|
|
15
|
+
* replaces the spinner with plain log output.
|
|
16
|
+
*/
|
|
17
|
+
function createSpinner(options, isTerminal = process.stdout.isTTY === true) {
|
|
18
|
+
if (!isCI() && isTerminal) return spinner(options);
|
|
19
|
+
let currentMessage = "";
|
|
20
|
+
return {
|
|
21
|
+
start(msg = "") {
|
|
22
|
+
currentMessage = msg;
|
|
23
|
+
if (msg) log.step(msg);
|
|
24
|
+
},
|
|
25
|
+
stop(msg = "") {
|
|
26
|
+
if (msg) log.info(msg);
|
|
27
|
+
},
|
|
28
|
+
message(msg = "") {
|
|
29
|
+
if (msg && msg !== currentMessage) {
|
|
30
|
+
currentMessage = msg;
|
|
31
|
+
log.step(msg);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
cancel(msg = "") {
|
|
35
|
+
if (msg) log.warn(msg);
|
|
36
|
+
},
|
|
37
|
+
error(msg = "") {
|
|
38
|
+
if (msg) log.error(msg);
|
|
39
|
+
},
|
|
40
|
+
clear() {},
|
|
41
|
+
get isCancelled() {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function cliTitle(command) {
|
|
47
|
+
return import_picocolors.default.blue(`void ${command}`);
|
|
48
|
+
}
|
|
49
|
+
function sectionTitle(title) {
|
|
50
|
+
return import_picocolors.default.reset(import_picocolors.default.blue(title));
|
|
51
|
+
}
|
|
52
|
+
function categoryTitle(title) {
|
|
53
|
+
return import_picocolors.default.reset(import_picocolors.default.bold(import_picocolors.default.cyan(title)));
|
|
54
|
+
}
|
|
55
|
+
function dim(text) {
|
|
56
|
+
return import_picocolors.default.dim(text);
|
|
57
|
+
}
|
|
58
|
+
function tablePrefix() {
|
|
59
|
+
return `${import_picocolors.default.gray("│")} `;
|
|
60
|
+
}
|
|
61
|
+
/** Strip terminal control characters from text received from a platform. */
|
|
62
|
+
function sanitizeTerminalText(value) {
|
|
63
|
+
return value.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ");
|
|
64
|
+
}
|
|
65
|
+
function helpLine(command, description) {
|
|
66
|
+
return `${import_picocolors.default.reset(command.padEnd(34))} ${import_picocolors.default.dim(description)}`;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Ensure a timestamp string will be parsed as UTC by `new Date()`.
|
|
70
|
+
* DB timestamps lack timezone info — appends 'Z' only when no
|
|
71
|
+
* existing indicator (Z, z, or numeric offset) is present.
|
|
72
|
+
*/
|
|
73
|
+
function ensureUtc(s) {
|
|
74
|
+
const last = s.at(-1);
|
|
75
|
+
if (last === "Z" || last === "z") return s;
|
|
76
|
+
if (s.includes("+", 10)) return s;
|
|
77
|
+
if (s.lastIndexOf("-") > 9) return s;
|
|
78
|
+
return s + "Z";
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { dim as a, import_picocolors as c, tablePrefix as d, createSpinner as i, sanitizeTerminalText as l, cliCommandName as n, ensureUtc as o, cliTitle as r, helpLine as s, categoryTitle as t, sectionTitle as u };
|
package/dist/pages/client.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { t as PageObject } from "../protocol-
|
|
1
|
+
import { t as PageObject } from "../protocol-CjF_iI9X.mjs";
|
|
2
2
|
import { n as CacheForInput, r as CacheForResult } from "../prefetch-Ce6la4EI.mjs";
|
|
3
|
+
import { UsageLimitData } from "@void/edge";
|
|
4
|
+
import { ActionUrl, ResolveActionBody, ResolveActionParams } from "void/routes";
|
|
3
5
|
//#region src/pages/action-result.d.ts
|
|
4
6
|
type ActionErrorHandlingScope = "callSite" | "boundary";
|
|
5
7
|
type ActionResult<T = PageObject | undefined> = {
|
|
@@ -11,6 +13,7 @@ type ActionResult<T = PageObject | undefined> = {
|
|
|
11
13
|
};
|
|
12
14
|
export declare class VoidActionError extends Error {
|
|
13
15
|
readonly body: unknown;
|
|
16
|
+
readonly limit: UsageLimitData | null;
|
|
14
17
|
readonly status: number;
|
|
15
18
|
readonly statusText: string;
|
|
16
19
|
readonly url: string;
|
|
@@ -109,6 +112,19 @@ export declare function createPageNavigationEngine(config: PageNavigationEngineC
|
|
|
109
112
|
//#region src/pages/form-value-equality.d.ts
|
|
110
113
|
export declare function isEqualFormValue(a: unknown, b: unknown): boolean;
|
|
111
114
|
//#endregion
|
|
115
|
+
//#region src/pages/form-presentation.d.ts
|
|
116
|
+
type FormMethod = "post" | "put" | "patch" | "delete";
|
|
117
|
+
type FormModel<Args extends Array<unknown> = []> = {
|
|
118
|
+
readonly pending: boolean;
|
|
119
|
+
readonly error: VoidActionError | null;
|
|
120
|
+
readonly errors: Readonly<Record<string, string | undefined>>;
|
|
121
|
+
} & { [K in FormMethod]: (...args: Args) => void | Promise<void>; };
|
|
122
|
+
export declare function formErrorMessage(form: Pick<FormModel, "error" | "errors">): string | null;
|
|
123
|
+
export declare function formRetryMessage(error: VoidActionError | null): string | null;
|
|
124
|
+
export declare function formSubmissionBlocked(form: Pick<FormModel, "pending" | "error">, now?: number): boolean;
|
|
125
|
+
/** One deadline, capped for browser timers; no polling and no automatic submission. */
|
|
126
|
+
export declare function scheduleFormRetry(error: VoidActionError | null, ready: () => void): () => void;
|
|
127
|
+
//#endregion
|
|
112
128
|
//#region src/pages/client.d.ts
|
|
113
129
|
export type VisitOptions = {
|
|
114
130
|
method?: string;
|
|
@@ -185,6 +201,22 @@ export declare function hasFiles(data: unknown): boolean;
|
|
|
185
201
|
export declare function objectToFormData(source: Record<string, unknown>, form?: FormData, parentKey?: string): FormData;
|
|
186
202
|
export declare const ssrProxy: VoidRouter;
|
|
187
203
|
export declare function submitAction(router: VoidRouter, url: string, options: VisitOptions): Promise<ActionResult>;
|
|
204
|
+
type ActionMethod = "POST" | "PUT" | "PATCH" | "DELETE";
|
|
205
|
+
type HasParams<U extends string> = [ResolveActionParams<U>] extends [never] ? false : true;
|
|
206
|
+
type ActionOptions<U extends string> = {
|
|
207
|
+
data?: ResolveActionBody<U>;
|
|
208
|
+
method?: ActionMethod;
|
|
209
|
+
} & (HasParams<U> extends true ? {
|
|
210
|
+
params: ResolveActionParams<U>;
|
|
211
|
+
} : {
|
|
212
|
+
params?: never;
|
|
213
|
+
});
|
|
214
|
+
export type ActionClient = {
|
|
215
|
+
setActionRouter(router: VoidRouter): void;
|
|
216
|
+
action<U extends ActionUrl & string>(url: U, ...args: HasParams<U> extends true ? [options: ActionOptions<U>] : [options?: ActionOptions<U>]): Promise<ActionResult>;
|
|
217
|
+
};
|
|
218
|
+
/** Creates an action client with its own router for each framework adapter. */
|
|
219
|
+
export declare function createActionClient(): ActionClient;
|
|
188
220
|
export declare function createVoidRouter(config: VoidRouterConfig): Promise<{
|
|
189
221
|
router: VoidRouter;
|
|
190
222
|
initialPageData: PageData;
|
|
@@ -195,4 +227,4 @@ export declare function createVoidRouter(config: VoidRouterConfig): Promise<{
|
|
|
195
227
|
export declare function scheduleHydration(el: Element, loader: () => Promise<unknown>, props: Record<string, unknown>, strategy: string, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>) => void | Promise<void>): void;
|
|
196
228
|
export declare function initIslands(islands: Record<string, () => Promise<unknown>>, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>) => void | Promise<void>): void;
|
|
197
229
|
//#endregion
|
|
198
|
-
export type { ActionErrorHandlingScope, ActionResult, PageNavigationEngine, PageNavigationResource, PageNavigationResult };
|
|
230
|
+
export type { ActionErrorHandlingScope, ActionResult, FormMethod, FormModel, PageNavigationEngine, PageNavigationResource, PageNavigationResult };
|
package/dist/pages/client.mjs
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
import { t as interpolateRouteParams } from "../route-url-CG7U-cRN.mjs";
|
|
1
2
|
import { n as initClientHead, t as applyClientHead } from "../head-client-DzmJGN4C.mjs";
|
|
2
3
|
import { n as parseCacheFor, t as PrefetchCache } from "../prefetch-Bsc_Pb6c.mjs";
|
|
4
|
+
import { readUsageLimit } from "@void/edge";
|
|
3
5
|
//#region src/pages/action-result.ts
|
|
4
6
|
var VoidActionError = class extends Error {
|
|
5
7
|
body;
|
|
8
|
+
limit;
|
|
6
9
|
status;
|
|
7
10
|
statusText;
|
|
8
11
|
url;
|
|
9
12
|
constructor({ body, status, statusText, url }) {
|
|
10
|
-
|
|
13
|
+
const limit = status === 429 ? readUsageLimit(body) : null;
|
|
14
|
+
super(limit?.message ?? (statusText ? `Action failed with ${status} ${statusText}` : `Action failed with ${status}`));
|
|
11
15
|
this.name = "VoidActionError";
|
|
12
16
|
this.body = body;
|
|
17
|
+
this.limit = limit;
|
|
13
18
|
this.status = status;
|
|
14
19
|
this.statusText = statusText;
|
|
15
20
|
this.url = url;
|
|
@@ -377,7 +382,7 @@ async function createPageNavigationEngine(config) {
|
|
|
377
382
|
window.location.href = url;
|
|
378
383
|
return;
|
|
379
384
|
}
|
|
380
|
-
pageData =
|
|
385
|
+
pageData = clonePageData(cachedPageData);
|
|
381
386
|
deferredRegistry.setupResolved(pageData);
|
|
382
387
|
if (!_prefetchCache.isFresh(cacheEntry)) {
|
|
383
388
|
const bgHeaders = {
|
|
@@ -732,6 +737,33 @@ function isEqualFormValue(a, b) {
|
|
|
732
737
|
return false;
|
|
733
738
|
}
|
|
734
739
|
//#endregion
|
|
740
|
+
//#region src/pages/form-presentation.ts
|
|
741
|
+
function formErrorMessage(form) {
|
|
742
|
+
return form.error?.message ?? (Object.values(form.errors).filter(Boolean).join(". ") || null);
|
|
743
|
+
}
|
|
744
|
+
function formRetryMessage(error) {
|
|
745
|
+
return error?.limit?.retryAt ? `Try again after ${new Date(error.limit.retryAt).toUTCString()}.` : null;
|
|
746
|
+
}
|
|
747
|
+
function formSubmissionBlocked(form, now = Date.now()) {
|
|
748
|
+
return form.pending || (form.error?.limit?.retryAt ? Date.parse(form.error.limit.retryAt) > now : false);
|
|
749
|
+
}
|
|
750
|
+
/** One deadline, capped for browser timers; no polling and no automatic submission. */
|
|
751
|
+
function scheduleFormRetry(error, ready) {
|
|
752
|
+
const retryAt = error?.limit?.retryAt;
|
|
753
|
+
if (!retryAt) return () => {};
|
|
754
|
+
let timer;
|
|
755
|
+
const schedule = () => {
|
|
756
|
+
const remaining = Date.parse(retryAt) - Date.now();
|
|
757
|
+
if (remaining <= 0) {
|
|
758
|
+
ready();
|
|
759
|
+
return;
|
|
760
|
+
}
|
|
761
|
+
timer = setTimeout(schedule, Math.min(remaining, 2147483647));
|
|
762
|
+
};
|
|
763
|
+
schedule();
|
|
764
|
+
return () => clearTimeout(timer);
|
|
765
|
+
}
|
|
766
|
+
//#endregion
|
|
735
767
|
//#region src/pages/client.ts
|
|
736
768
|
function currentUrl() {
|
|
737
769
|
return window.location.pathname + window.location.search + window.location.hash;
|
|
@@ -883,6 +915,30 @@ async function submitAction(router, url, options) {
|
|
|
883
915
|
throw error;
|
|
884
916
|
}
|
|
885
917
|
}
|
|
918
|
+
/** Creates an action client with its own router for each framework adapter. */
|
|
919
|
+
function createActionClient() {
|
|
920
|
+
let _router = null;
|
|
921
|
+
/** Called during app initialization to store the router instance */
|
|
922
|
+
function setActionRouter(router) {
|
|
923
|
+
_router = router;
|
|
924
|
+
}
|
|
925
|
+
/** Programmatic page action call with a router update */
|
|
926
|
+
async function action(url, ...args) {
|
|
927
|
+
if (!_router) throw new Error("action(): called before router initialization.");
|
|
928
|
+
const options = args[0];
|
|
929
|
+
const data = options?.data;
|
|
930
|
+
const method = options?.method || "POST";
|
|
931
|
+
const resolvedUrl = interpolateRouteParams(url, options?.params);
|
|
932
|
+
return submitAction(_router, resolvedUrl, {
|
|
933
|
+
method,
|
|
934
|
+
data
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
return {
|
|
938
|
+
action,
|
|
939
|
+
setActionRouter
|
|
940
|
+
};
|
|
941
|
+
}
|
|
886
942
|
async function createVoidRouter(config) {
|
|
887
943
|
{
|
|
888
944
|
const engine = await createPageNavigationEngine(config);
|
|
@@ -1003,4 +1059,4 @@ function initIslands(islands, hydrateFn) {
|
|
|
1003
1059
|
});
|
|
1004
1060
|
}
|
|
1005
1061
|
//#endregion
|
|
1006
|
-
export { VoidActionError, categorizeActionError, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, hasFiles, idleNavigationState, initIslands, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, objectToFormData, scheduleHydration, ssrProxy, submitAction };
|
|
1062
|
+
export { VoidActionError, categorizeActionError, createActionClient, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, formErrorMessage, formRetryMessage, formSubmissionBlocked, hasFiles, idleNavigationState, initIslands, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, objectToFormData, scheduleFormRetry, scheduleHydration, ssrProxy, submitAction };
|
package/dist/pages/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-Do8P4puT.mjs";
|
|
2
|
-
import "../config-
|
|
2
|
+
import "../config-BMHb8RCj.mjs";
|
|
3
3
|
import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-BAp5AEBU.mjs";
|
|
4
4
|
import { t as serializePageData } from "../serialize-CfSwWfF2.mjs";
|
|
5
5
|
//#region src/project-paths.d.ts
|
package/dist/pages/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join } from "../dist-BVqXeR_h.mjs";
|
|
2
2
|
import { r as resolvePagesDir } from "../project-paths-GgcMozYz.mjs";
|
|
3
|
-
import { m as readConfig } from "../config-
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
3
|
+
import { m as readConfig } from "../config-Br_JZD6u.mjs";
|
|
4
|
+
import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, r as resolveLayoutChain, t as scanPages } from "../scan-C7okrLyM.mjs";
|
|
5
|
+
import { i as parseRedirectsFile } from "../headers-DWi2IXWx.mjs";
|
|
6
6
|
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-D_QRR5Yd.mjs";
|
|
7
7
|
import { t as serializePageData } from "../serialize-BPvnNQuA.mjs";
|
|
8
8
|
//#region src/pages/manifest.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as PageScanResult } from "../types-BAp5AEBU.mjs";
|
|
2
2
|
import { ResolvedConfig, ViteDevServer } from "vite";
|
|
3
|
-
//#region ../../node_modules/.pnpm/magic-string@1.
|
|
3
|
+
//#region ../../node_modules/.pnpm/magic-string@1.4.2/node_modules/magic-string/dist/index.d.mts
|
|
4
4
|
//#region src/SourceMap.d.ts
|
|
5
5
|
interface SourceMapOptions {
|
|
6
6
|
/**
|
|
@@ -56,7 +56,9 @@ declare class SourceMap {
|
|
|
56
56
|
x_google_ignoreList: number[] | undefined;
|
|
57
57
|
debugId: string | undefined;
|
|
58
58
|
rangeMappings: string | undefined;
|
|
59
|
-
constructor(properties: DecodedSourceMap
|
|
59
|
+
constructor(properties: DecodedSourceMap | (Omit<DecodedSourceMap, "mappings"> & {
|
|
60
|
+
mappings: string;
|
|
61
|
+
}));
|
|
60
62
|
/**
|
|
61
63
|
* Returns the equivalent of `JSON.stringify(map)`
|
|
62
64
|
*/
|
|
@@ -90,8 +92,7 @@ interface UpdateOptions {
|
|
|
90
92
|
}
|
|
91
93
|
type ReplacementFunction = (substring: string, ...args: any[]) => string;
|
|
92
94
|
declare class MagicString {
|
|
93
|
-
original: string;
|
|
94
|
-
indentExclusionRanges: MagicStringOptions["indentExclusionRanges"];
|
|
95
|
+
readonly original: string;
|
|
95
96
|
offset: number;
|
|
96
97
|
constructor(string: string, options?: MagicStringOptions);
|
|
97
98
|
/**
|
|
@@ -143,8 +144,14 @@ declare class MagicString {
|
|
|
143
144
|
indent(indentStr?: string, options?: IndentOptions): this;
|
|
144
145
|
/**
|
|
145
146
|
* Moves the characters from `start` and `end` to `index`.
|
|
147
|
+
*
|
|
148
|
+
* `affinity` controls where the range is anchored at `index`. With the
|
|
149
|
+
* default `'right'`, it is inserted before the content that starts at `index`;
|
|
150
|
+
* with `'left'`, it is inserted after the content that ends at `index`. The
|
|
151
|
+
* two differ only when other content has already been moved to that boundary,
|
|
152
|
+
* mirroring the `appendLeft`/`appendRight` distinction.
|
|
146
153
|
*/
|
|
147
|
-
move(start: number, end: number, index: number): this;
|
|
154
|
+
move(start: number, end: number, index: number, affinity?: "left" | "right"): this;
|
|
148
155
|
/**
|
|
149
156
|
* Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
|
|
150
157
|
* that range. The same restrictions as `s.remove()` apply.
|
|
@@ -178,7 +185,10 @@ declare class MagicString {
|
|
|
178
185
|
prependRight(index: number, content: string): this;
|
|
179
186
|
/**
|
|
180
187
|
* Removes the characters from `start` to `end` (of the original string, **not** the generated string).
|
|
181
|
-
*
|
|
188
|
+
* Content appended or prepended at positions strictly inside the range is removed with it, while
|
|
189
|
+
* content attached at `start` or `end` is preserved — use `s.overwrite(start, end, '')` to remove
|
|
190
|
+
* the range including its edge inserts.
|
|
191
|
+
* Repeated removals and removals with partially overlapping ranges are allowed.
|
|
182
192
|
*/
|
|
183
193
|
remove(start: number, end: number): this;
|
|
184
194
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as dirname, u as resolve } from "../dist-BVqXeR_h.mjs";
|
|
2
2
|
import { n as isIdentifier, r as isLiteral } from "../ast-CPGPjb0V.mjs";
|
|
3
|
-
import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-
|
|
4
|
-
import { t as MagicString } from "../dist-
|
|
3
|
+
import { n as resolveEffectiveLayoutChain, t as scanPages } from "../scan-C7okrLyM.mjs";
|
|
4
|
+
import { t as MagicString } from "../dist-AoCzRTJE.mjs";
|
|
5
5
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
6
6
|
import { normalizePath, parseSync } from "vite";
|
|
7
7
|
//#region src/pages/island-imports.ts
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { w as ValidationError } from "../handler-
|
|
2
|
-
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-
|
|
1
|
+
import { w as ValidationError } from "../handler-CZ4nAylQ.mjs";
|
|
2
|
+
import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-CjF_iI9X.mjs";
|
|
3
3
|
export { PageObject, PageRenderResult, ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
|