cf 1.0.0-beta.14 → 1.0.0-beta.16
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 -0
- package/dist/_meta/commands.json +6545 -3180
- package/dist/_meta/hand-written-commands.json +35 -2
- package/dist/_meta/schemas.json +7031 -4599
- package/dist/abuse-reports-17K-TRhO.mjs +24 -0
- package/dist/{access-k1QjF5rE.mjs → access-BwB7sg1D.mjs} +1 -1
- package/dist/account-tags-povXTDAu.mjs +15 -0
- package/dist/accounts-BnIGu_ac.mjs +132 -0
- package/dist/acm-CQRcu_zw.mjs +15 -0
- package/dist/addressing-Qcm9jd3C.mjs +105 -0
- package/dist/agent-memory-B3xN9I6-.mjs +34 -0
- package/dist/ai-BRKOCckA.mjs +31 -0
- package/dist/ai-audit-Cd9Rc2Fc.mjs +6 -0
- package/dist/ai-gateway-BWU5064V.mjs +80 -0
- package/dist/ai-search-CJ3b8eot.mjs +79 -0
- package/dist/ai-security-Dn0Ee6QS.mjs +10 -0
- package/dist/alerting-BXTiMfXo.mjs +56 -0
- package/dist/analytics-Jyd04TRW.mjs +17 -0
- package/dist/analytics-engine-CzrNfUeh.mjs +4 -0
- package/dist/api-eMuS5GI1.mjs +3 -0
- package/dist/api-security-DRBHZaf_.mjs +154 -0
- package/dist/argo-DiQt0pSb.mjs +14 -0
- package/dist/artifacts-eBZ4YN53.mjs +43 -0
- package/dist/audit-logs-Bb4HTZay.mjs +4 -0
- package/dist/auth-C6My1gI6.mjs +2 -0
- package/dist/auth-OFqV2M4q.mjs +2 -0
- package/dist/auth-eVI_UEt8.mjs +2 -0
- package/dist/{auth-token-Dop0wLCw.mjs → auth-token-Cfj2yehs.mjs} +1 -1
- package/dist/{autoconfig-RQ3HS4m1.mjs → autoconfig-B0ESZ8DJ.mjs} +2 -2
- package/dist/basin-catalog-Cwk1RSMX.mjs +46 -0
- package/dist/billing-CfV8oi6A.mjs +23 -0
- package/dist/blocks-Bat9A8V_.mjs +5 -0
- package/dist/bot-management-CH4_Kewx.mjs +9 -0
- package/dist/botnet-feed-Cg_Wp8ei.mjs +11 -0
- package/dist/brand-protection-Cp2ckWou.mjs +27 -0
- package/dist/browser-run-CfQ30dB6.mjs +42 -0
- package/dist/build-Bm6kGyzo.mjs +2 -0
- package/dist/{build-CCe7IrWT.mjs → build-sBpqm9ga.mjs} +1 -1
- package/dist/builds-B2RBgVL9.mjs +71 -0
- package/dist/cache-yvrYPvRI.mjs +45 -0
- package/dist/certificate-authorities-BdMRaOnD.mjs +6 -0
- package/dist/cf-Bq4pA4n6.mjs +18 -0
- package/dist/{chunk-TAK63GWY-DdMktrgc.mjs → chunk-2HLTAS5V-D7COzUOd.mjs} +2 -2
- package/dist/chunk-2K52M2W5-CYxfQXUq.mjs +363 -0
- package/dist/{chunk-DSGVRFIS-CPI5cYtB.mjs → chunk-DSGVRFIS-C5SqiTOz.mjs} +1 -1
- package/dist/{cli-ht4q6i2y.mjs → cli-CsnoQloF.mjs} +1 -1
- package/dist/client-certificates-CuWGvZSr.mjs +13 -0
- package/dist/client-side-security-D50iZjd_.mjs +63 -0
- package/dist/cloud-connector-wvSGdxWT.mjs +6 -0
- package/dist/{cloudflared-D83U8Yn3.mjs → cloudflared-By8BzYXc.mjs} +1 -1
- package/dist/cloudforce-one-j6vlmaMB.mjs +405 -0
- package/dist/{command-9VAc7b30.mjs → command-74P4_CTx.mjs} +1 -1
- package/dist/{command-B_Ixlz8Q.mjs → command-BDpm-U8z.mjs} +1 -1
- package/dist/{command-OHov3PEc.mjs → command-BSbhJRmu.mjs} +1 -1
- package/dist/{command-DjEJaOwV.mjs → command-BbO3sBQ2.mjs} +1 -1
- package/dist/{command-CtVUNm__.mjs → command-Bgb-3yPg.mjs} +1 -1
- package/dist/{command-DtgJilOK.mjs → command-C6w1OdoC.mjs} +1 -1
- package/dist/{command-CyJQ40fc.mjs → command-CM_f48gs.mjs} +1 -1
- package/dist/command-CmUtmu5j.mjs +2 -0
- package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
- package/dist/{command-SmWD-MeI.mjs → command-DFRsim8q.mjs} +1 -1
- package/dist/command-DQojhTEQ.mjs +2 -0
- package/dist/{command-CUNMrMou.mjs → command-DZfKHiru.mjs} +1 -1
- package/dist/{command-BtDY_MKv.mjs → command-DiqRELHF.mjs} +1 -1
- package/dist/{command-DXaRn1ls.mjs → command-DppVezAB.mjs} +1 -1
- package/dist/{command-Ckb9FufU.mjs → command-Dr4PEvB2.mjs} +1 -1
- package/dist/{completions-CuqAO3N_.mjs → completions-oD1EcuHk.mjs} +1 -1
- package/dist/config.mjs +0 -0
- package/dist/connector-interrupts-DP4rbOe8.mjs +6 -0
- package/dist/connector-telemetry-events-BQGBQwzR.mjs +6 -0
- package/dist/connector-telemetry-snapshots-DBO0Mdcj.mjs +6 -0
- package/dist/connectors-BSVr3Kz1.mjs +15 -0
- package/dist/containers-BOpKpipz.mjs +376 -0
- package/dist/containers-BTqAeVV2.mjs +78 -0
- package/dist/content-scan-B9Keyxe-.mjs +14 -0
- package/dist/{context-BBLtgdR1.mjs → context-B-vEsyrK.mjs} +2 -2
- package/dist/{cps-C5phNoVU.mjs → cps-VRP794c5.mjs} +3 -3
- package/dist/create-OXylMu6m.mjs +2 -0
- package/dist/csam-scanner-C1jOgXVu.mjs +10 -0
- package/dist/ct-alerting-Y9vfa6Fo.mjs +5 -0
- package/dist/custom-certificates-CojTEC0E.mjs +17 -0
- package/dist/custom-csrs-DM5X-K6H.mjs +11 -0
- package/dist/custom-hostnames-BBjqaiFF.mjs +27 -0
- package/dist/custom-nameservers-C0NDMLPJ.mjs +9 -0
- package/dist/custom-pages-M4RUxcn6.mjs +21 -0
- package/dist/{d1-EQMUlHTJ.mjs → d1-hin5PmxW.mjs} +31 -31
- package/dist/dcv-delegation-KOO8syyQ.mjs +4 -0
- package/dist/delegate.mjs +0 -0
- package/dist/{deploy-B22sEVHd.mjs → deploy-Bo7FtE44.mjs} +1 -1
- package/dist/deploy-context-ClvBD87y.mjs +56 -0
- package/dist/{deploy-input-BCjcuP6u.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
- package/dist/{dev-ClhhXuNU.mjs → dev-EtnMYA7K.mjs} +1 -1
- package/dist/diagnostics-LZuMrGjK.mjs +15 -0
- package/dist/{dist-DmRM6WSZ.mjs → dist-DZRTPMMA.mjs} +4 -4
- package/dist/dls-Bq8k3iy-.mjs +17 -0
- package/dist/dns-firewall-zavP5Qxj.mjs +71 -0
- package/dist/dns-ry5E2Bsa.mjs +144 -0
- package/dist/docs-B08YtL0U.mjs +3 -0
- package/dist/{dotenv-DpXaxfho.mjs → dotenv-usOKkeW7.mjs} +3 -3
- package/dist/{dry-run-DRj2_uV3.mjs → dry-run-C2KjGX10.mjs} +1 -1
- package/dist/durable-objects-B9fo41B1.mjs +6 -0
- package/dist/email-auth-D9LGjFlh.mjs +6 -0
- package/dist/email-routing-6iDnNPhY.mjs +45 -0
- package/dist/email-security-ty4ufRnJ.mjs +158 -0
- package/dist/email-sending-d7LO_Cz_.mjs +47 -0
- package/dist/error-sanitization-CIQOep3I.mjs +2 -0
- package/dist/error-sanitization-pOyzm2F1.mjs +2 -0
- package/dist/field-extractors-DkgQ7PSw.mjs +9 -0
- package/dist/firewall-Q88YyEwD.mjs +36 -0
- package/dist/flagship-CzI8zhd6.mjs +28 -0
- package/dist/fraud-CvFXTR0w.mjs +22 -0
- package/dist/get-By1q8YlI.mjs +2 -0
- package/dist/get-CRKvqCu6.mjs +2 -0
- package/dist/get-iPUHxD1r.mjs +2 -0
- package/dist/google-tag-gateway-Y2zbyey8.mjs +6 -0
- package/dist/healthchecks-4Hz-6xYi.mjs +22 -0
- package/dist/{hostnames-DvaUSzsj.mjs → hostnames-B3k7fIUL.mjs} +6 -6
- package/dist/hyperdrive-BWGYz95H.mjs +37 -0
- package/dist/iam-AXco_qmt.mjs +52 -0
- package/dist/images-BzYh8y0u.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-Da8pe296.mjs → init-DlenHBtS.mjs} +2 -2
- package/dist/intel-BBi3i_GU.mjs +76 -0
- package/dist/ips-CWG2b7AM.mjs +4 -0
- package/dist/k2-DXdMe3Cb.mjs +11 -0
- package/dist/keyless-certificates-B4ta_OGS.mjs +13 -0
- package/dist/keys-B9zvFzrf.mjs +4 -0
- package/dist/kv-FUd7UdDu.mjs +15 -0
- package/dist/{lazy-command-CDWwCsD2.mjs → lazy-command-BC8rIlHu.mjs} +1 -1
- package/dist/leaked-credential-checks-BufVA9vL.mjs +18 -0
- package/dist/{load-balancers-Bu9pd2SV.mjs → load-balancers-CWd9mSWM.mjs} +40 -40
- package/dist/{local-BcPM4I0s.mjs → local-Dil4fTWX.mjs} +1 -1
- package/dist/local-DxWDQDnG.mjs +2 -0
- package/dist/{local-runtime-BHKyRlCP.mjs → local-runtime-B7TKFu6E.mjs} +1 -1
- package/dist/login-BJr2PBaJ.mjs +5 -0
- package/dist/login-DVbXZ_Tv.mjs +2 -0
- package/dist/logo-matches-BluaPvMa.mjs +6 -0
- package/dist/logos-CXtmYWEJ.mjs +7 -0
- package/dist/logpush-DCYgrqz0.mjs +46 -0
- package/dist/logs-as60IP29.mjs +36 -0
- package/dist/magic-cloud-networking-0RsHugUF.mjs +71 -0
- package/dist/magic-network-monitoring-CPqvZdcb.mjs +36 -0
- package/dist/magic-transit-ClPyGzOE.mjs +386 -0
- package/dist/managed-defense-P4_QWSbK.mjs +18 -0
- package/dist/managed-transforms-CUwQXMij.mjs +9 -0
- package/dist/matches-BjckDBW1.mjs +6 -0
- package/dist/mcp-C2EG2c7L.mjs +32 -0
- package/dist/mesh-CpMZA7Xt.mjs +26 -0
- package/dist/{migrate-CZNq63Uj.mjs → migrate-6e5mJ79R.mjs} +1 -1
- package/dist/monetization-DypuCZmU.mjs +20 -0
- package/dist/mtls-certificates-B5AWTU6u.mjs +13 -0
- package/dist/network-DQ5Ridgy.mjs +50 -0
- package/dist/network-interconnects-ifU4JhGE.mjs +72 -0
- package/dist/o11y-CzssfRHt.mjs +93 -0
- package/dist/{oauth-n8um6MFk.mjs → oauth-BDdhqasa.mjs} +1 -1
- package/dist/oauth-BNTiErBG.mjs +4 -0
- package/dist/oauth-clients-gknNcBdV.mjs +16 -0
- package/dist/oauth-scopes-BJeSanuF.mjs +4 -0
- package/dist/organization-CXAM41sd.mjs +71 -0
- package/dist/organizations-kfFFW4uO.mjs +4 -0
- package/dist/origin-ca-certificates-DwhYV3m_.mjs +11 -0
- package/dist/origin-post-quantum-encryption-DfrnptJ1.mjs +6 -0
- package/dist/origin-tls-client-auth-COSxTc2q.mjs +30 -0
- package/dist/output-Co4xdFf6.mjs +2 -0
- package/dist/page-rules-ByrDMDBZ.mjs +39 -0
- package/dist/{pages-Bn0Sg1ay.mjs → pages-DuGcBC6k.mjs} +29 -29
- package/dist/path-DRw6Y-nd.mjs +2 -0
- package/dist/pay-per-crawl-B3_Gn9Cj.mjs +38 -0
- package/dist/pay-per-use-49EXt75f.mjs +33 -0
- package/dist/pipelines-Bvgh1BQZ.mjs +44 -0
- package/dist/precursor-VobQf--m.mjs +4 -0
- package/dist/previews-DkwFHNRx.mjs +7 -0
- package/dist/progress-R-1tIuep.mjs +2 -0
- package/dist/prompt-dgLm0iFJ.mjs +4 -0
- package/dist/queries-EbIadtC5.mjs +9 -0
- package/dist/queues-C4GZ-O3f.mjs +57 -0
- package/dist/r2-DEuFfWBR.mjs +128 -0
- package/dist/{radar-CdvQL4xm.mjs → radar-CDOERVcR.mjs} +150 -150
- package/dist/raw-fetch-BapeoreV.mjs +2 -0
- package/dist/realtime-D_A9Qgly.mjs +172 -0
- package/dist/registrar-X1YLlnmg.mjs +43 -0
- package/dist/registrar-sandbox-BF3cYO3n.mjs +56 -0
- package/dist/{registry-PI6sO95I.mjs → registry-CRnk93ur.mjs} +1 -1
- package/dist/reporting-BWm9jIF8.mjs +14 -0
- package/dist/{request-headers-D8L95bEQ.mjs → request-headers-BRxv6NkA.mjs} +1 -1
- package/dist/request-tracers-CHWpiejG.mjs +4 -0
- package/dist/resolve-BpgXeklt.mjs +2 -0
- package/dist/resolve-C3FmNlSO.mjs +2 -0
- package/dist/resource-sharing-C186jZv0.mjs +40 -0
- package/dist/resource-tagging-BTagOZli.mjs +4 -0
- package/dist/rules-DYnGIU_0.mjs +18 -0
- package/dist/rulesets-BcNrbVcq.mjs +37 -0
- package/dist/rum-BDyRecfp.mjs +30 -0
- package/dist/{run-CW2Cgi0S.mjs → run-BvDCuZ8q.mjs} +1 -1
- package/dist/run-roYb_Odh.mjs +2 -0
- package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
- package/dist/{schema-flags-BTItUu1K.mjs → schema-flags-DcKjAxI1.mjs} +1 -1
- package/dist/scim-zn-CNCsc.mjs +18 -0
- package/dist/secrets-store-CFhyQUV6.mjs +24 -0
- package/dist/security-insights-D8XgtCed.mjs +40 -0
- package/dist/security-txt-CCM-Vro0.mjs +9 -0
- package/dist/session-Cq3YNLoI.mjs +2 -0
- package/dist/shared-ouAF7o4S.mjs +2 -0
- package/dist/smart-shield-DwW7N92r.mjs +24 -0
- package/dist/snippets-B2jBY0m_.mjs +20 -0
- package/dist/{spawn-D07wH-MH.mjs → spawn-DQttFH05.mjs} +1 -1
- package/dist/{spectrum-B6qkjR_Z.mjs → spectrum-Cf_4cGE8.mjs} +16 -16
- package/dist/speed-DoXdyIYK.mjs +24 -0
- package/dist/sql-Bze4h80q.mjs +4 -0
- package/dist/src-BguQDHjS.mjs +125 -0
- package/dist/ssl-u_0gUhPA.mjs +45 -0
- package/dist/{startup-profile-CrtCP-6-.mjs → startup-profile-BOaseXnO.mjs} +1 -1
- package/dist/startup-profile-BwEZFVGS.mjs +2 -0
- package/dist/{state-DIiIGEtR.mjs → state-Boubf1X6.mjs} +1 -1
- package/dist/state-CODDG9Nx.mjs +2 -0
- package/dist/stream-BcReYIHJ.mjs +102 -0
- package/dist/submit-ldFVNfNC.mjs +4 -0
- package/dist/{tags-CX23P4jg.mjs → tags-D_Hc_A-r.mjs} +2 -2
- package/dist/{telemetry-ZlCi5Xhc.mjs → telemetry-Cojgz4Sv.mjs} +1 -1
- package/dist/telemetry-Ct_2AaO4.mjs +2 -0
- package/dist/tenant-AZ0EAsmT.mjs +10 -0
- package/dist/tenant-custom-nameservers-aozjaasc.mjs +9 -0
- package/dist/theme-BGHWSKCw.mjs +6 -0
- package/dist/{tools-CSc5DmFi.mjs → tools-BCCRUENY.mjs} +1 -1
- package/dist/tunnels-CXez5LPB.mjs +29 -0
- package/dist/turnstile-B2NQ8Nsk.mjs +33 -0
- package/dist/ui-BtIBQeaG.mjs +2 -0
- package/dist/{update-check-HFkPml6x.mjs → update-check-BlyKN8m0.mjs} +1 -1
- package/dist/update-check-BnGDxswi.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-D_UqGiWD.mjs +4 -0
- package/dist/url-normalization-CF1YHpIN.mjs +9 -0
- package/dist/url-scanner-ChF3GO2U.mjs +16 -0
- package/dist/{user-rXca0J9M.mjs → user-BfWRsdJh.mjs} +58 -58
- package/dist/values-CLfxkAUJ.mjs +4 -0
- package/dist/vectorize-CRYbWKg5.mjs +32 -0
- package/dist/version-CVlh2Zaq.mjs +2 -0
- package/dist/{waiting-rooms-DrA3-0bw.mjs → waiting-rooms-Crp7MVd9.mjs} +25 -25
- package/dist/web-assets-CgyrPnT-.mjs +64 -0
- package/dist/web3-Cd0Yd0eQ.mjs +28 -0
- package/dist/workers-CTwJpTfJ.mjs +40 -0
- package/dist/workers-builds-f2nVw7EZ.mjs +14 -0
- package/dist/workers-for-platforms-DjeKp2uy.mjs +40 -0
- package/dist/workers-vpc-B_L3TEg2.mjs +13 -0
- package/dist/workflows-CBPGf65x.mjs +52 -0
- package/dist/{wrangler-migration-C6FKHER1.mjs → wrangler-migration-DxTB5yPT.mjs} +1 -1
- package/dist/zaraz-3VDxl0gF.mjs +22 -0
- package/dist/zero-trust-B9xY8zcn.mjs +957 -0
- package/dist/zone-CmwVqTI2.mjs +4 -0
- package/dist/zones-Bf0VVpMf.mjs +124 -0
- package/package.json +17 -19
- package/dist/Page-BShsqCXr.mjs +0 -2
- package/dist/abuse-reports-CVv52Q2w.mjs +0 -24
- package/dist/account-tags-RhvWOkOf.mjs +0 -15
- package/dist/accounts--3lrEkmu.mjs +0 -125
- package/dist/acm-BJxINEcu.mjs +0 -15
- package/dist/addressing-BqByG9JW.mjs +0 -105
- package/dist/agent-memory-D4dQMGbh.mjs +0 -34
- package/dist/ai-CRkQ4pjC.mjs +0 -31
- package/dist/ai-audit-fMSn4c5L.mjs +0 -6
- package/dist/ai-gateway-CbhvQK4L.mjs +0 -80
- package/dist/ai-search-CvVSnOA0.mjs +0 -79
- package/dist/ai-security-Z_qpI92I.mjs +0 -10
- package/dist/alerting-CpbCB8br.mjs +0 -56
- package/dist/alerts-BSON-vFh.mjs +0 -2
- package/dist/analytics-DkY9dOP1.mjs +0 -17
- package/dist/analytics_engine-DE_jvlx_.mjs +0 -4
- package/dist/api-security-BHnOU5MM.mjs +0 -154
- package/dist/argo-DhC5L_aN.mjs +0 -14
- package/dist/args-CfbYkeXd.mjs +0 -2
- package/dist/artifacts-CrIupY7P.mjs +0 -43
- package/dist/audit-logs-BjeBxTox.mjs +0 -4
- package/dist/auth-BNYfOMl0.mjs +0 -2
- package/dist/auth-CAWalgW0.mjs +0 -2
- package/dist/auth-DOwC01PW.mjs +0 -2
- package/dist/autorag-kNrLiqDX.mjs +0 -2
- package/dist/banner-D03JEqRs.mjs +0 -2
- package/dist/basin-catalog-DZ7QV-_N.mjs +0 -46
- package/dist/billing-BFyte9fL.mjs +0 -23
- package/dist/bot-management-DXcbV3am.mjs +0 -9
- package/dist/botnet-feed-bGGp_cwX.mjs +0 -11
- package/dist/brand-protection-DN36XkxH.mjs +0 -27
- package/dist/brands-bBJgbbOH.mjs +0 -2
- package/dist/browser-extension-C1_fcw7h.mjs +0 -2
- package/dist/browser-run-hHD1RT43.mjs +0 -42
- package/dist/build-BhpWYgNm.mjs +0 -2
- package/dist/builds-6aO61R9R.mjs +0 -71
- package/dist/cache-C5YJpMqi.mjs +0 -45
- package/dist/certificate-authorities-CbqDAktQ.mjs +0 -6
- package/dist/cf-oRSQKirD.mjs +0 -18
- package/dist/chunk-NDZDTP46-Civns3WA.mjs +0 -361
- package/dist/clear-BW9vLgI3.mjs +0 -2
- package/dist/cli-types-9oYmRTHJ.mjs +0 -2
- package/dist/client-certificates-balaN_my.mjs +0 -13
- package/dist/client-side-security-3_4Ermmg.mjs +0 -63
- package/dist/cloud-connector-avx27sLw.mjs +0 -6
- package/dist/cloudforce-one-CXdeqJ9l.mjs +0 -405
- package/dist/command-DPX9sJVi.mjs +0 -2
- package/dist/command-OWe3v69l.mjs +0 -2
- package/dist/connector-interrupts-ftd10Du-.mjs +0 -6
- package/dist/connector-telemetry-events-TwDZYdEM.mjs +0 -6
- package/dist/connector-telemetry-events-latest-BQdOvbWh.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CZxkOuC3.mjs +0 -6
- package/dist/connector-telemetry-snapshots-latest-CtdN_dGu.mjs +0 -2
- package/dist/connectors-6lVSr-fd.mjs +0 -15
- package/dist/containers-Dqs_ZnO2.mjs +0 -78
- package/dist/containers-ncw3bd3a.mjs +0 -376
- package/dist/content-scan-BWFbqfQ0.mjs +0 -14
- package/dist/csamScanner-BwZNZu0A.mjs +0 -10
- package/dist/ct-alerting-DPp3qLqO.mjs +0 -5
- package/dist/custom-certificates-pfpZcr06.mjs +0 -17
- package/dist/custom-csrs-DrvGRAkl.mjs +0 -11
- package/dist/custom-hostnames-wGtmFbz1.mjs +0 -27
- package/dist/custom-nameservers-HTG6MPKv.mjs +0 -9
- package/dist/custom-pages-DqEHBSVt.mjs +0 -21
- package/dist/dcv-delegation-D6nj0Z5N.mjs +0 -4
- package/dist/deploy-context-DmG9rgPO.mjs +0 -56
- package/dist/diagnostics-tqHjq-Pl.mjs +0 -15
- package/dist/dls-BEHj4X9T.mjs +0 -17
- package/dist/dns-firewall-zwbkutyf.mjs +0 -71
- package/dist/dns-n4mfYBZg.mjs +0 -144
- package/dist/domain-info-BkcBcyfF.mjs +0 -2
- package/dist/durable-objects-CQ2dHhho.mjs +0 -6
- package/dist/email-auth-DOi6yOt3.mjs +0 -6
- package/dist/email-routing-WcSPt22u.mjs +0 -45
- package/dist/email-security-BXu3OGay.mjs +0 -158
- package/dist/email-sending-B9zTlIjt.mjs +0 -47
- package/dist/error-sanitization-DE_zSrXw.mjs +0 -2
- package/dist/error-sanitization-DOCQ9Ykh.mjs +0 -2
- package/dist/errors-_sob7Ihu.mjs +0 -3
- package/dist/fieldExtractors-B37m2lKW.mjs +0 -9
- package/dist/firewall-CRtYO0Ha.mjs +0 -36
- package/dist/flagship-DvTFZSay.mjs +0 -28
- package/dist/fraud-uSyibsit.mjs +0 -22
- package/dist/google-tag-gateway-BFXiiokq.mjs +0 -6
- package/dist/health-CTaCeVyC.mjs +0 -2
- package/dist/healthchecks-27u7b7Jb.mjs +0 -22
- package/dist/hyperdrive-BzJvPdu6.mjs +0 -37
- package/dist/iam-Dl3cU9GI.mjs +0 -52
- package/dist/images-C2OkI1j7.mjs +0 -71
- package/dist/intel-DoB1g_K7.mjs +0 -76
- package/dist/internal-BYS7hO8c.mjs +0 -2
- package/dist/ips-BRt68epr.mjs +0 -4
- package/dist/k2-_eq5ZY2t.mjs +0 -11
- package/dist/keyless-certificates-DaO2yqYu.mjs +0 -13
- package/dist/keys-7BQ3Zq6Y.mjs +0 -4
- package/dist/kv-BTYCXKML.mjs +0 -15
- package/dist/leaked-credential-checks-CPHOK_dE.mjs +0 -18
- package/dist/live-BJE_YWE1.mjs +0 -2
- package/dist/local-BundUuDT.mjs +0 -2
- package/dist/login-BBYC_BtH.mjs +0 -2
- package/dist/login-D2uoWhWh.mjs +0 -5
- package/dist/logo-matches-Bc1DQ4-g.mjs +0 -6
- package/dist/logos-X5B8z7Iv.mjs +0 -7
- package/dist/logpush-C2ENi1et.mjs +0 -46
- package/dist/logs-BKDz7kBW.mjs +0 -36
- package/dist/magic-cloud-networking-B60Gld8A.mjs +0 -71
- package/dist/magic-network-monitoring-CxXI3Y-H.mjs +0 -36
- package/dist/magic-transit-ZCSaCbl8.mjs +0 -386
- package/dist/managed-defense-DrxMb7xi.mjs +0 -18
- package/dist/managed-transforms-AI7KrRU1.mjs +0 -9
- package/dist/matches-rPMLS3Ip.mjs +0 -6
- package/dist/mcp-DXUMvEWt.mjs +0 -32
- package/dist/mesh-MmBCQ37q.mjs +0 -26
- package/dist/monetization-DQE5VtUO.mjs +0 -20
- package/dist/mtls-certificates-DwkEb-Hy.mjs +0 -13
- package/dist/network-BcfobxQY.mjs +0 -50
- package/dist/network-interconnects-BU3tN_Ab.mjs +0 -72
- package/dist/o11y-BBv7nedp.mjs +0 -93
- package/dist/oauth-BUr8bPwo.mjs +0 -9
- package/dist/oauth-clients-qWVImhHE.mjs +0 -16
- package/dist/oauth-scopes-CdeIgJIx.mjs +0 -4
- package/dist/organization-CJeOVWH7.mjs +0 -71
- package/dist/organizations-BpfoqZcG.mjs +0 -4
- package/dist/origin-ca-certificates-Bimf07RF.mjs +0 -11
- package/dist/origin-post-quantum-encryption-CM-If38w.mjs +0 -6
- package/dist/origin-tls-client-auth-BPwYPhc9.mjs +0 -30
- package/dist/output-BOe-3AQG.mjs +0 -2
- package/dist/page-rules-DOeekMrj.mjs +0 -39
- package/dist/pay-per-crawl-qJpseNNx.mjs +0 -38
- package/dist/pay-per-use-C1MWKJ4O.mjs +0 -33
- package/dist/pipelines-rCwXQw6S.mjs +0 -44
- package/dist/precursor-Bk8Pp6jT.mjs +0 -4
- package/dist/previews-BEheHO3T.mjs +0 -4
- package/dist/progress-CQqDtgmF.mjs +0 -2
- package/dist/prompt-C8FyienX.mjs +0 -3
- package/dist/queries-DJ8looyq.mjs +0 -9
- package/dist/queues-BBH9Q-Tt.mjs +0 -57
- package/dist/r2-CdJKpP2w.mjs +0 -128
- package/dist/r2-data-catalog-BRo-Rx2I.mjs +0 -2
- package/dist/rate-limit-analytics-BiRyU0Xd.mjs +0 -2
- package/dist/rate-limits-Cr2zpncO.mjs +0 -2
- package/dist/raw-fetch-DbXN3SlE.mjs +0 -2
- package/dist/ready-B3pLxnjc.mjs +0 -2
- package/dist/realtime-onrXppzh.mjs +0 -172
- package/dist/recent-submissions-JLOvuZq-.mjs +0 -2
- package/dist/refute-Dp3VodMn.mjs +0 -2
- package/dist/registrar-CbEBc5IE.mjs +0 -43
- package/dist/registrar-sandbox-BJhn1HFT.mjs +0 -56
- package/dist/reporting-bXZY6obP.mjs +0 -14
- package/dist/request-tracers-CihskC2A.mjs +0 -4
- package/dist/resolve-CaTBV-c6.mjs +0 -2
- package/dist/resolve-DCGSzUDQ.mjs +0 -2
- package/dist/resource-sharing-DDqcCHVs.mjs +0 -40
- package/dist/resource-tagging-D63RpBce.mjs +0 -4
- package/dist/rules-CAW0-Wde.mjs +0 -18
- package/dist/rulesets-CPir63Qc.mjs +0 -37
- package/dist/rum-BfwTcuup.mjs +0 -30
- package/dist/run-DEynXvCc.mjs +0 -2
- package/dist/scan-logo-3Zr6CDJB.mjs +0 -2
- package/dist/scan-page-CxeudOzj.mjs +0 -2
- package/dist/scim-CtZ1FeQE.mjs +0 -18
- package/dist/search-B_P5ZTQj.mjs +0 -2
- package/dist/secrets-store-BIuBYUJT.mjs +0 -24
- package/dist/security-insights-DfUus0bs.mjs +0 -40
- package/dist/security-txt-CgZOsAIZ.mjs +0 -9
- package/dist/session-BcM8Vyyx.mjs +0 -2
- package/dist/shared-CpS23WwR.mjs +0 -2
- package/dist/signed-url-D5RwvrQq.mjs +0 -2
- package/dist/smart-shield-ClgB7r-9.mjs +0 -24
- package/dist/snippets-DLO3iFAg.mjs +0 -20
- package/dist/speed-DX5X2EIR.mjs +0 -24
- package/dist/sql-CF044HDW.mjs +0 -4
- package/dist/src-BMATTZU_.mjs +0 -125
- package/dist/ssl-CM-rChEC.mjs +0 -45
- package/dist/startup-profile-D662WI9s.mjs +0 -2
- package/dist/state-D7uNYnoi.mjs +0 -2
- package/dist/stream-5EmUOQvy.mjs +0 -102
- package/dist/submission-info-_t78q2OE.mjs +0 -2
- package/dist/submit-lEAaRSMR.mjs +0 -4
- package/dist/telemetry-0Y5hAtCX.mjs +0 -2
- package/dist/tenant-DnI7QziH.mjs +0 -10
- package/dist/tenant-custom-nameservers-MR0dlcGm.mjs +0 -9
- package/dist/theme-CQ_TYifs.mjs +0 -6
- package/dist/total-queries-CPrKEciQ.mjs +0 -2
- package/dist/tracked-domains-CTRItgFT.mjs +0 -2
- package/dist/tunnels-NzYpsfi_.mjs +0 -29
- package/dist/turnstile-M7sKCEz3.mjs +0 -33
- package/dist/ui-YmjF66Ct.mjs +0 -5
- package/dist/update-check-aTutXNRd.mjs +0 -2
- package/dist/url-info-Dos9VOXV.mjs +0 -4
- package/dist/url-normalization-CZbFOq_v.mjs +0 -9
- package/dist/url-scanner-B7quLPGW.mjs +0 -16
- package/dist/values-D-rrZrDa.mjs +0 -4
- package/dist/vectorize-D2tf_oA8.mjs +0 -32
- package/dist/verify-5KcvRk-q.mjs +0 -2
- package/dist/version-BGnqDvNR.mjs +0 -2
- package/dist/web-assets-DQAfvPT9.mjs +0 -64
- package/dist/web3-MI0GQDnu.mjs +0 -28
- package/dist/workers-By6Pf8fv.mjs +0 -40
- package/dist/workers-builds-6YsWsCmC.mjs +0 -14
- package/dist/workers-for-platforms-DL8fC1qR.mjs +0 -40
- package/dist/workers-vpc-BYx6sbgd.mjs +0 -13
- package/dist/workflows-ByQLnV0E.mjs +0 -52
- package/dist/zaraz-CgbpmA85.mjs +0 -22
- package/dist/zero-trust-CpjTkkWt.mjs +0 -837
- package/dist/zone-DnKIe6po.mjs +0 -4
- package/dist/zones--5ZzsDmQ.mjs +0 -124
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-eVI_UEt8.mjs";import{i as n}from"./context-B-vEsyrK.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-R-1tIuep.mjs";import{t as o}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./prompt-dgLm0iFJ.mjs";var l={method:`GET`,path:t=>e`/zones/${t.zone_id}/hostnames/settings/${t.setting_id}/${t.hostname}`};function u(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
|
|
3
3
|
|
|
4
|
-
Get the requested TLS setting for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
4
|
+
Get the requested TLS setting for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <hostname>`,describe:`Get TLS setting for hostname`,builder:u,handler:async e=>o({command:`hostnames settings tls-single get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls-single get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-id`]??``),hostname:String(e.hostname??``)},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(l,{zone_id:s,setting_id:e[`setting-id`],hostname:e.hostname}));r(c,{successLabel:`Loaded`})})},f={command:`tls-single`,describe:`Operations for settings.tls-single`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var p={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/hostnames/settings/${t.setting_id}/${t.hostname}`};function m(e){return e.usage(`$0 hostnames settings tls delete <hostname>
|
|
5
5
|
|
|
6
|
-
Delete the tls setting value for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',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
|
|
7
|
-
`);return}let l=await a(`Deleting`,async()=>o.
|
|
6
|
+
Delete the tls setting value for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',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 h={command:`delete <hostname>`,describe:`Delete TLS setting for hostname`,builder:m,handler:async e=>o({command:`hostnames settings tls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-id`]??``),hostname:String(e.hostname??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await c({force:!!e.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let l=await a(`Deleting`,async()=>o.send(p,{zone_id:s,setting_id:e[`setting-id`],hostname:e.hostname}));r(l,{successLabel:`Deleted`})})};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/hostnames/settings/${t.setting_id}`};function _(e){return e.usage(`$0 hostnames settings tls get <setting-id>
|
|
8
8
|
|
|
9
|
-
List the requested TLS setting for the hostnames under this zone.`).positional(`setting-id`,{type:`string`,description:'The TLS Setting name. The value type depends on the setting: - `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`). - `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`). - `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
9
|
+
List the requested TLS setting for the hostnames under this zone.`).positional(`setting-id`,{type:`string`,description:'The TLS Setting name. The value type depends on the setting: - `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`). - `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`). - `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <setting-id>`,describe:`List TLS setting for hostnames`,builder:_,handler:async e=>o({command:`hostnames settings tls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-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(g,{zone_id:s,setting_id:e[`setting-id`]}));r(c,{successLabel:`Loaded`})})};var y={method:`PUT`,path:t=>e`/zones/${t.zone_id}/hostnames/settings/${t.setting_id}/${t.hostname}`,body:`json`};function b(e){return e.usage(`$0 hostnames settings tls update <hostname>
|
|
10
10
|
|
|
11
|
-
Update the tls setting value for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',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)`})}const
|
|
11
|
+
Update the tls setting value for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',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)`})}const x={command:`update <hostname>`,describe:`Edit TLS setting for hostname`,builder:b,handler:async e=>o({command:`hostnames settings tls update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-id`]??``),hostname:String(e.hostname??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(y,{body:t,zone_id:c,setting_id:e[`setting-id`],hostname:e.hostname}));r(n,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},S={command:`tls`,describe:`Operations for settings.tls`,builder:e=>e.command(h).command(v).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},C={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(S).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`hostnames`,describe:`hostnames`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-eVI_UEt8.mjs";import{a as r,t as i}from"./context-B-vEsyrK.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-R-1tIuep.mjs";import{t as c}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-dgLm0iFJ.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
|
|
3
|
+
|
|
4
|
+
Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).coerce(`mtls-sslmode`,e=>d(e,`mtls-sslmode`,`text`)).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
|
|
5
|
+
|
|
6
|
+
Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
|
|
7
|
+
If not specified, defaults to 20 for free tier and 60 for paid tier.
|
|
8
|
+
Certain Cloudflare-managed origins may be permitted a higher limit.
|
|
9
|
+
Contact Cloudflare if you need a higher limit.
|
|
10
|
+
`}).option(`integration-custom-database-name`,{type:`string`,description:"The database name to use when connecting. Defaults to `postgres` for PostgreSQL and `mysql` for MySQL."}).option(`integration-database-branch-name`,{type:`string`,description:`The name of the PlanetScale database branch.`}).option(`integration-database-name`,{type:`string`,description:`The name of the PlanetScale database.`}).option(`integration-organization-name`,{type:`string`,description:`The name of the PlanetScale organization.`}).option(`integration-provider`,{type:`string`,description:`The database integration provider used by this operation.`,choices:[`planetscale`]}).coerce(`integration-provider`,e=>d(e,`integration-provider`,`text`)).option(`integration-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).coerce(`integration-scheme`,e=>d(e,`integration-scheme`,`text`)).option(`origin-database`,{type:`string`,description:`Set the name of your origin database.`}).option(`origin-password`,{type:`string`,description:`Set the password needed to access your origin database. The API never returns this write-only value.`}).option(`origin-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).coerce(`origin-scheme`,e=>d(e,`origin-scheme`,`text`)).option(`origin-user`,{type:`string`,description:`Set the user of your origin database.`}).option(`origin-host`,{type:`string`,description:`Defines the publicly reachable hostname or IP of your origin database. Private, loopback, and link-local IP addresses are not allowed.`}).option(`origin-port`,{type:`number`,description:`Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.`}).option(`origin-access-client-id`,{type:`string`,description:`Defines the Client ID of the Access token to use when connecting to the origin database.`}).option(`origin-access-client-secret`,{type:`string`,description:`Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.`}).option(`origin-service-id`,{type:`string`,description:`The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A request to create a Hyperdrive configuration using exactly one of caller-supplied origin credentials or a managed integration.`}).conflicts(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-access-client-secret`,`origin-host`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-access-client-id`,`origin-host`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`]).check(e=>{if([`origin-database`,`origin-password`,`origin-scheme`,`origin-user`,`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`].some(t=>e[t]!==void 0)){let t=[`origin-database`,`origin-password`,`origin-scheme`,`origin-user`].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 --origin-* flag is set`)}return!0})}const _={command:`create`,describe:`Create Hyperdrive`,builder:g,handler:async e=>c({command:`hyperdrive create`,classification:{safeFlags:[`mtls-sslmode`,`integration-provider`,`integration-scheme`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`));let m=u({mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`],integration:{custom_database_name:d(e[`integration-custom-database-name`],`integration-custom-database-name`,`text`),database_branch_name:d(e[`integration-database-branch-name`],`integration-database-branch-name`,`text`),database_name:d(e[`integration-database-name`],`integration-database-name`,`text`),organization_name:d(e[`integration-organization-name`],`integration-organization-name`,`text`),provider:e[`integration-provider`],scheme:e[`integration-scheme`]},origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)}}),g=await s(`Creating`,async()=>c.send(h,{body:m,account_id:p}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`};function y(e){return e.usage(`$0 hyperdrive delete <hyperdrive-id>
|
|
11
|
+
|
|
12
|
+
Deletes the specified Hyperdrive.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,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 b={command:`delete <hyperdrive-id>`,describe:`Delete Hyperdrive`,builder:y,handler:async e=>c({command:`hyperdrive delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`This operation deletes an existing Hyperdrive configuration.`})){process.stderr.write(`Aborted.
|
|
13
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,hyperdrive_id:e[`hyperdrive-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`};function S(e){return e.usage(`$0 hyperdrive get <hyperdrive-id>
|
|
14
|
+
|
|
15
|
+
Returns the specified Hyperdrive configuration.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <hyperdrive-id>`,describe:`Get Hyperdrive`,builder:S,handler:async e=>c({command:`hyperdrive get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-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(x,{account_id:l,hyperdrive_id:e[`hyperdrive-id`]}));a(u,{successLabel:`Loaded`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/integrationsOperations/planetScale/createDatabaseSignature`};function T(e){return e.usage(`$0 hyperdrive integration planetscale signature
|
|
16
|
+
|
|
17
|
+
Returns a short-lived signed authorization for creating a database that is billed through Cloudflare. The caller passes these values to the integration partner's own CLI, which verifies the signature before creating the database. Requires the account to be entitled to Cloudflare-billed databases for the integration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`signature`,describe:`Create Database Signature`,builder:T,handler:async e=>c({command:`hyperdrive integration planetscale signature`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf hyperdrive integration planetscale signature`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/integrationsOperations/planetScale/createDatabaseSignature`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(w,{account_id:l}));a(u,{successLabel:`Created`})})},D={command:`planetscale`,describe:`Operations for integration.planetscale`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`integration`,describe:`Operations for integration`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,query:[`page`,`per_page`]};function A(e){return e.usage(`$0 hyperdrive list
|
|
18
|
+
|
|
19
|
+
Returns a list of Hyperdrives.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List Hyperdrives`,builder:A,handler:async e=>c({command:`hyperdrive list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf hyperdrive list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs`,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(k,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var M={method:`PUT`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`,body:`json`};function N(e){return e.usage(`$0 hyperdrive replace <hyperdrive-id>
|
|
20
|
+
|
|
21
|
+
Replaces and returns the specified Hyperdrive configuration. The request must include the name and complete origin connection details. Omitted caching settings are reset to their defaults, while omitted mTLS settings and origin connection limits are preserved. The integration association is set only during creation and cannot be changed; omit the integration field even when replacing an integration-backed configuration. Use the update operation to modify only selected fields.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`caching-disabled`,{type:`boolean`,description:`Set to true to disable caching of SQL responses. Default is false.`}).option(`caching-max-age`,{type:`number`,description:`Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.`}).option(`caching-stale-while-revalidate`,{type:`number`,description:`Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.`}).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).coerce(`mtls-sslmode`,e=>d(e,`mtls-sslmode`,`text`)).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-database`,{type:`string`,description:`Set the name of your origin database.`}).option(`origin-password`,{type:`string`,description:`Set the password needed to access your origin database. The API never returns this write-only value.`}).option(`origin-scheme`,{type:`string`,description:`Specifies the URL scheme used to connect to your origin database.`,choices:[`postgres`,`postgresql`,`mysql`]}).coerce(`origin-scheme`,e=>d(e,`origin-scheme`,`text`)).option(`origin-user`,{type:`string`,description:`Set the user of your origin database.`}).option(`origin-host`,{type:`string`,description:`Defines the publicly reachable hostname or IP of your origin database. Private, loopback, and link-local IP addresses are not allowed.`}).option(`origin-port`,{type:`number`,description:`Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.`}).option(`origin-access-client-id`,{type:`string`,description:`Defines the Client ID of the Access token to use when connecting to the origin database.`}).option(`origin-access-client-secret`,{type:`string`,description:`Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.`}).option(`origin-service-id`,{type:`string`,description:`The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
|
|
22
|
+
|
|
23
|
+
Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
|
|
24
|
+
If not specified, defaults to 20 for free tier and 60 for paid tier.
|
|
25
|
+
Certain Cloudflare-managed origins may be permitted a higher limit.
|
|
26
|
+
Contact Cloudflare if you need a higher limit.
|
|
27
|
+
`}).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(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-access-client-secret`,`origin-host`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-access-client-id`,`origin-host`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`])}const P={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:N,handler:async e=>c({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}):l(e.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(M,{body:t,account_id:m,hyperdrive_id:e[`hyperdrive-id`]}));a(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await f(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),e[`origin-database`]===void 0&&(e[`origin-database`]=await f(`origin-database`,`Set the name of your origin database.`)),e[`origin-password`]===void 0&&(e[`origin-password`]=await f(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),e[`origin-scheme`]===void 0&&(e[`origin-scheme`]=await p(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),e[`origin-user`]===void 0&&(e[`origin-user`]=await f(`origin-user`,`Set the user of your origin database.`));let h=u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin:{database:d(e[`origin-database`],`origin-database`,`text`),password:d(e[`origin-password`],`origin-password`,`text`),scheme:e[`origin-scheme`],user:d(e[`origin-user`],`origin-user`,`text`),host:d(e[`origin-host`],`origin-host`,`text`),port:e[`origin-port`],access_client_id:d(e[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:d(e[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:d(e[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:e[`origin-connection-limit`]}),g=await s(`Updating`,async()=>c.send(M,{body:h,account_id:m,hyperdrive_id:e[`hyperdrive-id`]}));a(g,{successLabel:`Updated`})})};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}/restart`};function I(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
|
|
28
|
+
|
|
29
|
+
Restarts the connection pool for the specified Hyperdrive configuration without changing its configuration. Existing connections are drained and a new pool is established at the edge.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`restart <hyperdrive-id>`,describe:`Restart Hyperdrive`,builder:I,handler:async e=>c({command:`hyperdrive restart`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive restart`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}/restart`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(F,{account_id:l,hyperdrive_id:e[`hyperdrive-id`]}));a(u,{successLabel:`Created`})})};var R={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs/${t.hyperdrive_id}`,body:`json`};function z(e){return e.usage(`$0 hyperdrive update <hyperdrive-id>
|
|
30
|
+
|
|
31
|
+
Updates and returns the specified fields of the Hyperdrive configuration. Custom caching settings are not kept if caching is disabled. For an integration-backed configuration, the integration association is preserved but cannot be changed; omit the integration field.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`caching-disabled`,{type:`boolean`,description:`Set to true to disable caching of SQL responses. Default is false.`}).option(`caching-max-age`,{type:`number`,description:`Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.`}).option(`caching-stale-while-revalidate`,{type:`number`,description:`Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.`}).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).coerce(`mtls-sslmode`,e=>d(e,`mtls-sslmode`,`text`)).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. An empty value leaves the name unchanged.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
|
|
32
|
+
|
|
33
|
+
Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
|
|
34
|
+
If not specified, defaults to 20 for free tier and 60 for paid tier.
|
|
35
|
+
Certain Cloudflare-managed origins may be permitted a higher limit.
|
|
36
|
+
Contact Cloudflare if you need a higher limit.
|
|
37
|
+
`}).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:`update <hyperdrive-id>`,describe:`Update Hyperdrive`,builder:z,handler:async e=>c({command:`hyperdrive update`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf hyperdrive update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/hyperdrive/configs/${e[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(e[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(e[`hyperdrive-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`]}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(R,{body:t,account_id:f,hyperdrive_id:e[`hyperdrive-id`]}));a(n,{successLabel:`Updated`});return}let p=u({caching:{disabled:e[`caching-disabled`],max_age:e[`caching-max-age`],stale_while_revalidate:e[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:d(e[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:d(e[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:e[`mtls-sslmode`]},name:d(e.name,`name`,`text`),origin_connection_limit:e[`origin-connection-limit`]}),m=await s(`Updating`,async()=>c.send(R,{body:p,account_id:f,hyperdrive_id:e[`hyperdrive-id`]}));a(m,{successLabel:`Updated`})})},V={command:`hyperdrive`,describe:`Accelerate access to existing databases by caching queries and pooling connections at the edge`,builder:e=>e.command(_).command(b).command(C).command(j).command(P).command(L).command(B).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-eVI_UEt8.mjs";import{a as r,t as i}from"./context-B-vEsyrK.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-R-1tIuep.mjs";import{t as c}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-dgLm0iFJ.mjs";var h={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/permission_groups/${t.permission_group_id}`};function g(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
|
|
3
|
+
|
|
4
|
+
Get information about a specific permission group in an account.`).positional(`permission-group-id`,{type:`string`,description:`Permission Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <permission-group-id>`,describe:`Permission Group Details`,builder:g,handler:async e=>c({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/permission_groups/${e[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(e[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(e[`permission-group-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(h,{account_id:l,permission_group_id:e[`permission-group-id`]}));a(u,{successLabel:`Loaded`})})};var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/permission_groups`,query:[`id`,`name`,`label`,`page`,`per_page`]};function v(e){return e.usage(`$0 iam permission-groups list
|
|
5
|
+
|
|
6
|
+
List all the permissions groups for an account.`).option(`id`,{type:`string`,description:`ID of the permission group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the permission group to be fetched.`}).option(`label`,{type:`string`,description:`Label of the permission group to be fetched.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`List Account Permission Groups`,builder:v,handler:async e=>c({command:`iam permission-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={id:e.id,name:e.name,label:e.label,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf iam permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/permission_groups`,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(_,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},te={command:`permission-groups`,describe:`View the permission groups that can be assigned to API tokens and policies`,builder:e=>e.command(ee).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups`,body:`json`};function ne(e){return e.usage(`$0 iam resource-groups create
|
|
7
|
+
|
|
8
|
+
Create a new Resource Group under the specified account.`).option(`name`,{type:`string`,description:`Name of the resource group`}).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 re={command:`create`,describe:`Create Resource Group`,builder:ne,handler:async e=>c({command:`iam resource-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam resource-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(b,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Name of the resource group`));let m=d({name:f(e.name,`name`,`text`)}),h=await s(`Creating`,async()=>c.send(b,{body:m,account_id:u}));a(h,{successLabel:`Created`})})};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups/${t.resource_group_id}`};function S(e){return e.usage(`$0 iam resource-groups delete <resource-group-id>
|
|
9
|
+
|
|
10
|
+
Remove a resource group from an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,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 C={command:`delete <resource-group-id>`,describe:`Remove Resource Group`,builder:S,handler:async e=>c({command:`iam resource-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam resource-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups/${e[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(e[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(e[`resource-group-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
11
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(x,{account_id:l,resource_group_id:e[`resource-group-id`]}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups/${t.resource_group_id}`};function T(e){return e.usage(`$0 iam resource-groups get <resource-group-id>
|
|
12
|
+
|
|
13
|
+
Get information about a specific resource group in an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <resource-group-id>`,describe:`Resource Group Details`,builder:T,handler:async e=>c({command:`iam resource-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam resource-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups/${e[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(e[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(e[`resource-group-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(w,{account_id:l,resource_group_id:e[`resource-group-id`]}));a(u,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups`,query:[`id`,`name`]};function O(e){return e.usage(`$0 iam resource-groups list
|
|
14
|
+
|
|
15
|
+
List all the resource groups for an account.`).option(`id`,{type:`string`,description:`ID of the resource group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the resource group to be fetched.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List Resource Groups`,builder:O,handler:async e=>c({command:`iam resource-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={id:e.id,name:e.name};if(e.dryRun){let e=await r();o({command:`cf iam resource-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups`,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(D,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var A={method:`PUT`,path:t=>e`/accounts/${t.account_id}/iam/resource_groups/${t.resource_group_id}`,body:`json`};function j(e){return e.usage(`$0 iam resource-groups update <resource-group-id>
|
|
16
|
+
|
|
17
|
+
Modify an existing resource group.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the resource group`}).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:`update <resource-group-id>`,describe:`Update Resource Group`,builder:j,handler:async e=>c({command:`iam resource-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam resource-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/resource_groups/${e[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(e[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(e[`resource-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:u,resource_group_id:e[`resource-group-id`]}));a(n,{successLabel:`Updated`});return}let p=d({name:f(e.name,`name`,`text`)}),m=await s(`Updating`,async()=>c.send(A,{body:p,account_id:u,resource_group_id:e[`resource-group-id`]}));a(m,{successLabel:`Updated`})})},N={command:`resource-groups`,describe:`Define scopes that limit which account resources a policy or token can access`,builder:e=>e.command(re).command(C).command(E).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}/begin_verification`};function F(e){return e.usage(`$0 iam sso begin-verification <sso-connector-id>
|
|
18
|
+
|
|
19
|
+
Validates the user has added the DNS TXT record required for validating ownership of the domain they are trying to set up a connector for.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`begin-verification <sso-connector-id>`,describe:`Begin SSO connector verification`,builder:F,handler:async e=>c({command:`iam sso begin-verification`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso begin-verification`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}/begin_verification`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(P,{account_id:l,sso_connector_id:e[`sso-connector-id`]}));a(u,{successLabel:`Created`})})};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/sso_connectors`,body:`json`};function R(e){return e.usage(`$0 iam sso create
|
|
20
|
+
|
|
21
|
+
Creates a new SSO connector for logging into Cloudflare through an identity provider.`).option(`begin-verification`,{type:`boolean`,description:`Begin the verification process after creation`,default:!0}).option(`email-domain`,{type:`string`,description:`Email domain of the new SSO connector`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`,default:!1}).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 z={command:`create`,describe:`Initialize new SSO connector`,builder:R,handler:async e=>c({command:`iam sso create`,classification:{safeFlags:[`begin-verification`,`use-fedramp-language`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({begin_verification:e[`begin-verification`],email_domain:f(e[`email-domain`],`email-domain`,`text`),use_fedramp_language:e[`use-fedramp-language`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(L,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}e[`email-domain`]===void 0&&(e[`email-domain`]=await p(`email-domain`,`Email domain of the new SSO connector`));let m=d({begin_verification:e[`begin-verification`],email_domain:f(e[`email-domain`],`email-domain`,`text`),use_fedramp_language:e[`use-fedramp-language`]}),h=await s(`Creating`,async()=>c.send(L,{body:m,account_id:u}));a(h,{successLabel:`Created`})})};var B={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}`};function V(e){return e.usage(`$0 iam sso delete <sso-connector-id>
|
|
22
|
+
|
|
23
|
+
Deletes an SSO connector from the account.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,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 H={command:`delete <sso-connector-id>`,describe:`Delete SSO connector`,builder:V,handler:async e=>c({command:`iam sso delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
24
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(B,{account_id:l,sso_connector_id:e[`sso-connector-id`]}));a(u,{successLabel:`Deleted`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}`};function W(e){return e.usage(`$0 iam sso get <sso-connector-id>
|
|
25
|
+
|
|
26
|
+
Retrieves details for a specific SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <sso-connector-id>`,describe:`Get single SSO connector`,builder:W,handler:async e=>c({command:`iam sso get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(e[`sso-connector-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(U,{account_id:l,sso_connector_id:e[`sso-connector-id`]}));a(u,{successLabel:`Loaded`})})};var K={method:`GET`,path:t=>e`/accounts/${t.account_id}/sso_connectors`};function q(e){return e.usage(`$0 iam sso list
|
|
27
|
+
|
|
28
|
+
Lists all SSO connectors configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`Get all SSO connectors`,builder:q,handler:async e=>c({command:`iam sso list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf iam sso list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors`,pathParams:{},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(K,{account_id:l}));a(u,{successLabel:`Loaded`})})};var Y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/sso_connectors/${t.sso_connector_id}`,body:`json`};function X(e){return e.usage(`$0 iam sso update <sso-connector-id>
|
|
29
|
+
|
|
30
|
+
Updates the state or configuration of an SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`SSO Connector enabled state`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`}).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 ie={command:`update <sso-connector-id>`,describe:`Update SSO connector state`,builder:X,handler:async e=>c({command:`iam sso update`,classification:{safeFlags:[`enabled`,`use-fedramp-language`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam sso update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/sso_connectors/${e[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(e[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(e[`sso-connector-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,use_fedramp_language:e[`use-fedramp-language`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(Y,{body:t,account_id:u,sso_connector_id:e[`sso-connector-id`]}));a(n,{successLabel:`Updated`});return}let f=d({enabled:e.enabled,use_fedramp_language:e[`use-fedramp-language`]}),p=await s(`Updating`,async()=>c.send(Y,{body:f,account_id:u,sso_connector_id:e[`sso-connector-id`]}));a(p,{successLabel:`Updated`})})},ae={command:`sso`,describe:`Configure single sign-on connectors to authenticate account members through an external identity provider`,builder:e=>e.command(I).command(z).command(H).command(G).command(J).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/iam/user_groups`,body:`json`};function oe(e){return e.usage(`$0 iam user-groups create
|
|
31
|
+
|
|
32
|
+
Create a new user group under the specified account.`).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. 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 se={command:`create`,describe:`Create User Group`,builder:oe,handler:async e=>c({command:`iam user-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),policies:u(e.policies,`policies`)}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Name of the User group.`));let h=d({name:f(e.name,`name`,`text`),policies:u(e.policies,`policies`)}),g=await s(`Creating`,async()=>c.send(Z,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}`};function le(e){return e.usage(`$0 iam user-groups delete <user-group-id>
|
|
33
|
+
|
|
34
|
+
Remove a user group from an account.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,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 <user-group-id>`,describe:`Remove User Group`,builder:le,handler:async e=>c({command:`iam user-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
35
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(ce,{account_id:l,user_group_id:e[`user-group-id`]}));a(u,{successLabel:`Deleted`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}`};function fe(e){return e.usage(`$0 iam user-groups get <user-group-id>
|
|
36
|
+
|
|
37
|
+
Get information about a specific user group in an account.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <user-group-id>`,describe:`User Group Details`,builder:fe,handler:async e=>c({command:`iam user-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-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,user_group_id:e[`user-group-id`]}));a(u,{successLabel:`Loaded`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups`,query:[`id`,`name`,`fuzzyName`,`page`,`per_page`,`direction`]};function he(e){return e.usage(`$0 iam user-groups list
|
|
38
|
+
|
|
39
|
+
List all the user groups for an account.`).option(`id`,{type:`string`,description:`ID of the user group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the user group to be fetched.`}).option(`fuzzy-name`,{type:`string`,description:`A string used for searching for user groups containing that substring.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`The sort order of returned user groups by name (ascending or descending).`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list`,describe:`List User Groups`,builder:he,handler:async e=>c({command:`iam user-groups list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let c={id:e.id,name:e.name,fuzzyName:e[`fuzzy-name`],page:e.page,per_page:e[`per-page`],direction:e.direction};if(e.dryRun){let e=await r();o({command:`cf iam user-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups`,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 _e={method:`POST`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members`,body:`json`};function ve(e){return e.usage(`$0 iam user-groups members create <user-group-id>
|
|
40
|
+
|
|
41
|
+
Add members to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,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)`})}const ye={command:`create <user-group-id>`,describe:`Add User Group Members`,builder:ve,handler:async e=>c({command:`iam user-groups members create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(_e,{body:t,account_id:u,user_group_id:e[`user-group-id`]}));a(n,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members/${t.member_id}`};function xe(e){return e.usage(`$0 iam user-groups members delete <member-id>
|
|
42
|
+
|
|
43
|
+
Remove a member from User Group`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,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 Se={command:`delete <member-id>`,describe:`Remove User Group Member`,builder:xe,handler:async e=>c({command:`iam user-groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
44
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(be,{account_id:l,user_group_id:e[`user-group-id`],member_id:e[`member-id`]}));a(u,{successLabel:`Deleted`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members/${t.member_id}`};function we(e){return e.usage(`$0 iam user-groups members get <member-id>
|
|
45
|
+
|
|
46
|
+
Get details of a specific member in a user group.`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get <member-id>`,describe:`Get User Group Member`,builder:we,handler:async e=>c({command:`iam user-groups members get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``),"member-id":String(e[`member-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(Ce,{account_id:l,user_group_id:e[`user-group-id`],member_id:e[`member-id`]}));a(u,{successLabel:`Loaded`})})};var Ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members`,query:[`page`,`per_page`,`fuzzyEmail`,`direction`]};function De(e){return e.usage(`$0 iam user-groups members list
|
|
47
|
+
|
|
48
|
+
List all the members attached to a user group.`).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`fuzzy-email`,{type:`string`,description:`A string used for filtering members by partial email match.`}).option(`direction`,{type:`string`,description:`The sort order of returned user group members by email.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`list`,describe:`List User Group Members`,builder:De,handler:async e=>c({command:`iam user-groups members list`,classification:{safeFlags:[`direction`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],fuzzyEmail:e[`fuzzy-email`],direction:e.direction};if(e.dryRun){let t=await r();o({command:`cf iam user-groups members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},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(Ee,{account_id:u,user_group_id:e[`user-group-id`],...c}));a(d,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}/members`,body:`json`};function ke(e){return e.usage(`$0 iam user-groups members update <user-group-id>
|
|
49
|
+
|
|
50
|
+
Replace the set of members attached to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Set/Replace members to a user group.`})}const Ae={command:`update <user-group-id>`,describe:`Update User Group Members`,builder:ke,handler:async e=>c({command:`iam user-groups members update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(Q,{body:t,account_id:u,user_group_id:e[`user-group-id`]}));a(n,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},je={command:`members`,describe:`Operations for user-groups.members`,builder:e=>e.command(ye).command(Se).command(Te).command(Oe).command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/iam/user_groups/${t.user_group_id}`,body:`json`};function Me(e){return e.usage(`$0 iam user-groups update <user-group-id>
|
|
51
|
+
|
|
52
|
+
Modify an existing user group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. 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 Ne={command:`update <user-group-id>`,describe:`Update User Group`,builder:Me,handler:async e=>c({command:`iam user-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf iam user-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/iam/user_groups/${e[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(e[`user-group-id`]))}`,pathParams:{"user-group-id":String(e[`user-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),policies:u(e.policies,`policies`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send($,{body:t,account_id:p,user_group_id:e[`user-group-id`]}));a(n,{successLabel:`Updated`});return}let m=d({name:f(e.name,`name`,`text`),policies:u(e.policies,`policies`)}),h=await s(`Updating`,async()=>c.send($,{body:m,account_id:p,user_group_id:e[`user-group-id`]}));a(h,{successLabel:`Updated`})})},Pe={command:`user-groups`,describe:`Organize account members into groups for easier permission assignment`,builder:e=>e.command(se).command(ue).command(pe).command(ge).command(Ne).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fe={command:`iam`,describe:`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,builder:e=>e.command(te).command(N).command(ae).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Fe as default};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-eVI_UEt8.mjs";import{a as i,i as a,t as o}from"./context-B-vEsyrK.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-R-1tIuep.mjs";import{t as u}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as d,r as f,t as p}from"./body-parser-DkHKPkJ7.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-dgLm0iFJ.mjs";import{n as y,t as b}from"./raw-fetch-BapeoreV.mjs";var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(e){return e.usage(`$0 images create
|
|
3
|
+
|
|
4
|
+
Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).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(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const te={command:`create`,describe:`Upload an image`,builder:ee,handler:async e=>u({command:`images create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`],url:e.url}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0||e.url!==void 0){let t=new FormData;if(e.file){let n=h(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(m(e.creator,`creator`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(m(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?m(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`])),e.url!==void 0&&t.append(`url`,String(m(e.url,`url`,`text`)??``));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=m(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(x,{account_id:u}));s(d,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function re(e){return e.usage(`$0 images delete <image-id>
|
|
5
|
+
|
|
6
|
+
Delete an image on Cloudflare Images. On success, all copies of the image are deleted and purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique 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 ie={command:`delete <image-id>`,describe:`Delete image`,builder:re,handler:async e=>u({command:`images delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.force,message:`This operation will delete this image.`})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(ne,{account_id:a,image_id:e[`image-id`]}));s(u,{successLabel:`Deleted`})})};var ae={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/direct_upload`,pathParams:[`account_id`],body:`form`};function oe(e){return e.usage(`$0 images direct-upload
|
|
8
|
+
|
|
9
|
+
Direct uploads allow users to upload images without API keys. A common use case are web apps, client-side applications, or mobile devices where users upload content directly to Cloudflare Images. This method creates a draft record for a future image. It returns an upload URL and an image identifier. To verify if the image itself has been uploaded, send an image details request (accounts/:account_identifier/images/v1/:identifier), and check that the \`draft: true\` property is not present.`).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(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`expiry`,{type:`string`,description:`The date after which the upload will not be accepted. Minimum: Now + 2 minutes. Maximum: Now + 6 hours.`}).option(`id`,{type:`string`,description:`Optional Image Custom ID. Up to 1024 chars. Can include any number of subpaths, and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a UUID.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can be used for keeping references to another system of record, for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token to be accessed.`})}const S={command:`direct-upload`,describe:`Create authenticated direct upload URL V2`,builder:oe,handler:async e=>u({command:`images direct-upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images direct-upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/direct_upload`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,expiry:e.expiry,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`]}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.expiry!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0){let t=new FormData;if(e.file){let n=h(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(m(e.creator,`creator`,`text`)??``)),e.expiry!==void 0&&t.append(`expiry`,String(m(e.expiry,`expiry`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(m(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?m(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`]));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=m(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(ae,{account_id:u}));s(d,{successLabel:`Created`})})};var C={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`,body:`json`};function w(e){return e.usage(`$0 images edit <image-id>
|
|
10
|
+
|
|
11
|
+
Update a CF Images image's metadata, creator, or access control. On access control change, all copies of the image are purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the image can be accessed using only its UID. If set to `true`, a signed token needs to be generated with a signing key to view the image. Returns a new UID on a change. No change if not specified."}).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 T={command:`edit <image-id>`,describe:`Update image`,builder:w,handler:async e=>u({command:`images edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({creator:m(e.creator,`creator`,`text`),requireSignedURLs:e[`require-signed-urls`]}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(C,{body:t,account_id:a,image_id:e[`image-id`]}));s(r,{successLabel:`Updated`});return}let u=p({creator:m(e.creator,`creator`,`text`),requireSignedURLs:e[`require-signed-urls`]}),f=await l(`Updating`,async()=>n.send(C,{body:u,account_id:a,image_id:e[`image-id`]}));s(f,{successLabel:`Updated`})})};var E={method:`GET`,path:t=>e`/zones/${t.zone_id}/images/v1/flows`};function D(e){return e.usage(`$0 images flows get
|
|
12
|
+
|
|
13
|
+
Get the current transformation flows configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get transformation flows`,builder:D,handler:async e=>u({command:`images flows get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf images flows get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(E,{zone_id:n}));s(i,{successLabel:`Loaded`})})};var k={method:`PUT`,path:t=>e`/zones/${t.zone_id}/images/v1/flows`,body:`json`};function A(e){return e.usage(`$0 images flows update
|
|
14
|
+
|
|
15
|
+
Replace the entire transformation flows configuration for a zone.`).option(`etag`,{type:`string`,description:`The etag field`}).option(`flows`,{type:`string`,description:`The flows field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`config-version`,{type:`number`,description:`The version field`}).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 j={command:`update`,describe:`Update transformation flows`,builder:A,handler:async e=>u({command:`images flows update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf images flows update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({etag:m(e.etag,`etag`,`text`),flows:f(e.flows,`flows`),version:e[`config-version`]}):d(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=d(e.body),i=await l(`Updating`,async()=>t.send(k,{body:r,zone_id:n}));s(i,{successLabel:`Updated`});return}if(e.flows===void 0)throw Error(`--flows is required (or pass --body with this field set).`);if(e[`config-version`]===void 0)throw Error(`--config-version is required (or pass --body with this field set).`);let i=p({etag:m(e.etag,`etag`,`text`),flows:f(e.flows,`flows`),version:e[`config-version`]}),o=await l(`Updating`,async()=>t.send(k,{body:i,zone_id:n}));s(o,{successLabel:`Updated`})})},M={command:`flows`,describe:`Zone-level transformation flows that control how images are resized and optimized on delivery`,builder:e=>e.command(O).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 images get-blob <image-id>
|
|
16
|
+
|
|
17
|
+
Download an image from CF Images. For most images this will be the originally uploaded file. For larger images it can be a near-lossless version of the original.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const P={command:`get-blob <image-id>`,describe:`Download image`,builder:N,handler:async e=>u({command:`images get-blob`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images get-blob`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}/blob`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await o();e.accountId=n;let a=await l(`Loading`,async()=>b(`/accounts/${n}/images/v1/${encodeURIComponent(String(e[`image-id`]))}/blob`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));y(e.text===!0?a.toString(`utf-8`):a)})};var F={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function I(e){return e.usage(`$0 images get <image-id>
|
|
18
|
+
|
|
19
|
+
Fetch details for a CF Images image.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <image-id>`,describe:`Image details`,builder:I,handler:async e=>u({command:`images get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(F,{account_id:a,image_id:e[`image-id`]}));s(u,{successLabel:`Loaded`})})};var R={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle/abort`};function z(e){return e.usage(`$0 images import abort <migration-id>
|
|
20
|
+
|
|
21
|
+
Abort a running CF Images import. Already imported images will remain.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`abort <migration-id>`,describe:`Abort a migration`,builder:z,handler:async e=>u({command:`images import abort`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import abort`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle/abort`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(R,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Updated`})})};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations`,body:`json`};function H(e){return e.usage(`$0 images import create
|
|
22
|
+
|
|
23
|
+
Create a pending CF Images import from a configured source.`).option(`conflict-behaviour`,{type:`string`,description:`How to handle objects that already exist at the destination.`,choices:[`skip`,`overwrite`],default:`skip`}).coerce(`conflict-behaviour`,e=>m(e,`conflict-behaviour`,`text`)).option(`excluded-content-types`,{type:`string`,array:!0,description:`Content types to skip during migration.`}).option(`path-prefix`,{type:`string`,description:`Prefix to prepend to image custom IDs.`}).option(`root-directory`,{type:`string`,description:`Only import objects under this prefix in the source bucket.`}).option(`source-id`,{type:`string`,description:`The identifier of the source to migrate from.`}).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 U={command:`create`,describe:`Create a sourcing kit migration`,builder:H,handler:async e=>u({command:`images import create`,classification:{safeFlags:[`conflict-behaviour`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({conflictBehaviour:e[`conflict-behaviour`],excludedContentTypes:e[`excluded-content-types`],pathPrefix:m(e[`path-prefix`],`path-prefix`,`text`),rootDirectory:m(e[`root-directory`],`root-directory`,`text`),sourceId:m(e[`source-id`],`source-id`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(V,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`source-id`]===void 0&&(e[`source-id`]=await g(`source-id`,`The identifier of the source to migrate from.`));let u=p({conflictBehaviour:e[`conflict-behaviour`],excludedContentTypes:e[`excluded-content-types`],pathPrefix:m(e[`path-prefix`],`path-prefix`,`text`),rootDirectory:m(e[`root-directory`],`root-directory`,`text`),sourceId:m(e[`source-id`],`source-id`,`text`)}),f=await l(`Creating`,async()=>n.send(V,{body:u,account_id:a}));s(f,{successLabel:`Created`})})};var W={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}`};function G(e){return e.usage(`$0 images import delete <migration-id>
|
|
24
|
+
|
|
25
|
+
Delete a completed, failed, or aborted CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource 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 K={command:`delete <migration-id>`,describe:`Delete a sourcing kit migration`,builder:G,handler:async e=>u({command:`images import delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.force,message:`This operation will delete this import migration.`})){process.stderr.write(`Aborted.
|
|
26
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(W,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Deleted`})})};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}`};function se(e){return e.usage(`$0 images import get <migration-id>
|
|
27
|
+
|
|
28
|
+
Get the configuration and status of a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get <migration-id>`,describe:`Get sourcing kit migration`,builder:se,handler:async e=>u({command:`images import get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(q,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Loaded`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations`,query:[`offset`,`limit`]};function ue(e){return e.usage(`$0 images import list
|
|
29
|
+
|
|
30
|
+
List CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`List sourcing kit migrations`,builder:ue,handler:async e=>u({command:`images import list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit};if(e.dryRun){let e=await i();c({command:`cf images import list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(le,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/logs`,query:[`offset`,`limit`]};function pe(e){return e.usage(`$0 images import logs <migration-id>
|
|
31
|
+
|
|
32
|
+
List log entries for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`logs <migration-id>`,describe:`List migration logs`,builder:pe,handler:async e=>u({command:`images import logs`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit};if(e.dryRun){let t=await i();c({command:`cf images import logs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/logs`,pathParams:{"migration-id":String(e[`migration-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(fe,{account_id:u,migration_id:e[`migration-id`],...n}));s(d,{successLabel:`Loaded`})})};var he={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle`};function ge(e){return e.usage(`$0 images import progress <migration-id>
|
|
33
|
+
|
|
34
|
+
Get progress and object counts for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`progress <migration-id>`,describe:`Get migration progress`,builder:ge,handler:async e=>u({command:`images import progress`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(he,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Loaded`})})};var ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}/connectivity`};function ye(e){return e.usage(`$0 images import sources check <source-id>
|
|
35
|
+
|
|
36
|
+
Check whether a source can still access its S3 bucket.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`check <source-id>`,describe:`Get source connectivity status`,builder:ye,handler:async e=>u({command:`images import sources check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}/connectivity`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ve,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources`,body:`json`};function xe(e){return e.usage(`$0 images import sources create
|
|
37
|
+
|
|
38
|
+
Configure an S3 source for CF Images imports.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`name`,{type:`string`,description:`A human-readable name for the source.`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).coerce(`vendor`,e=>m(e,`vendor`,`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)`})}const Se={command:`create`,describe:`Create a sourcing kit source`,builder:xe,handler:async e=>u({command:`images import sources create`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({account:m(e.account,`account`,`text`),bucket:m(e.bucket,`bucket`,`text`),name:m(e.name,`name`,`text`),vendor:e.vendor}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(J,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.bucket===void 0&&(e.bucket=await g(`bucket`,`The name of the storage bucket.`)),e.name===void 0&&(e.name=await g(`name`,`A human-readable name for the source.`)),e.vendor===void 0&&(e.vendor=await _(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let u=p({account:m(e.account,`account`,`text`),bucket:m(e.bucket,`bucket`,`text`),name:m(e.name,`name`,`text`),vendor:e.vendor}),f=await l(`Creating`,async()=>n.send(J,{body:u,account_id:a}));s(f,{successLabel:`Created`})})};var Ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`};function we(e){return e.usage(`$0 images import sources delete <source-id>
|
|
39
|
+
|
|
40
|
+
Delete a source configured for CF Images imports. Sources used by active imports cannot be deleted.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource 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 Te={command:`delete <source-id>`,describe:`Delete a sourcing kit source`,builder:we,handler:async e=>u({command:`images import sources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.force,message:`This operation will delete this import source.`})){process.stderr.write(`Aborted.
|
|
41
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(Ce,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Deleted`})})};var Ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`};function De(e){return e.usage(`$0 images import sources get <source-id>
|
|
42
|
+
|
|
43
|
+
Get details of a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`get <source-id>`,describe:`Get sourcing kit source`,builder:De,handler:async e=>u({command:`images import sources get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Ee,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Loaded`})})};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources`,query:[`offset`,`limit`,`name`]};function Ae(e){return e.usage(`$0 images import sources list
|
|
44
|
+
|
|
45
|
+
List sources configured for CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`name`,{type:`string`,description:`Filter sources by name (partial match).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`list`,describe:`List sourcing kit sources`,builder:Ae,handler:async e=>u({command:`images import sources list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit,name:e.name};if(e.dryRun){let e=await i();c({command:`cf images import sources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(ke,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/connectivity-precheck`,body:`json`};function Me(e){return e.usage(`$0 images import sources pre-check
|
|
46
|
+
|
|
47
|
+
Check S3 credentials without saving a source.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`region`,{type:`string`,description:`The region hint for the bucket (S3 only).`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).coerce(`vendor`,e=>m(e,`vendor`,`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)`})}const Ne={command:`pre-check`,describe:`Precheck source connectivity`,builder:Me,handler:async e=>u({command:`images import sources pre-check`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources pre-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({account:m(e.account,`account`,`text`),bucket:m(e.bucket,`bucket`,`text`),region:m(e.region,`region`,`text`),vendor:e.vendor}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.bucket===void 0&&(e.bucket=await g(`bucket`,`The name of the storage bucket.`)),e.vendor===void 0&&(e.vendor=await _(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let u=p({account:m(e.account,`account`,`text`),bucket:m(e.bucket,`bucket`,`text`),region:m(e.region,`region`,`text`),vendor:e.vendor}),f=await l(`Creating`,async()=>n.send(Y,{body:u,account_id:a}));s(f,{successLabel:`Created`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`,body:`json`};function Pe(e){return e.usage(`$0 images import sources update <source-id>
|
|
48
|
+
|
|
49
|
+
Rename a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`Updated name for the source.`}).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 Fe={command:`update <source-id>`,describe:`Update a sourcing kit source`,builder:Pe,handler:async e=>u({command:`images import sources update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(X,{body:t,account_id:a,source_id:e[`source-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await g(`name`,`Updated name for the source.`));let u=p({name:m(e.name,`name`,`text`)}),f=await l(`Updating`,async()=>n.send(X,{body:u,account_id:a,source_id:e[`source-id`]}));s(f,{successLabel:`Updated`})})},Ie={command:`sources`,describe:`Operations for import.sources`,builder:e=>e.command(be).command(Se).command(Te).command(Oe).command(je).command(Ne).command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Le={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle/start`};function Re(e){return e.usage(`$0 images import start <migration-id>
|
|
50
|
+
|
|
51
|
+
Start a pending CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ze={command:`start <migration-id>`,describe:`Start a migration`,builder:Re,handler:async e=>u({command:`images import start`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import start`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle/start`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(Le,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Updated`})})},Be={command:`import`,describe:`Import images from S3`,builder:e=>e.command(B).command(U).command(K).command(ce).command(de).command(me).command(_e).command(ze).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ve={method:`PUT`,path:t=>e`/accounts/${t.account_id}/images/v1/keys/${t.signing_key_name}`};function He(e){return e.usage(`$0 images keys create <signing-key-name>
|
|
52
|
+
|
|
53
|
+
Create a new CF Images signing key with specified name. Returns all keys available.`).positional(`signing-key-name`,{type:`string`,description:`Signing key name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`create <signing-key-name>`,describe:`Create a new Signing Key`,builder:He,handler:async e=>u({command:`images keys create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images keys create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/keys/${e[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(e[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(e[`signing-key-name`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(Ve,{account_id:a,signing_key_name:e[`signing-key-name`]}));s(u,{successLabel:`Updated`})})};var We={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/keys/${t.signing_key_name}`};function Ge(e){return e.usage(`$0 images keys delete <signing-key-name>
|
|
54
|
+
|
|
55
|
+
Delete a CF Images signing key with specified name. Returns all keys available. When the last key is removed, a new default signing key will be generated.`).positional(`signing-key-name`,{type:`string`,description:`Signing key name`,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 Ke={command:`delete <signing-key-name>`,describe:`Delete Signing Key`,builder:Ge,handler:async e=>u({command:`images keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/keys/${e[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(e[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(e[`signing-key-name`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.force,message:`This operation will delete this signing key. This will invalidate any URLs that are signed with this key.`})){process.stderr.write(`Aborted.
|
|
56
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(We,{account_id:a,signing_key_name:e[`signing-key-name`]}));s(u,{successLabel:`Deleted`})})};var qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/keys`};function Je(e){return e.usage(`$0 images keys list
|
|
57
|
+
|
|
58
|
+
List your CF Images signing keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`list`,describe:`List Signing Keys`,builder:Je,handler:async e=>u({command:`images keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/keys`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(qe,{account_id:a}));s(u,{successLabel:`Loaded`})})},Xe={command:`keys`,describe:`Manage signing keys for generating private image URLs`,builder:e=>e.command(Ue).command(Ke).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ze={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2`,query:[`continuation_token`,`per_page`,`sort_order`,`creator`,`meta.<field>[<operator>]`],errors:{400:`BadRequestError`}};function Qe(e){return e.usage("$0 images list\n\nList up to 10000 images from CF Images, with up to 1000 results per page. Use the optional parameters below to get a specific range of images. Pagination is supported via continuation_token. **Metadata Filtering (Optional):** You can optionally filter images by custom metadata fields using the `meta.<field>[<operator>]=<value>` syntax. **Supported Operators:** - `eq` / `eq:string` / `eq:number` / `eq:boolean` - Exact match - `gt` / `gt:number` - Greater than (number only) - `gte` / `gte:number` - Greater than or equal (number only) - `lt` / `lt:number` - Less than (number only) - `lte` / `lte:number` - Less than or equal (number only) - `in` / `in:string` / `in:number` - Match any value in list (pipe-separated) **Metadata Filter Constraints:** - Maximum 5 metadata filters per request - Maximum 5 levels of nesting (e.g., `meta.first.second.third.fourth.fifth`) - Maximum 10 elements for list operators (`in`) - Supports string, number, and boolean value types - Range operators (`gt`, `gte`, `lt`, `lte`) only accept numeric values **Filter Consistency:** Filters are combined with AND logic. The system does not validate whether filter combinations are logically consistent. For example, `meta.priority[eq:number]=5&meta.priority[lte:number]=3` will return zero results because no value can satisfy both conditions simultaneously. It is the caller's responsibility to ensure filter combinations make sense. **Examples:** ``` # List all images /images/v2 # Filter by metadata [eq] /images/v2?meta.status[eq:string]=active # Filter by metadata [in] /images/v2?meta.status[in]=pending|deleted|flagged # Filter by metadata [in:number] /images/v2?meta.ratings[in:number]=4|5 # Filter by metadata range [gte:number] /images/v2?meta.priority[gte:number]=1 # Filter by bounded range /images/v2?meta.priority[gte:number]=1&meta.priority[lte:number]=5 # Filter by nested metadata /images/v2?meta.region.name[eq]=eu-west # Combine metadata filters with creator /images/v2?meta.status[eq]=active&creator=user123 # Multiple metadata filters (AND logic) /images/v2?meta.status[eq]=active&meta.priority[eq:number]=5 ```").option(`continuation-token`,{type:`string`,description:`Continuation token to fetch next page. Passed as a query param when requesting List V2 api endpoint.`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`sort-order`,{type:`string`,description:`Sorting order by upload time`,choices:[`asc`,`desc`]}).option(`creator`,{type:`string`,description:`Internal user ID set within the creator field. Setting to empty string "" will return images where creator field is not set`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $e={command:`list`,describe:`List images V2`,builder:Qe,handler:async e=>u({command:`images list`,classification:{safeFlags:[`sort-order`,`dry-run`]}},e,async()=>{let n={continuation_token:e[`continuation-token`],per_page:e[`per-page`],sort_order:e[`sort-order`],creator:e.creator};if(e.dryRun){let e=await i();c({command:`cf images list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ze,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var et={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/stats`};function tt(e){return e.usage(`$0 images stats
|
|
59
|
+
|
|
60
|
+
Fetch image statistics details for Cloudflare Images. The returned statistics detail storage usage, including the current image count vs this account's allowance.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nt={command:`stats`,describe:`Images usage statistics`,builder:tt,handler:async e=>u({command:`images stats`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/stats`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(et,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1/variants`,body:`json`};function Q(e){return e.usage(`$0 images variants create
|
|
61
|
+
|
|
62
|
+
Create a CF Images variant that allows you to resize images for different use cases.`).option(`id`,{type:`string`,description:`The id field`}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`,default:!1}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).coerce(`options-fit`,e=>m(e,`options-fit`,`text`)).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).coerce(`options-metadata`,e=>m(e,`options-metadata`,`text`)).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).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 rt={command:`create`,describe:`Create a variant`,builder:Q,handler:async e=>u({command:`images variants create`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({id:m(e.id,`id`,`text`),neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(Z,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.id===void 0&&(e.id=await g(`id`,`The id field`)),e[`options-fit`]===void 0&&(e[`options-fit`]=await _(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),e[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(e[`options-metadata`]===void 0&&(e[`options-metadata`]=await _(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),e[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let u=p({id:m(e.id,`id`,`text`),neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}),f=await l(`Creating`,async()=>n.send(Z,{body:u,account_id:a}));s(f,{successLabel:`Created`})})};var it={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`};function at(e){return e.usage(`$0 images variants delete <variant-id>
|
|
63
|
+
|
|
64
|
+
Delete a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,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 ot={command:`delete <variant-id>`,describe:`Delete a variant`,builder:at,handler:async e=>u({command:`images variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await v({force:!!e.force,message:`This operation will delete this variant.`})){process.stderr.write(`Aborted.
|
|
65
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(it,{account_id:a,variant_id:e[`variant-id`]}));s(u,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`,body:`json`};function st(e){return e.usage(`$0 images variants edit <variant-id>
|
|
66
|
+
|
|
67
|
+
Update a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).coerce(`options-fit`,e=>m(e,`options-fit`,`text`)).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).coerce(`options-metadata`,e=>m(e,`options-metadata`,`text`)).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).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 ct={command:`edit <variant-id>`,describe:`Update a variant`,builder:st,handler:async e=>u({command:`images variants edit`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send($,{body:t,account_id:a,variant_id:e[`variant-id`]}));s(r,{successLabel:`Updated`});return}if(e[`options-fit`]===void 0&&(e[`options-fit`]=await _(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),e[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(e[`options-metadata`]===void 0&&(e[`options-metadata`]=await _(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),e[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let u=p({neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}),f=await l(`Updating`,async()=>n.send($,{body:u,account_id:a,variant_id:e[`variant-id`]}));s(f,{successLabel:`Updated`})})};var lt={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`};function ut(e){return e.usage(`$0 images variants get <variant-id>
|
|
68
|
+
|
|
69
|
+
Fetch details for a CF Images variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dt={command:`get <variant-id>`,describe:`Variant details`,builder:ut,handler:async e=>u({command:`images variants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(lt,{account_id:a,variant_id:e[`variant-id`]}));s(u,{successLabel:`Loaded`})})};var ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/variants`};function pt(e){return e.usage(`$0 images variants list
|
|
70
|
+
|
|
71
|
+
List existing CF Images variants.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`list`,describe:`List variants`,builder:pt,handler:async e=>u({command:`images variants list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images variants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ft,{account_id:a}));s(u,{successLabel:`Loaded`})})},ht={command:`variants`,describe:`Manage named resize variants for transforming images on delivery`,builder:e=>e.command(rt).command(ot).command(ct).command(dt).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gt={command:`images`,describe:`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,builder:e=>e.command(te).command(ie).command(S).command(T).command(L).command(P).command($e).command(nt).command(M).command(Be).command(Xe).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{gt as default};
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./src-
|
|
2
|
+
import{n as e,r as t,t as n}from"./src-BguQDHjS.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./src-
|
|
2
|
+
import"./src-BguQDHjS.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n,z as r}from"./dist-DZRTPMMA.mjs";import{i,n as a,t as o}from"./autoconfig-B0ESZ8DJ.mjs";import{n as s}from"./version-CVlh2Zaq.mjs";import{n as c}from"./delegate-Tgfxa-MZ.mjs";import{t as l}from"./project-settings-nBMEx1f-.mjs";import"./ui-BtIBQeaG.mjs";import{n as u}from"./dist-uRuGmkMB.mjs";import{t as d}from"./progress-R-1tIuep.mjs";import{n as f}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as p,r as m}from"./dialog-D4Y9ocuF.mjs";import{basename as h,dirname as g,isAbsolute as _,join as v,relative as y,resolve as b}from"node:path";import{mkdir as x,readdir as S,stat as C,writeFile as w}from"node:fs/promises";const T={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function ee(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":te()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function te(){return`# Approve build scripts needed by the generated Worker's dependencies.
|
|
3
3
|
allowBuilds:
|
|
4
4
|
esbuild: true
|
|
5
5
|
workerd: true
|
|
@@ -39,5 +39,5 @@ dist/
|
|
|
39
39
|
!.env.example
|
|
40
40
|
*.log
|
|
41
41
|
.DS_Store
|
|
42
|
-
`}const N=[`npm`,`pnpm`,`yarn`,`bun`],P=[`install`,`package-manager`],F=/* @__PURE__ */ new Set([`.git`]);function I(e){return e.positional(`directory`,{type:`string`,describe:`Directory to initialize; created when missing (prompts when omitted; use . for the current directory)`}).option(`install`,{type:`boolean`,default:!0,describe:`Install dependencies after creating a new project (use --no-install to skip)`}).option(`package-manager`,{type:`string`,choices:N,describe:`Package manager for a new project (prompts when interactive)`})}async function L(e){let t=b(e.directory??await R());if(await H(t)===`not-empty`){await K(t,e);return}await U(t,e)}async function R(){return(await p(`Which directory do you want to initialize?`,{defaultValue:`.`,placeholder:`. (the current directory)`,fallbackError:`Pass the directory to initialize, for example ${e.code(`cf init my-worker`)}, or ${e.code(`cf init .`)} for the current directory.`})).trim()||`.`}function z(e){return{directory:e.directory,install:e.install??!0,packageManager:V(e.packageManager),mode:e.mode}}function B(e=process.env.npm_config_user_agent){return V(e?.split(`/`,1)[0])}function V(e){return N.find(t=>t===e)}async function H(e){let t;try{t=(await C(e)).isDirectory()}catch(e){if(ne(e)&&e.code===`ENOENT`)return`missing`;throw e}if(!t)throw Error(`Cannot initialize ${Z(e)} because it is not a directory.`);return(await S(e)).every(e=>F.has(e))?`empty`:`not-empty`}async function U(a,o){u.info(`Creating a new Worker in ${e.bold(a)}`,{spacing:0});let c=await G(o),l=
|
|
42
|
+
`}const N=[`npm`,`pnpm`,`yarn`,`bun`],P=[`install`,`package-manager`],F=/* @__PURE__ */ new Set([`.git`]);function I(e){return e.positional(`directory`,{type:`string`,describe:`Directory to initialize; created when missing (prompts when omitted; use . for the current directory)`}).option(`install`,{type:`boolean`,default:!0,describe:`Install dependencies after creating a new project (use --no-install to skip)`}).option(`package-manager`,{type:`string`,choices:N,describe:`Package manager for a new project (prompts when interactive)`})}async function L(e){let t=b(e.directory??await R());if(await H(t)===`not-empty`){await K(t,e);return}await U(t,e)}async function R(){return(await p(`Which directory do you want to initialize?`,{defaultValue:`.`,placeholder:`. (the current directory)`,fallbackError:`Pass the directory to initialize, for example ${e.code(`cf init my-worker`)}, or ${e.code(`cf init .`)} for the current directory.`})).trim()||`.`}function z(e){return{directory:e.directory,install:e.install??!0,packageManager:V(e.packageManager),mode:e.mode}}function B(e=process.env.npm_config_user_agent){return V(e?.split(`/`,1)[0])}function V(e){return N.find(t=>t===e)}async function H(e){let t;try{t=(await C(e)).isDirectory()}catch(e){if(ne(e)&&e.code===`ENOENT`)return`missing`;throw e}if(!t)throw Error(`Cannot initialize ${Z(e)} because it is not a directory.`);return(await S(e)).every(e=>F.has(e))?`empty`:`not-empty`}async function U(a,o){u.info(`Creating a new Worker in ${e.bold(a)}`,{spacing:0});let c=await G(o),l=r(h(a).toLowerCase().replace(/\s+/g,`-`)).replace(/-+$/,``),d=ee({name:l,compatibilityDate:n,cfVersion:s,packageManager:c});for(let[e,t]of Object.entries(d)){let n=v(a,e);await x(g(n),{recursive:!0}),await w(n,t,{flag:`wx`})}if(u.success(`Created the ${e.bold(l)} Worker in ${Z(a)}`,{spacing:0}),o.install){let n=`${c} install`,r=await i(n,a);if(r.exitCode!==0||r.signal)throw u.error(`Dependency installation failed. Run ${e.code(n)} in ${Z(a)} to try again.`,{spacing:0}),new t(r.exitCode,{signal:r.signal});await W(a,o.mode)}Y(a,[...o.install?[]:[{command:`${c} install`,description:`Install dependencies`}],...J()])}async function W(t,n){try{let{generateWorkerTypes:e}=await import(`./generate-D80-1GnZ.mjs`),r=await d(`Generating types`,()=>e({configPath:v(t,l),mode:n,includeRuntime:!0}));u.success(`Generated types in ${Z(r)}`,{spacing:0})}catch(n){let r=n instanceof Error?n.message:String(n);u.warn(`Could not generate types: ${r}\nRun ${e.code(`${q()} workers types`)} in ${Z(t)} to try again.`,{spacing:0})}}async function G(e){if(e.packageManager)return e.packageManager;let t=B()??`npm`;return e.install?m(`Which package manager do you want to use?`,{choices:N.map(e=>({title:e,value:e})),defaultOption:N.indexOf(t)}):t}async function K(t,n){let r=Z(t);u.info(`Setting up the existing project in ${e.bold(t)}`,{spacing:0}),(!n.install||n.packageManager)&&u.warn(`${e.code(`--no-install`)} and ${e.code(`--package-manager`)} only apply when creating a new project. Setting up an existing project uses its own package manager.`,{spacing:0});let i=process.cwd();process.chdir(t);let s=!1;try{let n=await o(t);if(!n)throw Error(`cf could not detect a project to set up in ${r}, and the directory is not empty.\nRun ${e.code(`cf init`)} in an empty directory, or pass a new directory name (for example, ${e.code(`cf init my-worker`)}).`);s=n.configured,s||await a(n)}finally{process.chdir(i)}s?u.info(`Found an existing Cloudflare configuration in ${r}.`,{spacing:0}):u.success(`Set up ${r} for Cloudflare.`,{spacing:0}),Y(t,J())}function q(){return c()?`npx cf`:`cf`}function J(){let e=q();return[{command:`${e} dev`,description:`Start a local development server`},{command:`${e} deploy`,description:`Deploy to Cloudflare`}]}function Y(t,n){let r=[...X(t).map(e=>({command:e})),...n],i=Math.max(...r.filter(e=>e.description).map(e=>e.command.length)),a=r.map(({command:t,description:n})=>n?` ${e.code(t)}${` `.repeat(i-t.length+2)}${e.muted(n)}`:` ${e.code(t)}`);u.message([e.bold(`Next steps`),...a].join(`
|
|
43
43
|
`),{symbol:e.muted(`├`)})}function X(e){let t=y(process.cwd(),e);if(t===``)return[];let n=Q(t)?e:t;return[`cd ${/\s/.test(n)?JSON.stringify(n):n}`]}function Z(e){let t=y(process.cwd(),e);return t===``?`the current directory`:Q(t)?e:t}function Q(e){return e.startsWith(`..`)||_(e)}function ne(e){return e instanceof Error&&`code`in e}const $={command:`workers [directory]`,describe:`Create a new Workers project or set up an existing one`,builder:I,handler:async e=>{await L(z(e))}},re={command:`init [directory]`,describe:`Create a new Cloudflare project or set up an existing one`,builder:e=>I(e).command(f({...$,describe:`${$.describe} [default]`},{command:`init workers`,classification:{safeFlags:P}})).epilogue(`Running cf init without a subcommand runs cf init workers. An empty directory, or one containing only .git, receives a new hello-world Worker. A directory with other files is set up with autoconfig instead. When no directory is given, cf asks for one; non-interactive runs must pass it. Use ./workers to initialize a directory named workers.`),handler:async e=>{await L(z(e))}};export{re as default};
|