cf 1.0.0-beta.11 → 1.0.0-beta.12
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/bin/cf +1 -1
- package/dist/abuse-reports-Cy9RcWPu.mjs +24 -0
- package/dist/{access-DuHs0Mii.mjs → access-DwJm1qet.mjs} +1 -1
- package/dist/account-tags-d0RkEw6s.mjs +15 -0
- package/dist/{accounts-DfXSHrkF.mjs → accounts-BSd4b-1j.mjs} +63 -63
- package/dist/{acm-BgSr3Ig4.mjs → acm-BfI0p2sX.mjs} +7 -7
- package/dist/addressing-lfeJf7YB.mjs +93 -0
- package/dist/agent-context-DFEgYjEQ.mjs +2 -0
- package/dist/agent-memory-CP1qpn-y.mjs +34 -0
- package/dist/{ai-audit-Bn_BfMFS.mjs → ai-audit-B_tSl78A.mjs} +3 -3
- package/dist/ai-gateway-CJaUlfGc.mjs +82 -0
- package/dist/ai-jFzFBANM.mjs +29 -0
- package/dist/{ai-search-C4YWVTCa.mjs → ai-search-PTlpY1T9.mjs} +42 -42
- package/dist/ai-security-CKGE547U.mjs +10 -0
- package/dist/alerting-CuxoqG3S.mjs +56 -0
- package/dist/analytics-NPND7aHB.mjs +20 -0
- package/dist/analytics_engine-BoapM9wd.mjs +4 -0
- package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
- package/dist/{api-security-gB1FHrHq.mjs → api-security-Nk_bg-Kg.mjs} +57 -57
- package/dist/{argo-wFCAsYx7.mjs → argo-DYfLQhd2.mjs} +5 -5
- package/dist/artifacts-BS6cEqCB.mjs +43 -0
- package/dist/{audit-logs-CpPUjMUP.mjs → audit-logs-x5tLqeX2.mjs} +2 -2
- package/dist/auth-AobvBmz4.mjs +2 -0
- package/dist/auth-CBtzZ3Sw.mjs +2 -0
- package/dist/{auth-7Fk7PVIC.mjs → auth-CKotxfap.mjs} +1 -1
- package/dist/{auth-token-DeG33BMQ.mjs → auth-token-CtguMdmF.mjs} +1 -1
- package/dist/autoconfig-PfnbLuEO.mjs +532 -0
- package/dist/{banner-Xk4xBN8U.mjs → banner-D03JEqRs.mjs} +1 -1
- package/dist/basin-catalog-Ddi-t3q9.mjs +46 -0
- package/dist/billing-CDMc4tvX.mjs +23 -0
- package/dist/bot-management-UrCM3P8K.mjs +9 -0
- package/dist/botnet-feed-CVwRm42k.mjs +11 -0
- package/dist/brand-protection-DfNf5REj.mjs +27 -0
- package/dist/browser-run-DVaiBLYX.mjs +46 -0
- package/dist/build-BKPVP5ip.mjs +2 -0
- package/dist/build-C4giET85.mjs +2 -0
- package/dist/builds-BG5DHqU3.mjs +71 -0
- package/dist/cache-C05hHXUp.mjs +45 -0
- package/dist/{certificate-authorities-NUQzCDK8.mjs → certificate-authorities-DyCFmZwR.mjs} +3 -3
- package/dist/cf-B9aqZZKD.mjs +18 -0
- package/dist/chunk-AUSY7DKT-BJX6Fdc4.mjs +312 -0
- package/dist/chunk-FT2NMTJB-DQ7s3x7Q.mjs +361 -0
- package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +2 -0
- package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
- package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
- package/dist/{cli-aChy8ou_.mjs → cli-D9qlPB-6.mjs} +1 -1
- package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
- package/dist/{client-certificates-qgLpBn8t.mjs → client-certificates-B-m8rfM9.mjs} +6 -6
- package/dist/{client-side-security-DZO6Xw14.mjs → client-side-security-M4oIUqID.mjs} +14 -14
- package/dist/{cloud-connector-C7vGDCzX.mjs → cloud-connector-B63Dwn6n.mjs} +3 -3
- package/dist/cloudflared-B48cfu95.mjs +2 -0
- package/dist/cloudforce-one-Dlc1GNFy.mjs +447 -0
- package/dist/{command-07vhr56i.mjs → command-BQpXcGKV.mjs} +1 -1
- package/dist/{command-Cdx___59.mjs → command-BWlpCtHe.mjs} +1 -1
- package/dist/{command-CrtDkZNs.mjs → command-BlGILcTA.mjs} +1 -1
- package/dist/{command-eM48o0J6.mjs → command-CKQlxypn.mjs} +1 -1
- package/dist/{command-D0MKPucK.mjs → command-CRl00uA2.mjs} +1 -1
- package/dist/{command-Ds5OVat3.mjs → command-CUkXxZsc.mjs} +1 -1
- package/dist/command-CXxh5Hce.mjs +2 -0
- package/dist/{command-BWC9CbE7.mjs → command-CzvlHvov.mjs} +1 -1
- package/dist/{command-B6TpINoN.mjs → command-DBaNgfA4.mjs} +1 -1
- package/dist/{command-C2pNxAeL.mjs → command-DEQSv-S1.mjs} +1 -1
- package/dist/{command-Dv6YavZa.mjs → command-DyE8v4sd.mjs} +1 -1
- package/dist/command-Rv2MR-eh.mjs +2 -0
- package/dist/{command-BsmF3J_l.mjs → command-SS1z_t68.mjs} +1 -1
- package/dist/{command-maDJWJgu.mjs → command-VuxpEvmH.mjs} +1 -1
- package/dist/{command-dAYWrB5y.mjs → command-ZBQ1WITj.mjs} +1 -1
- package/dist/{completions-D0280hul.mjs → completions-lf50FBGm.mjs} +2 -2
- package/dist/connector-interrupts-DHN1KtUE.mjs +6 -0
- package/dist/connector-telemetry-events-CHg7FmXh.mjs +6 -0
- package/dist/connector-telemetry-snapshots-CSifYi9r.mjs +6 -0
- package/dist/connectors-0UwPUav-.mjs +15 -0
- package/dist/containers-DRzgE46U.mjs +375 -0
- package/dist/containers-DuIsM7lM.mjs +78 -0
- package/dist/{content-scan-BCtWBCqd.mjs → content-scan-COyTz0Wb.mjs} +7 -7
- package/dist/{context-CquYYyS3.mjs → context-Bwkz4Lm_.mjs} +2 -2
- package/dist/{cps-C8BbnbuD.mjs → cps-B7_BJaAU.mjs} +3 -3
- package/dist/{csamScanner-CsJ9H2fA.mjs → csamScanner-jez2EYXC.mjs} +3 -3
- package/dist/ct-alerting-CACDrY0E.mjs +5 -0
- package/dist/{custom-certificates-CA8HqolM.mjs → custom-certificates-BBd92YlF.mjs} +7 -7
- package/dist/{custom-csrs-D0P2vWJE.mjs → custom-csrs-DTwBiNMX.mjs} +5 -5
- package/dist/{custom-hostnames-CzYMChbh.mjs → custom-hostnames-DIWlqvN9.mjs} +12 -12
- package/dist/{custom-nameservers-Cet3oF56.mjs → custom-nameservers-DISy8v8u.mjs} +5 -5
- package/dist/{custom-pages-DUkHIaTP.mjs → custom-pages-BHXO_NFv.mjs} +10 -10
- package/dist/d1-MvAQMvvo.mjs +89 -0
- package/dist/{dcv-delegation-BkdRVEAH.mjs → dcv-delegation-Buq0hcm_.mjs} +2 -2
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BdWBEbLj.mjs → deploy-BS47vZvJ.mjs} +1 -1
- package/dist/deploy-context-Cfushp8j.mjs +56 -0
- package/dist/{deploy-input-LmLfj6kI.mjs → deploy-input-BAhS5LYx.mjs} +1 -1
- package/dist/{dev-BHkVwAea.mjs → dev-D8FGPKRt.mjs} +2 -2
- package/dist/diagnostics-ChDfJ-Gv.mjs +15 -0
- package/dist/{dialog-Dpi-UVbz.mjs → dialog-CL1Zy4pn.mjs} +1 -1
- package/dist/discover-DIDEGKo3.mjs +2 -0
- package/dist/discover-P20XeGBF.mjs +2 -0
- package/dist/{dist-Cpb7_h4N.mjs → dist-8rP3V95o.mjs} +5 -5
- package/dist/dist-CYFkGHYv.mjs +487 -0
- package/dist/dls-8D00tqvC.mjs +17 -0
- package/dist/{dns-BLNa0GrP.mjs → dns-C-A5pwf3.mjs} +63 -63
- package/dist/{dns-firewall-ChCvC5rT.mjs → dns-firewall-DIiF4pro.mjs} +9 -9
- package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
- package/dist/dotenv-DpXaxfho.mjs +4 -0
- package/dist/dry-run-DmsbOMF1.mjs +2 -0
- package/dist/durable-objects-CnIqbj84.mjs +6 -0
- package/dist/{email-auth-C28s03aI.mjs → email-auth-v97Md32E.mjs} +3 -3
- package/dist/{email-routing-Ci-xjXIN.mjs → email-routing-I29RG4hb.mjs} +22 -22
- package/dist/{email-security-DPU6xvI9.mjs → email-security-BCarmbky.mjs} +86 -86
- package/dist/{email-sending-kTVAlVKO.mjs → email-sending-CsHk2HAJ.mjs} +22 -22
- package/dist/error-sanitization-BWnGnB73.mjs +2 -0
- package/dist/error-sanitization-C_a2LxOK.mjs +2 -0
- package/dist/fieldExtractors-GIVe9jZa.mjs +9 -0
- package/dist/{firewall-BND3qSY2.mjs → firewall-DpgFqJr3.mjs} +16 -16
- package/dist/flagship-BVaXXlsX.mjs +28 -0
- package/dist/{fraud-DgyYv_CC.mjs → fraud-B5GQdEF2.mjs} +3 -3
- package/dist/{generate-VxmGG8BF.mjs → generate-CeeWW3eX.mjs} +1 -1
- package/dist/generate-D80-1GnZ.mjs +2 -0
- package/dist/{google-tag-gateway-v3p7murv.mjs → google-tag-gateway-C4O61lp-.mjs} +3 -3
- package/dist/gt-3bcLGJ7V.mjs +3 -0
- package/dist/{healthchecks-CByb4qYA.mjs → healthchecks-BwYMnKSF.mjs} +10 -10
- package/dist/{hostnames-3CqeMF5g.mjs → hostnames-DhrGRFeI.mjs} +5 -5
- package/dist/{hyperdrive-CmyYTE-K.mjs → hyperdrive-DAA8Fazg.mjs} +10 -10
- package/dist/iam-sRKDU2Z3.mjs +52 -0
- package/dist/images-DXdekLVs.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/init-j47MT4Qe.mjs +39 -0
- package/dist/intel-CnVeSjIS.mjs +76 -0
- package/dist/interactive-Dqv0RWVU.mjs +42 -0
- package/dist/interactive-Wpd3FcDc.mjs +2 -0
- package/dist/{ips-WWvPwSBc.mjs → ips-COCUG8mk.mjs} +2 -2
- package/dist/k2-CmHkArHL.mjs +13 -0
- package/dist/{keyless-certificates-DqILy3t9.mjs → keyless-certificates-l2_S__h3.mjs} +6 -6
- package/dist/keys-CDZreums.mjs +4 -0
- package/dist/kv-DkpKVimq.mjs +15 -0
- package/dist/{lazy-command--5YpWUVY.mjs → lazy-command-_vZGz6mv.mjs} +1 -1
- package/dist/{leaked-credential-checks-C0U1oYM5.mjs → leaked-credential-checks-edbapECI.mjs} +8 -8
- package/dist/lifecycle-oud60haK.mjs +2 -0
- package/dist/{load-balancers-BJKI9lm7.mjs → load-balancers-C5YMvhXD.mjs} +40 -40
- package/dist/{local-rYpzEQb-.mjs → local-C0lQ9sTg.mjs} +1 -1
- package/dist/local-D5L5Bwju.mjs +2 -0
- package/dist/{local-runtime-DZTTIe6x.mjs → local-runtime-DtnWXN0a.mjs} +1 -1
- package/dist/{login-bnylLTit.mjs → login-BrjOuHKu.mjs} +1 -1
- package/dist/login-DeOM4v0L.mjs +2 -0
- package/dist/logo-matches-CF8321pb.mjs +6 -0
- package/dist/logos-Bd8xNRKW.mjs +7 -0
- package/dist/logpush-BYk3qqwY.mjs +46 -0
- package/dist/{logs-c3b3USyS.mjs → logs-Jcj2NN8H.mjs} +11 -11
- package/dist/magic-cloud-networking-Dgdb9H0f.mjs +71 -0
- package/dist/magic-network-monitoring-CxVU4MZB.mjs +36 -0
- package/dist/magic-transit-KDyfUgTv.mjs +383 -0
- package/dist/managed-defense-CxaDeNUd.mjs +18 -0
- package/dist/{managed-transforms-DcYAvqTe.mjs → managed-transforms-C7rT5E-x.mjs} +4 -4
- package/dist/{matches-hnU16rSJ.mjs → matches-BtKqG8T9.mjs} +3 -3
- package/dist/{mcp-kZX4irfN.mjs → mcp-QDd1Iyc0.mjs} +17 -17
- package/dist/mesh-DtrIzl5z.mjs +26 -0
- package/dist/metadata-Df5kCWJv.mjs +2 -0
- package/dist/{migrate-BNvUWrjy.mjs → migrate-DHlfR_gZ.mjs} +1 -1
- package/dist/{monetization-Dsqj9DCA.mjs → monetization-pLalYYMI.mjs} +9 -9
- package/dist/mtls-certificates-DYA9Wu-c.mjs +13 -0
- package/dist/network-DrJxPWXQ.mjs +50 -0
- package/dist/{network-interconnects-osO_vAPu.mjs → network-interconnects-D73MlYG8.mjs} +19 -19
- package/dist/{oauth-CeZ3d_dB.mjs → oauth-B08YQ4xq.mjs} +1 -1
- package/dist/{oauth-w0fWmrwU.mjs → oauth-TGbM1Q0V.mjs} +1 -1
- package/dist/oauth-clients-CkPDLFd-.mjs +16 -0
- package/dist/{oauth-scopes-CxpRD6d7.mjs → oauth-scopes-VgliqcQe.mjs} +2 -2
- package/dist/{observability-BxL2RqWZ.mjs → observability-CvN9oxAo.mjs} +42 -42
- package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
- package/dist/{organization-DNieJ1xJ.mjs → organization-DIwqRBBV.mjs} +16 -16
- package/dist/{organizations-BIXPmTy5.mjs → organizations-Dk0D9ukm.mjs} +2 -2
- package/dist/{origin-ca-certificates-dVJvSIH8.mjs → origin-ca-certificates-BSFqMTn-.mjs} +5 -5
- package/dist/{origin-post-quantum-encryption-CO6tDW1t.mjs → origin-post-quantum-encryption-BOKWKDTY.mjs} +3 -3
- package/dist/{origin-tls-client-auth-DeTY8aN2.mjs → origin-tls-client-auth-BzE3WpcN.mjs} +14 -14
- package/dist/output-BGqhvqe2.mjs +2 -0
- package/dist/{page-rules-DA552Ra4.mjs → page-rules-BKaU37cM.mjs} +7 -7
- package/dist/pages-2Xg-lrMf.mjs +54 -0
- package/dist/{pay-per-crawl-DoTg9VP7.mjs → pay-per-crawl-5-KTQXRr.mjs} +33 -33
- package/dist/pay-per-use-sGebKzNK.mjs +6 -0
- package/dist/pipelines-BM-T7mMK.mjs +44 -0
- package/dist/precursor-DmQ32-Sp.mjs +4 -0
- package/dist/previews-DDQ9ACDJ.mjs +4 -0
- package/dist/{progress-TLUEIYE6.mjs → progress-BYVZuEcG.mjs} +1 -1
- package/dist/{prompt-Ck_1PCHm.mjs → prompt-F5wxc8zq.mjs} +1 -1
- package/dist/queries-DPBkVynK.mjs +9 -0
- package/dist/queues-CCXRs98q.mjs +57 -0
- package/dist/r2-BKuBSW8h.mjs +125 -0
- package/dist/{radar-Bez6k9Dw.mjs → radar-Gv1yFoRX.mjs} +150 -150
- package/dist/{raw-fetch-DNxNCoeP.mjs → raw-fetch-DyYWa923.mjs} +1 -1
- package/dist/realtime-CVl-rvgx.mjs +172 -0
- package/dist/registrar-sandbox-cmOYDnkp.mjs +56 -0
- package/dist/registrar-swlnh22i.mjs +43 -0
- package/dist/{registry-CsSLAAOE.mjs → registry-C20J1MW0.mjs} +1 -1
- package/dist/reporting-Bgwsvol1.mjs +14 -0
- package/dist/request-headers-CUee83pa.mjs +2 -0
- package/dist/request-tracers-BBiJvVDz.mjs +4 -0
- package/dist/resolve-DvxgnWjL.mjs +2 -0
- package/dist/resolve-qwL1LmKN.mjs +2 -0
- package/dist/resource-sharing-C1JiYLbl.mjs +40 -0
- package/dist/resource-tagging-C9VOSlDR.mjs +4 -0
- package/dist/rules-BDunCGMj.mjs +18 -0
- package/dist/{rulesets-RJ6yBefy.mjs → rulesets-BMGxrnv9.mjs} +17 -17
- package/dist/rum-B7XiECe9.mjs +30 -0
- package/dist/run-CrZgB8L_.mjs +2 -0
- package/dist/run-nNxXb_Cv.mjs +2 -0
- package/dist/schema-DC0kdqgV.mjs +2 -0
- package/dist/schema-flags-BUZR9SLd.mjs +5 -0
- package/dist/scim-CORcs2wK.mjs +18 -0
- package/dist/secrets-store-BoZQaFey.mjs +24 -0
- package/dist/{security-insights-DVAqroY5.mjs → security-insights-DblK_6sg.mjs} +20 -20
- package/dist/{security-txt-rfrrdiZV.mjs → security-txt-Dl7RPnRb.mjs} +4 -4
- package/dist/{session-B6mFkaVZ.mjs → session-BWe9et4K.mjs} +1 -1
- package/dist/shared-0N31BXkY.mjs +2 -0
- package/dist/{smart-shield-_HA814Im.mjs → smart-shield-DX0-8ruu.mjs} +11 -11
- package/dist/{snippets-mRelEw0p.mjs → snippets-BFN-Lg3K.mjs} +8 -8
- package/dist/source-mXUcrTVw.mjs +6 -0
- package/dist/spawn-DZ9A-xXb.mjs +10 -0
- package/dist/{spectrum-BwtOiaDw.mjs → spectrum-HYWLWB0X.mjs} +11 -11
- package/dist/{speed-DmqsZtiJ.mjs → speed-Dj0YhfRe.mjs} +11 -11
- package/dist/src-CAiZlihY.mjs +117 -0
- package/dist/{ssl-DCvfveJB.mjs → ssl-BQL1fNtD.mjs} +16 -16
- package/dist/startup-profile-0X5ebbng.mjs +29 -0
- package/dist/startup-profile-CXnsF4c7.mjs +2 -0
- package/dist/state-BA2CanJ_.mjs +2 -0
- package/dist/{state-BPwdiNO_.mjs → state-Dy6-rKNd.mjs} +1 -1
- package/dist/stream-DKv2TtZN.mjs +102 -0
- package/dist/submit-Byt2KBGI.mjs +4 -0
- package/dist/{tags-Djw0e-4j.mjs → tags-BIBsdG68.mjs} +2 -2
- package/dist/telemetry-DBXOMuLh.mjs +2 -0
- package/dist/{telemetry-DrFNujdx.mjs → telemetry-bu3txnIR.mjs} +1 -1
- package/dist/{tenant-tc1wb_ym.mjs → tenant-Bs4Ac4n3.mjs} +5 -5
- package/dist/{tenant-custom-nameservers-XCbXryBZ.mjs → tenant-custom-nameservers-DcaELeCE.mjs} +4 -4
- package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
- package/dist/{tools-CB4NleeJ.mjs → tools-BbTX7rlM.mjs} +1 -1
- package/dist/tunnels-DWcrz9Sf.mjs +29 -0
- package/dist/turnstile-2MIGp2ce.mjs +33 -0
- package/dist/{ui-D1hhIDIs.mjs → ui-YmjF66Ct.mjs} +1 -1
- package/dist/update-check-B-CvDAUz.mjs +2 -0
- package/dist/update-check-CfB0PNTY.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-B8udoxlx.mjs +4 -0
- package/dist/{url-normalization-Dbypc9wz.mjs → url-normalization-C6AdWtaE.mjs} +4 -4
- package/dist/url-scanner-Dg0c_yVb.mjs +16 -0
- package/dist/{user-3uwLMH78.mjs → user-BLZ-0Bgv.mjs} +51 -51
- package/dist/values-BUK-m0Jg.mjs +4 -0
- package/dist/vectorize-DEUSEQXY.mjs +32 -0
- package/dist/version-BZNc7Y3t.mjs +2 -0
- package/dist/waiting-rooms-BycGk2Y0.mjs +53 -0
- package/dist/{web-assets-BfEprX1S.mjs → web-assets-CLZdWOmN.mjs} +30 -30
- package/dist/{web3-DNbp5sZw.mjs → web3-DjeavuLg.mjs} +13 -13
- package/dist/workers-C_SfyU-v.mjs +38 -0
- package/dist/workers-builds-COn5Ne5G.mjs +14 -0
- package/dist/workers-for-platforms-tchCXwNF.mjs +42 -0
- package/dist/{workers-vpc-LVfayM2-.mjs → workers-vpc-CKts8Av0.mjs} +7 -7
- package/dist/workflows-BibtWuOx.mjs +43 -0
- package/dist/{wrangler-migration-B0mKHqGd.mjs → wrangler-migration-BpJqCFAa.mjs} +1 -1
- package/dist/{zaraz-BY60ZUQ4.mjs → zaraz-BvQZB0YY.mjs} +11 -11
- package/dist/{zero-trust-CQNohO7_.mjs → zero-trust-FStq4uhn.mjs} +411 -411
- package/dist/{zone-BVDW2UGd.mjs → zone-tymlghWb.mjs} +2 -2
- package/dist/{zones-CcZL0YQp.mjs → zones-Bz6dgT9_.mjs} +43 -43
- package/package.json +20 -21
- package/dist/abuse-reports-DX5xgeka.mjs +0 -24
- package/dist/account-tags-CiKwgOWd.mjs +0 -15
- package/dist/addressing-B70NFnrX.mjs +0 -93
- package/dist/agent-context-GRiQ4zRU.mjs +0 -2
- package/dist/agent-memory-DJRquHeq.mjs +0 -34
- package/dist/ai-CP2oIS-I.mjs +0 -29
- package/dist/ai-gateway-CrrEtzUP.mjs +0 -82
- package/dist/ai-security-Bt_fG65f.mjs +0 -10
- package/dist/alerting-CRr88fVR.mjs +0 -56
- package/dist/analytics-XqS9OP5B.mjs +0 -20
- package/dist/analytics_engine-CzmYem4f.mjs +0 -4
- package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
- package/dist/artifacts-qFjlNRqb.mjs +0 -43
- package/dist/auth-BmJ946bE.mjs +0 -2
- package/dist/auth-Br-t8vL_.mjs +0 -2
- package/dist/autoconfig-D-copdZG.mjs +0 -511
- package/dist/basin-catalog-CshcpsAH.mjs +0 -46
- package/dist/billing-B-xNxxiP.mjs +0 -23
- package/dist/bot-management-DhafeA2J.mjs +0 -9
- package/dist/botnet-feed-D6uCLE_D.mjs +0 -11
- package/dist/brand-protection-c3WiHbYn.mjs +0 -27
- package/dist/browser-run-D9_cwaSD.mjs +0 -46
- package/dist/build-9ihDp-Gy.mjs +0 -2
- package/dist/build-DrG6TqMw.mjs +0 -2
- package/dist/builds-Dl8if-2k.mjs +0 -71
- package/dist/cache-CIZokBjd.mjs +0 -45
- package/dist/cf-DfQfIu3q.mjs +0 -18
- package/dist/chunk-FT2NMTJB-BFqlGcem.mjs +0 -97
- package/dist/chunk-KKDV4JPS-B_t8sDTz.mjs +0 -2
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
- package/dist/chunk-WMOON6TZ-B8xCqjB1.mjs +0 -2
- package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
- package/dist/cloudflared-CEfZhSQH.mjs +0 -2
- package/dist/cloudforce-one-CE7y5UkF.mjs +0 -447
- package/dist/command-C65Ed0o9.mjs +0 -2
- package/dist/command-DHdWKtqx.mjs +0 -2
- package/dist/connector-interrupts-CVjFhU-C.mjs +0 -6
- package/dist/connector-telemetry-events-Bu3LKP6T.mjs +0 -6
- package/dist/connector-telemetry-snapshots-BbDTIc06.mjs +0 -6
- package/dist/connectors-DGtx-rPI.mjs +0 -15
- package/dist/containers-CzNbBrYE.mjs +0 -239
- package/dist/containers-DEFrbNgO.mjs +0 -78
- package/dist/ct-alerting-CYsQZO2H.mjs +0 -5
- package/dist/d1-B2duXfH2.mjs +0 -41
- package/dist/diagnostics-9Wj5UWBL.mjs +0 -15
- package/dist/discover-BYkHr5Ja.mjs +0 -2
- package/dist/discover-t6E9lpf3.mjs +0 -2
- package/dist/dist-D1iG7guo.mjs +0 -366
- package/dist/dist-zep5OXGt.mjs +0 -48
- package/dist/dls-Caya7FZc.mjs +0 -17
- package/dist/dot-prop-IITUZ2XW-BsZYdILY.mjs +0 -2
- package/dist/dotenv-CcQjGlV0.mjs +0 -4
- package/dist/dry-run-p9Q7nMZ5.mjs +0 -2
- package/dist/durable-objects-DuRbdp7N.mjs +0 -6
- package/dist/error-sanitization-BbEw--0B.mjs +0 -2
- package/dist/error-sanitization-p5rmb53x.mjs +0 -2
- package/dist/fieldExtractors-ceaXu4zD.mjs +0 -9
- package/dist/flagship-DfxbNzgx.mjs +0 -28
- package/dist/generate-9P8Q_RiO.mjs +0 -2
- package/dist/gt-KlYHH-UC.mjs +0 -2
- package/dist/iam-CV_M681j.mjs +0 -52
- package/dist/images-DaLPjskW.mjs +0 -71
- package/dist/init-CBKifk5L.mjs +0 -39
- package/dist/intel-MpftjuPB.mjs +0 -76
- package/dist/interactive-D80kbTap.mjs +0 -32
- package/dist/interactive-mJQ_IrGd.mjs +0 -2
- package/dist/k2-D0QYUFqT.mjs +0 -13
- package/dist/keys-DhX4AcqF.mjs +0 -4
- package/dist/kv-DLUfUL0_.mjs +0 -15
- package/dist/lifecycle-Cyc3fmyN.mjs +0 -2
- package/dist/local-DkYQiSQQ.mjs +0 -2
- package/dist/login-CnE2Ii_F.mjs +0 -2
- package/dist/logo-matches-DFZybI0C.mjs +0 -6
- package/dist/logos-Da2YtqSN.mjs +0 -7
- package/dist/logpush-Q7WIEHS1.mjs +0 -46
- package/dist/magic-cloud-networking-BoyDmFq3.mjs +0 -71
- package/dist/magic-network-monitoring-BkUbpMUp.mjs +0 -36
- package/dist/magic-transit-4-THD45G.mjs +0 -383
- package/dist/managed-defense-CTMqSp6z.mjs +0 -18
- package/dist/mesh-Dxzvvso6.mjs +0 -26
- package/dist/metadata-C33s4rc-.mjs +0 -2
- package/dist/mtls-certificates-BSbMwIna.mjs +0 -13
- package/dist/network-mEnXTEiG.mjs +0 -50
- package/dist/oauth-clients-CWPHi-Yn.mjs +0 -16
- package/dist/open-PCXX3ZDZ-C7gpxSsl.mjs +0 -4
- package/dist/output-ClYel9WX.mjs +0 -2
- package/dist/pages-B0x7tidm.mjs +0 -54
- package/dist/pay-per-use-yRO2QBfe.mjs +0 -6
- package/dist/pipelines-CQxrm9ao.mjs +0 -44
- package/dist/precursor-FiGYDRV9.mjs +0 -4
- package/dist/previews-BthBa50j.mjs +0 -4
- package/dist/queries-C0RRdol7.mjs +0 -9
- package/dist/queues-sLgvjsRP.mjs +0 -57
- package/dist/r2-C2PllL6i.mjs +0 -125
- package/dist/realtime-D-HSXznX.mjs +0 -172
- package/dist/registrar-DwHrG9QR.mjs +0 -43
- package/dist/registrar-sandbox-jNukmzQP.mjs +0 -56
- package/dist/reporting-DolhAb10.mjs +0 -14
- package/dist/request-headers-Lhj314mk.mjs +0 -2
- package/dist/request-tracers-w72hKc33.mjs +0 -4
- package/dist/resolve-CGKqk7q8.mjs +0 -2
- package/dist/resolve-Djf2xgBx.mjs +0 -2
- package/dist/resource-sharing-DTrSkqI4.mjs +0 -40
- package/dist/resource-tagging-aURR4fIJ.mjs +0 -4
- package/dist/rules-C8a7cV-W.mjs +0 -18
- package/dist/rum-Bk1dPW4p.mjs +0 -30
- package/dist/run-BJOAPmsz.mjs +0 -2
- package/dist/run-iFM5TxtQ.mjs +0 -2
- package/dist/schema-flags-PagOq-G2.mjs +0 -5
- package/dist/schema-v7mOxMdx.mjs +0 -2
- package/dist/scim-C0FmjkkV.mjs +0 -18
- package/dist/secrets-store-cG_5RMzK.mjs +0 -24
- package/dist/shared-BqsWoApw.mjs +0 -2
- package/dist/source-38bULAR8.mjs +0 -6
- package/dist/spawn-BzPhcLJI.mjs +0 -10
- package/dist/src--KDGqL5N.mjs +0 -109
- package/dist/startup-profile-BCe9k9sR.mjs +0 -17
- package/dist/startup-profile-WrwRyMwH.mjs +0 -2
- package/dist/state-a1tTOGjm.mjs +0 -2
- package/dist/stream-aroClJeD.mjs +0 -102
- package/dist/submit-BBKhoKT8.mjs +0 -4
- package/dist/telemetry-DoBQOGRk.mjs +0 -2
- package/dist/tunnels-C2FTswb6.mjs +0 -29
- package/dist/turnstile-BV4Mdd-j.mjs +0 -33
- package/dist/update-check-CFt6cMOi.mjs +0 -2
- package/dist/update-check-Dtj9fzNe.mjs +0 -2
- package/dist/url-info-CeegsDK7.mjs +0 -4
- package/dist/url-scanner-BFXMrpJF.mjs +0 -16
- package/dist/values-BTncDc3U.mjs +0 -4
- package/dist/vectorize-CtMAtx8r.mjs +0 -32
- package/dist/version-oN1bmOgM.mjs +0 -2
- package/dist/waiting-rooms-1xDvjF13.mjs +0 -53
- package/dist/workers-DK_JgS4Y.mjs +0 -38
- package/dist/workers-builds-CdhwmmsQ.mjs +0 -14
- package/dist/workers-for-platforms-CP6IqxrK.mjs +0 -42
- package/dist/workflows-CA5K8FFb.mjs +0 -43
- /package/dist/{Page-DAgOEX17.mjs → Page-BShsqCXr.mjs} +0 -0
- /package/dist/{alerts-D3iKtzoN.mjs → alerts-BSON-vFh.mjs} +0 -0
- /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
- /package/dist/{autorag-pvRfDwne.mjs → autorag-kNrLiqDX.mjs} +0 -0
- /package/dist/{body-parser-NjzJZMOV.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
- /package/dist/{brands-DP5Ndir1.mjs → brands-bBJgbbOH.mjs} +0 -0
- /package/dist/{browser-extension-Dee2Y1qn.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
- /package/dist/{clear-qLKPlJqb.mjs → clear-BW9vLgI3.mjs} +0 -0
- /package/dist/{cli-types-_Kmwfpnp.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-_aCmWeZx.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-CffEplpV.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
- /package/dist/{delegate-CCGgla7X.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
- /package/dist/{domain-info-BQh9XapD.mjs → domain-info-BkcBcyfF.mjs} +0 -0
- /package/dist/{errors-cuuW88wR.mjs → errors-_sob7Ihu.mjs} +0 -0
- /package/dist/{health--10IShMi.mjs → health-CTaCeVyC.mjs} +0 -0
- /package/dist/{input-validation-0CeePPHp.mjs → input-validation-D7z60HJH.mjs} +0 -0
- /package/dist/{internal-BUs583vv.mjs → internal-BYS7hO8c.mjs} +0 -0
- /package/dist/{live-VCSxA0N9.mjs → live-BJE_YWE1.mjs} +0 -0
- /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-nBMEx1f-.mjs} +0 -0
- /package/dist/{r2-data-catalog-Bg7zq1IB.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
- /package/dist/{rate-limit-analytics-D3q0mGv2.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
- /package/dist/{rate-limits-BIxlBuMn.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
- /package/dist/{ready-CAgelFmC.mjs → ready-B3pLxnjc.mjs} +0 -0
- /package/dist/{recent-submissions-B3TOjNmk.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
- /package/dist/{refute-BZNkFpBB.mjs → refute-Dp3VodMn.mjs} +0 -0
- /package/dist/{scan-logo-StecHiaf.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
- /package/dist/{scan-page-B4adr-vD.mjs → scan-page-CxeudOzj.mjs} +0 -0
- /package/dist/{search-Devngw4M.mjs → search-B_P5ZTQj.mjs} +0 -0
- /package/dist/{signed-url-ChR5eXXd.mjs → signed-url-D5RwvrQq.mjs} +0 -0
- /package/dist/{submission-info-BGb81HZN.mjs → submission-info-_t78q2OE.mjs} +0 -0
- /package/dist/{total-queries-_wa6KxEl.mjs → total-queries-CPrKEciQ.mjs} +0 -0
- /package/dist/{tracked-domains-BesKGqfI.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
- /package/dist/{verify-CYM5GlPu.mjs → verify-5KcvRk-q.mjs} +0 -0
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,i as u,n as d}from"./prompt-F5wxc8zq.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";function p(e){return e.usage(`$0 web-assets discovery get
|
|
3
3
|
|
|
4
|
-
Returns the latest API operations discovered from zone traffic, rendered as OpenAPI schemas.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
4
|
+
Returns the latest API operations discovered from zone traffic, rendered as OpenAPI schemas.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get`,describe:`Export discovered API operations as OpenAPI schemas`,builder:p,handler:async o=>a({command:`web-assets discovery get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web-assets discovery get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/discovery`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.webAssets.discovery.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function ee(e){return e.usage(`$0 web-assets discovery operations bulk-edit
|
|
5
5
|
|
|
6
|
-
Updates the state of one or more discovered web and API operations.`).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 h={command:`bulk-edit`,describe:`Edit discovered web and API operations`,builder:
|
|
6
|
+
Updates the state of one or more discovered web and API operations.`).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 h={command:`bulk-edit`,describe:`Edit discovered web and API operations`,builder:ee,handler:async s=>a({command:`web-assets discovery operations bulk-edit`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web-assets discovery operations bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/discovery/operations`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.webAssets.discovery.operations.bulkEdit({body:e,zone_id:c}));n(t,{successLabel:`Updated`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function g(e){return e.usage(`$0 web-assets discovery operations edit <discovery-id>
|
|
7
7
|
|
|
8
|
-
Updates the state of a discovered web or API operation.`).positional(`discovery-id`,{type:`string`,description:`Discovery ID of a discovered operation`,demandOption:!0}).option(`state`,{type:`string`,description:"Mark state of operation in API Discovery\n * `review` - Mark operation as for review\n * `ignored` - Mark operation as ignored\n",choices:[`review`,`ignored`]}).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 _={command:`edit <discovery-id>`,describe:`Edit a discovered web or API operation`,builder:g,handler:async l=>a({command:`web-assets discovery operations edit`,classification:{safeFlags:[`state`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf web-assets discovery operations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/api_gateway/discovery/operations/${l[`discovery-id`]==null?`<discovery-id>`:encodeURIComponent(String(l[`discovery-id`]))}`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``),"discovery-id":String(l[`discovery-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({state:c(l.state,`state`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body)
|
|
8
|
+
Updates the state of a discovered web or API operation.`).positional(`discovery-id`,{type:`string`,description:`Discovery ID of a discovered operation`,demandOption:!0}).option(`state`,{type:`string`,description:"Mark state of operation in API Discovery\n * `review` - Mark operation as for review\n * `ignored` - Mark operation as ignored\n",choices:[`review`,`ignored`]}).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 _={command:`edit <discovery-id>`,describe:`Edit a discovered web or API operation`,builder:g,handler:async l=>a({command:`web-assets discovery operations edit`,classification:{safeFlags:[`state`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf web-assets discovery operations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/api_gateway/discovery/operations/${l[`discovery-id`]==null?`<discovery-id>`:encodeURIComponent(String(l[`discovery-id`]))}`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``),"discovery-id":String(l[`discovery-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({state:c(l.state,`state`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.webAssets.discovery.operations.edit({...e,zone_id:u,discovery_id:l[`discovery-id`]}));n(t,{successLabel:`Updated`});return}let d=s({state:c(l.state,`state`,`text`)}),f=await i(`Updating`,async()=>a.webAssets.discovery.operations.edit({...d,zone_id:u,discovery_id:l[`discovery-id`]}));n(f,{successLabel:`Updated`})})};function v(e){return e.usage(`$0 web-assets discovery operations get <discovery-id>
|
|
9
9
|
|
|
10
|
-
Returns a discovered web or API operation by discovery ID.`).positional(`discovery-id`,{type:`string`,description:`Discovery ID of a discovered operation`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <discovery-id>`,describe:`Get a discovered web or API operation`,builder:v,handler:async o=>a({command:`web-assets discovery operations get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web-assets discovery operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/discovery/operations/${o[`discovery-id`]==null?`<discovery-id>`:encodeURIComponent(String(o[`discovery-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"discovery-id":String(o[`discovery-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s
|
|
10
|
+
Returns a discovered web or API operation by discovery ID.`).positional(`discovery-id`,{type:`string`,description:`Discovery ID of a discovered operation`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <discovery-id>`,describe:`Get a discovered web or API operation`,builder:v,handler:async o=>a({command:`web-assets discovery operations get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web-assets discovery operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/discovery/operations/${o[`discovery-id`]==null?`<discovery-id>`:encodeURIComponent(String(o[`discovery-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"discovery-id":String(o[`discovery-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.webAssets.discovery.operations.get({zone_id:s,discovery_id:o[`discovery-id`]}));n(c,{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 web-assets discovery operations list
|
|
11
11
|
|
|
12
|
-
Returns the latest web and API operations discovered from zone traffic.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`host`,{type:`string`,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,description:`Filter results to only include the specified HTTP methods.`}).option(`endpoint`,{type:`string`,description:`Filter results to only include endpoints containing this pattern.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Field to order by`,choices:[`host`,`method`,`endpoint`,`traffic_stats.requests`,`traffic_stats.last_updated`]}).option(`diff`,{type:`boolean`,description:"When `true`, only return API Discovery results that are not saved into API Shield Endpoint Management"}).option(`origin`,{type:`string`,description:"Filter results to only include discovery results sourced from a particular discovery engine\n * `ML` - Discovered operations that were sourced using ML API Discovery\n * `SessionIdentifier` - Discovered operations that were sourced using Session Identifier API Discovery",choices:[`ML`,`SessionIdentifier`,`LabelDiscovery`]}).option(`state`,{type:`string`,description:"Filter results to only include discovery results in a particular state. States are as follows\n * `review` - Discovered operations that are not saved into API Shield Endpoint Management\n * `saved` - Discovered operations that are already saved into API Shield Endpoint Management\n * `ignored` - Discovered operations that have been marked as ignored",choices:[`review`,`saved`,`ignored`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List discovered web and API operations`,builder:f(b),handler:async o=>a({command:`web-assets discovery operations list`,classification:{safeFlags:[`direction`,`order`,`diff`,`origin`,`state`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],host:o.host,method:o.method,endpoint:o.endpoint,direction:o.direction,order:o.order,diff:o.diff,origin:o.origin,state:o.state};if(o.dryRun){r({command:`cf web-assets discovery operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/discovery/operations`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c
|
|
12
|
+
Returns the latest web and API operations discovered from zone traffic.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`host`,{type:`string`,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,description:`Filter results to only include the specified HTTP methods.`}).option(`endpoint`,{type:`string`,description:`Filter results to only include endpoints containing this pattern.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Field to order by`,choices:[`host`,`method`,`endpoint`,`traffic_stats.requests`,`traffic_stats.last_updated`]}).option(`diff`,{type:`boolean`,description:"When `true`, only return API Discovery results that are not saved into API Shield Endpoint Management"}).option(`origin`,{type:`string`,description:"Filter results to only include discovery results sourced from a particular discovery engine\n * `ML` - Discovered operations that were sourced using ML API Discovery\n * `SessionIdentifier` - Discovered operations that were sourced using Session Identifier API Discovery",choices:[`ML`,`SessionIdentifier`,`LabelDiscovery`]}).option(`state`,{type:`string`,description:"Filter results to only include discovery results in a particular state. States are as follows\n * `review` - Discovered operations that are not saved into API Shield Endpoint Management\n * `saved` - Discovered operations that are already saved into API Shield Endpoint Management\n * `ignored` - Discovered operations that have been marked as ignored",choices:[`review`,`saved`,`ignored`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List discovered web and API operations`,builder:f(b),handler:async o=>a({command:`web-assets discovery operations list`,classification:{safeFlags:[`direction`,`order`,`diff`,`origin`,`state`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],host:o.host,method:o.method,endpoint:o.endpoint,direction:o.direction,order:o.order,diff:o.diff,origin:o.origin,state:o.state};if(o.dryRun){r({command:`cf web-assets discovery operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/discovery/operations`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.webAssets.discovery.operations.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})},S={command:`operations`,describe:`Operations for discovery.operations`,builder:e=>e.command(h).command(_).command(y).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},C={command:`discovery`,describe:`Operations for discovery`,builder:e=>e.command(m).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 web-assets labels list
|
|
13
13
|
|
|
14
|
-
Returns all managed and user-defined labels available for web and API operations in the zone.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:`Field to order by`,choices:[`name`,`description`,`created_at`,`last_updated`,`mapped_resources.operations`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`source`,{type:`string`,description:`Filter for labels with source`,choices:[`user`,`managed`]}).option(`filter`,{type:`string`,description:`Filter for labels where the name or description matches using substring match`}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List operation labels`,builder:f(w),handler:async o=>a({command:`web-assets labels list`,classification:{safeFlags:[`order`,`direction`,`source`,`with-mapped-resource-counts`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],order:o.order,direction:o.direction,source:o.source,filter:o.filter,with_mapped_resource_counts:o[`with-mapped-resource-counts`]};if(o.dryRun){r({command:`cf web-assets labels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/labels`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c
|
|
14
|
+
Returns all managed and user-defined labels available for web and API operations in the zone.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:`Field to order by`,choices:[`name`,`description`,`created_at`,`last_updated`,`mapped_resources.operations`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`source`,{type:`string`,description:`Filter for labels with source`,choices:[`user`,`managed`]}).option(`filter`,{type:`string`,description:`Filter for labels where the name or description matches using substring match`}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List operation labels`,builder:f(w),handler:async o=>a({command:`web-assets labels list`,classification:{safeFlags:[`order`,`direction`,`source`,`with-mapped-resource-counts`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],order:o.order,direction:o.direction,source:o.source,filter:o.filter,with_mapped_resource_counts:o[`with-mapped-resource-counts`]};if(o.dryRun){r({command:`cf web-assets labels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/labels`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.webAssets.labels.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 web-assets labels managed get <name>
|
|
15
15
|
|
|
16
|
-
Returns a managed label and the web and API operations associated with it.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <name>`,describe:`Get a managed operation label`,builder:E,handler:async o=>a({command:`web-assets labels managed get`,classification:{safeFlags:[`with-mapped-resource-counts`,`dry-run`]}},o,async()=>{let a={with_mapped_resource_counts:o[`with-mapped-resource-counts`]};if(o.dryRun){r({command:`cf web-assets labels managed get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/labels/managed/${o.name==null?`<name>`:encodeURIComponent(String(o.name))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),name:String(o.name??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c
|
|
16
|
+
Returns a managed label and the web and API operations associated with it.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <name>`,describe:`Get a managed operation label`,builder:E,handler:async o=>a({command:`web-assets labels managed get`,classification:{safeFlags:[`with-mapped-resource-counts`,`dry-run`]}},o,async()=>{let a={with_mapped_resource_counts:o[`with-mapped-resource-counts`]};if(o.dryRun){r({command:`cf web-assets labels managed get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/labels/managed/${o.name==null?`<name>`:encodeURIComponent(String(o.name))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),name:String(o.name??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.webAssets.labels.managed.get({zone_id:c,name:o.name,...a}));n(l,{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 web-assets labels managed operations update <name>
|
|
17
17
|
|
|
18
|
-
Replaces the complete set of web and API operations attached to the managed label.`).positional(`name`,{type:`string`,description:`The label name`,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 k={command:`update <name>`,describe:`Replace operations attached to a managed label`,builder:O,handler:async s=>a({command:`web-assets labels managed operations update`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web-assets labels managed operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/labels/managed/${s.name==null?`<name>`:encodeURIComponent(String(s.name))}/resources/operation`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``),name:String(s.name??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body)
|
|
18
|
+
Replaces the complete set of web and API operations attached to the managed label.`).positional(`name`,{type:`string`,description:`The label name`,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 k={command:`update <name>`,describe:`Replace operations attached to a managed label`,builder:O,handler:async s=>a({command:`web-assets labels managed operations update`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web-assets labels managed operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/labels/managed/${s.name==null?`<name>`:encodeURIComponent(String(s.name))}/resources/operation`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``),name:String(s.name??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.webAssets.labels.managed.operations.update({body:e,zone_id:c,name:s.name}));n(t,{successLabel:`Updated`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},A={command:`operations`,describe:`Operations for labels.managed.operations`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`managed`,describe:`Operations for labels.managed`,builder:e=>e.command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 web-assets labels user bulk-create
|
|
19
19
|
|
|
20
|
-
Creates one or more user-defined labels for classifying web and API operations.`).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 N={command:`bulk-create`,describe:`Create user-defined operation labels`,builder:M,handler:async s=>a({command:`web-assets labels user bulk-create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web-assets labels user bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/labels/user`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body)
|
|
20
|
+
Creates one or more user-defined labels for classifying web and API operations.`).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 N={command:`bulk-create`,describe:`Create user-defined operation labels`,builder:M,handler:async s=>a({command:`web-assets labels user bulk-create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web-assets labels user bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/labels/user`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.webAssets.labels.user.bulkCreate({body:e,zone_id:c}));n(t,{successLabel:`Created`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function P(e){return e.usage(`$0 web-assets labels user bulk-delete
|
|
21
21
|
|
|
22
22
|
Deletes one or more user-defined labels and removes their associations with web and API operations.`).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`bulk-delete`,describe:`Delete user-defined operation labels`,builder:P,handler:async s=>a({command:`web-assets labels user bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},s,async()=>{if(s.dryRun){r({command:`cf web-assets labels user bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/labels/user`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,!await d({force:!!s.force,message:`This operation deletes the selected user-defined labels and removes them from associated web and API operations.`})){process.stderr.write(`Aborted.
|
|
23
|
-
`);return}if(s.body){let e=o(s.body)
|
|
23
|
+
`);return}if(s.body){let e=o(s.body),t=await i(`Deleting`,async()=>a.webAssets.labels.user.bulkDelete({body:e,zone_id:c}));n(t,{successLabel:`Deleted`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function I(e){return e.usage(`$0 web-assets labels user delete <name>
|
|
24
24
|
|
|
25
25
|
Deletes a user-defined label and removes its associations with web and API operations.`).positional(`name`,{type:`string`,description:`The label 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 L={command:`delete <name>`,describe:`Delete a user-defined operation label`,builder:I,handler:async o=>a({command:`web-assets labels user delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf web-assets labels user delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/labels/user/${o.name==null?`<name>`:encodeURIComponent(String(o.name))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),name:String(o.name??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force,message:`This operation deletes the user-defined label and removes it from associated web and API operations.`})){process.stderr.write(`Aborted.
|
|
26
|
-
`);return}
|
|
26
|
+
`);return}let c=await i(`Deleting`,async()=>a.webAssets.labels.user.delete({zone_id:s,name:o.name}));n(c,{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 web-assets labels user edit <name>
|
|
27
27
|
|
|
28
|
-
Updates only the supplied fields on a user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`description`,{type:`string`,description:`The description of the label`}).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:`edit <name>`,describe:`Edit a user-defined operation label`,builder:R,handler:async l=>a({command:`web-assets labels user edit`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf web-assets labels user edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/api_gateway/labels/user/${l.name==null?`<name>`:encodeURIComponent(String(l.name))}`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``),name:String(l.name??``)},bodyKind:`json`,body:l.body===void 0?s({description:c(l.description,`description`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body)
|
|
28
|
+
Updates only the supplied fields on a user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`description`,{type:`string`,description:`The description of the label`}).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:`edit <name>`,describe:`Edit a user-defined operation label`,builder:R,handler:async l=>a({command:`web-assets labels user edit`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf web-assets labels user edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/api_gateway/labels/user/${l.name==null?`<name>`:encodeURIComponent(String(l.name))}`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``),name:String(l.name??``)},bodyKind:`json`,body:l.body===void 0?s({description:c(l.description,`description`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.webAssets.labels.user.edit({...e,zone_id:u,name:l.name}));n(t,{successLabel:`Updated`});return}let d=s({description:c(l.description,`description`,`text`)}),f=await i(`Updating`,async()=>a.webAssets.labels.user.edit({...d,zone_id:u,name:l.name}));n(f,{successLabel:`Updated`})})};function B(e){return e.usage(`$0 web-assets labels user get <name>
|
|
29
29
|
|
|
30
|
-
Returns a user-defined label and the web and API operations associated with it.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <name>`,describe:`Get a user-defined operation label`,builder:B,handler:async o=>a({command:`web-assets labels user get`,classification:{safeFlags:[`with-mapped-resource-counts`,`dry-run`]}},o,async()=>{let a={with_mapped_resource_counts:o[`with-mapped-resource-counts`]};if(o.dryRun){r({command:`cf web-assets labels user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/labels/user/${o.name==null?`<name>`:encodeURIComponent(String(o.name))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),name:String(o.name??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c
|
|
30
|
+
Returns a user-defined label and the web and API operations associated with it.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <name>`,describe:`Get a user-defined operation label`,builder:B,handler:async o=>a({command:`web-assets labels user get`,classification:{safeFlags:[`with-mapped-resource-counts`,`dry-run`]}},o,async()=>{let a={with_mapped_resource_counts:o[`with-mapped-resource-counts`]};if(o.dryRun){r({command:`cf web-assets labels user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/labels/user/${o.name==null?`<name>`:encodeURIComponent(String(o.name))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),name:String(o.name??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.webAssets.labels.user.get({zone_id:c,name:o.name,...a}));n(l,{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 web-assets labels user operations update <name>
|
|
31
31
|
|
|
32
|
-
Replaces the complete set of web and API operations attached to the user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,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 U={command:`update <name>`,describe:`Replace operations attached to a user-defined label`,builder:H,handler:async s=>a({command:`web-assets labels user operations update`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web-assets labels user operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/labels/user/${s.name==null?`<name>`:encodeURIComponent(String(s.name))}/resources/operation`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``),name:String(s.name??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body)
|
|
32
|
+
Replaces the complete set of web and API operations attached to the user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,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 U={command:`update <name>`,describe:`Replace operations attached to a user-defined label`,builder:H,handler:async s=>a({command:`web-assets labels user operations update`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web-assets labels user operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/labels/user/${s.name==null?`<name>`:encodeURIComponent(String(s.name))}/resources/operation`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``),name:String(s.name??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.webAssets.labels.user.operations.update({body:e,zone_id:c,name:s.name}));n(t,{successLabel:`Updated`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},W={command:`operations`,describe:`Operations for labels.user.operations`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 web-assets labels user update <name>
|
|
33
33
|
|
|
34
|
-
Replaces all editable fields on a user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`description`,{type:`string`,description:`The description of the label`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`update <name>`,describe:`Update a user-defined operation label`,builder:G,handler:async l=>a({command:`web-assets labels user update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf web-assets labels user update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/api_gateway/labels/user/${l.name==null?`<name>`:encodeURIComponent(String(l.name))}`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``),name:String(l.name??``)},bodyKind:`json`,body:l.body===void 0?s({description:c(l.description,`description`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body)
|
|
34
|
+
Replaces all editable fields on a user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`description`,{type:`string`,description:`The description of the label`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`update <name>`,describe:`Update a user-defined operation label`,builder:G,handler:async l=>a({command:`web-assets labels user update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf web-assets labels user update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/api_gateway/labels/user/${l.name==null?`<name>`:encodeURIComponent(String(l.name))}`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``),name:String(l.name??``)},bodyKind:`json`,body:l.body===void 0?s({description:c(l.description,`description`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.webAssets.labels.user.update({...e,zone_id:u,name:l.name}));n(t,{successLabel:`Updated`});return}let d=s({description:c(l.description,`description`,`text`)}),f=await i(`Updating`,async()=>a.webAssets.labels.user.update({...d,zone_id:u,name:l.name}));n(f,{successLabel:`Updated`})})},q={command:`user`,describe:`Operations for labels.user`,builder:e=>e.command(N).command(F).command(L).command(z).command(V).command(K).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`labels`,describe:`Operations for labels`,builder:e=>e.command(T).command(j).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.usage(`$0 web-assets operations bulk-create
|
|
35
35
|
|
|
36
|
-
Creates one or more web or API operations. Hosts, methods, and paths are normalized; an existing matching operation is returned instead of duplicated.`).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
|
|
36
|
+
Creates one or more web or API operations. Hosts, methods, and paths are normalized; an existing matching operation is returned instead of duplicated.`).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:`bulk-create`,describe:`Create web or API operations`,builder:Y,handler:async s=>a({command:`web-assets operations bulk-create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web-assets operations bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.webAssets.operations.bulkCreate({body:e,zone_id:c}));n(t,{successLabel:`Created`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function te(e){return e.usage(`$0 web-assets operations bulk-delete
|
|
37
37
|
|
|
38
|
-
Deletes multiple web or API operations from endpoint management in one request.`).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`bulk-delete`,describe:`Delete web or API operations`,builder:
|
|
39
|
-
`);return}if(s.body){let e=o(s.body)
|
|
38
|
+
Deletes multiple web or API operations from endpoint management in one request.`).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`bulk-delete`,describe:`Delete web or API operations`,builder:te,handler:async s=>a({command:`web-assets operations bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},s,async()=>{if(s.dryRun){r({command:`cf web-assets operations bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await e(s),c=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,!await d({force:!!s.force,message:`This operation deletes the selected web or API operations.`})){process.stderr.write(`Aborted.
|
|
39
|
+
`);return}if(s.body){let e=o(s.body),t=await i(`Deleting`,async()=>a.webAssets.operations.bulkDelete({body:e,zone_id:c}));n(t,{successLabel:`Deleted`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Q(e){return e.usage(`$0 web-assets operations create
|
|
40
40
|
|
|
41
|
-
Creates one web or API operation. The host, method, and path are normalized; an existing matching operation is returned instead of duplicated.`).option(`endpoint`,{type:`string`,description:`The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.`}).option(`host`,{type:`string`,description:`RFC3986-compliant host.`}).option(`method`,{type:`string`,description:`The HTTP method used to access the endpoint.`,choices:[`GET`,`POST`,`HEAD`,`OPTIONS`,`PUT`,`DELETE`,`CONNECT`,`PATCH`,`TRACE`]}).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:`create`,describe:`Create a web or API operation`,builder:Q,handler:async d=>a({command:`web-assets operations create`,classification:{safeFlags:[`method`,`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf web-assets operations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/api_gateway/operations/item`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?s({endpoint:c(d.endpoint,`endpoint`,`text`),host:c(d.host,`host`,`text`),method:c(d.method,`method`,`text`)}):o(d.body)});return}let a=await e(d),f=await t({zone:d.zone},a,{quiet:d.quiet});if(d.zoneId=f,d.body){let e=o(d.body)
|
|
41
|
+
Creates one web or API operation. The host, method, and path are normalized; an existing matching operation is returned instead of duplicated.`).option(`endpoint`,{type:`string`,description:`The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.`}).option(`host`,{type:`string`,description:`RFC3986-compliant host.`}).option(`method`,{type:`string`,description:`The HTTP method used to access the endpoint.`,choices:[`GET`,`POST`,`HEAD`,`OPTIONS`,`PUT`,`DELETE`,`CONNECT`,`PATCH`,`TRACE`]}).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:`create`,describe:`Create a web or API operation`,builder:Q,handler:async d=>a({command:`web-assets operations create`,classification:{safeFlags:[`method`,`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf web-assets operations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/api_gateway/operations/item`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?s({endpoint:c(d.endpoint,`endpoint`,`text`),host:c(d.host,`host`,`text`),method:c(d.method,`method`,`text`)}):o(d.body)});return}let a=await e(d),f=await t({zone:d.zone},a,{quiet:d.quiet});if(d.zoneId=f,d.body){let e=o(d.body),t=await i(`Creating`,async()=>a.webAssets.operations.create({body:e,zone_id:f}));n(t,{successLabel:`Created`});return}d.endpoint===void 0&&(d.endpoint=await l(`endpoint`,`The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.`)),d.host===void 0&&(d.host=await l(`host`,`RFC3986-compliant host.`)),d.method===void 0&&(d.method=await u(`method`,`The HTTP method used to access the endpoint.`,[`GET`,`POST`,`HEAD`,`OPTIONS`,`PUT`,`DELETE`,`CONNECT`,`PATCH`,`TRACE`]));let p=s({endpoint:c(d.endpoint,`endpoint`,`text`),host:c(d.host,`host`,`text`),method:c(d.method,`method`,`text`)}),m=await i(`Creating`,async()=>a.webAssets.operations.create({body:p,zone_id:f}));n(m,{successLabel:`Created`})})};function re(e){return e.usage(`$0 web-assets operations delete <operation-id>
|
|
42
42
|
|
|
43
43
|
Deletes a web or API operation from endpoint management so its feature configuration is no longer tracked.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,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 <operation-id>`,describe:`Delete a web or API operation`,builder:re,handler:async o=>a({command:`web-assets operations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf web-assets operations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/operations/${o[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(o[`operation-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"operation-id":String(o[`operation-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force,message:`This operation deletes the web or API operation.`})){process.stderr.write(`Aborted.
|
|
44
|
-
`);return}
|
|
44
|
+
`);return}let c=await i(`Deleting`,async()=>a.webAssets.operations.delete({zone_id:s,operation_id:o[`operation-id`]}));n(c,{successLabel:`Deleted`})})};function ae(e){return e.usage(`$0 web-assets operations get <operation-id>
|
|
45
45
|
|
|
46
|
-
Returns a web or API operation, including its schema validation settings and requested feature data.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`with-schemas`,{type:`boolean`,description:`When true, includes OpenAPI schemas (both uploaded and learned) for the operation in the response. Due to the conversion overhead, this parameter is only supported on single-operation retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <operation-id>`,describe:`Get a web or API operation`,builder:f(ae),handler:async o=>a({command:`web-assets operations get`,classification:{safeFlags:[`with-schemas`,`dry-run`]}},o,async()=>{let a={feature:o.feature,with_schemas:o[`with-schemas`]};if(o.dryRun){r({command:`cf web-assets operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/operations/${o[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(o[`operation-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"operation-id":String(o[`operation-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c
|
|
46
|
+
Returns a web or API operation, including its schema validation settings and requested feature data.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`with-schemas`,{type:`boolean`,description:`When true, includes OpenAPI schemas (both uploaded and learned) for the operation in the response. Due to the conversion overhead, this parameter is only supported on single-operation retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <operation-id>`,describe:`Get a web or API operation`,builder:f(ae),handler:async o=>a({command:`web-assets operations get`,classification:{safeFlags:[`with-schemas`,`dry-run`]}},o,async()=>{let a={feature:o.feature,with_schemas:o[`with-schemas`]};if(o.dryRun){r({command:`cf web-assets operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/operations/${o[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(o[`operation-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"operation-id":String(o[`operation-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.webAssets.operations.get({zone_id:c,operation_id:o[`operation-id`],...a}));n(l,{successLabel:`Loaded`})})};function se(e){return e.usage(`$0 web-assets operations labels bulk-create
|
|
47
47
|
|
|
48
|
-
Attaches labels to multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names.`}).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 ce={command:`bulk-create`,describe:`Attach labels to web or API operations`,builder:se,handler:async c=>a({command:`web-assets operations labels bulk-create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:{labels:c[`managed-labels`]},user:{labels:c[`user-labels`]}}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body)
|
|
48
|
+
Attaches labels to multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names.`}).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 ce={command:`bulk-create`,describe:`Attach labels to web or API operations`,builder:se,handler:async c=>a({command:`web-assets operations labels bulk-create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:{labels:c[`managed-labels`]},user:{labels:c[`user-labels`]}}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body),t=await i(`Creating`,async()=>a.webAssets.operations.labels.bulkCreate({...e,zone_id:l}));n(t,{successLabel:`Created`});return}let u=s({managed:{labels:c[`managed-labels`]},user:{labels:c[`user-labels`]}}),d=await i(`Creating`,async()=>a.webAssets.operations.labels.bulkCreate({...u,zone_id:l}));n(d,{successLabel:`Created`})})};function le(e){return e.usage(`$0 web-assets operations labels bulk-delete
|
|
49
49
|
|
|
50
50
|
Removes labels from multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names.`}).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`bulk-delete`,describe:`Remove labels from web or API operations`,builder:le,handler:async c=>a({command:`web-assets operations labels bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:{labels:c[`managed-labels`]},user:{labels:c[`user-labels`]}}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,!await d({force:!!c.force,message:`This operation removes the selected labels from the selected web and API operations.`})){process.stderr.write(`Aborted.
|
|
51
|
-
`);return}if(c.body){let e=o(c.body)
|
|
51
|
+
`);return}if(c.body){let e=o(c.body),t=await i(`Deleting`,async()=>a.webAssets.operations.labels.bulkDelete({...e,zone_id:l}));n(t,{successLabel:`Deleted`});return}let u=s({managed:{labels:c[`managed-labels`]},user:{labels:c[`user-labels`]}}),f=await i(`Deleting`,async()=>a.webAssets.operations.labels.bulkDelete({...u,zone_id:l}));n(f,{successLabel:`Deleted`})})};function de(e){return e.usage(`$0 web-assets operations labels bulk-update
|
|
52
52
|
|
|
53
|
-
Replaces the complete label sets on multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names. Providing an empty array will result in all managed labels being removed from all affected operations`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names. Providing an empty array will result in all user labels being removed from all affected operations`}).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:`bulk-update`,describe:`Replace labels on web or API operations`,builder:de,handler:async c=>a({command:`web-assets operations labels bulk-update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:{labels:c[`managed-labels`]},user:{labels:c[`user-labels`]}}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body)
|
|
53
|
+
Replaces the complete label sets on multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names. Providing an empty array will result in all managed labels being removed from all affected operations`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names. Providing an empty array will result in all user labels being removed from all affected operations`}).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:`bulk-update`,describe:`Replace labels on web or API operations`,builder:de,handler:async c=>a({command:`web-assets operations labels bulk-update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:{labels:c[`managed-labels`]},user:{labels:c[`user-labels`]}}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body),t=await i(`Updating`,async()=>a.webAssets.operations.labels.bulkUpdate({...e,zone_id:l}));n(t,{successLabel:`Updated`});return}if(c[`managed-labels`]===void 0)throw Error(`--managed-labels is required (or pass --body with this field set).`);if(c[`user-labels`]===void 0)throw Error(`--user-labels is required (or pass --body with this field set).`);let u=s({managed:{labels:c[`managed-labels`]},user:{labels:c[`user-labels`]}}),d=await i(`Updating`,async()=>a.webAssets.operations.labels.bulkUpdate({...u,zone_id:l}));n(d,{successLabel:`Updated`})})};function pe(e){return e.usage(`$0 web-assets operations labels create <operation-id>
|
|
54
54
|
|
|
55
|
-
Attaches one or more labels to a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user`,{type:`string`,array:!0,description:`List of user label names.`}).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 me={command:`create <operation-id>`,describe:`Attach labels to a web or API operation`,builder:pe,handler:async c=>a({command:`web-assets operations labels create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"operation-id":String(c[`operation-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:c.managed,user:c.user}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body)
|
|
55
|
+
Attaches one or more labels to a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user`,{type:`string`,array:!0,description:`List of user label names.`}).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 me={command:`create <operation-id>`,describe:`Attach labels to a web or API operation`,builder:pe,handler:async c=>a({command:`web-assets operations labels create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"operation-id":String(c[`operation-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:c.managed,user:c.user}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body),t=await i(`Creating`,async()=>a.webAssets.operations.labels.create({...e,zone_id:l,operation_id:c[`operation-id`]}));n(t,{successLabel:`Created`});return}let u=s({managed:c.managed,user:c.user}),d=await i(`Creating`,async()=>a.webAssets.operations.labels.create({...u,zone_id:l,operation_id:c[`operation-id`]}));n(d,{successLabel:`Created`})})};function he(e){return e.usage(`$0 web-assets operations labels delete <operation-id>
|
|
56
56
|
|
|
57
57
|
Removes one or more labels from a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user`,{type:`string`,array:!0,description:`List of user label names.`}).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ge={command:`delete <operation-id>`,describe:`Remove labels from a web or API operation`,builder:he,handler:async c=>a({command:`web-assets operations labels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"operation-id":String(c[`operation-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:c.managed,user:c.user}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,!await d({force:!!c.force,message:`This operation removes the selected labels from the web or API operation.`})){process.stderr.write(`Aborted.
|
|
58
|
-
`);return}if(c.body){let e=o(c.body)
|
|
58
|
+
`);return}if(c.body){let e=o(c.body),t=await i(`Deleting`,async()=>a.webAssets.operations.labels.delete({...e,zone_id:l,operation_id:c[`operation-id`]}));n(t,{successLabel:`Deleted`});return}let u=s({managed:c.managed,user:c.user}),f=await i(`Deleting`,async()=>a.webAssets.operations.labels.delete({...u,zone_id:l,operation_id:c[`operation-id`]}));n(f,{successLabel:`Deleted`})})};function _e(e){return e.usage(`$0 web-assets operations labels update <operation-id>
|
|
59
59
|
|
|
60
|
-
Replaces the complete label set on a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names. Omitting this property or passing an empty array will result in all managed labels being removed from the operation`}).option(`user`,{type:`string`,array:!0,description:`List of user label names. Omitting this property or passing an empty array will result in all user labels being removed from the operation`}).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 ve={command:`update <operation-id>`,describe:`Replace labels on a web or API operation`,builder:_e,handler:async c=>a({command:`web-assets operations labels update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"operation-id":String(c[`operation-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:c.managed,user:c.user}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body)
|
|
60
|
+
Replaces the complete label set on a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names. Omitting this property or passing an empty array will result in all managed labels being removed from the operation`}).option(`user`,{type:`string`,array:!0,description:`List of user label names. Omitting this property or passing an empty array will result in all user labels being removed from the operation`}).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 ve={command:`update <operation-id>`,describe:`Replace labels on a web or API operation`,builder:_e,handler:async c=>a({command:`web-assets operations labels update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf web-assets operations labels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/api_gateway/operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}/labels`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"operation-id":String(c[`operation-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({managed:c.managed,user:c.user}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body),t=await i(`Updating`,async()=>a.webAssets.operations.labels.update({...e,zone_id:l,operation_id:c[`operation-id`]}));n(t,{successLabel:`Updated`});return}let u=s({managed:c.managed,user:c.user}),d=await i(`Updating`,async()=>a.webAssets.operations.labels.update({...u,zone_id:l,operation_id:c[`operation-id`]}));n(d,{successLabel:`Updated`})})},ye={command:`labels`,describe:`Operations for operations.labels`,builder:e=>e.command(ce).command(ue).command(fe).command(me).command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function be(e){return e.usage(`$0 web-assets operations list
|
|
61
61
|
|
|
62
|
-
Lists web and API operations tracked for the zone, including each operation's method, path, and feature configuration.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:"Field to order by. When requesting a feature, the feature keys are available for ordering as well, e.g., `thresholds.suggested_threshold`.",choices:[`method`,`host`,`endpoint`,`thresholds.$key`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`host`,{type:`string`,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,description:`Filter results to only include the specified HTTP methods.`}).option(`endpoint`,{type:`string`,description:`Filter results to only include endpoints containing this pattern.`}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`list`,describe:`List web and API operations`,builder:f(be),handler:async o=>a({command:`web-assets operations list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],order:o.order,direction:o.direction,host:o.host,method:o.method,endpoint:o.endpoint,feature:o.feature};if(o.dryRun){r({command:`cf web-assets operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c
|
|
62
|
+
Lists web and API operations tracked for the zone, including each operation's method, path, and feature configuration.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:"Field to order by. When requesting a feature, the feature keys are available for ordering as well, e.g., `thresholds.suggested_threshold`.",choices:[`method`,`host`,`endpoint`,`thresholds.$key`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`host`,{type:`string`,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,description:`Filter results to only include the specified HTTP methods.`}).option(`endpoint`,{type:`string`,description:`Filter results to only include endpoints containing this pattern.`}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`list`,describe:`List web and API operations`,builder:f(be),handler:async o=>a({command:`web-assets operations list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],order:o.order,direction:o.direction,host:o.host,method:o.method,endpoint:o.endpoint,feature:o.feature};if(o.dryRun){r({command:`cf web-assets operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.webAssets.operations.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})},xe={command:`operations`,describe:`Operations for operations`,builder:e=>e.command(X).command(Z).command(ne).command(ie).command(oe).command($).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Se(e){return e.usage(`$0 web-assets schemas list
|
|
63
63
|
|
|
64
|
-
Returns tracked web and API operations and their feature configuration rendered as OpenAPI schemas.`).option(`host`,{type:`string`,description:`Receive schema only for the given host(s).`}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`include-schema-kind`,{type:`string`,description:`Schema kinds to include in exported OpenAPI schemas.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`list`,describe:`Export web and API operations as OpenAPI schemas`,builder:f(Se),handler:async o=>a({command:`web-assets schemas list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={host:o.host,feature:o.feature,include_schema_kind:o[`include-schema-kind`]};if(o.dryRun){r({command:`cf web-assets schemas list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/schemas`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c
|
|
64
|
+
Returns tracked web and API operations and their feature configuration rendered as OpenAPI schemas.`).option(`host`,{type:`string`,description:`Receive schema only for the given host(s).`}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`include-schema-kind`,{type:`string`,description:`Schema kinds to include in exported OpenAPI schemas.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`list`,describe:`Export web and API operations as OpenAPI schemas`,builder:f(Se),handler:async o=>a({command:`web-assets schemas list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={host:o.host,feature:o.feature,include_schema_kind:o[`include-schema-kind`]};if(o.dryRun){r({command:`cf web-assets schemas list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/api_gateway/schemas`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.webAssets.schemas.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})},we={command:`schemas`,describe:`Operations for schemas`,builder:e=>e.command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Te={command:`web-assets`,describe:`web-assets`,builder:e=>e.command(C).command(J).command(xe).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Te as default};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-F5wxc8zq.mjs";function p(e){return e.usage(`$0 web3 hostnames create
|
|
3
3
|
|
|
4
|
-
Create Web3 Hostname`).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`name`,{type:`string`,description:`Specify the hostname that points to the target gateway via CNAME.`}).option(`target`,{type:`string`,description:`Specify the target gateway of the hostname.`,choices:[`ethereum`,`ipfs`,`ipfs_universal_path`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create Web3 Hostname`,builder:p,handler:async s=>a({command:`web3 hostnames create`,classification:{safeFlags:[`target`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({description:l(s.description,`description`,`text`),dnslink:l(s.dnslink,`dnslink`,`text`),name:l(s.name,`name`,`text`),target:l(s.target,`target`,`text`)}):o(s.body)});return}let a=await e(s),f=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=f,s.body){let e=o(s.body)
|
|
4
|
+
Create Web3 Hostname`).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`name`,{type:`string`,description:`Specify the hostname that points to the target gateway via CNAME.`}).option(`target`,{type:`string`,description:`Specify the target gateway of the hostname.`,choices:[`ethereum`,`ipfs`,`ipfs_universal_path`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create Web3 Hostname`,builder:p,handler:async s=>a({command:`web3 hostnames create`,classification:{safeFlags:[`target`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({description:l(s.description,`description`,`text`),dnslink:l(s.dnslink,`dnslink`,`text`),name:l(s.name,`name`,`text`),target:l(s.target,`target`,`text`)}):o(s.body)});return}let a=await e(s),f=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=f,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.web3.hostnames.create({...e,zone_id:f}));n(t,{successLabel:`Created`});return}s.name===void 0&&(s.name=await u(`name`,`Specify the hostname that points to the target gateway via CNAME.`)),s.target===void 0&&(s.target=await d(`target`,`Specify the target gateway of the hostname.`,[`ethereum`,`ipfs`,`ipfs_universal_path`]));let p=c({description:l(s.description,`description`,`text`),dnslink:l(s.dnslink,`dnslink`,`text`),name:l(s.name,`name`,`text`),target:l(s.target,`target`,`text`)}),m=await i(`Creating`,async()=>a.web3.hostnames.create({...p,zone_id:f}));n(m,{successLabel:`Created`})})};function h(e){return e.usage(`$0 web3 hostnames delete <identifier>
|
|
5
5
|
|
|
6
6
|
Delete Web3 Hostname`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,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 g={command:`delete <identifier>`,describe:`Delete Web3 Hostname`,builder:h,handler:async o=>a({command:`web3 hostnames delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}`,pathParams:{identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await f({force:!!o.force})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}
|
|
7
|
+
`);return}let c=await i(`Deleting`,async()=>a.web3.hostnames.delete({zone_id:s,identifier:o.identifier}));n(c,{successLabel:`Deleted`})})};function _(e){return e.usage(`$0 web3 hostnames edit <identifier>
|
|
8
8
|
|
|
9
|
-
Edit Web3 Hostname`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`edit <identifier>`,describe:`Edit Web3 Hostname`,builder:_,handler:async s=>a({command:`web3 hostnames edit`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web3 hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/web3/hostnames/${s.identifier==null?`<identifier>`:encodeURIComponent(String(s.identifier))}`,pathParams:{identifier:String(s.identifier??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({description:l(s.description,`description`,`text`),dnslink:l(s.dnslink,`dnslink`,`text`)}):o(s.body)});return}let a=await e(s),u=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body)
|
|
9
|
+
Edit Web3 Hostname`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`edit <identifier>`,describe:`Edit Web3 Hostname`,builder:_,handler:async s=>a({command:`web3 hostnames edit`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web3 hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/web3/hostnames/${s.identifier==null?`<identifier>`:encodeURIComponent(String(s.identifier))}`,pathParams:{identifier:String(s.identifier??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({description:l(s.description,`description`,`text`),dnslink:l(s.dnslink,`dnslink`,`text`)}):o(s.body)});return}let a=await e(s),u=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.web3.hostnames.edit({...e,zone_id:u,identifier:s.identifier}));n(t,{successLabel:`Updated`});return}let d=c({description:l(s.description,`description`,`text`),dnslink:l(s.dnslink,`dnslink`,`text`)}),f=await i(`Updating`,async()=>a.web3.hostnames.edit({...d,zone_id:u,identifier:s.identifier}));n(f,{successLabel:`Updated`})})};function y(e){return e.usage(`$0 web3 hostnames get <identifier>
|
|
10
10
|
|
|
11
|
-
Web3 Hostname Details`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <identifier>`,describe:`Web3 Hostname Details`,builder:y,handler:async o=>a({command:`web3 hostnames get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}`,pathParams:{identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s
|
|
11
|
+
Web3 Hostname Details`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <identifier>`,describe:`Web3 Hostname Details`,builder:y,handler:async o=>a({command:`web3 hostnames get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}`,pathParams:{identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.web3.hostnames.get({zone_id:s,identifier:o.identifier}));n(c,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries create <identifier>
|
|
12
12
|
|
|
13
|
-
Create IPFS Universal Path Gateway Content List Entry`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).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 S={command:`create <identifier>`,describe:`Create IPFS Universal Path Gateway Content List Entry`,builder:x,handler:async s=>a({command:`web3 hostnames ipfs-universal-paths content-lists entries create`,classification:{safeFlags:[`type`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/web3/hostnames/${s.identifier==null?`<identifier>`:encodeURIComponent(String(s.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{identifier:String(s.identifier??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({content:l(s.content,`content`,`text`),description:l(s.description,`description`,`text`),type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await e(s),f=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=f,s.body){let e=o(s.body)
|
|
13
|
+
Create IPFS Universal Path Gateway Content List Entry`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).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 S={command:`create <identifier>`,describe:`Create IPFS Universal Path Gateway Content List Entry`,builder:x,handler:async s=>a({command:`web3 hostnames ipfs-universal-paths content-lists entries create`,classification:{safeFlags:[`type`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/web3/hostnames/${s.identifier==null?`<identifier>`:encodeURIComponent(String(s.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{identifier:String(s.identifier??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({content:l(s.content,`content`,`text`),description:l(s.description,`description`,`text`),type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await e(s),f=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=f,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.entries.create({body:e,zone_id:f,identifier:s.identifier}));n(t,{successLabel:`Created`});return}s.content===void 0&&(s.content=await u(`content`,`Specify the CID or content path of content to block.`)),s.type===void 0&&(s.type=await d(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let p=c({content:l(s.content,`content`,`text`),description:l(s.description,`description`,`text`),type:l(s.type,`type`,`text`)}),m=await i(`Creating`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.entries.create({body:p,zone_id:f,identifier:s.identifier}));n(m,{successLabel:`Created`})})};function C(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries delete <content-list-entry-identifier>
|
|
14
14
|
|
|
15
15
|
Delete IPFS Universal Path Gateway Content List Entry`).positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const w={command:`delete <content-list-entry-identifier>`,describe:`Delete IPFS Universal Path Gateway Content List Entry`,builder:C,handler:async o=>a({command:`web3 hostnames ipfs-universal-paths content-lists entries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}/ipfs_universal_path/content_list/entries/${o[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(o[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(o[`content-list-entry-identifier`]??``),identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await f({force:!!o.force})){process.stderr.write(`Aborted.
|
|
16
|
-
`);return}
|
|
16
|
+
`);return}let c=await i(`Deleting`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.entries.delete({zone_id:s,identifier:o.identifier,content_list_entry_identifier:o[`content-list-entry-identifier`]}));n(c,{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries get <content-list-entry-identifier>
|
|
17
17
|
|
|
18
|
-
IPFS Universal Path Gateway Content List Entry Details`).positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <content-list-entry-identifier>`,describe:`IPFS Universal Path Gateway Content List Entry Details`,builder:T,handler:async o=>a({command:`web3 hostnames ipfs-universal-paths content-lists entries get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists entries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}/ipfs_universal_path/content_list/entries/${o[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(o[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(o[`content-list-entry-identifier`]??``),identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s
|
|
18
|
+
IPFS Universal Path Gateway Content List Entry Details`).positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <content-list-entry-identifier>`,describe:`IPFS Universal Path Gateway Content List Entry Details`,builder:T,handler:async o=>a({command:`web3 hostnames ipfs-universal-paths content-lists entries get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists entries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}/ipfs_universal_path/content_list/entries/${o[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(o[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(o[`content-list-entry-identifier`]??``),identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.entries.get({zone_id:s,identifier:o.identifier,content_list_entry_identifier:o[`content-list-entry-identifier`]}));n(c,{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries list
|
|
19
19
|
|
|
20
|
-
List IPFS Universal Path Gateway Content List Entries`).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List IPFS Universal Path Gateway Content List Entries`,builder:D,handler:async o=>a({command:`web3 hostnames ipfs-universal-paths content-lists entries list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s
|
|
20
|
+
List IPFS Universal Path Gateway Content List Entries`).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List IPFS Universal Path Gateway Content List Entries`,builder:D,handler:async o=>a({command:`web3 hostnames ipfs-universal-paths content-lists entries list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.entries.list({zone_id:s,identifier:o.identifier}));n(c,{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries update <content-list-entry-identifier>
|
|
21
21
|
|
|
22
|
-
Edit IPFS Universal Path Gateway Content List Entry`).positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).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 A={command:`update <content-list-entry-identifier>`,describe:`Edit IPFS Universal Path Gateway Content List Entry`,builder:k,handler:async s=>a({command:`web3 hostnames ipfs-universal-paths content-lists entries update`,classification:{safeFlags:[`type`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/web3/hostnames/${s.identifier==null?`<identifier>`:encodeURIComponent(String(s.identifier))}/ipfs_universal_path/content_list/entries/${s[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(s[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(s[`content-list-entry-identifier`]??``),identifier:String(s.identifier??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({content:l(s.content,`content`,`text`),description:l(s.description,`description`,`text`),type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await e(s),f=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=f,s.body){let e=o(s.body)
|
|
22
|
+
Edit IPFS Universal Path Gateway Content List Entry`).positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).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 A={command:`update <content-list-entry-identifier>`,describe:`Edit IPFS Universal Path Gateway Content List Entry`,builder:k,handler:async s=>a({command:`web3 hostnames ipfs-universal-paths content-lists entries update`,classification:{safeFlags:[`type`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/web3/hostnames/${s.identifier==null?`<identifier>`:encodeURIComponent(String(s.identifier))}/ipfs_universal_path/content_list/entries/${s[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(s[`content-list-entry-identifier`]))}`,pathParams:{"content-list-entry-identifier":String(s[`content-list-entry-identifier`]??``),identifier:String(s.identifier??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({content:l(s.content,`content`,`text`),description:l(s.description,`description`,`text`),type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await e(s),f=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=f,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.entries.update({body:e,zone_id:f,identifier:s.identifier,content_list_entry_identifier:s[`content-list-entry-identifier`]}));n(t,{successLabel:`Updated`});return}s.content===void 0&&(s.content=await u(`content`,`Specify the CID or content path of content to block.`)),s.type===void 0&&(s.type=await d(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let p=c({content:l(s.content,`content`,`text`),description:l(s.description,`description`,`text`),type:l(s.type,`type`,`text`)}),m=await i(`Updating`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.entries.update({body:p,zone_id:f,identifier:s.identifier,content_list_entry_identifier:s[`content-list-entry-identifier`]}));n(m,{successLabel:`Updated`})})},j={command:`entries`,describe:`Operations for hostnames.ipfs-universal-paths.content-lists.entries`,builder:e=>e.command(S).command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists get <identifier>
|
|
23
23
|
|
|
24
|
-
IPFS Universal Path Gateway Content List Details`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get <identifier>`,describe:`IPFS Universal Path Gateway Content List Details`,builder:M,handler:async o=>a({command:`web3 hostnames ipfs-universal-paths content-lists get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}/ipfs_universal_path/content_list`,pathParams:{identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s
|
|
24
|
+
IPFS Universal Path Gateway Content List Details`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get <identifier>`,describe:`IPFS Universal Path Gateway Content List Details`,builder:M,handler:async o=>a({command:`web3 hostnames ipfs-universal-paths content-lists get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames/${o.identifier==null?`<identifier>`:encodeURIComponent(String(o.identifier))}/ipfs_universal_path/content_list`,pathParams:{identifier:String(o.identifier??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.get({zone_id:s,identifier:o.identifier}));n(c,{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists update <identifier>
|
|
25
25
|
|
|
26
|
-
Update IPFS Universal Path Gateway Content List`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`action`,{type:`string`,description:`Behavior of the content list.`,choices:[`block`]}).option(`entries`,{type:`string`,description:`Provides content list entries. 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 F={command:`update <identifier>`,describe:`Update IPFS Universal Path Gateway Content List`,builder:P,handler:async u=>a({command:`web3 hostnames ipfs-universal-paths content-lists update`,classification:{safeFlags:[`action`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/web3/hostnames/${u.identifier==null?`<identifier>`:encodeURIComponent(String(u.identifier))}/ipfs_universal_path/content_list`,pathParams:{identifier:String(u.identifier??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({action:l(u.action,`action`,`text`),entries:s(u.entries,`entries`)}):o(u.body)});return}let a=await e(u),f=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=f,u.body){let e=o(u.body)
|
|
26
|
+
Update IPFS Universal Path Gateway Content List`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`action`,{type:`string`,description:`Behavior of the content list.`,choices:[`block`]}).option(`entries`,{type:`string`,description:`Provides content list entries. 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 F={command:`update <identifier>`,describe:`Update IPFS Universal Path Gateway Content List`,builder:P,handler:async u=>a({command:`web3 hostnames ipfs-universal-paths content-lists update`,classification:{safeFlags:[`action`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf web3 hostnames ipfs-universal-paths content-lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/web3/hostnames/${u.identifier==null?`<identifier>`:encodeURIComponent(String(u.identifier))}/ipfs_universal_path/content_list`,pathParams:{identifier:String(u.identifier??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({action:l(u.action,`action`,`text`),entries:s(u.entries,`entries`)}):o(u.body)});return}let a=await e(u),f=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=f,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.update({...e,zone_id:f,identifier:u.identifier}));n(t,{successLabel:`Updated`});return}if(u.action===void 0&&(u.action=await d(`action`,`Behavior of the content list.`,[`block`])),u.entries===void 0)throw Error(`--entries is required (or pass --body with this field set).`);let p=c({action:l(u.action,`action`,`text`),entries:s(u.entries,`entries`)}),m=await i(`Updating`,async()=>a.web3.hostnames.ipfsUniversalPaths.contentLists.update({...p,zone_id:f,identifier:u.identifier}));n(m,{successLabel:`Updated`})})},I={command:`content-lists`,describe:`Operations for hostnames.ipfs-universal-paths.content-lists`,builder:e=>e.command(N).command(F).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`ipfs-universal-paths`,describe:`Operations for hostnames.ipfs-universal-paths`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 web3 hostnames list
|
|
27
27
|
|
|
28
|
-
List Web3 Hostnames`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`List Web3 Hostnames`,builder:R,handler:async o=>a({command:`web3 hostnames list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s
|
|
28
|
+
List Web3 Hostnames`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`List Web3 Hostnames`,builder:R,handler:async o=>a({command:`web3 hostnames list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf web3 hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.web3.hostnames.list({zone_id:s}));n(c,{successLabel:`Loaded`})})},B={command:`hostnames`,describe:`Operations for hostnames`,builder:e=>e.command(m).command(g).command(v).command(b).command(z).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`web3`,describe:`web3`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./lazy-command-_vZGz6mv.mjs";import{r as t}from"./theme-CQ_TYifs.mjs";import{r as n}from"./dotenv-DpXaxfho.mjs";import{q as r}from"./dist-CYFkGHYv.mjs";import"./ui-YmjF66Ct.mjs";import{t as i}from"./local-C0lQ9sTg.mjs";import{i as a,n as o}from"./auth-AobvBmz4.mjs";import{n as s}from"./dist-8rP3V95o.mjs";import{a as c,r as l,t as u}from"./context-Bwkz4Lm_.mjs";import{t as d}from"./deploy-context-Cfushp8j.mjs";import{t as ee}from"./auth-token-CtguMdmF.mjs";import{t as f}from"./output-BGqhvqe2.mjs";import{t as p}from"./dry-run-DmsbOMF1.mjs";import{t as m}from"./progress-BYVZuEcG.mjs";import{n as h,t as g}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as _,r as v,t as y}from"./body-parser-DkHKPkJ7.mjs";import{n as b,t as x}from"./input-validation-D7z60HJH.mjs";import{a as S,i as C,n as w}from"./prompt-F5wxc8zq.mjs";import{t as T}from"./cli-types-9oYmRTHJ.mjs";import{l as E,s as D}from"./containers-DRzgE46U.mjs";import{a as O,i as k,n as A,o as j,r as M}from"./build-BKPVP5ip.mjs";import{r as N}from"./deploy-input-BAhS5LYx.mjs";import{n as P,t as F}from"./shared-0N31BXkY.mjs";import{readBuildOutput as I}from"@cloudflare/build-output-utils";function L(e){return e.usage(`$0 workers delete <worker-id>
|
|
3
|
+
|
|
4
|
+
Delete a Worker and all its associated resources (versions, deployments, etc.).`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the Worker even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted Worker are deleted even if other Workers reference them.`}).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 R={command:`delete <worker-id>`,describe:`Delete Worker`,builder:L,handler:async e=>g({command:`workers delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`delete-with-references`]};if(e.dryRun){let n=await c();p({command:`cf workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?i:await u();if(e.accountId=r,!await w({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`})){process.stderr.write(`Aborted.
|
|
5
|
+
`);return}let a=await m(`Deleting`,async()=>n.workers.delete({account_id:r,worker_id:e[`worker-id`],...t}));f(a,{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 workers deployments create
|
|
6
|
+
|
|
7
|
+
Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of multiple versions of a Worker.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`bypass-deployment-checks`,{type:`boolean`,description:`If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed.`}).option(`strategy`,{type:`string`,description:`The strategy field`,choices:[`percentage`]}).option(`versions`,{type:`string`,description:'Worker versions included in this deployment. Each object must contain a `version_id` UUID and a `percentage`; percentages across all objects must total 100. In the `cf` CLI, pass the entire array as one JSON value to `--versions`, either inline, for example `--versions \'[{"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]\'`, or from a JSON file with `--versions @versions.json`. Provide as a JSON array of objects or @path/to/file.json.'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`create`,describe:`Create Worker Deployment`,builder:z,handler:async e=>g({command:`workers deployments create`,classification:{safeFlags:[`bypass-deployment-checks`,`strategy`,`dry-run`]}},e,async()=>{let t={force:e[`bypass-deployment-checks`]};if(e.dryRun){let n=await c();p({command:`cf workers deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?y({strategy:b(e.strategy,`strategy`,`text`),versions:v(e.versions,`versions`)}):_(e.body)});return}let n=await o(e),r=e.local?i:await u();e.accountId=r;let a=l({scriptName:e.worker});if(e.worker=a,e.body){let i=_(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let o=await m(`Creating`,async()=>n.workers.deployments.create({body:i,account_id:r,script_name:a,...t}));f(o,{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await C(`strategy`,`The strategy field`,[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let s=y({strategy:b(e.strategy,`strategy`,`text`),versions:v(e.versions,`versions`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let d=await m(`Creating`,async()=>n.workers.deployments.create({body:s,account_id:r,script_name:a,...t}));f(d,{successLabel:`Created`})})};function V(e){return e.usage(`$0 workers deployments delete <deployment-id>
|
|
8
|
+
|
|
9
|
+
Delete a Worker Deployment. The latest deployment, which is actively serving traffic, cannot be deleted. All other deployments can be deleted.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).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 <deployment-id>`,describe:`Delete Worker Deployment`,builder:V,handler:async e=>g({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await c();p({command:`cf workers deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?i:await u();e.accountId=n;let r=l({scriptName:e.worker});if(e.worker=r,!await w({force:!!e.force,message:`This will permanently delete the Worker deployment.`})){process.stderr.write(`Aborted.
|
|
10
|
+
`);return}let a=await m(`Deleting`,async()=>t.workers.deployments.delete({account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));f(a,{successLabel:`Deleted`})})};function U(e){return e.usage(`$0 workers deployments get <deployment-id>
|
|
11
|
+
|
|
12
|
+
Get information about a Worker Deployment.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <deployment-id>`,describe:`Get Worker Deployment`,builder:U,handler:async e=>g({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();p({command:`cf workers deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?i:await u();e.accountId=n;let r=l({scriptName:e.worker});e.worker=r;let a=await m(`Loading`,async()=>t.workers.deployments.get({account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));f(a,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 workers deployments list
|
|
13
|
+
|
|
14
|
+
List Worker deployments. The first deployment in the list is the latest deployment actively serving traffic.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`since`,{type:`string`,description:`Start of the deployment creation time range, inclusive.`}).option(`until`,{type:`string`,description:`End of the deployment creation time range, inclusive.`}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`list`,describe:`List Worker Deployments`,builder:G,handler:async e=>g({command:`workers deployments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await c();p({command:`cf workers deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?i:await u();e.accountId=r;let a=l({scriptName:e.worker});e.worker=a;let s=await m(`Loading`,async()=>n.workers.deployments.list({account_id:r,script_name:a,...t}));f(s,{successLabel:`Loaded`})})},q={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.usage(`$0 workers get <worker-id>
|
|
15
|
+
|
|
16
|
+
Get details about a specific Worker.`).positional(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get <worker-id>`,describe:`Get Worker`,builder:J,handler:async e=>g({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();p({command:`cf workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?i:await u();e.accountId=n;let r=await m(`Loading`,async()=>t.workers.get({account_id:n,worker_id:e[`worker-id`]}));f(r,{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 workers list
|
|
17
|
+
|
|
18
|
+
List all Workers for an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`order-by`,{type:`string`,description:`Property to sort results by.`,choices:[`deployed_on`,`updated_on`,`created_on`,`name`]}).option(`order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Workers`,builder:T(X),handler:async e=>g({command:`workers list`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order_by:e[`order-by`],order:e.order};if(e.dryRun){let e=await c();p({command:`cf workers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/workers`,pathParams:{},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?i:await u();e.accountId=r;let a=await m(`Loading`,async()=>n.workers.list({account_id:r,...t}));f(a,{successLabel:`Loaded`})})};function te(e){return e.usage(`$0 workers scripts search
|
|
19
|
+
|
|
20
|
+
Search for Worker scripts in an account.`).option(`name`,{type:`string`,description:`Worker name to search for. Both exact and partial matches are returned.`}).option(`id`,{type:`string`,description:`Worker ID (also called tag) to search for. Only exact matches are returned.`}).option(`order-by`,{type:`string`,description:`Property to sort results by. Results are sorted in ascending order.`,choices:[`created_on`,`modified_on`,`name`]}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`search`,describe:`Search Worker Scripts`,builder:T(te),handler:async e=>g({command:`workers scripts search`,classification:{safeFlags:[`order-by`,`dry-run`]}},e,async()=>{let t={name:e.name,id:e.id,order_by:e[`order-by`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await c();p({command:`cf workers scripts search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/scripts-search`,pathParams:{},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?i:await u();e.accountId=r;let a=await m(`Loading`,async()=>n.workers.scripts.search({account_id:r,...t}));f(a,{successLabel:`Loaded`})})},ne={command:`scripts`,describe:`Operations for scripts`,builder:e=>e.command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.usage(`$0 workers secrets bulk
|
|
21
|
+
|
|
22
|
+
Create, update, or delete multiple secrets on a Worker script in a single operation using JSON Merge Patch (RFC 7396). This operation creates a single version with all changes included. Prefer this API instead of changing many secrets individually. Usage: - To create or update a secret, set its value to a secret object. - To delete a secret, set its value to \`null\`. - Secrets not included in the request are left unchanged.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`JSON Merge Patch (RFC 7396) request body for bulk secret changes. `}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ie={command:`bulk`,describe:`Patch multiple Worker script secrets`,builder:re,handler:async e=>g({command:`workers secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();p({command:`cf workers secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets-bulk`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?void 0:_(e.body):{file:e.file}});return}let t=await o(e),n=e.local?i:await u();e.accountId=n;let r=l({scriptName:e.worker});if(e.worker=r,e.file){let i=x(e.file),o=await m(`Updating`,async()=>a(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i,headers:{"Content-Type":`application/merge-patch+json`}}));f(o,{successLabel:`Updated`});return}if(e.body){let i=_(e.body),o=await m(`Updating`,async()=>a(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));f(o,{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.`)})};function ae(e){return e.usage(`$0 workers secrets delete <secret-name>
|
|
23
|
+
|
|
24
|
+
Remove a secret from a Worker script by creating a new version without that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).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 oe={command:`delete <secret-name>`,describe:`Delete Worker script secret`,builder:ae,handler:async e=>g({command:`workers secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await c();p({command:`cf workers secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?i:await u();e.accountId=r;let a=l({scriptName:e.worker});if(e.worker=a,!await w({force:!!e.force,message:`This will permanently delete the Worker script secret.`})){process.stderr.write(`Aborted.
|
|
25
|
+
`);return}let s=await m(`Deleting`,async()=>n.workers.secrets.delete({account_id:r,script_name:a,secret_name:e[`secret-name`],...t}));f(s,{successLabel:`Deleted`})})};function se(e){return e.usage(`$0 workers secrets get <secret-name>
|
|
26
|
+
|
|
27
|
+
Get a given secret binding (value omitted) on a Worker script.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get <secret-name>`,describe:`Get a secret binding`,builder:se,handler:async e=>g({command:`workers secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await c();p({command:`cf workers secrets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?i:await u();e.accountId=r;let a=l({scriptName:e.worker});e.worker=a;let s=await m(`Loading`,async()=>n.workers.secrets.get({account_id:r,script_name:a,secret_name:e[`secret-name`],...t}));f(s,{successLabel:`Loaded`})})};function le(e){return e.usage(`$0 workers secrets list
|
|
28
|
+
|
|
29
|
+
List the names of secrets bound to a Worker script.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`list`,describe:`List secrets bound to a Worker script`,builder:le,handler:async e=>g({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();p({command:`cf workers secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?i:await u();e.accountId=n;let r=l({scriptName:e.worker});e.worker=r;let a=await m(`Loading`,async()=>t.workers.secrets.list({account_id:n,script_name:r}));f(a,{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 workers secrets update <name>
|
|
30
|
+
|
|
31
|
+
Add a secret to a Worker script by creating a new version with that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`text`,{type:`string`,description:`The secret value to use.`}).option(`type`,{type:`string`,description:`The kind of resource that the binding provides.`,choices:[`secret_text`,`secret_key`]}).option(`format`,{type:`string`,description:`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,choices:[`raw`,`pkcs8`,`spki`,`jwk`]}).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`usages`,{type:`string`,array:!0,description:`Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A secret value accessible through a binding.`}).conflicts(`text`,[`format`,`key-base64`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`format`])}const fe={command:`update <name>`,describe:`Add a secret to a Worker script`,builder:de,handler:async e=>g({command:`workers secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();p({command:`cf workers secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?y({text:b(e.text,`text`,`text`),type:b(e.type,`type`,`text`),format:b(e.format,`format`,`text`),key_base64:b(e[`key-base64`],`key-base64`,`text`),usages:e.usages,name:e.name}):_(e.body)});return}let t=await o(e),n=e.local?i:await u();e.accountId=n;let r=l({scriptName:e.worker});if(e.worker=r,e.body){let i=_(e.body),a=await m(`Updating`,async()=>t.workers.secrets.update({body:i,account_id:n,script_name:r}));f(a,{successLabel:`Updated`});return}if(e.type===void 0&&(e.type=await C(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await S(`text`,`The secret value to use.`,{kind:`secret`,question:`Enter value for --text`})),e.type===`secret_key`)throw Error(`The secret_key variant requires algorithm, which cannot be supplied as flags. Pass --body with a complete request body.`);let a=y({text:b(e.text,`text`,`text`),type:b(e.type,`type`,`text`),format:b(e.format,`format`,`text`),key_base64:b(e[`key-base64`],`key-base64`,`text`),usages:e.usages,name:e.name}),s=await m(`Updating`,async()=>t.workers.secrets.update({body:a,account_id:n,script_name:r}));f(s,{successLabel:`Updated`})})},pe={command:`secrets`,describe:`Operations for secrets`,builder:e=>e.command(ie).command(oe).command(ce).command(ue).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.usage(`$0 workers versions delete <version-id>
|
|
32
|
+
|
|
33
|
+
Delete a Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or 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 he={command:`delete <version-id>`,describe:`Delete Worker Version`,builder:me,handler:async e=>g({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await c();p({command:`cf workers versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?i:await u();if(e.accountId=n,!await w({force:!!e.force,message:`This will permanently delete the Worker version.`})){process.stderr.write(`Aborted.
|
|
34
|
+
`);return}let r=await m(`Deleting`,async()=>t.workers.versions.delete({account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]}));f(r,{successLabel:`Deleted`})})};function ge(e){return e.usage(`$0 workers versions get <version-id>
|
|
35
|
+
|
|
36
|
+
Get details about a specific Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`include`,{type:`string`,description:"Whether to include the `modules` property of the version in the response, which contains code and sourcemap content and may add several megabytes to the response size.",choices:[`modules`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`get <version-id>`,describe:`Get Worker Version`,builder:T(ge),handler:async e=>g({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let t={include:e.include};if(e.dryRun){let n=await c();p({command:`cf workers versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?i:await u();e.accountId=r;let a=await m(`Loading`,async()=>n.workers.versions.get({account_id:r,worker_id:e[`worker-id`],version_id:e[`version-id`],...t}));f(a,{successLabel:`Loaded`})})};function ve(e){return e.usage(`$0 workers versions list
|
|
37
|
+
|
|
38
|
+
List all versions for a Worker.`).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`list`,describe:`List Worker Versions`,builder:ve,handler:async e=>g({command:`workers versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await c();p({command:`cf workers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=e.local?i:await u();e.accountId=r;let a=await m(`Loading`,async()=>n.workers.versions.list({account_id:r,worker_id:e[`worker-id`],...t}));f(a,{successLabel:`Loaded`})})};function be(e){return P(e).hide(`local`).hide(`persist-to`).epilogue(`Local simulation (--local) is not supported by this command.`).option(`preview-alias`,{type:`string`,description:`Preview alias for this Worker Version`,requiresArg:!0})}var $=h({command:`create`,describe:`Upload a new Worker Version without deploying it`,builder:be,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers versions create.`);await F(e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});const xe={command:`versions`,describe:`Operations for versions`,builder:e=>e.command($).command(he).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Se=e(`check`,`Profile a Worker's startup performance`,()=>import(`./command-CKQlxypn.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function Ce(e){return e.hide(`local`).hide(`persist-to`).epilogue(`Local simulation (--local) is not supported by this command.`).option(`prebuilt`,{type:`boolean`,description:`Use existing Build Output Specification files without building`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Run checks without applying triggers`,default:!1}).option(`worker`,M)}const we={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:Ce,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers triggers deploy.`);e.prebuilt||(await A(e.mode,{worker:e.worker}),s.message(``,{spacing:0})),await n(e,()=>Te(e))}};async function Te(e){let{workers:n,rootConfig:i}=await I(process.cwd());if(i.buildContext.isPreview){let e=[`cf previews deploy`,`--prebuilt`,...i.buildContext.mode===void 0?[]:[`--mode`,i.buildContext.mode]].join(` `);throw Error(`The Build Output was created for a Preview, but this command deploys production triggers. To use the existing Build Output and deploy the Preview, run "${e}". To deploy production triggers, rebuild without Preview settings before deploying.`)}j(e.mode,i.buildContext.mode);let a=O(n,e.worker),{wranglerConfig:o}=k(a,i),c=e[`dry-run`]?``:await ee(),l=e[`dry-run`]?void 0:i.accountId??await u({skipProjectSettings:!0,complianceRegion:r(o)});E(d(c)),s.message(t.bold(`Deploy triggers`),{symbol:t.muted(`├`),spacing:0}),await D(N(a,o,l,e)),s.success(e[`dry-run`]?`Dry run complete`:`Trigger deploy complete`)}const Ee={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(h(we,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var De=e(`types`,`Generate types from cloudflare.config.ts`,()=>import(`./command-ZBQ1WITj.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});const Oe={command:`workers`,describe:`workers`,builder:e=>e.command(Se).command(R).command(Y).command(Z).command(De).command(q).command(ne).command(pe).command(Ee).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Oe as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";function d(e){return e.usage(`$0 workers-builds workers migrate-to-previews <script-tag>
|
|
3
|
+
|
|
4
|
+
Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`deploy-command`,{type:`string`,description:`Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for migrating a Worker's legacy non-production trigger to Previews.`})}const f={command:`migrate-to-previews <script-tag>`,describe:`Migrate worker to previews`,builder:d,handler:async d=>s({command:`workers-builds workers migrate-to-previews`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf workers-builds workers migrate-to-previews`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/workers/${d[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(d[`script-tag`]))}/migrate_to_previews`,pathParams:{"script-tag":String(d[`script-tag`]??``)},bodyKind:`json`,body:d.body===void 0?l({deploy_command:u(d[`deploy-command`],`deploy-command`,`text`)}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Creating`,async()=>s.workersBuilds.workers.migrateToPreviews({...e,account_id:f,script_tag:d[`script-tag`]}));i(t,{successLabel:`Created`});return}let p=l({deploy_command:u(d[`deploy-command`],`deploy-command`,`text`)}),m=await o(`Creating`,async()=>s.workersBuilds.workers.migrateToPreviews({...p,account_id:f,script_tag:d[`script-tag`]}));i(m,{successLabel:`Created`})})};function p(e){return e.usage(`$0 workers-builds workers previews create-build <preview-id>
|
|
5
|
+
|
|
6
|
+
Trigger a build for a single Preview.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0)){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].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 --seed_repo-* flag is set`)}return!0})}const m={command:`create-build <preview-id>`,describe:`Create preview build`,builder:p,handler:async d=>s({command:`workers-builds workers previews create-build`,classification:{safeFlags:[`seed-repo-provider`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf workers-builds workers previews create-build`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/workers/${d[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(d[`script-tag`]))}/previews/${d[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(d[`preview-id`]))}/builds`,pathParams:{"script-tag":String(d[`script-tag`]??``),"preview-id":String(d[`preview-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({seed_repo:{owner:u(d[`seed-repo-owner`],`seed-repo-owner`,`text`),path:u(d[`seed-repo-path`],`seed-repo-path`,`text`),provider:u(d[`seed-repo-provider`],`seed-repo-provider`,`text`),repository:u(d[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Creating`,async()=>s.workersBuilds.workers.previews.createBuild({body:e,account_id:f,script_tag:d[`script-tag`],preview_id:d[`preview-id`]}));i(t,{successLabel:`Created`});return}let p=l({seed_repo:{owner:u(d[`seed-repo-owner`],`seed-repo-owner`,`text`),path:u(d[`seed-repo-path`],`seed-repo-path`,`text`),provider:u(d[`seed-repo-provider`],`seed-repo-provider`,`text`),repository:u(d[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),m=await o(`Creating`,async()=>s.workersBuilds.workers.previews.createBuild({body:p,account_id:f,script_tag:d[`script-tag`],preview_id:d[`preview-id`]}));i(m,{successLabel:`Created`})})};function h(e){return e.usage(`$0 workers-builds workers previews edit <preview-id>
|
|
7
|
+
|
|
8
|
+
Update a single Preview of a Worker. Supports partial updates to the tracked branch, the automation flags, and the build settings.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`auto-build`,{type:`boolean`,description:`Whether pushes to the git branch build this Preview. Deploy hooks, manual builds, and retries run regardless of this setting.`}).option(`auto-delete`,{type:`boolean`,description:`Whether deleting the git branch also deletes this Preview.`}).option(`branch`,{type:`string`,description:`Git branch this Preview tracks`}).option(`settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Preview. At least one field must be provided, and omitted fields are left unchanged.`})}const g={command:`edit <preview-id>`,describe:`Update preview`,builder:h,handler:async d=>s({command:`workers-builds workers previews edit`,classification:{safeFlags:[`auto-build`,`auto-delete`,`settings-build-caching-enabled`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf workers-builds workers previews edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/workers/${d[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(d[`script-tag`]))}/previews/${d[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(d[`preview-id`]))}`,pathParams:{"script-tag":String(d[`script-tag`]??``),"preview-id":String(d[`preview-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({auto_build:d[`auto-build`],auto_delete:d[`auto-delete`],branch:u(d.branch,`branch`,`text`),settings:{build_caching_enabled:d[`settings-build-caching-enabled`],build_command:u(d[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:u(d[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:u(d[`settings-deploy-command`],`settings-deploy-command`,`text`),path_excludes:d[`settings-path-excludes`],path_includes:d[`settings-path-includes`],root_directory:u(d[`settings-root-directory`],`settings-root-directory`,`text`)}}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.workersBuilds.workers.previews.edit({...e,account_id:f,script_tag:d[`script-tag`],preview_id:d[`preview-id`]}));i(t,{successLabel:`Updated`});return}let p=l({auto_build:d[`auto-build`],auto_delete:d[`auto-delete`],branch:u(d.branch,`branch`,`text`),settings:{build_caching_enabled:d[`settings-build-caching-enabled`],build_command:u(d[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:u(d[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:u(d[`settings-deploy-command`],`settings-deploy-command`,`text`),path_excludes:d[`settings-path-excludes`],path_includes:d[`settings-path-includes`],root_directory:u(d[`settings-root-directory`],`settings-root-directory`,`text`)}}),m=await o(`Updating`,async()=>s.workersBuilds.workers.previews.edit({...p,account_id:f,script_tag:d[`script-tag`],preview_id:d[`preview-id`]}));i(m,{successLabel:`Updated`})})};function _(e){return e.usage(`$0 workers-builds workers previews get <preview-id>
|
|
9
|
+
|
|
10
|
+
Retrieve a single Preview of a Worker, including the build settings it currently uses.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <preview-id>`,describe:`Get preview`,builder:_,handler:async c=>s({command:`workers-builds workers previews get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf workers-builds workers previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/workers/${c[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(c[`script-tag`]))}/previews/${c[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(c[`preview-id`]))}`,pathParams:{"script-tag":String(c[`script-tag`]??``),"preview-id":String(c[`preview-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.workersBuilds.workers.previews.get({account_id:l,script_tag:c[`script-tag`],preview_id:c[`preview-id`]}));i(u,{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 workers-builds workers previews list-builds <preview-id>
|
|
11
|
+
|
|
12
|
+
List the builds of a single Preview with pagination.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list-builds <preview-id>`,describe:`List builds by preview`,builder:y,handler:async c=>s({command:`workers-builds workers previews list-builds`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf workers-builds workers previews list-builds`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/workers/${c[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(c[`script-tag`]))}/previews/${c[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(c[`preview-id`]))}/builds`,pathParams:{"script-tag":String(c[`script-tag`]??``),"preview-id":String(c[`preview-id`]??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.workersBuilds.workers.previews.listBuilds({account_id:u,script_tag:c[`script-tag`],preview_id:c[`preview-id`],...s}));i(d,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 workers-builds workers previews list
|
|
13
|
+
|
|
14
|
+
List the Previews of a Worker with pagination.`).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List previews`,builder:x,handler:async c=>s({command:`workers-builds workers previews list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf workers-builds workers previews list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/workers/${c[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(c[`script-tag`]))}/previews`,pathParams:{"script-tag":String(c[`script-tag`]??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.workersBuilds.workers.previews.list({account_id:u,script_tag:c[`script-tag`],...s}));i(d,{successLabel:`Loaded`})})},C={command:`previews`,describe:`Operations for workers.previews`,builder:e=>e.command(m).command(g).command(v).command(S).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`workers`,describe:`Operations for workers`,builder:e=>e.command(f).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`workers-builds`,describe:`workers-builds`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
|