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 { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { N as note, P as outro } from "./dist-Dn6nn2IU.mjs";
|
|
2
|
+
import { N as note, P as outro } from "./dist-CTBk70IR.mjs";
|
|
4
3
|
import { n as getPackageDir } from "./agents-B_pX_HmQ.mjs";
|
|
5
|
-
import { t as
|
|
4
|
+
import { c as import_picocolors, s as helpLine, t as categoryTitle, u as sectionTitle } from "./output-Dm_A4Tbv.mjs";
|
|
5
|
+
import { n as operatorGroups, t as operatorCommands } from "./operator-args-CLgKGlwU.mjs";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
//#region src/cli/ascii.ts
|
|
8
8
|
const asciiArts = [
|
|
@@ -26,563 +26,6 @@ dP .dP .d8888b. dP .d888b88
|
|
|
26
26
|
|___/\\____/_/\\__,_/`
|
|
27
27
|
];
|
|
28
28
|
//#endregion
|
|
29
|
-
//#region src/cli/operator-args.ts
|
|
30
|
-
const operatorCommands = [
|
|
31
|
-
{
|
|
32
|
-
group: "auth",
|
|
33
|
-
action: "login",
|
|
34
|
-
description: "Sign in as a platform administrator",
|
|
35
|
-
path: "/session",
|
|
36
|
-
values: { provider: "OAuth provider" },
|
|
37
|
-
booleans: ["token-stdin"]
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
group: "auth",
|
|
41
|
-
action: "logout",
|
|
42
|
-
description: "Revoke the current operator session and remove its local credential",
|
|
43
|
-
path: "/session/logout"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
group: "auth",
|
|
47
|
-
action: "status",
|
|
48
|
-
description: "Inspect operator identity, expiry, and capabilities",
|
|
49
|
-
path: "/session"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
group: "auth",
|
|
53
|
-
action: "token",
|
|
54
|
-
description: "Print an operator token; exchange an API session with --token-stdin",
|
|
55
|
-
path: "/session",
|
|
56
|
-
booleans: ["token-stdin"]
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
group: "user",
|
|
60
|
-
action: "list",
|
|
61
|
-
description: "List users",
|
|
62
|
-
path: "/users",
|
|
63
|
-
values: { search: "Search login or email" }
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
group: "user",
|
|
67
|
-
action: "show",
|
|
68
|
-
description: "Inspect a user, usage, and projects",
|
|
69
|
-
path: "/users/:id",
|
|
70
|
-
positional: ["id"]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
group: "user",
|
|
74
|
-
action: "plan",
|
|
75
|
-
description: "Change a user plan",
|
|
76
|
-
path: "/users/:id/plan",
|
|
77
|
-
positional: ["id", "plan"],
|
|
78
|
-
method: "POST"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
group: "user",
|
|
82
|
-
action: "suspend",
|
|
83
|
-
description: "Suspend a user and their projects",
|
|
84
|
-
path: "/users/:id/suspend",
|
|
85
|
-
positional: ["id"],
|
|
86
|
-
values: { reason: "Reason for suspension" },
|
|
87
|
-
method: "POST"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
group: "user",
|
|
91
|
-
action: "restore",
|
|
92
|
-
description: "Restore a suspended user",
|
|
93
|
-
path: "/users/:id/restore",
|
|
94
|
-
positional: ["id"],
|
|
95
|
-
method: "POST"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
group: "user",
|
|
99
|
-
action: "delete",
|
|
100
|
-
description: "Delete a user and all owned resources",
|
|
101
|
-
path: "/users/:id/delete",
|
|
102
|
-
positional: ["id"],
|
|
103
|
-
method: "POST"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
group: "project",
|
|
107
|
-
action: "list",
|
|
108
|
-
description: "List tenant projects",
|
|
109
|
-
path: "/projects",
|
|
110
|
-
values: {
|
|
111
|
-
user: "Owner user ID",
|
|
112
|
-
search: "Search projects"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
group: "project",
|
|
117
|
-
action: "show",
|
|
118
|
-
description: "Inspect a project and its resources",
|
|
119
|
-
path: "/projects/:id",
|
|
120
|
-
positional: ["id"]
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
group: "project",
|
|
124
|
-
action: "delete",
|
|
125
|
-
description: "Delete a project and its resources",
|
|
126
|
-
path: "/projects/:id/delete",
|
|
127
|
-
positional: ["id"],
|
|
128
|
-
method: "POST"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
group: "project",
|
|
132
|
-
action: "owner",
|
|
133
|
-
description: "Transfer project ownership to another registered user",
|
|
134
|
-
path: "/projects/:id/owner",
|
|
135
|
-
positional: ["id", "userId"],
|
|
136
|
-
method: "POST"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
group: "deployment",
|
|
140
|
-
action: "list",
|
|
141
|
-
description: "List tenant deployments",
|
|
142
|
-
path: "/deployments",
|
|
143
|
-
values: {
|
|
144
|
-
project: "Project ID",
|
|
145
|
-
search: "Search deployments",
|
|
146
|
-
status: "Deployment status"
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
group: "deployment",
|
|
151
|
-
action: "show",
|
|
152
|
-
description: "Inspect a deployment",
|
|
153
|
-
path: "/deployments/:id",
|
|
154
|
-
positional: ["id"]
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
group: "deployment",
|
|
158
|
-
action: "cancel",
|
|
159
|
-
description: "Cancel a deployment",
|
|
160
|
-
path: "/deployments/:id/cancel",
|
|
161
|
-
positional: ["id"],
|
|
162
|
-
method: "POST"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
group: "deployment",
|
|
166
|
-
action: "logs",
|
|
167
|
-
description: "Read runtime logs (JSON follow emits one object per line)",
|
|
168
|
-
path: "/deployments/:id/logs",
|
|
169
|
-
positional: ["id"],
|
|
170
|
-
values: {
|
|
171
|
-
since: "Duration or ISO timestamp",
|
|
172
|
-
cursor: "Opaque continuation cursor"
|
|
173
|
-
},
|
|
174
|
-
booleans: ["follow"]
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
group: "build",
|
|
178
|
-
action: "show",
|
|
179
|
-
description: "Inspect a managed build",
|
|
180
|
-
path: "/builds/:id",
|
|
181
|
-
positional: ["id"]
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
group: "build",
|
|
185
|
-
action: "logs",
|
|
186
|
-
description: "Read build logs (JSON follow emits one object per line)",
|
|
187
|
-
path: "/builds/:id/logs",
|
|
188
|
-
positional: ["id"],
|
|
189
|
-
values: { since: "Last received sequence number" },
|
|
190
|
-
booleans: ["follow"]
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
group: "signup",
|
|
194
|
-
action: "show",
|
|
195
|
-
description: "Inspect signup restrictions and allowlist",
|
|
196
|
-
path: "/signup"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
group: "signup",
|
|
200
|
-
action: "restrict",
|
|
201
|
-
description: "Restrict signup to the allowlist",
|
|
202
|
-
path: "/signup/restrict",
|
|
203
|
-
method: "POST"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
group: "signup",
|
|
207
|
-
action: "open",
|
|
208
|
-
description: "Open public signup",
|
|
209
|
-
path: "/signup/open",
|
|
210
|
-
method: "POST"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
group: "signup",
|
|
214
|
-
action: "allow",
|
|
215
|
-
description: "Add a GitHub, email, or exact login identity grant",
|
|
216
|
-
path: "/signup/allow",
|
|
217
|
-
positional: ["type", "pattern"],
|
|
218
|
-
usage: ["void platform signup allow <github|email> <pattern> [options]", "void platform signup allow identity <connection-id> <subject> [options]"],
|
|
219
|
-
values: { note: "Allowlist note" },
|
|
220
|
-
method: "POST"
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
group: "signup",
|
|
224
|
-
action: "disallow",
|
|
225
|
-
description: "Remove a GitHub, email, or exact login identity grant",
|
|
226
|
-
path: "/signup/disallow",
|
|
227
|
-
positional: ["type", "pattern"],
|
|
228
|
-
usage: ["void platform signup disallow <github|email> <pattern> [options]", "void platform signup disallow identity <connection-id> <subject> [options]"],
|
|
229
|
-
method: "POST"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
group: "signup",
|
|
233
|
-
action: "remove",
|
|
234
|
-
description: "Remove a GitHub or email allowlist pattern (compatibility alias)",
|
|
235
|
-
path: "/signup/remove",
|
|
236
|
-
positional: ["type", "pattern"],
|
|
237
|
-
method: "POST"
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
group: "invitation",
|
|
241
|
-
action: "list",
|
|
242
|
-
description: "List invitations",
|
|
243
|
-
path: "/invitations"
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
group: "invitation",
|
|
247
|
-
action: "send",
|
|
248
|
-
description: "Send invitations to comma-separated email addresses",
|
|
249
|
-
path: "/invitations/send",
|
|
250
|
-
positional: ["emails"],
|
|
251
|
-
method: "POST"
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
group: "invitation",
|
|
255
|
-
action: "revoke",
|
|
256
|
-
description: "Revoke an invitation",
|
|
257
|
-
path: "/invitations/:id/revoke",
|
|
258
|
-
positional: ["id"],
|
|
259
|
-
method: "POST"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
group: "system",
|
|
263
|
-
action: "overview",
|
|
264
|
-
description: "Inspect platform usage and capacity",
|
|
265
|
-
path: "/system/overview"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
group: "system",
|
|
269
|
-
action: "health",
|
|
270
|
-
description: "Check platform health",
|
|
271
|
-
path: "/system/health"
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
group: "system",
|
|
275
|
-
action: "cli-versions",
|
|
276
|
-
description: "Inspect CLI version adoption and deployment statistics",
|
|
277
|
-
path: "/system/cli-versions"
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
group: "system",
|
|
281
|
-
action: "events",
|
|
282
|
-
description: "List operator audit events",
|
|
283
|
-
path: "/system/events"
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
group: "system",
|
|
287
|
-
action: "backfill-queue-tokens",
|
|
288
|
-
description: "Repair missing queue authentication tokens",
|
|
289
|
-
path: "/system/backfill-queue-tokens",
|
|
290
|
-
method: "POST"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
group: "system",
|
|
294
|
-
action: "sandbox-drain",
|
|
295
|
-
description: "Drain and verify managed Sandbox container applications",
|
|
296
|
-
path: "/system/sandbox-drain",
|
|
297
|
-
values: { cursor: "Opaque cursor returned by --plan" },
|
|
298
|
-
method: "POST"
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
group: "email",
|
|
302
|
-
action: "policy",
|
|
303
|
-
description: "Show the recipient policy for the shared sender",
|
|
304
|
-
path: "/email/policy"
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
group: "email",
|
|
308
|
-
action: "policy-set",
|
|
309
|
-
description: "Set the recipient policy: verified, domains, or any",
|
|
310
|
-
path: "/email/policy",
|
|
311
|
-
positional: ["mode"],
|
|
312
|
-
values: { domains: "Comma-separated recipient domains for mode=domains" },
|
|
313
|
-
method: "POST"
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
group: "email",
|
|
317
|
-
action: "settings",
|
|
318
|
-
description: "Show platform email settings",
|
|
319
|
-
path: "/email/settings"
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
group: "email",
|
|
323
|
-
action: "settings-set",
|
|
324
|
-
description: "Set who manages email domains: self-serve or admin",
|
|
325
|
-
path: "/email/settings",
|
|
326
|
-
values: { domains: "self-serve or admin" },
|
|
327
|
-
method: "POST"
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
group: "email",
|
|
331
|
-
action: "limit",
|
|
332
|
-
description: "Set a project's monthly and burst recipient submission caps",
|
|
333
|
-
path: "/email/projects/:project/limit",
|
|
334
|
-
positional: ["project"],
|
|
335
|
-
values: {
|
|
336
|
-
monthly: "Recipient submissions per UTC calendar month",
|
|
337
|
-
burst: "Recipient submissions per rolling 60-second window"
|
|
338
|
-
},
|
|
339
|
-
method: "POST"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
group: "email",
|
|
343
|
-
action: "logs",
|
|
344
|
-
description: "Inspect retained email receipt and recipient outcomes for a project",
|
|
345
|
-
path: "/email/projects/:project/logs",
|
|
346
|
-
positional: ["project"]
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
group: "email",
|
|
350
|
-
action: "attempts",
|
|
351
|
-
description: "List unresolved email send attempts awaiting operator reconciliation",
|
|
352
|
-
path: "/email/attempts",
|
|
353
|
-
values: { project: "Project id or slug" }
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
group: "email",
|
|
357
|
-
action: "attempt-resolve",
|
|
358
|
-
description: "Resolve a stopped send as outcome unknown and release its cleanup fence",
|
|
359
|
-
path: "/email/attempts/:id/resolve",
|
|
360
|
-
positional: ["id"],
|
|
361
|
-
values: { reason: "Audit reason without recipient or message content" },
|
|
362
|
-
booleans: ["ended"],
|
|
363
|
-
method: "POST"
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
group: "email",
|
|
367
|
-
action: "operation-resolve",
|
|
368
|
-
description: "Resolve an ended ambiguous email setup write with operator attestation",
|
|
369
|
-
path: "/email/operations/:id/resolve",
|
|
370
|
-
positional: ["id"],
|
|
371
|
-
values: {
|
|
372
|
-
outcome: "Provider outcome: applied or not-applied",
|
|
373
|
-
reason: "Audit reason for the verified provider outcome"
|
|
374
|
-
},
|
|
375
|
-
booleans: ["ended"],
|
|
376
|
-
method: "POST"
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
group: "email",
|
|
380
|
-
action: "domains",
|
|
381
|
-
description: "List email domains registered on this platform",
|
|
382
|
-
path: "/email/domains",
|
|
383
|
-
values: { project: "Project id or slug" }
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
group: "email",
|
|
387
|
-
action: "domain-add",
|
|
388
|
-
description: "Register an email domain for a project with the platform credential",
|
|
389
|
-
path: "/email/domains",
|
|
390
|
-
positional: ["domain"],
|
|
391
|
-
values: { project: "Project id or slug" },
|
|
392
|
-
booleans: ["token-stdin"],
|
|
393
|
-
method: "POST"
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
group: "email",
|
|
397
|
-
action: "domain-status",
|
|
398
|
-
description: "Inspect an email domain's setup, credential and relay",
|
|
399
|
-
path: "/email/domains/:domain",
|
|
400
|
-
positional: ["domain"]
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
group: "email",
|
|
404
|
-
action: "domain-sync",
|
|
405
|
-
description: "Reconcile an email domain with its Cloudflare setup",
|
|
406
|
-
path: "/email/domains/:domain/sync",
|
|
407
|
-
positional: ["domain"],
|
|
408
|
-
method: "POST"
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
group: "email",
|
|
412
|
-
action: "domain-rotate-secret",
|
|
413
|
-
description: "Rotate an email domain's ingress secret",
|
|
414
|
-
path: "/email/domains/:domain/rotate-secret",
|
|
415
|
-
positional: ["domain"],
|
|
416
|
-
method: "POST"
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
group: "email",
|
|
420
|
-
action: "domain-remove",
|
|
421
|
-
description: "Remove an email domain and its Cloudflare setup",
|
|
422
|
-
path: "/email/domains/:domain/remove",
|
|
423
|
-
positional: ["domain"],
|
|
424
|
-
booleans: ["token-stdin"],
|
|
425
|
-
method: "POST"
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
group: "worker",
|
|
429
|
-
action: "list",
|
|
430
|
-
description: "List hosted platform workers",
|
|
431
|
-
path: "/workers",
|
|
432
|
-
values: { environment: "production or staging" }
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
group: "worker",
|
|
436
|
-
action: "show",
|
|
437
|
-
description: "Inspect hosted worker versions",
|
|
438
|
-
path: "/workers/:id",
|
|
439
|
-
positional: ["id"],
|
|
440
|
-
values: { environment: "production or staging" }
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
group: "worker",
|
|
444
|
-
action: "rollback",
|
|
445
|
-
description: "Roll back a hosted worker to a version",
|
|
446
|
-
path: "/workers/:id/rollback",
|
|
447
|
-
positional: ["id", "versionId"],
|
|
448
|
-
values: { environment: "production or staging" },
|
|
449
|
-
method: "POST"
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
group: "worker",
|
|
453
|
-
action: "rollback-all",
|
|
454
|
-
description: "Roll back all hosted workers to their previous versions",
|
|
455
|
-
path: "/workers/rollback-all",
|
|
456
|
-
values: { environment: "production or staging" },
|
|
457
|
-
method: "POST"
|
|
458
|
-
},
|
|
459
|
-
{
|
|
460
|
-
group: "worker",
|
|
461
|
-
action: "events",
|
|
462
|
-
description: "List hosted worker events or inspect a batch",
|
|
463
|
-
path: "/workers/events",
|
|
464
|
-
positional: ["batchId"],
|
|
465
|
-
optionalPositional: true,
|
|
466
|
-
values: { environment: "production or staging" }
|
|
467
|
-
}
|
|
468
|
-
];
|
|
469
|
-
const operatorGroups = [...new Set(operatorCommands.map(({ group }) => group))];
|
|
470
|
-
function parseOperatorArgs(args) {
|
|
471
|
-
const positional = [];
|
|
472
|
-
const values = {};
|
|
473
|
-
const flags = /* @__PURE__ */ new Set();
|
|
474
|
-
const booleanFlags = /* @__PURE__ */ new Set([
|
|
475
|
-
"json",
|
|
476
|
-
"plan",
|
|
477
|
-
"yes",
|
|
478
|
-
"follow",
|
|
479
|
-
"token-stdin",
|
|
480
|
-
"force",
|
|
481
|
-
"ended"
|
|
482
|
-
]);
|
|
483
|
-
for (let index = 0; index < args.length; index++) {
|
|
484
|
-
const arg = args[index];
|
|
485
|
-
if (!arg.startsWith("-")) {
|
|
486
|
-
positional.push(arg);
|
|
487
|
-
continue;
|
|
488
|
-
}
|
|
489
|
-
if (!arg.startsWith("--")) throw new Error(`platform: Unknown flag '${arg}'.`);
|
|
490
|
-
const flag = arg.slice(2);
|
|
491
|
-
if (flags.has(flag) || Object.hasOwn(values, flag)) throw new Error(`platform: Duplicate flag '${arg}'.`);
|
|
492
|
-
if (booleanFlags.has(flag)) flags.add(flag);
|
|
493
|
-
else {
|
|
494
|
-
const value = args[++index];
|
|
495
|
-
if (!value || value.startsWith("-")) throw new Error(`platform: ${arg} requires a value.`);
|
|
496
|
-
values[flag] = value;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
const [group = "", action = "", ...parameters] = positional;
|
|
500
|
-
if (!operatorGroups.includes(group)) throw new Error("platform: Unknown operator command group.");
|
|
501
|
-
const parsed = {
|
|
502
|
-
subcommand: "operator",
|
|
503
|
-
group,
|
|
504
|
-
action,
|
|
505
|
-
connection: values.connection ?? "",
|
|
506
|
-
json: flags.has("json"),
|
|
507
|
-
plan: flags.has("plan"),
|
|
508
|
-
yes: flags.has("yes"),
|
|
509
|
-
follow: flags.has("follow"),
|
|
510
|
-
tokenStdin: flags.has("token-stdin"),
|
|
511
|
-
provider: values.provider ?? "github",
|
|
512
|
-
...values.provider ? { providerExplicit: true } : {},
|
|
513
|
-
method: "GET",
|
|
514
|
-
path: "",
|
|
515
|
-
query: {},
|
|
516
|
-
body: {}
|
|
517
|
-
};
|
|
518
|
-
if (!action && args.length === 1) return parsed;
|
|
519
|
-
const command = operatorCommands.find((entry) => entry.group === group && entry.action === action);
|
|
520
|
-
if (!command) throw new Error(`platform: Usage: void platform ${group} <${operatorCommands.filter((entry) => entry.group === group).map(({ action }) => action).join("|")}>.`);
|
|
521
|
-
const count = command.positional?.length ?? 0;
|
|
522
|
-
const identitySignupEntry = group === "signup" && ["allow", "disallow"].includes(action) && parameters[0] === "identity";
|
|
523
|
-
if (group === "signup" && action === "remove" && parameters[0] === "identity") throw new Error("platform: Use `void platform signup disallow identity <connection-id> <subject>`.");
|
|
524
|
-
const expectedCount = identitySignupEntry ? 3 : count;
|
|
525
|
-
if (parameters.length > expectedCount || !command.optionalPositional && parameters.length !== expectedCount) throw new Error(`platform: Usage: ${command.usage?.[identitySignupEntry ? 1 : 0]?.replace(/ \[options\]$/, "") ?? `void platform ${group} ${action}${command.positional?.map((name) => ` <${name}>`).join("") ?? ""}`}.`);
|
|
526
|
-
const paged = action === "list" || action === "events" || action === "logs" || action === "attempts";
|
|
527
|
-
const allowed = /* @__PURE__ */ new Set([
|
|
528
|
-
"connection",
|
|
529
|
-
...command.method ? ["timeout"] : [],
|
|
530
|
-
...Object.keys(command.values ?? {}),
|
|
531
|
-
...paged ? ["limit", ...action !== "logs" || group === "email" ? ["page"] : []] : []
|
|
532
|
-
]);
|
|
533
|
-
for (const name of Object.keys(values)) if (!allowed.has(name)) throw new Error(`platform: Unknown flag '--${name}' for ${group} ${action}.`);
|
|
534
|
-
for (const name of flags) if (![
|
|
535
|
-
"json",
|
|
536
|
-
...command.method ? ["yes", "plan"] : [],
|
|
537
|
-
...command.booleans ?? []
|
|
538
|
-
].includes(name)) throw new Error(`platform: Unknown flag '--${name}' for ${group} ${action}.`);
|
|
539
|
-
if (parsed.plan && parsed.yes) throw new Error("platform: --plan and --yes cannot be combined.");
|
|
540
|
-
parsed.path = command.path;
|
|
541
|
-
parsed.method = command.method ?? "GET";
|
|
542
|
-
if (identitySignupEntry) {
|
|
543
|
-
const connectionId = parameters[1];
|
|
544
|
-
const subject = parameters[2];
|
|
545
|
-
if (!/^[a-z][a-z0-9-]{0,63}$/.test(connectionId)) throw new Error("platform: Invalid login connection ID.");
|
|
546
|
-
if (!subject || subject.length > 255) throw new Error("platform: Identity subject must be 1–255 characters.");
|
|
547
|
-
parsed.body = {
|
|
548
|
-
type: "identity",
|
|
549
|
-
connectionId,
|
|
550
|
-
subject
|
|
551
|
-
};
|
|
552
|
-
} else for (const [index, name] of (command.positional ?? []).entries()) {
|
|
553
|
-
const value = parameters[index];
|
|
554
|
-
if (value === void 0) continue;
|
|
555
|
-
if (value === "." || value === "..") throw new Error("platform: An object ID cannot be a dot path segment.");
|
|
556
|
-
if (parsed.path.includes(`:${name}`)) parsed.path = parsed.path.replace(`:${name}`, encodeURIComponent(value));
|
|
557
|
-
else if (group === "worker" && action === "events") parsed.path += `/${encodeURIComponent(value)}`;
|
|
558
|
-
else parsed.body[name] = name === "emails" ? value.split(",").map((email) => email.trim()) : value;
|
|
559
|
-
}
|
|
560
|
-
for (const [name, value] of Object.entries(values)) {
|
|
561
|
-
if (name === "connection" || name === "provider") continue;
|
|
562
|
-
if (name === "timeout") {
|
|
563
|
-
const maximum = OPERATOR_MAX_TIMEOUT_MS / 1e3;
|
|
564
|
-
if (!/^[1-9]\d*$/.test(value) || Number(value) > maximum) throw new Error(`platform: --timeout must be an integer from 1 to ${maximum} seconds.`);
|
|
565
|
-
parsed.timeoutMs = Number(value) * 1e3;
|
|
566
|
-
continue;
|
|
567
|
-
}
|
|
568
|
-
if (name === "page" || name === "limit") {
|
|
569
|
-
const maximum = name === "limit" ? action === "logs" && group !== "email" ? 500 : 100 : 1e6;
|
|
570
|
-
if (!/^[1-9]\d*$/.test(value) || Number(value) > maximum) throw new Error(`platform: --${name} must be an integer from 1 to ${maximum}.`);
|
|
571
|
-
}
|
|
572
|
-
if (name === "since" && group === "build" && (!/^\d+$/.test(value) || !Number.isSafeInteger(Number(value)))) throw new Error("platform: --since must be a nonnegative safe integer for build logs.");
|
|
573
|
-
if (name === "environment" && !["production", "staging"].includes(value)) throw new Error("platform: --environment must be production or staging.");
|
|
574
|
-
if (parsed.method === "POST") parsed.body[name] = value;
|
|
575
|
-
else parsed.query[name] = value;
|
|
576
|
-
}
|
|
577
|
-
if (parsed.body.type && ![
|
|
578
|
-
"github",
|
|
579
|
-
"email",
|
|
580
|
-
"identity"
|
|
581
|
-
].includes(String(parsed.body.type))) throw new Error("platform: Signup grant type must be github, email, or identity.");
|
|
582
|
-
for (const name of command.booleans ?? []) if (name !== "token-stdin" && flags.has(name)) parsed.body[name] = true;
|
|
583
|
-
return parsed;
|
|
584
|
-
}
|
|
585
|
-
//#endregion
|
|
586
29
|
//#region src/cli/help.ts
|
|
587
30
|
function operatorHelpTree() {
|
|
588
31
|
return Object.fromEntries(operatorGroups.map((group) => {
|
|
@@ -624,7 +67,8 @@ function operatorHelpTree() {
|
|
|
624
67
|
"list",
|
|
625
68
|
"events",
|
|
626
69
|
"logs",
|
|
627
|
-
"attempts"
|
|
70
|
+
"attempts",
|
|
71
|
+
"shared-recipients"
|
|
628
72
|
].includes(entry.action) ? [{
|
|
629
73
|
command: "--limit <number>",
|
|
630
74
|
description: entry.action === "logs" && group !== "email" ? "Maximum 500 log records" : "Maximum 100 records per page"
|
|
@@ -638,7 +82,7 @@ function operatorHelpTree() {
|
|
|
638
82
|
})),
|
|
639
83
|
...(entry.booleans ?? []).map((flag) => ({
|
|
640
84
|
command: `--${flag}`,
|
|
641
|
-
description: flag === "follow" ? "Poll new logs until interrupted or the build ends" : flag === "ended" ? "Attest that the original provider execution has ended" : flag === "token-stdin" && group === "email" ? entry.action === "domain-remove" ? "Read a replacement Cloudflare token for blocked project cleanup from stdin" : "Read a scoped Cloudflare API token from stdin" : "Read a full API session from stdin for explicit operator session exchange"
|
|
85
|
+
description: flag === "follow" ? "Poll new logs until interrupted or the build ends" : flag === "ended" ? "Attest that the original provider execution has ended" : flag === "protect-new-projects" ? "Protect newly created projects by default" : flag === "check" && group === "zero-trust" ? "Also check the saved settings against Cloudflare Access (several API calls)" : flag === "token-stdin" && group === "zero-trust" ? "Read the Access management API token from stdin" : flag === "token-stdin" && group === "email" ? entry.action === "domain-remove" ? "Read a replacement Cloudflare token for blocked project cleanup from stdin" : "Read a scoped Cloudflare API token from stdin" : "Read a full API session from stdin for explicit operator session exchange"
|
|
642
86
|
}))
|
|
643
87
|
]
|
|
644
88
|
}]))
|
|
@@ -870,6 +314,10 @@ const HELP_TREE = {
|
|
|
870
314
|
command: "config auth [command]",
|
|
871
315
|
description: "Configure login methods, company protection, and provider recovery"
|
|
872
316
|
},
|
|
317
|
+
{
|
|
318
|
+
command: "config plans [command]",
|
|
319
|
+
description: "Manage plans, account limits, and the default plan"
|
|
320
|
+
},
|
|
873
321
|
{
|
|
874
322
|
command: "list",
|
|
875
323
|
description: "List installed and connected platforms"
|
|
@@ -923,99 +371,177 @@ const HELP_TREE = {
|
|
|
923
371
|
...operatorHelpTree(),
|
|
924
372
|
config: {
|
|
925
373
|
summary: "Configure platform settings.",
|
|
926
|
-
usage: ["void platform config auth [command] [options]"],
|
|
927
|
-
children: {
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
374
|
+
usage: ["void platform config <auth|plans> [command] [options]"],
|
|
375
|
+
children: {
|
|
376
|
+
plans: {
|
|
377
|
+
summary: "Manage plans and limits. Without a command, opens interactive configuration.",
|
|
378
|
+
usage: ["void platform config plans [show|add|set|reset|archive|restore|remove|default|sync] [plan-id] [options]"],
|
|
379
|
+
commands: [
|
|
380
|
+
{
|
|
381
|
+
command: "show [id]",
|
|
382
|
+
description: "Show the catalog or one plan and its account count"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
command: "add <id> --copy <id> --name <name>",
|
|
386
|
+
description: "Copy an existing plan with a new stable ID"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
command: "set <id>",
|
|
390
|
+
description: "Edit a plan name, limits, or build instance size"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
command: "reset <id>",
|
|
394
|
+
description: "Restore a built-in plan’s original limits and build size"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
command: "archive <id>",
|
|
398
|
+
description: "Keep current accounts while stopping new assignments"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
command: "restore <id>",
|
|
402
|
+
description: "Allow assignments to an archived plan again"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
command: "remove <id>",
|
|
406
|
+
description: "Remove an unused plan or move its accounts to a replacement"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
command: "default <id>",
|
|
410
|
+
description: "Choose the plan new accounts receive"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
command: "sync",
|
|
414
|
+
description: "Continue pending account limit updates"
|
|
415
|
+
}
|
|
416
|
+
],
|
|
417
|
+
options: [
|
|
418
|
+
{
|
|
419
|
+
command: "--connection <id-or-url>",
|
|
420
|
+
description: "Select a registered platform"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
command: "--file <path>",
|
|
424
|
+
description: "Read plan settings and partial limits from JSON"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
command: "--name <name>",
|
|
428
|
+
description: "Set the display name when adding or editing"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
command: "--copy <id>",
|
|
432
|
+
description: "Copy this plan when adding a new one"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
command: "--replacement <id>",
|
|
436
|
+
description: "Move accounts and any default before removing a plan"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
command: "--plan",
|
|
440
|
+
description: "Preview the change and affected accounts"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
command: "--yes",
|
|
444
|
+
description: "Apply without prompting"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
command: "--json",
|
|
448
|
+
description: "Print structured output"
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
auth: {
|
|
453
|
+
summary: "Manage login methods and independent platform protection. Without a command, opens interactive configuration.",
|
|
454
|
+
usage: ["void platform config auth [list|show|initialize|add|configure|test|enable|disable|link|admission|protection|recover] [method-or-action] [options]"],
|
|
455
|
+
commands: [
|
|
456
|
+
{
|
|
457
|
+
command: "list",
|
|
458
|
+
description: "List configured login methods and platform protection"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
command: "show <id>",
|
|
462
|
+
description: "Inspect a login method without displaying secrets"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
command: "initialize",
|
|
466
|
+
description: "Import existing login settings before first configuration"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
command: "add <github|google|oidc|cloudflare-access>",
|
|
470
|
+
description: "Configure a new login method"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
command: "configure <id>",
|
|
474
|
+
description: "Stage an update to a login method"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
command: "test <id>",
|
|
478
|
+
description: "Verify a login configuration in the browser"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
command: "enable <id>",
|
|
482
|
+
description: "Enable a successfully tested configuration"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
command: "disable <id>",
|
|
486
|
+
description: "Disable a method and revoke its human sessions"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
command: "link <id>",
|
|
490
|
+
description: "Explicitly link a tested identity to your account"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
command: "admission",
|
|
494
|
+
description: "Choose invited, company-approved, or public signup"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
command: "protection <enable|disable|show>",
|
|
498
|
+
description: "Create or connect Access protection independently from login"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
command: "recover <id>",
|
|
502
|
+
description: "Recover an existing administrator using installation authority"
|
|
503
|
+
}
|
|
504
|
+
],
|
|
505
|
+
options: [
|
|
506
|
+
{
|
|
507
|
+
command: "--connection <id-or-url>",
|
|
508
|
+
description: "Select a registered platform"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
command: "--installation <id>",
|
|
512
|
+
description: "Select recovery authority for protection or provider recovery"
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
command: "--id <id>",
|
|
516
|
+
description: "Name a new OIDC or Access connection"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
command: "--file <path>",
|
|
520
|
+
description: "Read nonsecret configuration from JSON"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
command: "--client-secret-env <name>",
|
|
524
|
+
description: "Read the client secret from an environment variable"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
command: "--test-id <id>",
|
|
528
|
+
description: "Use a completed test for enable or link"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
command: "--plan",
|
|
532
|
+
description: "Validate and preview a change"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
command: "--yes",
|
|
536
|
+
description: "Apply without prompting"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
command: "--json",
|
|
540
|
+
description: "Print structured output"
|
|
541
|
+
}
|
|
542
|
+
]
|
|
543
|
+
}
|
|
544
|
+
}
|
|
1019
545
|
},
|
|
1020
546
|
domain: {
|
|
1021
547
|
summary: "Add an application domain while keeping existing workers.dev URLs.",
|
|
@@ -1069,13 +595,29 @@ const HELP_TREE = {
|
|
|
1069
595
|
command: "--auth-config <path>",
|
|
1070
596
|
description: "Read login methods and signup policy from nonsecret JSON with environment secret references"
|
|
1071
597
|
},
|
|
598
|
+
{
|
|
599
|
+
command: "--login-methods <methods>",
|
|
600
|
+
description: "Comma-separated github, google, oidc, or cloudflare-access login methods"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
command: "--access-protection",
|
|
604
|
+
description: "Protect platform UI and APIs with Cloudflare Access"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
command: "--no-access-protection",
|
|
608
|
+
description: "Skip Cloudflare Access protection"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
command: "--hyperdrive <create|id>",
|
|
612
|
+
description: "Create Hyperdrive or use the specified existing configuration"
|
|
613
|
+
},
|
|
1072
614
|
{
|
|
1073
615
|
command: "--name <slug>",
|
|
1074
616
|
description: "Installation name"
|
|
1075
617
|
},
|
|
1076
618
|
{
|
|
1077
619
|
command: "--workers-dev",
|
|
1078
|
-
description: "Use workers.dev for testing
|
|
620
|
+
description: "Use workers.dev for testing. Add a domain later."
|
|
1079
621
|
},
|
|
1080
622
|
{
|
|
1081
623
|
command: "--display-name <name>",
|
|
@@ -1087,7 +629,7 @@ const HELP_TREE = {
|
|
|
1087
629
|
},
|
|
1088
630
|
{
|
|
1089
631
|
command: "--application-domain <domain>",
|
|
1090
|
-
description: "Base domain for applications
|
|
632
|
+
description: "Base domain for applications"
|
|
1091
633
|
},
|
|
1092
634
|
{
|
|
1093
635
|
command: "--zone <domain>",
|
|
@@ -1097,10 +639,22 @@ const HELP_TREE = {
|
|
|
1097
639
|
command: "--dedicated-zone",
|
|
1098
640
|
description: "Allow zone-wide application catch-all routes"
|
|
1099
641
|
},
|
|
642
|
+
{
|
|
643
|
+
command: "--no-dedicated-zone",
|
|
644
|
+
description: "Skip zone-wide application catch-all routes"
|
|
645
|
+
},
|
|
1100
646
|
{
|
|
1101
647
|
command: "--control-plane-domain <domain>",
|
|
1102
648
|
description: "Optional API hostname"
|
|
1103
649
|
},
|
|
650
|
+
{
|
|
651
|
+
command: "--no-control-plane-domain",
|
|
652
|
+
description: "Use the default workers.dev API hostname"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
command: "--dashboard-url <origin>",
|
|
656
|
+
description: "HTTPS origin of a separately deployed dashboard"
|
|
657
|
+
},
|
|
1104
658
|
{
|
|
1105
659
|
command: "--plan",
|
|
1106
660
|
description: "Print the exact plan without changing Cloudflare"
|
|
@@ -1193,6 +747,10 @@ const HELP_TREE = {
|
|
|
1193
747
|
command: "team <command>",
|
|
1194
748
|
description: "Manage members and project invitations"
|
|
1195
749
|
},
|
|
750
|
+
{
|
|
751
|
+
command: "zero-trust <command>",
|
|
752
|
+
description: "Inspect or override Cloudflare Zero Trust protection"
|
|
753
|
+
},
|
|
1196
754
|
{
|
|
1197
755
|
command: "logs",
|
|
1198
756
|
description: "Show runtime logs from the deployed project"
|
|
@@ -1319,6 +877,38 @@ const HELP_TREE = {
|
|
|
1319
877
|
decline: basicSubcommand("Decline your invitation on the active platform connection (VOID_API_URL overrides it).", "void project team decline <invitation-id>")
|
|
1320
878
|
}
|
|
1321
879
|
},
|
|
880
|
+
"zero-trust": {
|
|
881
|
+
summary: "Inspect and manage Zero Trust protection for a Void platform project.",
|
|
882
|
+
usage: ["void project zero-trust <status|protect|public|reconcile> [options]"],
|
|
883
|
+
commands: [
|
|
884
|
+
{
|
|
885
|
+
command: "status",
|
|
886
|
+
description: "Show desired and effective protection state"
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
command: "protect",
|
|
890
|
+
description: "Protect the project"
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
command: "public",
|
|
894
|
+
description: "Make the project public"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
command: "reconcile",
|
|
898
|
+
description: "Repair Cloudflare Access configuration drift"
|
|
899
|
+
}
|
|
900
|
+
],
|
|
901
|
+
options: [{
|
|
902
|
+
command: "--project <name>",
|
|
903
|
+
description: "Project name override"
|
|
904
|
+
}],
|
|
905
|
+
children: Object.fromEntries([
|
|
906
|
+
"status",
|
|
907
|
+
"protect",
|
|
908
|
+
"public",
|
|
909
|
+
"reconcile"
|
|
910
|
+
].map((action) => [action, withProjectOption(action === "status" ? "Show desired and effective Zero Trust protection." : action === "protect" ? "Protect the project with the platform Access policy." : action === "public" ? "Make the project public with a managed Access bypass." : "Repair Cloudflare Access configuration drift for the project.", `void project zero-trust ${action} [options]`)]))
|
|
911
|
+
},
|
|
1322
912
|
logs: {
|
|
1323
913
|
summary: "Show runtime logs from the deployed project.",
|
|
1324
914
|
usage: ["void project logs [options]"],
|
|
@@ -1546,20 +1136,14 @@ const HELP_TREE = {
|
|
|
1546
1136
|
}
|
|
1547
1137
|
],
|
|
1548
1138
|
options: [{
|
|
1549
|
-
command: "--subdomain <label|host>",
|
|
1550
|
-
description: "On add: register this subdomain instead of the proposed mail.<domain>"
|
|
1551
|
-
}, {
|
|
1552
1139
|
command: "--project <name>",
|
|
1553
1140
|
description: "Project name override"
|
|
1554
1141
|
}],
|
|
1555
1142
|
children: {
|
|
1556
1143
|
add: {
|
|
1557
|
-
summary: "Register a
|
|
1144
|
+
summary: "Register a Cloudflare zone apex you own for sending and receiving.",
|
|
1558
1145
|
usage: ["void email domain add <domain> [options]"],
|
|
1559
1146
|
options: [{
|
|
1560
|
-
command: "--subdomain <label|host>",
|
|
1561
|
-
description: "Register this subdomain instead of the proposed mail.<domain>"
|
|
1562
|
-
}, {
|
|
1563
1147
|
command: "--project <name>",
|
|
1564
1148
|
description: "Project name override"
|
|
1565
1149
|
}]
|
|
@@ -2052,6 +1636,18 @@ const HELP_TREE = {
|
|
|
2052
1636
|
queue: basicSubcommand("Generate a queue consumer file.", "void gen queue <name>")
|
|
2053
1637
|
}
|
|
2054
1638
|
},
|
|
1639
|
+
info: {
|
|
1640
|
+
summary: "Inspect persistent resource names in this project without deploying.",
|
|
1641
|
+
usage: ["void info [--json]"],
|
|
1642
|
+
options: [{
|
|
1643
|
+
command: "--json",
|
|
1644
|
+
description: "Write structured JSON to stdout"
|
|
1645
|
+
}],
|
|
1646
|
+
examples: [{
|
|
1647
|
+
command: "void info",
|
|
1648
|
+
description: "Find names to preserve before moving persistent definitions"
|
|
1649
|
+
}]
|
|
1650
|
+
},
|
|
2055
1651
|
prepare: {
|
|
2056
1652
|
summary: "Generate .void artifacts without starting Vite.",
|
|
2057
1653
|
usage: ["void prepare"],
|
|
@@ -2084,7 +1680,7 @@ function withProjectOption(summary, usage) {
|
|
|
2084
1680
|
function lifecycleHelp(command, summary) {
|
|
2085
1681
|
return {
|
|
2086
1682
|
summary,
|
|
2087
|
-
usage: [`void platform ${command} [id] [--plan]${command === "disable" ? "" : " [--runtime <path>]"} [--yes]`],
|
|
1683
|
+
usage: [`void platform ${command} [id] [--plan]${command === "disable" ? "" : " [--runtime <path>]"}${command === "upgrade" || command === "repair" ? " [--dashboard-url <origin>]" : ""} [--yes]`],
|
|
2088
1684
|
options: [
|
|
2089
1685
|
{
|
|
2090
1686
|
command: "--plan",
|
|
@@ -2094,6 +1690,10 @@ function lifecycleHelp(command, summary) {
|
|
|
2094
1690
|
command: "--runtime <path>",
|
|
2095
1691
|
description: "Deploy an integrity-checked runtime directory instead of the package"
|
|
2096
1692
|
}],
|
|
1693
|
+
...command === "upgrade" || command === "repair" ? [{
|
|
1694
|
+
command: "--dashboard-url <origin>",
|
|
1695
|
+
description: "Configure a separately deployed dashboard; omission keeps its saved origin"
|
|
1696
|
+
}] : [],
|
|
2097
1697
|
{
|
|
2098
1698
|
command: "--yes",
|
|
2099
1699
|
description: "Acknowledge non-interactive Cloudflare changes"
|
|
@@ -2109,6 +1709,8 @@ function printGlobalHelp() {
|
|
|
2109
1709
|
"",
|
|
2110
1710
|
globalCommandLine(["migrate"], "void migrate"),
|
|
2111
1711
|
"",
|
|
1712
|
+
globalCommandLine(["info"], "void info [--json]"),
|
|
1713
|
+
"",
|
|
2112
1714
|
globalCommandLine(["connect"], "void connect [url]"),
|
|
2113
1715
|
...globalOptionLines(["connect"]),
|
|
2114
1716
|
"",
|
|
@@ -2253,4 +1855,4 @@ function formatHelpPath(path) {
|
|
|
2253
1855
|
return path.length === 0 ? "help" : path.join(" ");
|
|
2254
1856
|
}
|
|
2255
1857
|
//#endregion
|
|
2256
|
-
export {
|
|
1858
|
+
export { printVoidHeader as i, printGlobalHelp as n, printHelpPage as r, getHelpPath as t };
|