cf 1.0.0-beta.27 → 1.0.0-beta.29
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 +10 -3
- package/dist/_meta/commands.json +7966 -5034
- package/dist/_meta/hand-written-commands.json +40 -10
- package/dist/_meta/schemas.json +3153 -3736
- package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
- package/dist/{access-BxEprr2f.mjs → access-Cte4yyIz.mjs} +1 -1
- package/dist/{accounts-DU2ZNYqP.mjs → accounts-G-x-_cEx.mjs} +58 -57
- package/dist/{acm-CBCIKBJ4.mjs → acm-Bg3HqMGG.mjs} +7 -7
- package/dist/{addressing-BKxiLRHk.mjs → addressing-BwEofGEm.mjs} +46 -46
- package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
- package/dist/ai-DWWRIQIt.mjs +30 -0
- package/dist/ai-audit-CMEBz6ZP.mjs +6 -0
- package/dist/ai-gateway-D2s0isU-.mjs +76 -0
- package/dist/ai-search-a0uqr9yJ.mjs +74 -0
- package/dist/{ai-security-CvZfP2JC.mjs → ai-security-H_RqjRoL.mjs} +4 -4
- package/dist/alerting-Bgp9rE4I.mjs +52 -0
- package/dist/analytics-CFYM82FD.mjs +17 -0
- package/dist/analytics-engine-BLiEaLxb.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BbcvDtff.mjs → api-security-B0YtHglt.mjs} +63 -63
- package/dist/argo-BPwbzHY7.mjs +14 -0
- package/dist/{artifacts-2R2sxIKO.mjs → artifacts-B6UwC2PH.mjs} +20 -20
- package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-kG97iEnI.mjs} +2 -2
- package/dist/auth-Czr8ChBB.mjs +2 -0
- package/dist/auth-DA1PHaHi.mjs +2 -0
- package/dist/auth-Dwfa4S3h.mjs +7 -0
- package/dist/{auth-token-BwpERbnG.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
- package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-B4tFR6ua.mjs} +118 -114
- package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
- package/dist/billing-TERxOuLR.mjs +22 -0
- package/dist/{blocks-C8vyXIAT.mjs → blocks-C3Im7AT0.mjs} +1 -1
- package/dist/body-parser-HN91kAf0.mjs +2 -0
- package/dist/{body-unions-CjpNjwSW.mjs → body-unions-D9OSaf4M.mjs} +1 -1
- package/dist/{bot-management-fwxKIbaB.mjs → bot-management-SZw9jTOC.mjs} +4 -4
- package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
- package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
- package/dist/browser-run-BvjfMK3f.mjs +40 -0
- package/dist/build-CCwo_ydV.mjs +2 -0
- package/dist/build-yQOzZg6Z.mjs +2 -0
- package/dist/builds-tMa3sbQU.mjs +62 -0
- package/dist/cache-b_EPh6Is.mjs +36 -0
- package/dist/cf-DmvZ2L51.mjs +18 -0
- package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
- package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
- package/dist/cli-Cc7ujzAy.mjs +4 -0
- package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
- package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
- package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
- package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
- package/dist/{command-BxZBNPxG.mjs → command-BQbZw4Kx.mjs} +1 -1
- package/dist/command-BVct0Dvr.mjs +2 -0
- package/dist/{command-BiIVclNA.mjs → command-C4_lMRkw.mjs} +1 -1
- package/dist/command-CJ3ldWrA.mjs +2 -0
- package/dist/command-CyOdBNur.mjs +2 -0
- package/dist/command-D2XkyO1e.mjs +2 -0
- package/dist/command-DHODgfFZ.mjs +2 -0
- package/dist/command-DIIaZx_f.mjs +2 -0
- package/dist/command-DONwHpqZ.mjs +2 -0
- package/dist/command-DdYnSf-8.mjs +2 -0
- package/dist/command-DqOU7Ql2.mjs +2 -0
- package/dist/{command-pMoNdd22.mjs → command-HW7k43qu.mjs} +1 -1
- package/dist/command-NqM0lo4a.mjs +2 -0
- package/dist/command-bwVDyMv4.mjs +2 -0
- package/dist/command-yzqs4m83.mjs +2 -0
- package/dist/{completions-DRzBiqpv.mjs → completions-0YKvIyBT.mjs} +2 -2
- package/dist/connector-interrupts-CsunbRsr.mjs +6 -0
- package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
- package/dist/{connectors-D1WFLJoE.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
- package/dist/containers-BiA_bpPR.mjs +76 -0
- package/dist/{content-scan-D1GfPSL0.mjs → content-scan-4SA2nacB.mjs} +6 -6
- package/dist/{context-Dp4CXG22.mjs → context-BGm5_wTT.mjs} +1 -1
- package/dist/{cps-D4uhzg3k.mjs → cps-WDmD3V5I.mjs} +3 -3
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
- package/dist/custom-csrs-D-lvkyRV.mjs +18 -0
- package/dist/custom-hostnames-B5BQX5m6.mjs +24 -0
- package/dist/custom-nameservers-CZrRjcjx.mjs +12 -0
- package/dist/custom-pages-CWwjtfbj.mjs +38 -0
- package/dist/d1-N81q-FAr.mjs +50 -0
- package/dist/{delegate-B4bKqF7i.mjs → delegate-livNdiwK.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-Ok4ncy06.mjs +2 -0
- package/dist/deploy-context-B_lLfxt7.mjs +55 -0
- package/dist/deploy-input-JZlEJwKB.mjs +2 -0
- package/dist/dev-DxbkJkzc.mjs +4 -0
- package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
- package/dist/dialog-CD94-Kzw.mjs +2 -0
- package/dist/discover-D9FNaCDK.mjs +2 -0
- package/dist/discover-DGsMj9ZN.mjs +2 -0
- package/dist/{dist-D5qkmHhC.mjs → dist-BxhwE-W1.mjs} +202 -193
- package/dist/{dls-DWBiYzY1.mjs → dls-5OXuxLAB.mjs} +8 -8
- package/dist/dns-Burep9O7.mjs +142 -0
- package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
- package/dist/docs-BFVK88kB.mjs +3 -0
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-qsnRlRk6.mjs} +1 -1
- package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
- package/dist/email-auth--2KCzZNA.mjs +6 -0
- package/dist/email-routing-DzaExfVf.mjs +44 -0
- package/dist/{email-security-CnNa1YON.mjs → email-security-DwQJszzy.mjs} +71 -71
- package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-mQd2qB-o.mjs} +21 -21
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/errors-C_bGcR0X.mjs +11 -0
- package/dist/field-extractors-MVOizTlB.mjs +8 -0
- package/dist/{firewall-CY_oem-d.mjs → firewall-DtSIlkfL.mjs} +19 -19
- package/dist/flagship-9E5gwNki.mjs +24 -0
- package/dist/{fraud-CSUKLh8X.mjs → fraud-DjqhVJdf.mjs} +3 -3
- package/dist/generate-BzOnRBij.mjs +2 -0
- package/dist/generate-DfxZtpn9.mjs +2 -0
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
- package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
- package/dist/gt-BV-jij5q.mjs +4 -0
- package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
- package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
- package/dist/{iam-8T74DNhH.mjs → iam-BK6N7NdQ.mjs} +31 -31
- package/dist/{images-C3JUaf6b.mjs → images-3bCWE6Ml.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-BgCF9K8h.mjs +43 -0
- package/dist/intel-BQ58CJLt.mjs +62 -0
- package/dist/{interactive-CKHdGvkh.mjs → interactive-JBA3qOUa.mjs} +9 -9
- package/dist/{internal-CamuESs0.mjs → internal-CWPz0sBF.mjs} +2 -2
- package/dist/{ips-DinCNnWj.mjs → ips-3WYegiVW.mjs} +2 -2
- package/dist/k2-Bc_hjmiv.mjs +10 -0
- package/dist/kv-DbShBhhg.mjs +12 -0
- package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
- package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
- package/dist/{live-B6AsI_E5.mjs → live-BTtMv1a6.mjs} +2 -2
- package/dist/load-balancers-C2hg52WA.mjs +84 -0
- package/dist/{local-CgBhtmON.mjs → local-B3zt9PXR.mjs} +1 -1
- package/dist/local-DRxctCh9.mjs +2 -0
- package/dist/local-runtime-BOnDiMDc.mjs +2 -0
- package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
- package/dist/log-DBAHla_W.mjs +2 -0
- package/dist/login-CK3nn9a5.mjs +2 -0
- package/dist/{login-BJHaTERg.mjs → login-DiR-buzS.mjs} +3 -3
- package/dist/{logpush-qhlxsioM.mjs → logpush-CitvUX-J.mjs} +22 -22
- package/dist/{logs-bI54CJ0w.mjs → logs-CfWHu4Ir.mjs} +14 -16
- package/dist/magic-network-monitoring-gU6yzzML.mjs +34 -0
- package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
- package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
- package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
- package/dist/{mcp-CyI0sDmL.mjs → mcp-DqhQJVaz.mjs} +15 -15
- package/dist/{mesh-Czr0UCP4.mjs → mesh-DXVZBNDC.mjs} +12 -12
- package/dist/{migrate-DKDWYrz2.mjs → migrate-CmXyk9vX.mjs} +1 -1
- package/dist/{monetization-NUgfDtSy.mjs → monetization-CWg-mySr.mjs} +9 -9
- package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
- package/dist/{network-B42zrBic.mjs → network-jtgq5eb4.mjs} +24 -24
- package/dist/o11y-eYYs59X9.mjs +88 -0
- package/dist/oauth-BgDZMd72.mjs +5 -0
- package/dist/{oauth-BLQ1-y3R.mjs → oauth-V37G-PaV.mjs} +1 -1
- package/dist/{observability-BxhJQCgZ.mjs → observability-CB72eC4T.mjs} +2 -2
- package/dist/ohttp-gateway-K9ToEft8.mjs +8 -0
- package/dist/organizations-BllV7l_c.mjs +70 -0
- package/dist/output-hFMAotFl.mjs +2 -0
- package/dist/package-oNVeacC9.mjs +2 -0
- package/dist/page-rules-BVmi-ZFW.mjs +35 -0
- package/dist/pages-5spcBpX1.mjs +48 -0
- package/dist/pay-per-crawl-BgsdGcBi.mjs +36 -0
- package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
- package/dist/pipelines-CbtmLRxt.mjs +40 -0
- package/dist/{precursor-D3VH2MXT.mjs → precursor-Dk8YOKf_.mjs} +2 -2
- package/dist/previews-Bv1HMMtO.mjs +6 -0
- package/dist/progress-DE_G09u2.mjs +2 -0
- package/dist/project-settings-D_S-UC8I.mjs +3 -0
- package/dist/prompt-D274Im1O.mjs +4 -0
- package/dist/queues-DGCYUr4g.mjs +52 -0
- package/dist/r2-DtCk-Nfi.mjs +112 -0
- package/dist/{radar-CvLtu-Vr.mjs → radar-1CwqOsMZ.mjs} +150 -150
- package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
- package/dist/{ready-gsGEaWLL.mjs → ready-CcoEA7M7.mjs} +2 -2
- package/dist/{realtime-DiCEgFTC.mjs → realtime-DFUxwIG5.mjs} +80 -81
- package/dist/registrar-Cl1snz8z.mjs +43 -0
- package/dist/registrar-sandbox-Cne9BVCZ.mjs +58 -0
- package/dist/{reporting-BiHgnT8L.mjs → reporting-D9FC-Z-3.mjs} +7 -7
- package/dist/request-headers-Bopp5lH_.mjs +2 -0
- package/dist/request-tracers-CSSB9_aW.mjs +4 -0
- package/dist/resource-sharing-D8yuzJm7.mjs +36 -0
- package/dist/{rules-CRhe_ca9.mjs → rules-DzmOQ3MB.mjs} +8 -8
- package/dist/rulesets-DsTGcgbc.mjs +42 -0
- package/dist/{rum-BfnWHW_d.mjs → rum-DrJLI93T.mjs} +14 -14
- package/dist/run-C5yPsiO2.mjs +2 -0
- package/dist/run-CXWkMU3x.mjs +2 -0
- package/dist/schema-CfZOW8Zw.mjs +2 -0
- package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
- package/dist/schema-flags-DO3kLYBu.mjs +4 -0
- package/dist/scim-0OufLKru.mjs +16 -0
- package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
- package/dist/{security-insights-SlUGW3F_.mjs → security-insights-D2pj8-O-.mjs} +20 -20
- package/dist/{security-txt-C3YS0REz.mjs → security-txt-SKtgW4n-.mjs} +4 -4
- package/dist/session-COdP8BXD.mjs +2 -0
- package/dist/shared-D_2KLpP3.mjs +2 -0
- package/dist/{signed-url-ClLk45_J.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
- package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
- package/dist/snippets-DrrdpLnS.mjs +18 -0
- package/dist/spawn-DNf-Ge8d.mjs +5 -0
- package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-CHBGZbZF.mjs} +11 -11
- package/dist/{speed-BrVeZRyX.mjs → speed-vOlHyG3v.mjs} +11 -11
- package/dist/sql-BCuLxGSf.mjs +4 -0
- package/dist/src-ByCoEqOw.mjs +133 -0
- package/dist/{ssl-Bx4LCutF.mjs → ssl-BA_dcVwF.mjs} +60 -62
- package/dist/startup-profile-CyQk_f_L.mjs +2 -0
- package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
- package/dist/state-B6r-b_-d.mjs +2 -0
- package/dist/{state-BmzOLELo.mjs → state-CTLznbVs.mjs} +1 -1
- package/dist/{containers-DINLx5_i.mjs → static-assets-DGDoaJf1.mjs} +216 -210
- package/dist/stream-CzlqY8hq.mjs +89 -0
- package/dist/{tags-xVzjZxdt.mjs → tags-BLeaslAb.mjs} +8 -8
- package/dist/telemetry-COlodX5Z.mjs +2 -0
- package/dist/{telemetry-CJ9URio3.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
- package/dist/tenants-CRirmhxS.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-BRjRgZnj.mjs} +1 -1
- package/dist/tunnels-nLfIWPYT.mjs +27 -0
- package/dist/{turnstile-B_Ugzgom.mjs → turnstile-CZjXtBCr.mjs} +10 -10
- package/dist/ui-dWsVmFCG.mjs +2 -0
- package/dist/{update-check-DRr0eRhB.mjs → update-check-CXMdVBhW.mjs} +1 -1
- package/dist/{update-check-DHUo4FOJ.mjs → update-check-D_Oky9-u.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
- package/dist/url-scanner-9XW3zLaU.mjs +16 -0
- package/dist/user-Bk1BIqZ5.mjs +103 -0
- package/dist/vectorize-CgOfmWYq.mjs +30 -0
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-CcuBNjqg.mjs +2 -0
- package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
- package/dist/{web-assets-CgQXsp8m.mjs → web-assets-CWU3jrit.mjs} +29 -29
- package/dist/web3-CRpQ5sl4.mjs +26 -0
- package/dist/workers-BZMvamn0.mjs +39 -0
- package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
- package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
- package/dist/workflows-Dd88_Nqc.mjs +48 -0
- package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-BzMTJPdI.mjs} +302 -293
- package/dist/zaraz-BFK0p28R.mjs +22 -0
- package/dist/zero-trust-Cdjfp0Ie.mjs +1008 -0
- package/dist/{zones-DTAcguf6.mjs → zones-DDn5jk6I.mjs} +51 -51
- package/package.json +20 -20
- package/dist/ai-DqEN_hhg.mjs +0 -30
- package/dist/ai-audit-BmzOgt6x.mjs +0 -6
- package/dist/ai-gateway-B0uiYVHq.mjs +0 -74
- package/dist/ai-search-DbZIxdio.mjs +0 -74
- package/dist/alerting-BjGwBxZT.mjs +0 -52
- package/dist/analytics-C7kT_H-W.mjs +0 -17
- package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-D1VONzu-.mjs +0 -14
- package/dist/auth-CspwoBlp.mjs +0 -2
- package/dist/auth-D499YE2n.mjs +0 -7
- package/dist/auth-FK2eLQ02.mjs +0 -2
- package/dist/billing-DRNww0iC.mjs +0 -24
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/brand-protection-BVICLzBc.mjs +0 -26
- package/dist/browser-run-CEk-NIgP.mjs +0 -40
- package/dist/build-CRm2TQq8.mjs +0 -2
- package/dist/build-DO_GNhRl.mjs +0 -2
- package/dist/builds-CoazxuN-.mjs +0 -64
- package/dist/cache-jlLJLSu7.mjs +0 -36
- package/dist/cf-hP0SOgC6.mjs +0 -18
- package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +0 -363
- package/dist/cli-Nqf58-1c.mjs +0 -4
- package/dist/cloudforce-one-CCaIBOAo.mjs +0 -318
- package/dist/command-BASaTmJc.mjs +0 -2
- package/dist/command-Bih1HLr3.mjs +0 -2
- package/dist/command-ByYf12-8.mjs +0 -2
- package/dist/command-C0qCuw03.mjs +0 -2
- package/dist/command-C2FVMd1b.mjs +0 -2
- package/dist/command-C4OgtX_x.mjs +0 -2
- package/dist/command-C5Kqc5Km.mjs +0 -2
- package/dist/command-CFxyp8Uo.mjs +0 -2
- package/dist/command-CZAR85ba.mjs +0 -2
- package/dist/command-CelQVrZL.mjs +0 -2
- package/dist/command-CrAlzysj.mjs +0 -2
- package/dist/command-MxFFWqMg.mjs +0 -2
- package/dist/connector-interrupts-CrTeSyaM.mjs +0 -6
- package/dist/containers-BOBEs1Gk.mjs +0 -75
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/csam-scanner-DOOUBeBM.mjs +0 -8
- package/dist/custom-csrs-DtdFo5YZ.mjs +0 -18
- package/dist/custom-hostnames-ccdlELaD.mjs +0 -24
- package/dist/custom-nameservers-p3gDjfva.mjs +0 -12
- package/dist/custom-pages-DAkKVzgR.mjs +0 -38
- package/dist/d1-CDIyRdh4.mjs +0 -52
- package/dist/deploy-BaC5Ty7F.mjs +0 -2
- package/dist/deploy-context-DTTgNGro.mjs +0 -56
- package/dist/deploy-input-mAy06fAI.mjs +0 -2
- package/dist/dev-De-HszNT.mjs +0 -4
- package/dist/dialog-D5lus4M4.mjs +0 -2
- package/dist/discover-6kAmVMPp.mjs +0 -2
- package/dist/discover-C06Syc2B.mjs +0 -2
- package/dist/dns-wMjf1t6-.mjs +0 -152
- package/dist/docs-BA7qslb2.mjs +0 -3
- package/dist/email-auth-BShMFXn4.mjs +0 -6
- package/dist/email-domains-CDSbVclP.mjs +0 -14
- package/dist/email-routing-CBCkbg_F.mjs +0 -44
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/errors-DatLr-iR.mjs +0 -11
- package/dist/field-extractors-BwGdMnTr.mjs +0 -8
- package/dist/flagship-Bat5EZCk.mjs +0 -24
- package/dist/generate-CeeWW3eX.mjs +0 -3
- package/dist/generate-D6V4Q58z.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/gt-BQkaDQDq.mjs +0 -3
- package/dist/healthchecks-uC43QKQd.mjs +0 -20
- package/dist/init-BEVVz4_P.mjs +0 -43
- package/dist/intel-DRy4rHrt.mjs +0 -62
- package/dist/k2-wsanPL3y.mjs +0 -10
- package/dist/kv-BLSPcEnH.mjs +0 -12
- package/dist/leaked-credential-checks-CSZd9hBQ.mjs +0 -16
- package/dist/load-balancers-gap5u4b1.mjs +0 -84
- package/dist/local-CFsO9Tkg.mjs +0 -2
- package/dist/local-runtime-CmlJ20uJ.mjs +0 -2
- package/dist/log-DZfik9Jk.mjs +0 -2
- package/dist/login-BfuOf-Yi.mjs +0 -2
- package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
- package/dist/managed-transforms-CUC-uAbW.mjs +0 -8
- package/dist/o11y-oEUpMC3O.mjs +0 -86
- package/dist/oauth-BmSFLp_s.mjs +0 -4
- package/dist/organization-CEnlXwrl.mjs +0 -70
- package/dist/organizations-Dt86ToxE.mjs +0 -4
- package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-CiRJBRHO.mjs +0 -2
- package/dist/page-rules-J6LhwR-s.mjs +0 -38
- package/dist/pages-BksdnChs.mjs +0 -48
- package/dist/pay-per-crawl-BLcbHRoR.mjs +0 -36
- package/dist/pipelines-B5AoB3f3.mjs +0 -40
- package/dist/previews-DzJ85fsr.mjs +0 -6
- package/dist/progress-DLri-rA7.mjs +0 -2
- package/dist/project-settings-nBMEx1f-.mjs +0 -3
- package/dist/prompt-D0dXwuME.mjs +0 -4
- package/dist/queues-BsAck4To.mjs +0 -52
- package/dist/r2-BYjdHDEZ.mjs +0 -112
- package/dist/raw-fetch-DQeDx1wT.mjs +0 -2
- package/dist/registrar-D4wdgWpo.mjs +0 -43
- package/dist/registrar-sandbox-B6yopzdG.mjs +0 -58
- package/dist/request-headers-CoxHUNcB.mjs +0 -2
- package/dist/request-tracers-817HTytF.mjs +0 -4
- package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
- package/dist/rulesets-CKyc-Xlx.mjs +0 -42
- package/dist/run-Ciw_GIrC.mjs +0 -2
- package/dist/run-DD45EQTm.mjs +0 -2
- package/dist/schema-DuLIZRhA.mjs +0 -2
- package/dist/schema-flags-DrqvwQNw.mjs +0 -4
- package/dist/scim-C4iRWNYB.mjs +0 -16
- package/dist/session-D2yuwO4i.mjs +0 -2
- package/dist/shared--uVkAAd7.mjs +0 -2
- package/dist/smart-shield-Dn95hqUH.mjs +0 -22
- package/dist/snippets-BNUKOajz.mjs +0 -18
- package/dist/spawn-DuT4snxu.mjs +0 -5
- package/dist/sql-BX1pBqj3.mjs +0 -4
- package/dist/src-DPnUfK4c.mjs +0 -131
- package/dist/startup-profile-tZNb2HGz.mjs +0 -2
- package/dist/state-Uwfrmw5I.mjs +0 -2
- package/dist/stream-BRzr6yh0.mjs +0 -89
- package/dist/telemetry-Pt5GpCKD.mjs +0 -2
- package/dist/tunnels-DQVXKUKA.mjs +0 -27
- package/dist/ui-FYultowZ.mjs +0 -2
- package/dist/url-scanner-BH4PLy16.mjs +0 -16
- package/dist/user-Bn82Qw0Y.mjs +0 -103
- package/dist/vectorize-DoVVz_sh.mjs +0 -30
- package/dist/version-Zr2oF8mY.mjs +0 -2
- package/dist/waiting-rooms-QUW131o3.mjs +0 -52
- package/dist/web3-TY9s6Swn.mjs +0 -26
- package/dist/workers-B3uJqJKc.mjs +0 -39
- package/dist/workers-builds-BgGY0IGk.mjs +0 -14
- package/dist/workflows-6m85DdqF.mjs +0 -48
- package/dist/zaraz-8WSJ7l0L.mjs +0 -22
- package/dist/zero-trust-DK0cqDZv.mjs +0 -1022
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as s,n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{n as d}from"./prompt-D0dXwuME.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/pagerules`,body:`json`};function p(e){return e.usage(`$0 page-rules create
|
|
3
|
-
|
|
4
|
-
Creates a new Page Rule.`).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
|
|
5
|
-
request. Actions can redirect to another URL or override settings, but
|
|
6
|
-
not both.
|
|
7
|
-
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
|
|
8
|
-
over another. A higher number indicates a higher priority. For example,
|
|
9
|
-
if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
|
|
10
|
-
specific Page Rule to take precedence (rule B: \`/images/special/*\`),
|
|
11
|
-
specify a higher priority for rule B so it overrides rule A.
|
|
12
|
-
`,default:1}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`],default:`disabled`}).coerce(`status`,e=>u(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create a Page Rule`,builder:p,handler:async e=>o({command:`page-rules create`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf page-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({actions:s(e.actions,`actions`),priority:e.priority,status:e.status,targets:s(e.targets,`targets`)}):c(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=c(e.body),n=await a(`Creating`,async()=>o.send(f,{body:t,zone_id:u}));r(n,{successLabel:`Created`});return}if(e.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=l({actions:s(e.actions,`actions`),priority:e.priority,status:e.status,targets:s(e.targets,`targets`)}),p=await a(`Creating`,async()=>o.send(f,{body:d,zone_id:u}));r(p,{successLabel:`Created`})})};var h={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/pagerules/${t.pagerule_id}`};function g(e){return e.usage(`$0 page-rules delete <pagerule-id>
|
|
13
|
-
|
|
14
|
-
Deletes an existing Page Rule.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <pagerule-id>`,describe:`Delete a Page Rule`,builder:g,handler:async e=>o({command:`page-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf page-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pagerules/${e[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(e[`pagerule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"pagerule-id":String(e[`pagerule-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await d({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(h,{zone_id:s,pagerule_id:e[`pagerule-id`]}));r(c,{successLabel:`Deleted`})})};var v={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/pagerules/${t.pagerule_id}`,body:`json`};function y(e){return e.usage(`$0 page-rules edit <pagerule-id>
|
|
15
|
-
|
|
16
|
-
Updates one or more fields of an existing Page Rule.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
|
|
17
|
-
request. Actions can redirect to another URL or override settings, but
|
|
18
|
-
not both.
|
|
19
|
-
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
|
|
20
|
-
over another. A higher number indicates a higher priority. For example,
|
|
21
|
-
if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
|
|
22
|
-
specific Page Rule to take precedence (rule B: \`/images/special/*\`),
|
|
23
|
-
specify a higher priority for rule B so it overrides rule A.
|
|
24
|
-
`}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).coerce(`status`,e=>u(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`edit <pagerule-id>`,describe:`Edit a Page Rule`,builder:y,handler:async e=>o({command:`page-rules edit`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf page-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pagerules/${e[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(e[`pagerule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"pagerule-id":String(e[`pagerule-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({actions:s(e.actions,`actions`),priority:e.priority,status:e.status,targets:s(e.targets,`targets`)}):c(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(v,{body:t,zone_id:u,pagerule_id:e[`pagerule-id`]}));r(n,{successLabel:`Updated`});return}let d=l({actions:s(e.actions,`actions`),priority:e.priority,status:e.status,targets:s(e.targets,`targets`)}),f=await a(`Updating`,async()=>o.send(v,{body:d,zone_id:u,pagerule_id:e[`pagerule-id`]}));r(f,{successLabel:`Updated`})})};var x={method:`GET`,path:t=>e`/zones/${t.zone_id}/pagerules/${t.pagerule_id}`};function S(e){return e.usage(`$0 page-rules get <pagerule-id>
|
|
25
|
-
|
|
26
|
-
Fetches the details of a Page Rule.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <pagerule-id>`,describe:`Get a Page Rule`,builder:S,handler:async e=>o({command:`page-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf page-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pagerules/${e[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(e[`pagerule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"pagerule-id":String(e[`pagerule-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(x,{zone_id:s,pagerule_id:e[`pagerule-id`]}));r(c,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/zones/${t.zone_id}/pagerules`,query:[`order`,`direction`,`match`,`status`]};function T(e){return e.usage(`$0 page-rules list
|
|
27
|
-
|
|
28
|
-
Fetches Page Rules in a zone.`).option(`order`,{type:`string`,description:`The field used to sort returned Page Rules.`,choices:[`status`,`priority`]}).option(`direction`,{type:`string`,description:`The direction used to sort returned Page Rules.`,choices:[`asc`,`desc`]}).option(`match`,{type:`string`,description:"When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Page Rules`,builder:T,handler:async e=>o({command:`page-rules list`,classification:{safeFlags:[`order`,`direction`,`match`,`status`,`dry-run`]}},e,async()=>{let o={order:e.order,direction:e.direction,match:e.match,status:e.status};if(e.dryRun){i({command:`cf page-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(w,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var D={method:`PUT`,path:t=>e`/zones/${t.zone_id}/pagerules/${t.pagerule_id}`,body:`json`};function O(e){return e.usage(`$0 page-rules update <pagerule-id>
|
|
29
|
-
|
|
30
|
-
Replaces the configuration of an existing Page Rule. The configuration of the updated Page Rule will exactly match the data passed in the API request.`).positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
|
|
31
|
-
request. Actions can redirect to another URL or override settings, but
|
|
32
|
-
not both.
|
|
33
|
-
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
|
|
34
|
-
over another. A higher number indicates a higher priority. For example,
|
|
35
|
-
if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
|
|
36
|
-
specific Page Rule to take precedence (rule B: \`/images/special/*\`),
|
|
37
|
-
specify a higher priority for rule B so it overrides rule A.
|
|
38
|
-
`}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).coerce(`status`,e=>u(e,`status`,`text`)).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`update <pagerule-id>`,describe:`Update a Page Rule`,builder:O,handler:async e=>o({command:`page-rules update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf page-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pagerules/${e[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(e[`pagerule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"pagerule-id":String(e[`pagerule-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({actions:s(e.actions,`actions`),priority:e.priority,status:e.status,targets:s(e.targets,`targets`)}):c(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(D,{body:t,zone_id:u,pagerule_id:e[`pagerule-id`]}));r(n,{successLabel:`Updated`});return}if(e.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=l({actions:s(e.actions,`actions`),priority:e.priority,status:e.status,targets:s(e.targets,`targets`)}),f=await a(`Updating`,async()=>o.send(D,{body:d,zone_id:u,pagerule_id:e[`pagerule-id`]}));r(f,{successLabel:`Updated`})})},A={command:`page-rules`,describe:`page-rules`,builder:e=>e.command(m).command(_).command(b).command(C).command(E).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};
|
package/dist/pages-BksdnChs.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./lazy-command-WB1FOuew.mjs";import"./api-X3wKppsT.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-CgBhtmON.mjs";import{i,n as a}from"./auth-FK2eLQ02.mjs";import{a as o,t as s}from"./context-Dp4CXG22.mjs";import{t as c}from"./output-BJEgbI0G.mjs";import{t as l}from"./dry-run-gy0Hl9xo.mjs";import{t as u}from"./progress-DLri-rA7.mjs";import{t as d}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as f,r as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h,t as ee}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-D0dXwuME.mjs";var y={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/purge_build_cache`};function te(e){return e.usage(`$0 pages build-cache purge <project-name>
|
|
3
|
-
|
|
4
|
-
Remove cached build artifacts so subsequent builds run without the project's existing build cache.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`purge <project-name>`,describe:`Purge the Pages build cache`,builder:te,handler:async e=>d({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages build-cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/purge_build_cache`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force,message:`This operation purges the build cache for a Pages project.`}))return;let i=await u(`Deleting`,async()=>t.send(y,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},re={command:`build-cache`,describe:`Operations for build-cache`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects`,body:`json`};function x(e){return e.usage(`$0 pages create
|
|
5
|
-
|
|
6
|
-
Create a Cloudflare Pages project for configuring and deploying a site or application.`).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-preview-usage-model`,e=>h(e,`deployment-configs-preview-usage-model`,`text`)).option(`deployment-configs-preview-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-production-usage-model`,e=>h(e,`deployment-configs-production-usage-model`,`text`)).option(`deployment-configs-production-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
|
|
7
|
-
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
8
|
-
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`source-type`,e=>h(e,`source-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const S={command:`create`,describe:`Create a Cloudflare Pages project`,builder:x,handler:async e=>d({command:`pages create`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(b,{body:r,account_id:n}));c(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`)),e[`production-branch`]===void 0&&(e[`production-branch`]=await g(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let i=m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]),d=await u(`Creating`,async()=>t.send(b,{body:i,account_id:n}));c(d,{successLabel:`Created`})})};var C={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function w(e){return e.usage(`$0 pages delete <project-name>
|
|
9
|
-
|
|
10
|
-
Permanently delete a Cloudflare Pages project and its deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const T={command:`delete <project-name>`,describe:`Delete a Cloudflare Pages project`,builder:w,handler:async e=>d({command:`pages delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(C,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})};var E={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments`,pathParams:[`account_id`,`project_name`],body:`form`};function D(e){return e.usage(`$0 pages deployments create <project-name>
|
|
11
|
-
|
|
12
|
-
Create a Cloudflare Pages deployment from a Git branch or Direct Upload manifest. Git repositories must already be authorized in Cloudflare Pages.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`branch`,{type:`string`,description:"Git branch to deploy. Uses the branch's `HEAD`; defaults to the project's production branch."}).option(`commit-dirty`,{type:`string`,description:"Whether the associated Git working tree has uncommitted changes. Provide `true` or `false`."}).option(`commit-hash`,{type:`string`,description:`Git commit SHA associated with the deployment.`}).option(`commit-message`,{type:`string`,description:`Git commit message associated with the deployment.`}).option(`manifest`,{type:`string`,description:`JSON-encoded object mapping deployment file paths to their uploaded content hashes. Required for Direct Upload deployments. Maximum 20,000 entries. `}).option(`pages-build-output-dir`,{type:`string`,description:`The build output directory path.`}).option(`wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration file used for this deployment.`}).option(`redirects`,{type:`string`,description:"Literal content or @path/to/file for the `_redirects` form field. Redirects configuration file for the deployment."}).option(`routes-json`,{type:`string`,description:"Literal content or @path/to/file for the `_routes.json` form field. Routes configuration file defining routing rules."}).option(`worker-bundle`,{type:`string`,description:"Literal content or @path/to/file for the `_worker.bundle` form field. Worker bundle file in multipart/form-data format. Mutually exclusive with `_worker.js`.\nCannot specify both `_worker.js` and `_worker.bundle` in the same request.\nMaximum size: 25 MiB.\n"}).option(`worker-js`,{type:`string`,description:"Literal content or @path/to/file for the `_worker.js` form field. Worker JavaScript file. Mutually exclusive with `_worker.bundle`.\nCannot specify both `_worker.js` and `_worker.bundle` in the same request.\n"}).option(`functions-filepath-routing-config-json`,{type:`string`,description:"Literal content or @path/to/file for the `functions-filepath-routing-config.json` form field. Functions routing configuration file."})}const O={command:`create <project-name>`,describe:`Create a Pages deployment`,builder:D,handler:async e=>d({command:`pages deployments create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,branch:e.branch,"commit-dirty":e[`commit-dirty`],"commit-hash":e[`commit-hash`],"commit-message":e[`commit-message`],manifest:e.manifest,"pages-build-output-dir":e[`pages-build-output-dir`],"wrangler-config-hash":e[`wrangler-config-hash`],redirects:e.redirects,"routes-json":e[`routes-json`],"worker-bundle":e[`worker-bundle`],"worker-js":e[`worker-js`],"functions-filepath-routing-config-json":e[`functions-filepath-routing-config-json`]}});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.file!==void 0||e.body!==void 0||e.branch!==void 0||e[`commit-dirty`]!==void 0||e[`commit-hash`]!==void 0||e[`commit-message`]!==void 0||e.manifest!==void 0||e[`pages-build-output-dir`]!==void 0||e[`wrangler-config-hash`]!==void 0||e.redirects!==void 0||e[`routes-json`]!==void 0||e[`worker-bundle`]!==void 0||e[`worker-js`]!==void 0||e[`functions-filepath-routing-config-json`]!==void 0){let r=new FormData;if(e.file){let t=ee(e.file);r.append(`_headers`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&r.append(`_headers`,e.body);if(e.branch!==void 0&&r.append(`branch`,String(h(e.branch,`branch`,`text`)??``)),e[`commit-dirty`]!==void 0&&r.append(`commit_dirty`,String(h(e[`commit-dirty`],`commit-dirty`,`text`)??``)),e[`commit-hash`]!==void 0&&r.append(`commit_hash`,String(h(e[`commit-hash`],`commit-hash`,`text`)??``)),e[`commit-message`]!==void 0&&r.append(`commit_message`,String(h(e[`commit-message`],`commit-message`,`text`)??``)),e.manifest!==void 0&&r.append(`manifest`,String(h(e.manifest,`manifest`,`text`)??``)),e[`pages-build-output-dir`]!==void 0&&r.append(`pages_build_output_dir`,String(h(e[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),e[`wrangler-config-hash`]!==void 0&&r.append(`wrangler_config_hash`,String(h(e[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``)),e.redirects!==void 0){let t=String(e.redirects);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`redirects`,`binary`);r.append(`_redirects`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`_redirects`,new Blob([t]),`_redirects`)}if(e[`routes-json`]!==void 0){let t=String(e[`routes-json`]);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`routes-json`,`binary`);r.append(`_routes.json`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`_routes.json`,new Blob([t]),`_routes.json`)}if(e[`worker-bundle`]!==void 0){let t=String(e[`worker-bundle`]);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`worker-bundle`,`binary`);r.append(`_worker.bundle`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`_worker.bundle`,new Blob([t]),`_worker.bundle`)}if(e[`worker-js`]!==void 0){let t=String(e[`worker-js`]);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`worker-js`,`binary`);r.append(`_worker.js`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`_worker.js`,new Blob([t]),`_worker.js`)}if(e[`functions-filepath-routing-config-json`]!==void 0){let t=String(e[`functions-filepath-routing-config-json`]);if(t.startsWith(`@`)){let e=t.slice(1),n=h(t,`functions-filepath-routing-config-json`,`binary`);r.append(`functions-filepath-routing-config.json`,new Blob([n]),e.split(/[\\/]/).filter(Boolean).pop())}else r.append(`functions-filepath-routing-config.json`,new Blob([t]),`functions-filepath-routing-config.json`)}let a=await u(`Creating`,async()=>i(t,`POST`,`/accounts/${n}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:r}));c(a,{successLabel:`Created`});return}if(e.body){let r=h(e.body,`body`,`binary`),a=await u(`Creating`,async()=>i(t,`POST`,`/accounts/${n}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:r,headers:{"Content-Type":`multipart/form-data`}}));c(a,{successLabel:`Created`});return}let d=await u(`Creating`,async()=>t.send(E,{account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var k={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}`,query:[`force`]};function A(e){return e.usage(`$0 pages deployments delete <deployment-id>
|
|
13
|
-
|
|
14
|
-
Remove a deployment from a Cloudflare Pages project.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`allow-aliased`,{type:`boolean`,description:`Allow deletion when a non-production deployment has an active alias.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const j={command:`delete <deployment-id>`,describe:`Delete a Pages deployment`,builder:A,handler:async e=>d({command:`pages deployments delete`,classification:{safeFlags:[`allow-aliased`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`allow-aliased`]};if(e.dryRun){let n=await o();l({command:`cf pages deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();if(e.accountId=i,!await v({force:!!e.force}))return;let d=await u(`Deleting`,async()=>n.send(k,{account_id:i,project_name:e[`project-name`],deployment_id:e[`deployment-id`],...t}));c(d,{successLabel:`Deleted`})})};var M={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}`};function N(e){return e.usage(`$0 pages deployments get <deployment-id>
|
|
15
|
-
|
|
16
|
-
Retrieve the status and details of a Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <deployment-id>`,describe:`Get a Pages deployment`,builder:N,handler:async e=>d({command:`pages deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(M,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Loaded`})})};var F={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/history/logs`};function I(e){return e.usage(`$0 pages deployments history logs get <deployment-id>
|
|
17
|
-
|
|
18
|
-
Retrieve the build logs for a Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <deployment-id>`,describe:`Get Pages deployment logs`,builder:I,handler:async e=>d({command:`pages deployments history logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments history logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/history/logs`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(F,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Loaded`})})},R={command:`logs`,describe:`Operations for deployments.history.logs`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`history`,describe:`Operations for deployments.history`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments`,query:[`env`,`page`,`per_page`]};function V(e){return e.usage(`$0 pages deployments list
|
|
19
|
-
|
|
20
|
-
List the production or preview deployments for a Cloudflare Pages project.`).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`env`,{type:`string`,description:"Deployment environment to return. Valid values are `production` and `preview`.",choices:[`production`,`preview`]}).option(`page`,{type:`number`,description:`Page number of results to return.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List Pages deployments`,builder:V,handler:async e=>d({command:`pages deployments list`,classification:{safeFlags:[`env`,`dry-run`]}},e,async()=>{let t={env:e.env,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await o();l({command:`cf pages deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();e.accountId=i;let d=await u(`Loading`,async()=>n.send(B,{account_id:i,project_name:e[`project-name`],...t}));c(d,{successLabel:`Loaded`})})};var U={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/retry`};function W(e){return e.usage(`$0 pages deployments retry <deployment-id>
|
|
21
|
-
|
|
22
|
-
Retry a previous Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`retry <deployment-id>`,describe:`Retry a Pages deployment`,builder:W,handler:async e=>d({command:`pages deployments retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments retry`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/retry`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Creating`,async()=>t.send(U,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Created`})})};var K={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/rollback`};function q(e){return e.usage(`$0 pages deployments rollback <deployment-id>
|
|
23
|
-
|
|
24
|
-
Roll back production to a previous successful Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`rollback <deployment-id>`,describe:`Roll back a Pages deployment`,builder:q,handler:async e=>d({command:`pages deployments rollback`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages deployments rollback`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/rollback`,pathParams:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force,message:`This operation rolls back the production deployment to an earlier deployment.`}))return;let i=await u(`Deleting`,async()=>t.send(K,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Deleted`})})},Y={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(O).command(j).command(P).command(H).command(G).command(J).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains`,body:`json`};function ie(e){return e.usage(`$0 pages domains create <project-name>
|
|
25
|
-
|
|
26
|
-
Attach a custom domain to a Cloudflare Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ae={command:`create <project-name>`,describe:`Add a Pages custom domain`,builder:ie,handler:async e=>d({command:`pages domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({name:h(e.name,`name`,`text`)}):f(e.body)});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(X,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,"Fully qualified domain name for the Pages project, such as `example.com`."));let i=m({name:h(e.name,`name`,`text`)}),d=await u(`Creating`,async()=>t.send(X,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var oe={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function se(e){return e.usage(`$0 pages domains delete <domain-name>
|
|
27
|
-
|
|
28
|
-
Remove a custom domain from a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ce={command:`delete <domain-name>`,describe:`Delete a Pages custom domain`,builder:se,handler:async e=>d({command:`pages domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(oe,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Deleted`})})};var le={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function ue(e){return e.usage(`$0 pages domains get <domain-name>
|
|
29
|
-
|
|
30
|
-
Retrieve the configuration and validation status of a custom domain attached to a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <domain-name>`,describe:`Get a Pages custom domain`,builder:ue,handler:async e=>d({command:`pages domains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(le,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Loaded`})})};var fe={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains`};function pe(e){return e.usage(`$0 pages domains list
|
|
31
|
-
|
|
32
|
-
List the custom domains associated with a Cloudflare Pages project.`).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List Pages custom domains`,builder:pe,handler:async e=>d({command:`pages domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(fe,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Loaded`})})};var he={method:`PATCH`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function ge(e){return e.usage(`$0 pages domains validation retry <domain-name>
|
|
33
|
-
|
|
34
|
-
Retry validation for a custom domain attached to a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`retry <domain-name>`,describe:`Retry custom domain validation`,builder:ge,handler:async e=>d({command:`pages domains validation retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages domains validation retry`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Updating`,async()=>t.send(he,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Updated`})})},ve={command:`validation`,describe:`Operations for domains.validation`,builder:e=>e.command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`domains`,describe:`Operations for domains`,builder:e=>e.command(ae).command(ce).command(de).command(me).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`PATCH`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`,body:`json`};function be(e){return e.usage(`$0 pages edit <project-name>
|
|
35
|
-
|
|
36
|
-
Update the build, deployment, source, or environment settings for a Cloudflare Pages project. To delete an environment variable, set its key to \`null\`.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-preview-usage-model`,e=>h(e,`deployment-configs-preview-usage-model`,`text`)).option(`deployment-configs-preview-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-production-usage-model`,e=>h(e,`deployment-configs-production-usage-model`,`text`)).option(`deployment-configs-production-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
|
|
37
|
-
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
38
|
-
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`source-type`,e=>h(e,`source-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`source-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const xe={command:`edit <project-name>`,describe:`Update a Cloudflare Pages project`,builder:be,handler:async e=>d({command:`pages edit`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Updating`,async()=>t.send(Z,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Updated`});return}let i=m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]),d=await u(`Updating`,async()=>t.send(Z,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Updated`})})};var Se={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function Ce(e){return e.usage(`$0 pages get <project-name>
|
|
39
|
-
|
|
40
|
-
Retrieve the configuration and deployment settings for a Cloudflare Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`get <project-name>`,describe:`Get a Cloudflare Pages project`,builder:Ce,handler:async e=>d({command:`pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(Se,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Loaded`})})};var Te={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects`,query:[`page`,`per_page`]};function Ee(e){return e.usage(`$0 pages list
|
|
41
|
-
|
|
42
|
-
List the Cloudflare Pages projects in an account.`).option(`page`,{type:`number`,description:`Page number of results to return.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`list`,describe:`List Cloudflare Pages projects`,builder:Ee,handler:async e=>d({command:`pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await o();l({command:`cf pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pages/projects`,pathParams:{},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();e.accountId=i;let d=await u(`Loading`,async()=>n.send(Te,{account_id:i,...t}));c(d,{successLabel:`Loaded`})})};var Q={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/source`,body:`json`};function $(e){return e.usage(`$0 pages source connect <project-name>
|
|
43
|
-
|
|
44
|
-
Connect a GitHub or GitLab repository to a Cloudflare Pages project to enable Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
|
|
45
|
-
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
46
|
-
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).coerce(`type`,e=>h(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Repository and deployment settings for connecting a Git repository to a Pages project.`})}const Oe={command:`connect <project-name>`,describe:`Connect a Git repository`,builder:$,handler:async e=>d({command:`pages source connect`,classification:{safeFlags:[`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source connect`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}):f(e.body)});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(Q,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Created`});return}if(e[`source-config-deployments-enabled`]===void 0)throw Error(`--source-config-deployments-enabled is required (or pass --body with this field set).`);if(e[`source-config-owner`]===void 0&&(e[`source-config-owner`]=await g(`source-config-owner`,`The owner of the repository.`)),e[`source-config-owner-id`]===void 0&&(e[`source-config-owner-id`]=await g(`source-config-owner-id`,`The owner ID of the repository.`)),e[`source-config-path-excludes`]===void 0)throw Error(`--source-config-path-excludes is required (or pass --body with this field set).`);if(e[`source-config-path-includes`]===void 0)throw Error(`--source-config-path-includes is required (or pass --body with this field set).`);if(e[`source-config-pr-comments-enabled`]===void 0)throw Error(`--source-config-pr-comments-enabled is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-excludes`]===void 0)throw Error(`--source-config-preview-branch-excludes is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-includes`]===void 0)throw Error(`--source-config-preview-branch-includes is required (or pass --body with this field set).`);if(e[`source-config-preview-deployment-setting`]===void 0&&(e[`source-config-preview-deployment-setting`]=await _(`source-config-preview-deployment-setting`,`Controls whether commits to preview branches trigger a preview deployment.`,[`all`,`none`,`custom`])),e[`source-config-production-branch`]===void 0&&(e[`source-config-production-branch`]=await g(`source-config-production-branch`,`The production branch of the repository.`)),e[`source-config-production-deployments-enabled`]===void 0)throw Error(`--source-config-production-deployments-enabled is required (or pass --body with this field set).`);e[`source-config-repo-id`]===void 0&&(e[`source-config-repo-id`]=await g(`source-config-repo-id`,`The ID of the repository.`)),e[`source-config-repo-name`]===void 0&&(e[`source-config-repo-name`]=await g(`source-config-repo-name`,`The name of the repository.`)),e.type===void 0&&(e.type=await _(`type`,`The source control management provider.`,[`github`,`gitlab`]));let i=m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}),d=await u(`Creating`,async()=>t.send(Q,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var ke={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/source`};function Ae(e){return e.usage(`$0 pages source disconnect <project-name>
|
|
47
|
-
|
|
48
|
-
Disconnect the Git repository from a Cloudflare Pages project to stop Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const je={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:Ae,handler:async e=>d({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({command:`cf pages source disconnect`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(ke,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},Me={command:`source`,describe:`Operations for source`,builder:e=>e.command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-C2FVMd1b.mjs`),{command:`pages deploy`,recordArgs:!1});const Pe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(S).command(T).command(n(Ne,`preview`)).command(xe).command(we).command(De).command(re).command(Y).command(ye).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./prompt-D0dXwuME.mjs";var h={method:`POST`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function ee(e){return e.usage(`$0 pay-per-crawl config create
|
|
3
|
-
|
|
4
|
-
Creates the pay-per-crawl config for a zone.`).option(`bot-overrides`,{type:`string`,description:`The bot_overrides field. Provide as a JSON object or @path/to/file.json.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const g={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:ee,handler:async e=>l({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`,!0),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]):d(e.body,[{path:[`bot_overrides`],flag:`bot-overrides`}])});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body,[{path:[`bot_overrides`],flag:`bot-overrides`}]),i=await c(`Creating`,async()=>t.send(h,{body:n,zone_id:r}));o(i,{successLabel:`Created`});return}if(e[`bot-overrides`]===void 0)throw Error(`--bot-overrides is required (or pass --body with this field set).`);if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let a=p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`,!0),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]),l=await c(`Creating`,async()=>t.send(h,{body:a,zone_id:r}));o(l,{successLabel:`Created`})})};var _={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function te(e){return e.usage(`$0 pay-per-crawl config edit
|
|
5
|
-
|
|
6
|
-
Changes the pay-per-crawl config for a zone.`).option(`bot-overrides`,{type:`string`,description:`The bot_overrides field. Provide as a JSON object or @path/to/file.json.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for setting flag on zones`})}const ne={command:`edit`,describe:`Changes pay-per-crawl config for a zone`,builder:te,handler:async e=>l({command:`pay-per-crawl config edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-crawl config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Updating`,async()=>t.send(_,{body:n,zone_id:r}));o(i,{successLabel:`Updated`});return}let a=p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]),l=await c(`Updating`,async()=>t.send(_,{body:a,zone_id:r}));o(l,{successLabel:`Updated`})})};var v={method:`GET`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,errors:{400:`BadRequestError`}};function y(e){return e.usage(`$0 pay-per-crawl config get
|
|
7
|
-
|
|
8
|
-
Gets the pay-per-crawl config for a zone including the bot configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Get the pay-per-crawl config`,builder:y,handler:async e=>l({command:`pay-per-crawl config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-crawl config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(v,{zone_id:r}));o(a,{successLabel:`Loaded`})})},x={command:`config`,describe:`Operations for config`,builder:e=>e.command(g).command(ne).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawler/stripe`,errors:{400:`BadRequestError`}};function C(e){return e.usage(`$0 pay-per-crawl crawler stripe create
|
|
9
|
-
|
|
10
|
-
Creates the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`create`,describe:`Creates the stripe config for a crawler`,builder:C,handler:async e=>l({command:`pay-per-crawl crawler stripe create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl crawler stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>i.send(S,{account_id:l}));o(u,{successLabel:`Created`})})};var T={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawler/stripe`,errors:{400:`BadRequestError`}};function E(e){return e.usage(`$0 pay-per-crawl crawler stripe delete
|
|
11
|
-
|
|
12
|
-
Deletes the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const D={command:`delete`,describe:`Deletes the stripe config for a crawler`,builder:E,handler:async e=>l({command:`pay-per-crawl crawler stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl crawler stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await m({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(T,{account_id:l}));o(u,{successLabel:`Deleted`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawler/stripe`,errors:{400:`BadRequestError`}};function k(e){return e.usage(`$0 pay-per-crawl crawler stripe get
|
|
13
|
-
|
|
14
|
-
Gets the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get`,describe:`Gets the stripe config for a crawler`,builder:k,handler:async e=>l({command:`pay-per-crawl crawler stripe get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl crawler stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(O,{account_id:l}));o(u,{successLabel:`Loaded`})})},j={command:`stripe`,describe:`Operations for crawler.stripe`,builder:e=>e.command(w).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`crawler`,describe:`Operations for crawler`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawlers`,errors:{400:`BadRequestError`}};function P(e){return e.usage(`$0 pay-per-crawl crawlers list
|
|
15
|
-
|
|
16
|
-
Lists the crawlers known to pay-per-crawl.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`list`,describe:`List pay-per-crawl crawlers`,builder:P,handler:async e=>l({command:`pay-per-crawl crawlers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl crawlers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawlers`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(N,{account_id:l}));o(u,{successLabel:`Loaded`})})},I={command:`crawlers`,describe:`Operations for crawlers`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/publisher/stripe`,errors:{400:`BadRequestError`}};function R(e){return e.usage(`$0 pay-per-crawl publisher stripe create
|
|
17
|
-
|
|
18
|
-
Creates the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`create`,describe:`Creates the stripe config for a publisher`,builder:R,handler:async e=>l({command:`pay-per-crawl publisher stripe create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl publisher stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>i.send(L,{account_id:l}));o(u,{successLabel:`Created`})})};var B={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/publisher/stripe`,errors:{400:`BadRequestError`}};function V(e){return e.usage(`$0 pay-per-crawl publisher stripe delete
|
|
19
|
-
|
|
20
|
-
Deletes the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const H={command:`delete`,describe:`Deletes the stripe config for a publisher`,builder:V,handler:async e=>l({command:`pay-per-crawl publisher stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl publisher stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await m({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(B,{account_id:l}));o(u,{successLabel:`Deleted`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/publisher/stripe`,errors:{400:`BadRequestError`}};function W(e){return e.usage(`$0 pay-per-crawl publisher stripe get
|
|
21
|
-
|
|
22
|
-
Gets the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get`,describe:`Gets the stripe config for a publisher`,builder:W,handler:async e=>l({command:`pay-per-crawl publisher stripe get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl publisher stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(U,{account_id:l}));o(u,{successLabel:`Loaded`})})},K={command:`stripe`,describe:`Operations for publisher.stripe`,builder:e=>e.command(z).command(H).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},q={command:`publisher`,describe:`Operations for publisher`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/signature_link`,errors:{400:`BadRequestError`}};function Y(e){return e.usage(`$0 pay-per-crawl terms get-signature-link
|
|
23
|
-
|
|
24
|
-
Gets a download link for the account's signed pay-per-crawl terms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get-signature-link`,describe:`Get signed pay-per-crawl terms link`,builder:Y,handler:async e=>l({command:`pay-per-crawl terms get-signature-link`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl terms get-signature-link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/signature_link`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(J,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Z={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/terms/signature`,query:[`remote`],errors:{400:`BadRequestError`}};function re(e){return e.usage(`$0 pay-per-crawl terms get-signature
|
|
25
|
-
|
|
26
|
-
Gets the account's pay-per-crawl terms signature status.`).option(`refresh`,{type:`boolean`,description:`Refresh the signature status from Ironclad.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get-signature`,describe:`Get pay-per-crawl terms signature status`,builder:re,handler:async e=>l({command:`pay-per-crawl terms get-signature`,classification:{safeFlags:[`refresh`,`dry-run`]}},e,async()=>{let i={remote:e.refresh};if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl terms get-signature`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Z,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/terms`,errors:{400:`BadRequestError`}};function oe(e){return e.usage(`$0 pay-per-crawl terms get
|
|
27
|
-
|
|
28
|
-
Gets the pay-per-crawl terms and conditions contract.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get`,describe:`Get pay-per-crawl terms`,builder:oe,handler:async e=>l({command:`pay-per-crawl terms get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl terms get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(ae,{account_id:l}));o(u,{successLabel:`Loaded`})})};var ce={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/terms/signature`,query:[`event_type`,`vid`],errors:{400:`BadRequestError`}};function le(e){return e.usage(`$0 pay-per-crawl terms send-signature-event
|
|
29
|
-
|
|
30
|
-
Records that an account displayed or agreed to the pay-per-crawl terms.`).option(`event-type`,{type:`string`,description:`The terms activity to record.`,choices:[`agreed`,`displayed`],demandOption:!0}).option(`vid`,{type:`string`,description:`Ironclad contract version ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`send-signature-event`,describe:`Record pay-per-crawl terms activity`,builder:le,handler:async e=>l({command:`pay-per-crawl terms send-signature-event`,classification:{safeFlags:[`event-type`,`dry-run`]}},e,async()=>{let i={event_type:e[`event-type`],vid:e.vid};if(e.dryRun){let e=await r();s({command:`cf pay-per-crawl terms send-signature-event`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Creating`,async()=>l.send(ce,{account_id:u,...i}));o(d,{successLabel:`Created`})})},de={command:`terms`,describe:`Operations for terms`,builder:e=>e.command(se).command(ie).command(X).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var fe={method:`GET`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/can_be_enabled`,errors:{400:`BadRequestError`}};function pe(e){return e.usage(`$0 pay-per-crawl zones get-can-be-enabled
|
|
31
|
-
|
|
32
|
-
Gets whether pay-per-crawl can be enabled for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`get-can-be-enabled`,describe:`Get pay-per-crawl zone eligibility`,builder:pe,handler:async e=>l({command:`pay-per-crawl zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf pay-per-crawl zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(fe,{zone_id:r}));o(a,{successLabel:`Loaded`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/zones_can_be_enabled/query`,body:`json`,errors:{400:`BadRequestError`}};function he(e){return e.usage(`$0 pay-per-crawl zones query-can-be-enabled
|
|
33
|
-
|
|
34
|
-
Provided a list of pay-per-crawl configured zones this method will return whether they can enable PPC or not.`).option(`zones`,{type:`string`,array:!0,description:`The zones field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Zone IDs to check for pay-per-crawl eligibility`})}const ge={command:`query-can-be-enabled`,describe:`Gets the can_be_enabled zone setting`,builder:he,handler:async e=>l({command:`pay-per-crawl zones query-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf pay-per-crawl zones query-can-be-enabled`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-crawl/zones_can_be_enabled/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({zones:e.zones}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(Q,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}let u=p({zones:e.zones}),f=await c(`Creating`,async()=>i.send(Q,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/zones_can_be_enabled`,body:`json`,errors:{400:`BadRequestError`}};function _e(e){return e.usage(`$0 pay-per-crawl zones set-can-be-enabled
|
|
35
|
-
|
|
36
|
-
Allows an account admin to set the can_be_enabled setting on a list of zones. An omitted can_be_enabled value leaves that zone unchanged.`).option(`zones`,{type:`string`,description:`The zones field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for setting flag on zones`})}const ve={command:`set-can-be-enabled`,describe:`Set can_be_enabled setting on zones`,builder:_e,handler:async e=>l({command:`pay-per-crawl zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf pay-per-crawl zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-crawl/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({zones:u(e.zones,`zones`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send($,{body:t,account_id:l}));o(n,{successLabel:`Updated`});return}if(e.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let f=p({zones:u(e.zones,`zones`)}),m=await c(`Updating`,async()=>i.send($,{body:f,account_id:l}));o(m,{successLabel:`Updated`})})},ye={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(me).command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`pay-per-crawl`,describe:`pay-per-crawl`,builder:e=>e.command(x).command(M).command(I).command(q).command(de).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{be as default};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D0dXwuME.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,body:`json`};function _(e){return e.usage(`$0 pipelines create
|
|
3
|
-
|
|
4
|
-
Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create Pipeline`,builder:_,handler:async e=>c({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(g,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Pipeline.`)),e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL for the Pipeline processing flow.`));let m=d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}),h=await s(`Creating`,async()=>c.send(g,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function b(e){return e.usage(`$0 pipelines delete <pipeline-id>
|
|
5
|
-
|
|
6
|
-
Delete Pipeline in Account.`).positional(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ee={command:`delete <pipeline-id>`,describe:`Delete Pipeline`,builder:b,handler:async e=>c({command:`pipelines delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines/${e[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(e[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(e[`pipeline-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(y,{account_id:l,pipeline_id:e[`pipeline-id`]}));a(u,{successLabel:`Deleted`})})};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function ne(e){return e.usage(`$0 pipelines get <pipeline-id>
|
|
7
|
-
|
|
8
|
-
Get Pipeline details.`).positional(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <pipeline-id>`,describe:`Get Pipeline Details`,builder:ne,handler:async e=>c({command:`pipelines get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines/${e[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(e[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(e[`pipeline-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(te,{account_id:l,pipeline_id:e[`pipeline-id`]}));a(u,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines`,body:`json`};function S(e){return e.usage(`$0 pipelines legacy-create
|
|
9
|
-
|
|
10
|
-
[DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`,default:1e8}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`,default:300}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`,default:1e7}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`],default:`gzip`}).coerce(`destination-compression-type`,e=>f(e,`destination-compression-type`,`text`)).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).coerce(`destination-format`,e=>f(e,`destination-format`,`text`)).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filename`,{type:`string`,description:`Specifies the name pattern to for individual data files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`legacy-create`,describe:`[DEPRECATED] Create Pipeline`,builder:S,handler:async e=>c({command:`pipelines legacy-create`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}):u(e.body)});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(x,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}if(e[`destination-credentials-access-key-id`]===void 0&&(e[`destination-credentials-access-key-id`]=await p(`destination-credentials-access-key-id`,`Specifies the R2 Bucket Access Key Id.`)),e[`destination-credentials-endpoint`]===void 0&&(e[`destination-credentials-endpoint`]=await p(`destination-credentials-endpoint`,`Specifies the R2 Endpoint.`)),e[`destination-credentials-secret-access-key`]===void 0&&(e[`destination-credentials-secret-access-key`]=await p(`destination-credentials-secret-access-key`,`Specifies the R2 Bucket Secret Access Key.`)),e[`destination-format`]===void 0&&(e[`destination-format`]=await m(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),e[`destination-path-bucket`]===void 0&&(e[`destination-path-bucket`]=await p(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),e[`destination-type`]===void 0&&(e[`destination-type`]=await m(`destination-type`,`Specifies the type of destination.`,[`r2`])),e.name===void 0&&(e.name=await p(`name`,`Defines the name of the pipeline.`)),e.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let g=d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}),_=await s(`Creating`,async()=>c.send(x,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,response:!1};function T(e){return e.usage(`$0 pipelines legacy-delete <pipeline-name>
|
|
11
|
-
|
|
12
|
-
[DEPRECATED] Delete a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`legacy-delete <pipeline-name>`,describe:`[DEPRECATED] Delete Pipeline`,builder:T,handler:async e=>c({command:`pipelines legacy-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(w,{account_id:l,pipeline_name:e[`pipeline-name`]}));a(u,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,errors:{404:`NotFoundError`}};function O(e){return e.usage(`$0 pipelines legacy-get <pipeline-name>
|
|
13
|
-
|
|
14
|
-
[DEPRECATED] Get configuration of a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`legacy-get <pipeline-name>`,describe:`[DEPRECATED] Get Pipeline`,builder:O,handler:async e=>c({command:`pipelines legacy-get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l,pipeline_name:e[`pipeline-name`]}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines`,query:[`search`,`page`,`per_page`]};function j(e){return e.usage(`$0 pipelines legacy-list
|
|
15
|
-
|
|
16
|
-
[DEPRECATED] List, filter, and paginate pipelines in an account. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`search`,{type:`string`,description:`Specifies the prefix of pipeline name to search.`}).option(`page`,{type:`string`,description:`Specifies which page to retrieve.`}).option(`per-page`,{type:`string`,description:`Specifies the number of pipelines per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`legacy-list`,describe:`[DEPRECATED] List Pipelines`,builder:j,handler:async e=>c({command:`pipelines legacy-list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={search:e.search,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf pipelines legacy-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(A,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,body:`json`};function P(e){return e.usage(`$0 pipelines legacy-update <pipeline-name>
|
|
17
|
-
|
|
18
|
-
[DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`]}).coerce(`destination-compression-type`,e=>f(e,`destination-compression-type`,`text`)).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).coerce(`destination-format`,e=>f(e,`destination-format`,`text`)).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filename`,{type:`string`,description:`Specifies the name pattern to for individual data files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`destination-credentials-access-key-id`,`destination-credentials-endpoint`,`destination-credentials-secret-access-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`destination-credentials-access-key-id`,`destination-credentials-endpoint`,`destination-credentials-secret-access-key`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --destination-credentials-* flag is set`)}return!0})}const F={command:`legacy-update <pipeline-name>`,describe:`[DEPRECATED] Update Pipeline`,builder:P,handler:async e=>c({command:`pipelines legacy-update`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}):u(e.body)});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:h,pipeline_name:e[`pipeline-name`]}));a(n,{successLabel:`Updated`});return}if(e[`destination-format`]===void 0&&(e[`destination-format`]=await m(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),e[`destination-path-bucket`]===void 0&&(e[`destination-path-bucket`]=await p(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),e[`destination-type`]===void 0&&(e[`destination-type`]=await m(`destination-type`,`Specifies the type of destination.`,[`r2`])),e.name===void 0&&(e.name=await p(`name`,`Defines the name of the pipeline.`)),e.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let g=d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}),_=await s(`Updating`,async()=>c.send(N,{body:g,account_id:h,pipeline_name:e[`pipeline-name`]}));a(_,{successLabel:`Updated`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,query:[`page`,`per_page`,`name`]};function L(e){return e.usage(`$0 pipelines list
|
|
19
|
-
|
|
20
|
-
List/Filter Pipelines in Account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`name`,{type:`string`,description:`Filters pipelines by name (case-insensitive substring).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List Pipelines`,builder:L,handler:async e=>c({command:`pipelines list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],name:e.name};if(e.dryRun){let e=await r();o({command:`cf pipelines list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(I,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks`,body:`json`};function B(e){return e.usage(`$0 pipelines sinks create
|
|
21
|
-
|
|
22
|
-
Create a new Sink.`).option(`sink-config-account-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-bucket`,{type:`string`,description:`R2 Bucket to write to`}).option(`sink-config-credentials-access-key-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-credentials-secret-access-key`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-file-naming-prefix`,{type:`string`,description:`The prefix to use in file name. i.e prefix-<uuid>.parquet`}).option(`sink-config-file-naming-strategy`,{type:`string`,description:`Filename generation strategy.`,choices:[`serial`,`uuid`,`uuid_v7`,`ulid`]}).coerce(`sink-config-file-naming-strategy`,e=>f(e,`sink-config-file-naming-strategy`,`text`)).option(`sink-config-file-naming-suffix`,{type:`string`,description:`This will overwrite the default file suffix. i.e .parquet, use with caution`}).option(`sink-config-jurisdiction`,{type:`string`,description:`Jurisdiction this bucket is hosted in`}).option(`sink-config-partitioning-time-pattern`,{type:`string`,description:`The pattern of the date string`}).option(`sink-config-path`,{type:`string`,description:`Subpath within the bucket to write to`}).option(`sink-config-rolling-policy-file-size-bytes`,{type:`number`,description:`Files will be rolled after reaching this number of bytes`}).option(`sink-config-rolling-policy-inactivity-seconds`,{type:`number`,description:`Number of seconds of inactivity to wait before rolling over to a new file`}).option(`sink-config-rolling-policy-interval-seconds`,{type:`number`,description:`Number of seconds to wait before rolling over to a new file`}).option(`sink-config-namespace`,{type:`string`,description:`Table namespace`}).option(`sink-config-table-name`,{type:`string`,description:`Table name`}).option(`sink-config-token`,{type:`string`,description:`Authentication token`}).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-compression`,{type:`string`,description:`Specifies the compression applied to JSON sink output.`,choices:[`uncompressed`,`gzip`,`snappy`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`name`,{type:`string`,description:`Defines the name of the Sink.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`type`,{type:`string`,description:`Specifies the type of sink.`,choices:[`r2`,`r2_data_catalog`,`basin_catalog`]}).coerce(`type`,e=>f(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`sink-config-credentials-access-key-id`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-credentials-access-key-id`,[`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-credentials-secret-access-key`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-credentials-secret-access-key`,[`sink-config-credentials-access-key-id`]).conflicts(`sink-config-file-naming-prefix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-prefix`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-file-naming-strategy`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-strategy`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-file-naming-suffix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-suffix`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-jurisdiction`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-jurisdiction`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-partitioning-time-pattern`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-partitioning-time-pattern`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-path`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-path`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-namespace`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-namespace`,[`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-table-name`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-table-name`,[`sink-config-token`]).conflicts(`sink-config-token`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-token`,[`sink-config-table-name`]).conflicts(`format-decimal-encoding`,[`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-row-group-bytes`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{let t=[`sink-config-account-id`,`sink-config-bucket`,`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`,`sink-config-rolling-policy-file-size-bytes`,`sink-config-rolling-policy-inactivity-seconds`,`sink-config-rolling-policy-interval-seconds`,`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`sink-config-account-id`,`sink-config-bucket`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0}).check(e=>{let t=[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`format-row-group-bytes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`format-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --format-* flag is set`)}return!0})}const V={command:`create`,describe:`Create Sink`,builder:B,handler:async e=>c({command:`pipelines sinks create`,classification:{safeFlags:[`sink-config-file-naming-strategy`,`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`schema-inferred`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}):u(e.body),sensitiveBodyPaths:[[`config`,`credentials`,`secret_access_key`],[`config`,`token`]]});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(z,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Defines the name of the Sink.`)),e.type===void 0&&(e.type=await m(`type`,`Specifies the type of sink.`,[`r2`,`r2_data_catalog`,`basin_catalog`]));let g=d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}),_=await s(`Creating`,async()=>c.send(z,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var H={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function U(e){return e.usage(`$0 pipelines sinks delete <sink-id>
|
|
23
|
-
|
|
24
|
-
Delete Sink in Account.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const W={command:`delete <sink-id>`,describe:`Delete Sink`,builder:U,handler:async e=>c({command:`pipelines sinks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(H,{account_id:l,sink_id:e[`sink-id`]}));a(u,{successLabel:`Deleted`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function G(e){return e.usage(`$0 pipelines sinks get <sink-id>
|
|
25
|
-
|
|
26
|
-
Get Sink Details.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <sink-id>`,describe:`Get Sink Details`,builder:G,handler:async e=>c({command:`pipelines sinks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ie,{account_id:l,sink_id:e[`sink-id`]}));a(u,{successLabel:`Loaded`})})};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks`,query:[`pipeline_id`,`name`,`order_by`,`direction`,`page`,`per_page`]};function J(e){return e.usage(`$0 pipelines sinks list
|
|
27
|
-
|
|
28
|
-
List/Filter Sinks in Account.`).option(`pipeline-id`,{type:`string`,description:`Pipeline ID`}).option(`name`,{type:`string`,description:`Filters sinks by name (case-insensitive substring).`}).option(`order-by`,{type:`string`,description:"Sorts sinks by this field. Defaults to `created_at`.",choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List Sinks`,builder:J,handler:async e=>c({command:`pipelines sinks list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let c={pipeline_id:e[`pipeline-id`],name:e.name,order_by:e[`order-by`],direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf pipelines sinks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(q,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},ae={command:`sinks`,describe:`Destinations where pipeline data is written — R2 buckets, HTTP endpoints, or other storage`,builder:e=>e.command(V).command(W).command(K).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams`,body:`json`};function oe(e){return e.usage(`$0 pipelines streams create
|
|
29
|
-
|
|
30
|
-
Create a new Stream.`).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-compression`,{type:`string`,description:`The format.compression field`,choices:[`uncompressed`,`snappy`,`gzip`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`name`,{type:`string`,description:`Specifies the name of the Stream.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`format-decimal-encoding`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-compression`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{let t=[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`format-row-group-bytes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`format-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --format-* flag is set`)}return!0}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-authentication`,`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const se={command:`create`,describe:`Create Stream`,builder:oe,handler:async e=>c({command:`pipelines streams create`,classification:{safeFlags:[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`http-authentication`,`http-enabled`,`schema-inferred`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}):u(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(X,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Stream.`));let h=d({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}),g=await s(`Creating`,async()=>c.send(X,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function le(e){return e.usage(`$0 pipelines streams delete <stream-id>
|
|
31
|
-
|
|
32
|
-
Delete Stream in Account.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ue={command:`delete <stream-id>`,describe:`Delete Stream`,builder:le,handler:async e=>c({command:`pipelines streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ce,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function fe(e){return e.usage(`$0 pipelines streams get <stream-id>
|
|
33
|
-
|
|
34
|
-
Get Stream Details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <stream-id>`,describe:`Get Stream Details`,builder:fe,handler:async e=>c({command:`pipelines streams get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(de,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams`,query:[`pipeline_id`,`name`,`order_by`,`direction`,`page`,`per_page`]};function he(e){return e.usage(`$0 pipelines streams list
|
|
35
|
-
|
|
36
|
-
List/Filter Streams in Account.`).option(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`}).option(`name`,{type:`string`,description:`Filters streams by name (case-insensitive substring).`}).option(`order-by`,{type:`string`,description:"Sorts streams by this field. Defaults to `created_at`.",choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Streams`,builder:he,handler:async e=>c({command:`pipelines streams list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let c={pipeline_id:e[`pipeline-id`],name:e.name,order_by:e[`order-by`],direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf pipelines streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(me,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var Q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`,body:`json`};function ge(e){return e.usage(`$0 pipelines streams update <stream-id>
|
|
37
|
-
|
|
38
|
-
Update a Stream.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-authentication`,`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const _e={command:`update <stream-id>`,describe:`Update Stream`,builder:ge,handler:async e=>c({command:`pipelines streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(Q,{body:t,account_id:l,stream_id:e[`stream-id`]}));a(n,{successLabel:`Updated`});return}let f=d({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}),p=await s(`Updating`,async()=>c.send(Q,{body:f,account_id:l,stream_id:e[`stream-id`]}));a(p,{successLabel:`Updated`})})},ve={command:`streams`,describe:`Inbound data streams that feed events into a pipeline for processing`,builder:e=>e.command(se).command(ue).command(pe).command(Z).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/validate_sql`,body:`json`,errors:{422:`UnprocessableEntityError`}};function ye(e){return e.usage(`$0 pipelines validate-sql
|
|
39
|
-
|
|
40
|
-
Validates that the Pipelines SQL is correct.`).option(`sql`,{type:`string`,description:`Specifies SQL to validate.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const be={command:`validate-sql`,describe:`Validate SQL`,builder:ye,handler:async e=>c({command:`pipelines validate-sql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines validate-sql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/validate_sql`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({sql:f(e.sql,`sql`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send($,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL to validate.`));let m=d({sql:f(e.sql,`sql`,`text`)}),h=await s(`Creating`,async()=>c.send($,{body:m,account_id:l}));a(h,{successLabel:`Created`})})},xe={command:`pipelines`,describe:`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,builder:e=>e.command(v).command(ee).command(re).command(C).command(E).command(k).command(M).command(F).command(R).command(be).command(ae).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xe as default};
|