cf 1.0.0-beta.27 → 1.0.0-beta.28
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/dist/_meta/commands.json +5787 -1914
- package/dist/_meta/hand-written-commands.json +2 -2
- package/dist/_meta/schemas.json +796 -557
- package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-D9edOyag.mjs} +5 -5
- package/dist/{access-BxEprr2f.mjs → access-CKCCSrrU.mjs} +1 -1
- package/dist/{accounts-DU2ZNYqP.mjs → accounts-CNb9U9bK.mjs} +22 -22
- package/dist/{acm-CBCIKBJ4.mjs → acm-CdKTAToZ.mjs} +3 -3
- package/dist/{addressing-BKxiLRHk.mjs → addressing-eZI_C-b0.mjs} +18 -18
- package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
- package/dist/{ai-DqEN_hhg.mjs → ai-Csl_QNwv.mjs} +7 -7
- package/dist/ai-audit-DlqWsQi-.mjs +6 -0
- package/dist/{ai-gateway-B0uiYVHq.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
- package/dist/{ai-search-DbZIxdio.mjs → ai-search-BxyhS3X7.mjs} +17 -17
- package/dist/{ai-security-CvZfP2JC.mjs → ai-security-DvU2iYkY.mjs} +3 -3
- package/dist/{alerting-BjGwBxZT.mjs → alerting-r0G2X9y9.mjs} +10 -10
- package/dist/{analytics-C7kT_H-W.mjs → analytics-C6bfqm-W.mjs} +7 -7
- package/dist/analytics-engine-BlIecoOe.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BbcvDtff.mjs → api-security-DZ7GWOqD.mjs} +26 -26
- package/dist/argo-Bh0_cj49.mjs +14 -0
- package/dist/{artifacts-2R2sxIKO.mjs → artifacts-VZJWVq_6.mjs} +16 -16
- package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
- package/dist/auth-B-h0BHg7.mjs +2 -0
- package/dist/auth-B6tswVxH.mjs +2 -0
- package/dist/{auth-D499YE2n.mjs → auth-clmqFEWU.mjs} +3 -3
- package/dist/{auth-token-BwpERbnG.mjs → auth-token-DW4dJVdj.mjs} +1 -1
- package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-C0ynlGHf.mjs} +47 -47
- package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
- package/dist/billing-B2KusU6g.mjs +22 -0
- package/dist/{blocks-C8vyXIAT.mjs → blocks-BFulF68V.mjs} +1 -1
- package/dist/body-parser-DoewLePl.mjs +2 -0
- package/dist/{body-unions-CjpNjwSW.mjs → body-unions-DNs981Ia.mjs} +1 -1
- package/dist/{bot-management-fwxKIbaB.mjs → bot-management-CXHXgrQC.mjs} +2 -2
- package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
- package/dist/brand-protection-kv1ba80i.mjs +14 -0
- package/dist/browser-run-D-vRoZmf.mjs +40 -0
- package/dist/build-BzJGqb2o.mjs +2 -0
- package/dist/build-FFxzigo4.mjs +2 -0
- package/dist/{builds-CoazxuN-.mjs → builds-BbxINHRP.mjs} +15 -15
- package/dist/cache-BacNNtLu.mjs +36 -0
- package/dist/{cf-hP0SOgC6.mjs → cf-BQ_LRiut.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
- package/dist/{chunk-SOBRPAPT-BKzUiNx_.mjs → chunk-SOBRPAPT-QTjnHSNs.mjs} +1 -1
- package/dist/{cli-Nqf58-1c.mjs → cli-B7vslRfu.mjs} +1 -1
- package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-bzB9JosR.mjs} +6 -6
- package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
- package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
- package/dist/{cloudforce-one-CCaIBOAo.mjs → cloudforce-one-DWBPQDA3.mjs} +71 -71
- package/dist/{command-C4OgtX_x.mjs → command-AVwd7XjE.mjs} +1 -1
- package/dist/{command-C5Kqc5Km.mjs → command-B87T_f2f.mjs} +1 -1
- package/dist/{command-CelQVrZL.mjs → command-CEHhi3t0.mjs} +1 -1
- package/dist/{command-ByYf12-8.mjs → command-CYmQE79n.mjs} +1 -1
- package/dist/{command-pMoNdd22.mjs → command-CbxXc5IW.mjs} +1 -1
- package/dist/{command-Bih1HLr3.mjs → command-Ce8CVLth.mjs} +1 -1
- package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
- package/dist/{command-BASaTmJc.mjs → command-D4YcwpVp.mjs} +1 -1
- package/dist/{command-BxZBNPxG.mjs → command-D895kdlh.mjs} +1 -1
- package/dist/{command-CrAlzysj.mjs → command-D9Qyi1B0.mjs} +1 -1
- package/dist/{command-BiIVclNA.mjs → command-DeutqL1n.mjs} +1 -1
- package/dist/{command-C0qCuw03.mjs → command-Dl9ICrRK.mjs} +1 -1
- package/dist/{command-CZAR85ba.mjs → command-DtCSe8Hy.mjs} +1 -1
- package/dist/{command-C2FVMd1b.mjs → command-DwzVtmb3.mjs} +1 -1
- package/dist/{command-CFxyp8Uo.mjs → command-wtBubtZ4.mjs} +1 -1
- package/dist/{completions-DRzBiqpv.mjs → completions-BvdKtzsX.mjs} +1 -1
- package/dist/{connector-interrupts-CrTeSyaM.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
- package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
- package/dist/{connectors-D1WFLJoE.mjs → connectors-DZFGNw3i.mjs} +4 -4
- package/dist/containers-B06OGOEB.mjs +380 -0
- package/dist/{containers-BOBEs1Gk.mjs → containers-DCzQCo79.mjs} +8 -8
- package/dist/{content-scan-D1GfPSL0.mjs → content-scan-XhnNJqXf.mjs} +4 -4
- package/dist/{context-Dp4CXG22.mjs → context-BY1Eh_Qe.mjs} +1 -1
- package/dist/{cps-D4uhzg3k.mjs → cps-CohlxvuN.mjs} +2 -2
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/{csam-scanner-DOOUBeBM.mjs → csam-scanner-BV4bHq8v.mjs} +2 -2
- package/dist/{custom-csrs-DtdFo5YZ.mjs → custom-csrs-BVdMQjYq.mjs} +2 -2
- package/dist/{custom-hostnames-ccdlELaD.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
- package/dist/{custom-nameservers-p3gDjfva.mjs → custom-nameservers-CapMDyly.mjs} +2 -2
- package/dist/{custom-pages-DAkKVzgR.mjs → custom-pages-BVIniWfq.mjs} +5 -5
- package/dist/{d1-CDIyRdh4.mjs → d1-nJCOJZb8.mjs} +20 -22
- package/dist/{delegate-B4bKqF7i.mjs → delegate-CcL6RoGw.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BaC5Ty7F.mjs → deploy-DJMnWFNk.mjs} +1 -1
- package/dist/{deploy-context-DTTgNGro.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
- package/dist/{deploy-input-mAy06fAI.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
- package/dist/{dev-De-HszNT.mjs → dev-GsYHvMah.mjs} +1 -1
- package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
- package/dist/{dist-D5qkmHhC.mjs → dist-D-ihn_mV.mjs} +42 -33
- package/dist/{dls-DWBiYzY1.mjs → dls-N1x8sAK3.mjs} +3 -3
- package/dist/{dns-wMjf1t6-.mjs → dns-DATWP-PF.mjs} +25 -25
- package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-n3Y2ui6W.mjs} +4 -4
- package/dist/{docs-BA7qslb2.mjs → docs-CRc_WOXh.mjs} +1 -1
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
- package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
- package/dist/{email-auth-BShMFXn4.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
- package/dist/{email-domains-CDSbVclP.mjs → email-domains-uL22-zRY.mjs} +2 -2
- package/dist/{email-routing-CBCkbg_F.mjs → email-routing-CV43rMJC.mjs} +12 -12
- package/dist/{email-security-CnNa1YON.mjs → email-security-DK_SJ0yi.mjs} +38 -38
- package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-CTQafGec.mjs} +11 -11
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/{errors-DatLr-iR.mjs → errors-VG1mgwJl.mjs} +1 -1
- package/dist/{field-extractors-BwGdMnTr.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
- package/dist/{firewall-CY_oem-d.mjs → firewall-CW-fAI9m.mjs} +12 -12
- package/dist/{flagship-Bat5EZCk.mjs → flagship-RiLnDwfJ.mjs} +8 -8
- package/dist/{fraud-CSUKLh8X.mjs → fraud-DvfBBTe8.mjs} +2 -2
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
- package/dist/{healthchecks-uC43QKQd.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
- package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
- package/dist/{iam-8T74DNhH.mjs → iam-LlGEzRCq.mjs} +14 -14
- package/dist/{images-C3JUaf6b.mjs → images-C5WqUXkK.mjs} +11 -11
- package/dist/index.mjs +1 -1
- package/dist/{init-BEVVz4_P.mjs → init-EVsjBrOz.mjs} +2 -2
- package/dist/{intel-DRy4rHrt.mjs → intel-vcWyslaX.mjs} +14 -14
- package/dist/{interactive-CKHdGvkh.mjs → interactive-BCDFSPtq.mjs} +1 -1
- package/dist/{internal-CamuESs0.mjs → internal-BhV9WjLp.mjs} +1 -1
- package/dist/{ips-DinCNnWj.mjs → ips-CqHjVsqd.mjs} +1 -1
- package/dist/k2-CZT2Pd5J.mjs +10 -0
- package/dist/kv-Ipa7dnvF.mjs +12 -0
- package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
- package/dist/{leaked-credential-checks-CSZd9hBQ.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
- package/dist/{live-B6AsI_E5.mjs → live-C9L1bNuE.mjs} +1 -1
- package/dist/{load-balancers-gap5u4b1.mjs → load-balancers-Cb3VkSfc.mjs} +21 -21
- package/dist/local-D5Vq6ooZ.mjs +2 -0
- package/dist/{local-CgBhtmON.mjs → local-DIJ7SIKC.mjs} +1 -1
- package/dist/{local-runtime-CmlJ20uJ.mjs → local-runtime-BZjgkacr.mjs} +1 -1
- package/dist/{login-BJHaTERg.mjs → login-DG5ebyab.mjs} +1 -1
- package/dist/login-DRJugxya.mjs +2 -0
- package/dist/{logpush-qhlxsioM.mjs → logpush-C5Gw7F_9.mjs} +16 -16
- package/dist/{logs-bI54CJ0w.mjs → logs-y3REfHbb.mjs} +8 -8
- package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
- package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-BPV_POf5.mjs} +129 -129
- package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
- package/dist/{managed-transforms-CUC-uAbW.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
- package/dist/{mcp-CyI0sDmL.mjs → mcp-RPtrISTy.mjs} +6 -6
- package/dist/{mesh-Czr0UCP4.mjs → mesh-DZ4QHBPE.mjs} +5 -5
- package/dist/{migrate-DKDWYrz2.mjs → migrate-CRIUqGi2.mjs} +1 -1
- package/dist/{monetization-NUgfDtSy.mjs → monetization-CVZqM8Xo.mjs} +4 -4
- package/dist/{network-B42zrBic.mjs → network-DLt2JUo1.mjs} +15 -15
- package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
- package/dist/{o11y-oEUpMC3O.mjs → o11y-ySxrnP1Z.mjs} +45 -43
- package/dist/{oauth-BmSFLp_s.mjs → oauth-CFVUl-Wv.mjs} +1 -1
- package/dist/{oauth-BLQ1-y3R.mjs → oauth-Cidoyxfp.mjs} +1 -1
- package/dist/{observability-BxhJQCgZ.mjs → observability-C-KNh__y.mjs} +1 -1
- package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
- package/dist/organizations-DbeeWUL4.mjs +71 -0
- package/dist/output-BZQEl3mK.mjs +2 -0
- package/dist/package-B7RgwuFR.mjs +2 -0
- package/dist/{page-rules-J6LhwR-s.mjs → page-rules-DRw763O1.mjs} +4 -4
- package/dist/{pages-BksdnChs.mjs → pages-DfQnxiTk.mjs} +12 -12
- package/dist/{pay-per-crawl-BLcbHRoR.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
- package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-wdEhl8k4.mjs} +11 -11
- package/dist/{pipelines-B5AoB3f3.mjs → pipelines-DbyrI6F4.mjs} +11 -11
- package/dist/{precursor-D3VH2MXT.mjs → precursor-Dx8lN4UJ.mjs} +2 -2
- package/dist/previews-DEVNSip2.mjs +6 -0
- package/dist/{progress-DLri-rA7.mjs → progress-yvPscjYg.mjs} +1 -1
- package/dist/{prompt-D0dXwuME.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
- package/dist/{queues-BsAck4To.mjs → queues-DgMc7Z6A.mjs} +18 -18
- package/dist/{r2-BYjdHDEZ.mjs → r2-BpTVicIq.mjs} +21 -21
- package/dist/{radar-CvLtu-Vr.mjs → radar-DW-S1VUh.mjs} +11 -11
- package/dist/{raw-fetch-DQeDx1wT.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
- package/dist/{ready-gsGEaWLL.mjs → ready-d0li0X6r.mjs} +1 -1
- package/dist/{realtime-DiCEgFTC.mjs → realtime-DMKHLYF4.mjs} +41 -41
- package/dist/{registrar-D4wdgWpo.mjs → registrar-D23gfKBi.mjs} +5 -5
- package/dist/{registrar-sandbox-B6yopzdG.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
- package/dist/{reporting-BiHgnT8L.mjs → reporting-WX8P3Y0k.mjs} +2 -2
- package/dist/{request-headers-CoxHUNcB.mjs → request-headers-C0FpeBhz.mjs} +1 -1
- package/dist/{request-tracers-817HTytF.mjs → request-tracers-qd7XOAka.mjs} +2 -2
- package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
- package/dist/{rules-CRhe_ca9.mjs → rules-CB0QQTB3.mjs} +5 -5
- package/dist/{rulesets-CKyc-Xlx.mjs → rulesets-DmqwixUC.mjs} +6 -6
- package/dist/{rum-BfnWHW_d.mjs → rum-BZ_24qZU.mjs} +9 -9
- package/dist/{run-Ciw_GIrC.mjs → run-BOKI1uWa.mjs} +1 -1
- package/dist/run-DBqOjD1P.mjs +2 -0
- package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
- package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
- package/dist/{schema-flags-DrqvwQNw.mjs → schema-flags-CXm9iIv6.mjs} +1 -1
- package/dist/{scim-C4iRWNYB.mjs → scim-DchxaJfE.mjs} +8 -8
- package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-oAft1cFE.mjs} +5 -5
- package/dist/{security-insights-SlUGW3F_.mjs → security-insights-DMm0qg_m.mjs} +15 -15
- package/dist/{security-txt-C3YS0REz.mjs → security-txt-CIt0494b.mjs} +2 -2
- package/dist/{session-D2yuwO4i.mjs → session-vzNfUhPl.mjs} +1 -1
- package/dist/{shared--uVkAAd7.mjs → shared-MK-_lkbn.mjs} +1 -1
- package/dist/{signed-url-ClLk45_J.mjs → signed-url-gNangfwc.mjs} +1 -1
- package/dist/{smart-shield-Dn95hqUH.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
- package/dist/{snippets-BNUKOajz.mjs → snippets-DdoDYXW-.mjs} +3 -3
- package/dist/{spawn-DuT4snxu.mjs → spawn-B5F4OIHG.mjs} +1 -1
- package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-DLYIHelC.mjs} +3 -3
- package/dist/{speed-BrVeZRyX.mjs → speed-DugG9Tm9.mjs} +2 -2
- package/dist/{sql-BX1pBqj3.mjs → sql-Bb56llsb.mjs} +2 -2
- package/dist/src-BoSDeQ9m.mjs +133 -0
- package/dist/{ssl-Bx4LCutF.mjs → ssl-Bg4X3WGk.mjs} +24 -24
- package/dist/startup-profile-DQVkZZpb.mjs +2 -0
- package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-DZL2DC44.mjs} +1 -1
- package/dist/state-DW3QZtfh.mjs +2 -0
- package/dist/{state-BmzOLELo.mjs → state-mr5ux1Nb.mjs} +1 -1
- package/dist/{stream-BRzr6yh0.mjs → stream-BuZYDbNR.mjs} +21 -21
- package/dist/{tags-xVzjZxdt.mjs → tags-SKz2odE_.mjs} +3 -3
- package/dist/{telemetry-CJ9URio3.mjs → telemetry-B4zmCpT0.mjs} +1 -1
- package/dist/telemetry-DkDUr4KK.mjs +2 -0
- package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-BhkhBerL.mjs} +2 -2
- package/dist/tenants-DD-GMq0K.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
- package/dist/{tunnels-DQVXKUKA.mjs → tunnels-D90ztENM.mjs} +6 -6
- package/dist/{turnstile-B_Ugzgom.mjs → turnstile-DhSU_Xar.mjs} +4 -4
- package/dist/ui-xjCox-gU.mjs +2 -0
- package/dist/{update-check-DHUo4FOJ.mjs → update-check-CRttabfu.mjs} +1 -1
- package/dist/{update-check-DRr0eRhB.mjs → update-check-HltjTMDE.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
- package/dist/{url-scanner-BH4PLy16.mjs → url-scanner-BRdWwka4.mjs} +3 -3
- package/dist/{user-Bn82Qw0Y.mjs → user-Cmb1_Wu5.mjs} +50 -50
- package/dist/{vectorize-DoVVz_sh.mjs → vectorize-BTBerJME.mjs} +11 -11
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-6Bpy6Bgt.mjs +2 -0
- package/dist/{waiting-rooms-QUW131o3.mjs → waiting-rooms-LymmKIGr.mjs} +13 -13
- package/dist/{web-assets-CgQXsp8m.mjs → web-assets-LHPQsrnY.mjs} +21 -21
- package/dist/{web3-TY9s6Swn.mjs → web3-BsOio0Ae.mjs} +12 -12
- package/dist/workers-BnLiOjZf.mjs +39 -0
- package/dist/{workers-builds-BgGY0IGk.mjs → workers-builds-sKpITeRk.mjs} +4 -4
- package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
- package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-D8lefWDo.mjs} +3 -3
- package/dist/{workflows-6m85DdqF.mjs → workflows-B-ZIG3y7.mjs} +22 -22
- package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-6E6wT_LZ.mjs} +66 -57
- package/dist/{zaraz-8WSJ7l0L.mjs → zaraz-BBKki5WS.mjs} +11 -11
- package/dist/{zero-trust-DK0cqDZv.mjs → zero-trust-BZDXM5r6.mjs} +165 -165
- package/dist/{zones-DTAcguf6.mjs → zones-B-UV_DGE.mjs} +24 -24
- package/package.json +14 -14
- package/dist/ai-audit-BmzOgt6x.mjs +0 -6
- package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-D1VONzu-.mjs +0 -14
- package/dist/auth-CspwoBlp.mjs +0 -2
- package/dist/auth-FK2eLQ02.mjs +0 -2
- package/dist/billing-DRNww0iC.mjs +0 -24
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/brand-protection-BVICLzBc.mjs +0 -26
- package/dist/browser-run-CEk-NIgP.mjs +0 -40
- package/dist/build-CRm2TQq8.mjs +0 -2
- package/dist/build-DO_GNhRl.mjs +0 -2
- package/dist/cache-jlLJLSu7.mjs +0 -36
- package/dist/containers-DINLx5_i.mjs +0 -380
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/k2-wsanPL3y.mjs +0 -10
- package/dist/kv-BLSPcEnH.mjs +0 -12
- package/dist/local-CFsO9Tkg.mjs +0 -2
- package/dist/login-BfuOf-Yi.mjs +0 -2
- package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
- package/dist/organization-CEnlXwrl.mjs +0 -70
- package/dist/organizations-Dt86ToxE.mjs +0 -4
- package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-CiRJBRHO.mjs +0 -2
- package/dist/previews-DzJ85fsr.mjs +0 -6
- package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
- package/dist/run-DD45EQTm.mjs +0 -2
- package/dist/src-DPnUfK4c.mjs +0 -131
- package/dist/startup-profile-tZNb2HGz.mjs +0 -2
- package/dist/state-Uwfrmw5I.mjs +0 -2
- package/dist/telemetry-Pt5GpCKD.mjs +0 -2
- package/dist/ui-FYultowZ.mjs +0 -2
- package/dist/version-Zr2oF8mY.mjs +0 -2
- package/dist/workers-B3uJqJKc.mjs +0 -39
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,r as c,t as l}from"./body-parser-DoewLePl.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-CEpZ-lQZ.mjs";var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery`};function h(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 ee={command:`get`,describe:`Export discovered API operations as OpenAPI schemas`,builder:h,handler:async e=>o({command:`web-assets discovery get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets discovery get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var g={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery/operations`,body:`json`};function te(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
|
|
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 ne={command:`bulk-edit`,describe:`Edit discovered web and API operations`,builder:te,handler:async e=>o({command:`web-assets discovery operations bulk-edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets discovery operations bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let o=e.body===void 0?void 0:s(e.body),c=await t(e),l=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>c.send(g,{body:e,zone_id:l}));r(t,{successLabel:`Updated`})}})};var _={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery/operations/${t.discovery_id}`,body:`json`};function re(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",choices:[`review`,`ignored`]}).coerce(`state`,e=>u(e,`state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
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",choices:[`review`,`ignored`]}).coerce(`state`,e=>u(e,`state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`edit <discovery-id>`,describe:`Edit a discovered web or API operation`,builder:re,handler:async e=>o({command:`web-assets discovery operations edit`,classification:{safeFlags:[`state`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets discovery operations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery/operations/${e[`discovery-id`]==null?`<discovery-id>`:encodeURIComponent(String(e[`discovery-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"discovery-id":String(e[`discovery-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({state:e.state}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),c=await t(e),u=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>c.send(_,{body:t,zone_id:u,discovery_id:e[`discovery-id`]}));r(n,{successLabel:`Updated`});return}let d=l({state:e.state}),f=await a(`Updating`,async()=>c.send(_,{body:d,zone_id:u,discovery_id:e[`discovery-id`]}));r(f,{successLabel:`Updated`})})};var ae={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery/operations/${t.discovery_id}`};function oe(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
|
|
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 se={command:`get <discovery-id>`,describe:`Get a discovered web or API operation`,builder:oe,handler:async e=>o({command:`web-assets discovery operations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets discovery operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery/operations/${e[`discovery-id`]==null?`<discovery-id>`:encodeURIComponent(String(e[`discovery-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"discovery-id":String(e[`discovery-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(ae,{zone_id:s,discovery_id:e[`discovery-id`]}));r(c,{successLabel:`Loaded`})})};var ce={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery/operations`,query:[`page`,`per_page`,`host`,`method`,`endpoint`,`direction`,`order`,`diff`,`origin`,`state`]};function le(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`,array:!0,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,array:!0,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 v={command:`list`,describe:`List discovered web and API operations`,builder:
|
|
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`,array:!0,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,array:!0,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 v={command:`list`,describe:`List discovered web and API operations`,builder:le,handler:async e=>o({command:`web-assets discovery operations list`,classification:{safeFlags:[`direction`,`order`,`diff`,`origin`,`state`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],host:e.host,method:e.method,endpoint:e.endpoint,direction:e.direction,order:e.order,diff:e.diff,origin:e.origin,state:e.state};if(e.dryRun){i({command:`cf web-assets discovery operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(ce,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},y={command:`operations`,describe:`Operations for discovery.operations`,builder:e=>e.command(ne).command(ie).command(se).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`discovery`,describe:`Operations for discovery`,builder:e=>e.command(ee).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels`,query:[`page`,`per_page`,`order`,`direction`,`source`,`filter`,`with_mapped_resource_counts`]};function S(e){return e.usage(`$0 web-assets labels list
|
|
13
13
|
|
|
14
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 C={command:`list`,describe:`List operation labels`,builder:S,handler:async e=>o({command:`web-assets labels list`,classification:{safeFlags:[`order`,`direction`,`source`,`with-mapped-resource-counts`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,source:e.source,filter:e.filter,with_mapped_resource_counts:e[`with-mapped-resource-counts`]};if(e.dryRun){i({command:`cf web-assets labels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(x,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/managed/${t.name}`,query:[`with_mapped_resource_counts`]};function T(e){return e.usage(`$0 web-assets labels managed get <name>
|
|
15
15
|
|
|
16
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 E={command:`get <name>`,describe:`Get a managed operation label`,builder:T,handler:async e=>o({command:`web-assets labels managed get`,classification:{safeFlags:[`with-mapped-resource-counts`,`dry-run`]}},e,async()=>{let o={with_mapped_resource_counts:e[`with-mapped-resource-counts`]};if(e.dryRun){i({command:`cf web-assets labels managed get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/managed/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(w,{zone_id:c,name:e.name,...o}));r(l,{successLabel:`Loaded`})})};var D={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/managed/${t.name}/resources/operation`,body:`json`};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 e=>o({command:`web-assets labels managed operations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels managed operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/managed/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}/resources/operation`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),
|
|
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 e=>o({command:`web-assets labels managed operations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels managed operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/managed/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}/resources/operation`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let o=e.body===void 0?void 0:s(e.body),c=await t(e),l=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>c.send(D,{body:t,zone_id:l,name:e.name}));r(n,{successLabel:`Updated`})}})},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(E).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user`,body:`json`};function N(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 P={command:`bulk-create`,describe:`Create user-defined operation labels`,builder:N,handler:async e=>o({command:`web-assets labels user bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),
|
|
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 P={command:`bulk-create`,describe:`Create user-defined operation labels`,builder:N,handler:async e=>o({command:`web-assets labels user bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let o=e.body===void 0?void 0:s(e.body),c=await t(e),l=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>c.send(M,{body:e,zone_id:l}));r(t,{successLabel:`Created`})}})};var F={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user`,body:`json`};function I(e){return e.usage(`$0 web-assets labels user bulk-delete
|
|
21
21
|
|
|
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 L={command:`bulk-delete`,describe:`Delete user-defined operation labels`,builder:I,handler:async e=>o({command:`web-assets labels user bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),
|
|
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 L={command:`bulk-delete`,describe:`Delete user-defined operation labels`,builder:I,handler:async e=>o({command:`web-assets labels user bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let o=e.body===void 0?void 0:s(e.body),c=await t(e),l=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=l,await p({force:!!e.force,message:`This operation deletes the selected user-defined labels and removes them from associated web and API operations.`})&&e.body!==void 0){let e=o,t=await a(`Deleting`,async()=>c.send(F,{body:e,zone_id:l}));r(t,{successLabel:`Deleted`})}})};var R={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}`};function z(e){return e.usage(`$0 web-assets labels user delete <name>
|
|
23
23
|
|
|
24
24
|
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 B={command:`delete <name>`,describe:`Delete a user-defined operation label`,builder:z,handler:async e=>o({command:`web-assets labels user delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`This operation deletes the user-defined label and removes it from associated web and API operations.`}))return;let c=await a(`Deleting`,async()=>o.send(R,{zone_id:s,name:e.name}));r(c,{successLabel:`Deleted`})})};var V={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}`,body:`json`};function H(e){return e.usage(`$0 web-assets labels user edit <name>
|
|
25
25
|
|
|
26
|
-
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(`metadata`,{type:`string`,description:`Metadata for the label. Provide as a JSON object 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 U={command:`edit <name>`,describe:`Edit a user-defined operation label`,builder:H,handler:async e=>o({command:`web-assets labels user edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]):s(e.body)});return}let o=await t(e),
|
|
26
|
+
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(`metadata`,{type:`string`,description:`Metadata for the label. Provide as a JSON object 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 U={command:`edit <name>`,describe:`Edit a user-defined operation label`,builder:H,handler:async e=>o({command:`web-assets labels user edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),d=await t(e),f=await n({zone:e.zone},d,{quiet:e.quiet});if(e.zoneId=f,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>d.send(V,{body:t,zone_id:f,name:e.name}));r(n,{successLabel:`Updated`});return}let p=l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]),m=await a(`Updating`,async()=>d.send(V,{body:p,zone_id:f,name:e.name}));r(m,{successLabel:`Updated`})})};var W={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}`,query:[`with_mapped_resource_counts`]};function ue(e){return e.usage(`$0 web-assets labels user get <name>
|
|
27
27
|
|
|
28
28
|
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 de={command:`get <name>`,describe:`Get a user-defined operation label`,builder:ue,handler:async e=>o({command:`web-assets labels user get`,classification:{safeFlags:[`with-mapped-resource-counts`,`dry-run`]}},e,async()=>{let o={with_mapped_resource_counts:e[`with-mapped-resource-counts`]};if(e.dryRun){i({command:`cf web-assets labels user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(W,{zone_id:c,name:e.name,...o}));r(l,{successLabel:`Loaded`})})};var fe={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}/resources/operation`,body:`json`};function pe(e){return e.usage(`$0 web-assets labels user operations update <name>
|
|
29
29
|
|
|
30
|
-
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 me={command:`update <name>`,describe:`Replace operations attached to a user-defined label`,builder:pe,handler:async e=>o({command:`web-assets labels user operations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}/resources/operation`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),
|
|
30
|
+
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 me={command:`update <name>`,describe:`Replace operations attached to a user-defined label`,builder:pe,handler:async e=>o({command:`web-assets labels user operations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}/resources/operation`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let o=e.body===void 0?void 0:s(e.body),c=await t(e),l=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>c.send(fe,{body:t,zone_id:l,name:e.name}));r(n,{successLabel:`Updated`})}})},he={command:`operations`,describe:`Operations for labels.user.operations`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}`,body:`json`};function ge(e){return e.usage(`$0 web-assets labels user update <name>
|
|
31
31
|
|
|
32
|
-
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(`metadata`,{type:`string`,description:`Metadata for the label. Provide as a JSON object 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 _e={command:`update <name>`,describe:`Update a user-defined operation label`,builder:ge,handler:async e=>o({command:`web-assets labels user update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]):s(e.body)});return}let o=await t(e),
|
|
32
|
+
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(`metadata`,{type:`string`,description:`Metadata for the label. Provide as a JSON object 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 _e={command:`update <name>`,describe:`Update a user-defined operation label`,builder:ge,handler:async e=>o({command:`web-assets labels user update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),d=await t(e),f=await n({zone:e.zone},d,{quiet:e.quiet});if(e.zoneId=f,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>d.send(G,{body:t,zone_id:f,name:e.name}));r(n,{successLabel:`Updated`});return}let p=l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]),m=await a(`Updating`,async()=>d.send(G,{body:p,zone_id:f,name:e.name}));r(m,{successLabel:`Updated`})})},ve={command:`user`,describe:`Operations for labels.user`,builder:e=>e.command(P).command(L).command(B).command(U).command(de).command(_e).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`labels`,describe:`Operations for labels`,builder:e=>e.command(C).command(j).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var be={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations`,body:`json`};function xe(e){return e.usage(`$0 web-assets operations bulk-create
|
|
33
33
|
|
|
34
|
-
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 Se={command:`bulk-create`,describe:`Create web or API operations`,builder:xe,handler:async e=>o({command:`web-assets operations bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),
|
|
34
|
+
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 Se={command:`bulk-create`,describe:`Create web or API operations`,builder:xe,handler:async e=>o({command:`web-assets operations bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let o=e.body===void 0?void 0:s(e.body),c=await t(e),l=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>c.send(be,{body:e,zone_id:l}));r(t,{successLabel:`Created`})}})};var Ce={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations`,body:`json`};function we(e){return e.usage(`$0 web-assets operations bulk-delete
|
|
35
35
|
|
|
36
|
-
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 Te={command:`bulk-delete`,describe:`Delete web or API operations`,builder:we,handler:async e=>o({command:`web-assets operations bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),
|
|
36
|
+
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 Te={command:`bulk-delete`,describe:`Delete web or API operations`,builder:we,handler:async e=>o({command:`web-assets operations bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let o=e.body===void 0?void 0:s(e.body),c=await t(e),l=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=l,await p({force:!!e.force,message:`This operation deletes the selected web or API operations.`})&&e.body!==void 0){let e=o,t=await a(`Deleting`,async()=>c.send(Ce,{body:e,zone_id:l}));r(t,{successLabel:`Deleted`})}})};var K={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/item`,body:`json`};function Ee(e){return e.usage(`$0 web-assets operations create
|
|
37
37
|
|
|
38
|
-
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`]}).coerce(`method`,e=>u(e,`method`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const De={command:`create`,describe:`Create a web or API operation`,builder:Ee,handler:async e=>o({command:`web-assets operations create`,classification:{safeFlags:[`method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/item`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({endpoint:u(e.endpoint,`endpoint`,`text`),host:u(e.host,`host`,`text`),method:e.method}):s(e.body)});return}let o=await t(e),
|
|
38
|
+
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`]}).coerce(`method`,e=>u(e,`method`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const De={command:`create`,describe:`Create a web or API operation`,builder:Ee,handler:async e=>o({command:`web-assets operations create`,classification:{safeFlags:[`method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/item`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({endpoint:u(e.endpoint,`endpoint`,`text`),host:u(e.host,`host`,`text`),method:e.method}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),c=await t(e),p=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>c.send(K,{body:e,zone_id:p}));r(t,{successLabel:`Created`});return}e.endpoint===void 0&&(e.endpoint=await d(`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/.`)),e.host===void 0&&(e.host=await d(`host`,`RFC3986-compliant host.`)),e.method===void 0&&(e.method=await f(`method`,`The HTTP method used to access the endpoint.`,[`GET`,`POST`,`HEAD`,`OPTIONS`,`PUT`,`DELETE`,`CONNECT`,`PATCH`,`TRACE`]));let m=l({endpoint:u(e.endpoint,`endpoint`,`text`),host:u(e.host,`host`,`text`),method:e.method}),h=await a(`Creating`,async()=>c.send(K,{body:m,zone_id:p}));r(h,{successLabel:`Created`})})};var Oe={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}`};function ke(e){return e.usage(`$0 web-assets operations delete <operation-id>
|
|
39
39
|
|
|
40
40
|
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 Ae={command:`delete <operation-id>`,describe:`Delete a web or API operation`,builder:ke,handler:async e=>o({command:`web-assets operations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`This operation deletes the web or API operation.`}))return;let c=await a(`Deleting`,async()=>o.send(Oe,{zone_id:s,operation_id:e[`operation-id`]}));r(c,{successLabel:`Deleted`})})};var je={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}`,query:[`feature`,`with_schemas`]};function Me(e){return e.usage(`$0 web-assets operations get <operation-id>
|
|
41
41
|
|
|
42
42
|
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`,array:!0,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 Ne={command:`get <operation-id>`,describe:`Get a web or API operation`,builder:Me,handler:async e=>o({command:`web-assets operations get`,classification:{safeFlags:[`with-schemas`,`dry-run`]}},e,async()=>{let o={feature:e.feature,with_schemas:e[`with-schemas`]};if(e.dryRun){i({command:`cf web-assets operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(je,{zone_id:c,operation_id:e[`operation-id`],...o}));r(l,{successLabel:`Loaded`})})};var q={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/labels`,body:`json`};function Pe(e){return e.usage(`$0 web-assets operations labels bulk-create
|
|
43
43
|
|
|
44
|
-
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 Fe={command:`bulk-create`,describe:`Attach labels to web or API operations`,builder:Pe,handler:async e=>o({command:`web-assets operations labels bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}):s(e.body)});return}let o=await t(e),
|
|
44
|
+
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 Fe={command:`bulk-create`,describe:`Attach labels to web or API operations`,builder:Pe,handler:async e=>o({command:`web-assets operations labels bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),c=await t(e),u=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>c.send(q,{body:e,zone_id:u}));r(t,{successLabel:`Created`});return}let d=l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}),f=await a(`Creating`,async()=>c.send(q,{body:d,zone_id:u}));r(f,{successLabel:`Created`})})};var J={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/labels`,body:`json`};function Ie(e){return e.usage(`$0 web-assets operations labels bulk-delete
|
|
45
45
|
|
|
46
|
-
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 Le={command:`bulk-delete`,describe:`Remove labels from web or API operations`,builder:Ie,handler:async e=>o({command:`web-assets operations labels bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}):s(e.body)});return}let o=await t(e),
|
|
46
|
+
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 Le={command:`bulk-delete`,describe:`Remove labels from web or API operations`,builder:Ie,handler:async e=>o({command:`web-assets operations labels bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),c=await t(e),u=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation removes the selected labels from the selected web and API operations.`}))return;if(e.body!==void 0){let e=o,t=await a(`Deleting`,async()=>c.send(J,{body:e,zone_id:u}));r(t,{successLabel:`Deleted`});return}let d=l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}),f=await a(`Deleting`,async()=>c.send(J,{body:d,zone_id:u}));r(f,{successLabel:`Deleted`})})};var Y={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/labels`,body:`json`};function Re(e){return e.usage(`$0 web-assets operations labels bulk-update
|
|
47
47
|
|
|
48
|
-
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 ze={command:`bulk-update`,describe:`Replace labels on web or API operations`,builder:Re,handler:async e=>o({command:`web-assets operations labels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}):s(e.body)});return}let o=await t(e),
|
|
48
|
+
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 ze={command:`bulk-update`,describe:`Replace labels on web or API operations`,builder:Re,handler:async e=>o({command:`web-assets operations labels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),c=await t(e),u=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>c.send(Y,{body:e,zone_id:u}));r(t,{successLabel:`Updated`});return}if(e[`managed-labels`]===void 0)throw Error(`--managed-labels is required (or pass --body with this field set).`);if(e[`user-labels`]===void 0)throw Error(`--user-labels is required (or pass --body with this field set).`);let d=l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}),f=await a(`Updating`,async()=>c.send(Y,{body:d,zone_id:u}));r(f,{successLabel:`Updated`})})};var X={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}/labels`,body:`json`};function Be(e){return e.usage(`$0 web-assets operations labels create <operation-id>
|
|
49
49
|
|
|
50
|
-
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 Ve={command:`create <operation-id>`,describe:`Attach labels to a web or API operation`,builder:Be,handler:async e=>o({command:`web-assets operations labels create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:e.managed,user:e.user}):s(e.body)});return}let o=await t(e),
|
|
50
|
+
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 Ve={command:`create <operation-id>`,describe:`Attach labels to a web or API operation`,builder:Be,handler:async e=>o({command:`web-assets operations labels create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:e.managed,user:e.user}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),c=await t(e),u=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let t=o,n=await a(`Creating`,async()=>c.send(X,{body:t,zone_id:u,operation_id:e[`operation-id`]}));r(n,{successLabel:`Created`});return}let d=l({managed:e.managed,user:e.user}),f=await a(`Creating`,async()=>c.send(X,{body:d,zone_id:u,operation_id:e[`operation-id`]}));r(f,{successLabel:`Created`})})};var Z={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}/labels`,body:`json`};function He(e){return e.usage(`$0 web-assets operations labels delete <operation-id>
|
|
51
51
|
|
|
52
|
-
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 Q={command:`delete <operation-id>`,describe:`Remove labels from a web or API operation`,builder:He,handler:async e=>o({command:`web-assets operations labels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:e.managed,user:e.user}):s(e.body)});return}let o=await t(e),
|
|
52
|
+
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 Q={command:`delete <operation-id>`,describe:`Remove labels from a web or API operation`,builder:He,handler:async e=>o({command:`web-assets operations labels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:e.managed,user:e.user}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),c=await t(e),u=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation removes the selected labels from the web or API operation.`}))return;if(e.body!==void 0){let t=o,n=await a(`Deleting`,async()=>c.send(Z,{body:t,zone_id:u,operation_id:e[`operation-id`]}));r(n,{successLabel:`Deleted`});return}let d=l({managed:e.managed,user:e.user}),f=await a(`Deleting`,async()=>c.send(Z,{body:d,zone_id:u,operation_id:e[`operation-id`]}));r(f,{successLabel:`Deleted`})})};var $={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}/labels`,body:`json`};function Ue(e){return e.usage(`$0 web-assets operations labels update <operation-id>
|
|
53
53
|
|
|
54
|
-
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 We={command:`update <operation-id>`,describe:`Replace labels on a web or API operation`,builder:Ue,handler:async e=>o({command:`web-assets operations labels update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:e.managed,user:e.user}):s(e.body)});return}let o=await t(e),
|
|
54
|
+
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 We={command:`update <operation-id>`,describe:`Replace labels on a web or API operation`,builder:Ue,handler:async e=>o({command:`web-assets operations labels update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:e.managed,user:e.user}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),c=await t(e),u=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>c.send($,{body:t,zone_id:u,operation_id:e[`operation-id`]}));r(n,{successLabel:`Updated`});return}let d=l({managed:e.managed,user:e.user}),f=await a(`Updating`,async()=>c.send($,{body:d,zone_id:u,operation_id:e[`operation-id`]}));r(f,{successLabel:`Updated`})})},Ge={command:`labels`,describe:`Operations for operations.labels`,builder:e=>e.command(Fe).command(Le).command(ze).command(Ve).command(Q).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ke={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations`,query:[`page`,`per_page`,`order`,`direction`,`host`,`method`,`endpoint`,`feature`]};function qe(e){return e.usage(`$0 web-assets operations list
|
|
55
55
|
|
|
56
56
|
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`,array:!0,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,array:!0,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`,array:!0,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 Je={command:`list`,describe:`List web and API operations`,builder:qe,handler:async e=>o({command:`web-assets operations list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,host:e.host,method:e.method,endpoint:e.endpoint,feature:e.feature};if(e.dryRun){i({command:`cf web-assets operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(Ke,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},Ye={command:`operations`,describe:`Operations for operations`,builder:e=>e.command(Se).command(Te).command(De).command(Ae).command(Ne).command(Je).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xe={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/schemas`,query:[`host`,`feature`,`include_schema_kind`]};function Ze(e){return e.usage(`$0 web-assets schemas list
|
|
57
57
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as s,n as c,t as l}from"./body-parser-DoewLePl.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-CEpZ-lQZ.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/web3/hostnames`,body:`json`};function h(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`]}).coerce(`target`,e=>u(e,`target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create Web3 Hostname`,builder:h,handler:async e=>o({command:`web3 hostnames create`,classification:{safeFlags:[`target`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`),name:u(e.name,`name`,`text`),target:e.target}):c(e.body)});return}let o=await t(e),
|
|
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`]}).coerce(`target`,e=>u(e,`target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create Web3 Hostname`,builder:h,handler:async e=>o({command:`web3 hostnames create`,classification:{safeFlags:[`target`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`),name:u(e.name,`name`,`text`),target:e.target}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),p=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>s.send(m,{body:e,zone_id:p}));r(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await d(`name`,`Specify the hostname that points to the target gateway via CNAME.`)),e.target===void 0&&(e.target=await f(`target`,`Specify the target gateway of the hostname.`,[`ethereum`,`ipfs`,`ipfs_universal_path`]));let h=l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`),name:u(e.name,`name`,`text`),target:e.target}),g=await a(`Creating`,async()=>s.send(m,{body:h,zone_id:p}));r(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}`,body:`json`};function v(e){return e.usage(`$0 web3 hostnames delete <identifier>
|
|
5
5
|
|
|
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
|
|
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 ee={command:`delete <identifier>`,describe:`Delete Web3 Hostname`,builder:v,handler:async e=>o({command:`web3 hostnames delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(_,{zone_id:s,identifier:e.identifier}));r(c,{successLabel:`Deleted`})})};var y={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}`,body:`json`};function b(e){return e.usage(`$0 web3 hostnames edit <identifier>
|
|
7
7
|
|
|
8
|
-
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
|
|
8
|
+
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 x={command:`edit <identifier>`,describe:`Edit Web3 Hostname`,builder:b,handler:async e=>o({command:`web3 hostnames edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`)}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),d=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=d,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>s.send(y,{body:t,zone_id:d,identifier:e.identifier}));r(n,{successLabel:`Updated`});return}let f=l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`)}),p=await a(`Updating`,async()=>s.send(y,{body:f,zone_id:d,identifier:e.identifier}));r(p,{successLabel:`Updated`})})};var S={method:`GET`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}`};function C(e){return e.usage(`$0 web3 hostnames get <identifier>
|
|
9
9
|
|
|
10
|
-
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
|
|
10
|
+
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 w={command:`get <identifier>`,describe:`Web3 Hostname Details`,builder:C,handler:async e=>o({command:`web3 hostnames get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(S,{zone_id:s,identifier:e.identifier}));r(c,{successLabel:`Loaded`})})};var T={method:`POST`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list/entries`,body:`json`};function E(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries create <identifier>
|
|
11
11
|
|
|
12
|
-
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`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
12
|
+
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`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const D={command:`create <identifier>`,describe:`Create IPFS Universal Path Gateway Content List Entry`,builder:E,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),p=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let t=o,n=await a(`Creating`,async()=>s.send(T,{body:t,zone_id:p,identifier:e.identifier}));r(n,{successLabel:`Created`});return}e.content===void 0&&(e.content=await d(`content`,`Specify the CID or content path of content to block.`)),e.type===void 0&&(e.type=await f(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let m=l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}),h=await a(`Creating`,async()=>s.send(T,{body:m,zone_id:p,identifier:e.identifier}));r(h,{successLabel:`Created`})})};var O={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list/entries/${t.content_list_entry_identifier}`,body:`json`};function k(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries delete <content-list-entry-identifier>
|
|
13
13
|
|
|
14
|
-
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
|
|
14
|
+
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 A={command:`delete <content-list-entry-identifier>`,describe:`Delete IPFS Universal Path Gateway Content List Entry`,builder:k,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``),"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(O,{zone_id:s,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]}));r(c,{successLabel:`Deleted`})})};var j={method:`GET`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list/entries/${t.content_list_entry_identifier}`};function M(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries get <content-list-entry-identifier>
|
|
15
15
|
|
|
16
|
-
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
|
|
16
|
+
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 N={command:`get <content-list-entry-identifier>`,describe:`IPFS Universal Path Gateway Content List Entry Details`,builder:M,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``),"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(j,{zone_id:s,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]}));r(c,{successLabel:`Loaded`})})};var P={method:`GET`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list/entries`};function F(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries list
|
|
17
17
|
|
|
18
|
-
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
|
|
18
|
+
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 I={command:`list`,describe:`List IPFS Universal Path Gateway Content List Entries`,builder:F,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(P,{zone_id:s,identifier:e.identifier}));r(c,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list/entries/${t.content_list_entry_identifier}`,body:`json`};function R(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries update <content-list-entry-identifier>
|
|
19
19
|
|
|
20
|
-
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`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update <content-list-entry-identifier>`,describe:`Edit IPFS Universal Path Gateway Content List Entry`,builder:R,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries update`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``),"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}):c(e.body)});return}let o=await t(e),
|
|
20
|
+
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`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update <content-list-entry-identifier>`,describe:`Edit IPFS Universal Path Gateway Content List Entry`,builder:R,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries update`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``),"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),p=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>s.send(L,{body:t,zone_id:p,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]}));r(n,{successLabel:`Updated`});return}e.content===void 0&&(e.content=await d(`content`,`Specify the CID or content path of content to block.`)),e.type===void 0&&(e.type=await f(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let m=l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}),h=await a(`Updating`,async()=>s.send(L,{body:m,zone_id:p,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]}));r(h,{successLabel:`Updated`})})},B={command:`entries`,describe:`Operations for hostnames.ipfs-universal-paths.content-lists.entries`,builder:e=>e.command(D).command(A).command(N).command(I).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list`};function H(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists get <identifier>
|
|
21
21
|
|
|
22
22
|
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 U={command:`get <identifier>`,describe:`IPFS Universal Path Gateway Content List Details`,builder:H,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(V,{zone_id:s,identifier:e.identifier}));r(c,{successLabel:`Loaded`})})};var W={method:`PUT`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list`,body:`json`,constants:{action:`block`}};function G(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists update <identifier>
|
|
23
23
|
|
|
24
|
-
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`]}).coerce(`action`,e=>u(e,`action`,`text`)).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 K={command:`update <identifier>`,describe:`Update IPFS Universal Path Gateway Content List`,builder:G,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists update`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({action:e.action,entries:s(e.entries,`entries`)}):c(e.body)});return}let o=await t(e),
|
|
24
|
+
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`]}).coerce(`action`,e=>u(e,`action`,`text`)).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 K={command:`update <identifier>`,describe:`Update IPFS Universal Path Gateway Content List`,builder:G,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists update`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({action:e.action,entries:s(e.entries,`entries`)}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),u=await t(e),d=await n({zone:e.zone},u,{quiet:e.quiet});if(e.zoneId=d,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>u.send(W,{body:t,zone_id:d,identifier:e.identifier}));r(n,{successLabel:`Updated`});return}if(e.action===void 0&&(e.action=await f(`action`,`Behavior of the content list.`,[`block`])),e.entries===void 0)throw Error(`--entries is required (or pass --body with this field set).`);let p=l({action:e.action,entries:s(e.entries,`entries`)}),m=await a(`Updating`,async()=>u.send(W,{body:p,zone_id:d,identifier:e.identifier}));r(m,{successLabel:`Updated`})})},q={command:`content-lists`,describe:`Operations for hostnames.ipfs-universal-paths.content-lists`,builder:e=>e.command(U).command(K).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`ipfs-universal-paths`,describe:`Operations for hostnames.ipfs-universal-paths`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`GET`,path:t=>e`/zones/${t.zone_id}/web3/hostnames`};function X(e){return e.usage(`$0 web3 hostnames list
|
|
25
25
|
|
|
26
|
-
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:X,handler:async e=>o({command:`web3 hostnames list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(Y,{zone_id:s}));r(c,{successLabel:`Loaded`})})},Q={command:`hostnames`,describe:`Operations for hostnames`,builder:e=>e.command(g).command(
|
|
26
|
+
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:X,handler:async e=>o({command:`web3 hostnames list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(Y,{zone_id:s}));r(c,{successLabel:`Loaded`})})},Q={command:`hostnames`,describe:`Operations for hostnames`,builder:e=>e.command(g).command(ee).command(x).command(w).command(Z).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$={command:`web3`,describe:`web3`,builder:e=>e.command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$ as default};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./lazy-command-DbKVgdGT.mjs";import{r as t}from"./dotenv-DKRemNCH.mjs";import{c as n,r,u as i}from"./containers-B06OGOEB.mjs";import{J as a}from"./dist-D-ihn_mV.mjs";import"./api-Dnt6lRJG.mjs";import{t as o}from"./path-DRw6Y-nd.mjs";import{t as s}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as c}from"./local-DIJ7SIKC.mjs";import{i as l,n as u}from"./auth-B-h0BHg7.mjs";import{t as d}from"./log-BWdaOGOW.mjs";import{a as f,r as p,t as m}from"./context-BY1Eh_Qe.mjs";import{t as h}from"./deploy-context-YCW3eqP1.mjs";import{t as g}from"./output-BZQEl3mK.mjs";import{t as _}from"./dry-run-kJbjn4kG.mjs";import{t as v}from"./progress-yvPscjYg.mjs";import{n as y,t as b}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as x,n as S,r as C,s as w,t as T}from"./body-parser-DoewLePl.mjs";import{n as E,t as D}from"./input-validation-D7z60HJH.mjs";import{a as O,i as k,n as A}from"./prompt-CEpZ-lQZ.mjs";import{n as j,t as M}from"./raw-fetch-Cl5spWC3.mjs";import{t as N}from"./body-unions-DNs981Ia.mjs";import{a as ee,i as te,n as ne,o as P,r as F,s as I}from"./build-FFxzigo4.mjs";import{r as L}from"./deploy-input-CQLBXFEB.mjs";import{n as R,t as z}from"./shared-MK-_lkbn.mjs";import{readBuildOutput as B}from"@cloudflare/build-output-utils";var V={method:`DELETE`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,query:[`force`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function H(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 U={command:`delete <worker-id>`,describe:`Delete Worker`,builder:H,handler:async e=>b({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 f();_({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 u(e),r=e.local?c:await m();if(e.accountId=r,!await A({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`}))return;let i=await v(`Deleting`,async()=>n.send(V,{account_id:r,worker_id:e[`worker-id`],...t}));g(i,{successLabel:`Deleted`})})};var W={method:`POST`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`force`],body:`json`,constants:{strategy:`percentage`}};function G(e){return e.usage(`$0 workers deployments create
|
|
5
|
+
|
|
6
|
+
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(`code-update-strategy-mode`,{type:`string`,description:`Apply Durable Object code updates immediately.`,choices:[`immediate`,`deferred`]}).coerce(`code-update-strategy-mode`,e=>E(e,`code-update-strategy-mode`,`text`)).option(`code-update-strategy-max-delay`,{type:`number`,description:`Set the maximum number of seconds to wait before forcing the update. When omitted, the default maximum delay applies.`}).option(`strategy`,{type:`string`,description:"Strategy for routing traffic across the listed versions. `percentage` splits traffic according to each version's `percentage`.",choices:[`percentage`]}).coerce(`strategy`,e=>E(e,`strategy`,`text`)).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)`}).check(e=>{let t=[`code-update-strategy-mode`,`code-update-strategy-max-delay`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`code-update-strategy-mode`].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 --code-update-strategy-* flag is set`)}return!0})}const K=[{path:[`code_update_strategy`],selector:`mode`,variants:[{values:[`immediate`],schema:{type:`object`,properties:{mode:{enum:[`immediate`]}},required:[`mode`],additionalProperties:!1}},{values:[`deferred`],schema:{type:`object`,properties:{max_delay:{anyOf:[{type:`number`},{type:`null`}]},mode:{enum:[`deferred`]}},required:[`mode`],additionalProperties:!1}}]}],q={command:`create`,describe:`Create Worker Deployment`,builder:G,handler:async e=>b({command:`workers deployments create`,classification:{safeFlags:[`bypass-deployment-checks`,`code-update-strategy-mode`,`strategy`,`dry-run`]}},e,async()=>{let t={force:e[`bypass-deployment-checks`]};if(e.dryRun){let n=await f();_({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?N(T({code_update_strategy:{mode:e[`code-update-strategy-mode`],max_delay:e[`code-update-strategy-max-delay`]},strategy:e.strategy,versions:x(e.versions,`versions`)}),K):S(e.body)});return}let n=e.body===void 0?void 0:S(e.body),r=await u(e),i=e.local?c:await m();e.accountId=i;let a=p({scriptName:e.worker});if(e.worker=a,e.body!==void 0){let e=n;new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let o=await v(`Creating`,async()=>r.send(W,{body:e,account_id:i,script_name:a,...t}));g(o,{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await k(`strategy`,"Strategy for routing traffic across the listed versions. `percentage` splits traffic according to each version's `percentage`.",[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let o=T({code_update_strategy:{mode:e[`code-update-strategy-mode`],max_delay:e[`code-update-strategy-max-delay`]},strategy:e.strategy,versions:x(e.versions,`versions`)});N(o,K),new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let s=await v(`Creating`,async()=>r.send(W,{body:o,account_id:i,script_name:a,...t}));g(s,{successLabel:`Created`})})};var J={method:`DELETE`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function Y(e){return e.usage(`$0 workers deployments delete <deployment-id>
|
|
7
|
+
|
|
8
|
+
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:`Identifier of the Worker Deployment.`,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 X={command:`delete <deployment-id>`,describe:`Delete Worker Deployment`,builder:Y,handler:async e=>b({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await f();_({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 u(e),n=e.local?c:await m();e.accountId=n;let r=p({scriptName:e.worker});if(e.worker=r,!await A({force:!!e.force,message:`This will permanently delete the Worker deployment.`}))return;let i=await v(`Deleting`,async()=>t.send(J,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));g(i,{successLabel:`Deleted`})})};var Z={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function re(e){return e.usage(`$0 workers deployments get <deployment-id>
|
|
9
|
+
|
|
10
|
+
Get information about a Worker Deployment.`).positional(`deployment-id`,{type:`string`,description:`Identifier of the Worker Deployment.`,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 ie={command:`get <deployment-id>`,describe:`Get Worker Deployment`,builder:re,handler:async e=>b({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await f();_({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 u(e),n=e.local?c:await m();e.accountId=n;let r=p({scriptName:e.worker});e.worker=r;let i=await v(`Loading`,async()=>t.send(Z,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));g(i,{successLabel:`Loaded`})})};var ae={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`since`,`until`,`page`,`per_page`]};function oe(e){return e.usage(`$0 workers deployments list
|
|
11
|
+
|
|
12
|
+
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 se={command:`list`,describe:`List Worker Deployments`,builder:oe,handler:async e=>b({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 f();_({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 u(e),r=e.local?c:await m();e.accountId=r;let i=p({scriptName:e.worker});e.worker=i;let a=await v(`Loading`,async()=>n.send(ae,{account_id:r,script_name:i,...t}));g(a,{successLabel:`Loaded`})})},ce={command:`deployments`,describe:`Manage Worker deployments and traffic versions`,builder:e=>e.command(q).command(X).command(ie).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var le={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function ue(e){return e.usage(`$0 workers get <worker-id>
|
|
13
|
+
|
|
14
|
+
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 de={command:`get <worker-id>`,describe:`Get Worker`,builder:ue,handler:async e=>b({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await f();_({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 u(e),n=e.local?c:await m();e.accountId=n;let r=await v(`Loading`,async()=>t.send(le,{account_id:n,worker_id:e[`worker-id`]}));g(r,{successLabel:`Loaded`})})};var fe={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/workers`,query:[`page`,`per_page`,`order_by`,`order`],errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function pe(e){return e.usage(`$0 workers list
|
|
15
|
+
|
|
16
|
+
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 me={command:`list`,describe:`List Workers`,builder:pe,handler:async e=>b({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 f();_({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 u(e),r=e.local?c:await m();e.accountId=r;let i=await v(`Loading`,async()=>n.send(fe,{account_id:r,...t}));g(i,{successLabel:`Loaded`})})};var he={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts-search`,query:[`name`,`id`,`order_by`,`page`,`per_page`]};function ge(e){return e.usage(`$0 workers scripts search
|
|
17
|
+
|
|
18
|
+
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 _e={command:`search`,describe:`Search Worker Scripts`,builder:ge,handler:async e=>b({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 f();_({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 u(e),r=e.local?c:await m();e.accountId=r;let i=await v(`Loading`,async()=>n.send(he,{account_id:r,...t}));g(i,{successLabel:`Loaded`})})},ve={command:`scripts`,describe:`Worker script operations including usage model, settings, content, tags, schedules, subdomains, and queue consumers`,builder:e=>e.command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ye(e){return e.usage(`$0 workers secrets bulk
|
|
19
|
+
|
|
20
|
+
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(`secrets`,{type:`string`,description:`Map of secret names to secret values:
|
|
21
|
+
- Set to a secret object to create or update.
|
|
22
|
+
- Set to \`null\` to delete.
|
|
23
|
+
- Omit to leave unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`version-tags`,{type:`string`,description:`Optional version tags to apply to the new script version. Provide as a JSON object 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:`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 be={command:`bulk`,describe:`Patch multiple Worker script secrets`,builder:ye,handler:async e=>b({command:`workers secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.file===void 0&&e.secrets===void 0&&e[`version-tags`]===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--secrets, --version-tags).`);if(e.dryRun){let t=await f();_({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?T({secrets:C(e.secrets,`secrets`),version_tags:C(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):S(e.body):{file:e.file}});return}let t=e.file===void 0?e.body===void 0?void 0:S(e.body):void 0,n=await u(e),r=e.local?c:await m();e.accountId=r;let i=p({scriptName:e.worker});if(e.worker=i,e.file!==void 0){let t=D(e.file),a=await v(`Updating`,async()=>l(n,`PATCH`,`/accounts/${r}/workers/scripts/${i}/secrets-bulk`,{body:t,headers:{"Content-Type":`application/merge-patch+json`}}));g(a,{successLabel:`Updated`});return}if(e.body!==void 0){let e=t,a=await v(`Updating`,async()=>l(n,`PATCH`,`/accounts/${r}/workers/scripts/${i}/secrets-bulk`,{body:e}));g(a,{successLabel:`Updated`});return}let a={};e.secrets!==void 0&&w(a,[`secrets`],C(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&w(a,[`version_tags`],C(e[`version-tags`],`version-tags`));let o=await v(`Updating`,async()=>l(n,`PATCH`,`/accounts/${r}/workers/scripts/${i}/secrets-bulk`,{body:a}));g(o,{successLabel:`Updated`})})};var xe={method:`DELETE`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function Se(e){return e.usage(`$0 workers secrets delete <secret-name>
|
|
24
|
+
|
|
25
|
+
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 Ce={command:`delete <secret-name>`,describe:`Delete Worker script secret`,builder:Se,handler:async e=>b({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 f();_({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 u(e),r=e.local?c:await m();e.accountId=r;let i=p({scriptName:e.worker});if(e.worker=i,!await A({force:!!e.force,message:`This will permanently delete the Worker script secret.`}))return;let a=await v(`Deleting`,async()=>n.send(xe,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));g(a,{successLabel:`Deleted`})})};var we={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function Te(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 Ee={command:`get <secret-name>`,describe:`Get a secret binding`,builder:Te,handler:async e=>b({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 f();_({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 u(e),r=e.local?c:await m();e.accountId=r;let i=p({scriptName:e.worker});e.worker=i;let a=await v(`Loading`,async()=>n.send(we,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));g(a,{successLabel:`Loaded`})})};var De={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`};function Oe(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 ke={command:`list`,describe:`List secrets bound to a Worker script`,builder:Oe,handler:async e=>b({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await f();_({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 u(e),n=e.local?c:await m();e.accountId=n;let r=p({scriptName:e.worker});e.worker=r;let i=await v(`Loading`,async()=>t.send(De,{account_id:n,script_name:r}));g(i,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:e=>o`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`,body:`json`,errors:{429:`TooManyRequestsError`}};function Ae(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`]}).coerce(`type`,e=>E(e,`type`,`text`)).option(`algorithm`,{type:`string`,description:`Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). Provide as a JSON object or @path/to/file.json.`}).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`]}).coerce(`format`,e=>E(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`key-jwk`,{type:`string`,description:'Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". Provide as a JSON object or @path/to/file.json.'}).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`,[`algorithm`,`format`,`key-base64`,`key-jwk`,`usages`]).conflicts(`algorithm`,[`text`]).implies(`algorithm`,[`format`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`algorithm`,`usages`]).conflicts(`key-base64`,[`text`]).implies(`key-base64`,[`algorithm`,`format`,`usages`]).conflicts(`key-jwk`,[`text`]).implies(`key-jwk`,[`algorithm`,`format`,`usages`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const je={command:`update <name>`,describe:`Add a secret to a Worker script`,builder:Ae,handler:async e=>b({command:`workers secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await f();_({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?T({text:E(e.text,`text`,`text`),type:e.type,algorithm:C(e.algorithm,`algorithm`),format:e.format,key_base64:E(e[`key-base64`],`key-base64`,`text`),key_jwk:C(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]):S(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let t=e.body===void 0?void 0:S(e.body),n=await u(e),r=e.local?c:await m();e.accountId=r;let i=p({scriptName:e.worker});if(e.worker=i,e.body!==void 0){let e=t,a=await v(`Updating`,async()=>n.send(Q,{body:e,account_id:r,script_name:i}));g(a,{successLabel:`Updated`});return}if(e.type===void 0&&(e.type=await k(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await O(`text`,`The secret value to use.`,{kind:`secret`,question:`Enter value for --text`})),e.type===`secret_key`&&e.algorithm===void 0)throw Error(`--algorithm is required (or pass --body with this field set).`);if(e.type===`secret_key`&&e.format===void 0&&(e.format=await O(`format`,`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,{question:`Enter value for --format`})),e.type===`secret_key`&&e.usages===void 0)throw Error(`--usages is required (or pass --body with this field set).`);let a=T({text:E(e.text,`text`,`text`),type:e.type,algorithm:C(e.algorithm,`algorithm`),format:e.format,key_base64:E(e[`key-base64`],`key-base64`,`text`),key_jwk:C(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]),o=await v(`Updating`,async()=>n.send(Q,{body:a,account_id:r,script_name:i}));g(o,{successLabel:`Updated`})})},Me={command:`secrets`,describe:`Manage secrets bound to Worker scripts`,builder:e=>e.command(be).command(Ce).command(Ee).command(ke).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne={method:`DELETE`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`};function Pe(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 Fe={command:`delete <version-id>`,describe:`Delete Worker Version`,builder:Pe,handler:async e=>b({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await f();_({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 u(e),n=e.local?c:await m();if(e.accountId=n,!await A({force:!!e.force,message:`This will permanently delete the Worker version.`}))return;let r=await v(`Deleting`,async()=>t.send(Ne,{account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]}));g(r,{successLabel:`Deleted`})})};var Ie={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`,query:[`include`]};function Le(e){return e.usage(`$0 workers versions get <version-id>
|
|
34
|
+
|
|
35
|
+
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 Re={command:`get <version-id>`,describe:`Get Worker Version`,builder:Le,handler:async e=>b({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let t={include:e.include};if(e.dryRun){let n=await f();_({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 u(e),r=e.local?c:await m();e.accountId=r;let i=await v(`Loading`,async()=>n.send(Ie,{account_id:r,worker_id:e[`worker-id`],version_id:e[`version-id`],...t}));g(i,{successLabel:`Loaded`})})};var ze={method:`GET`,path:e=>o`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions`,query:[`page`,`per_page`]};function Be(e){return e.usage(`$0 workers versions list
|
|
36
|
+
|
|
37
|
+
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 Ve={command:`list`,describe:`List Worker Versions`,builder:Be,handler:async e=>b({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 f();_({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 u(e),r=e.local?c:await m();e.accountId=r;let i=await v(`Loading`,async()=>n.send(ze,{account_id:r,worker_id:e[`worker-id`],...t}));g(i,{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 workers versions profile <version-id>
|
|
38
|
+
|
|
39
|
+
Captures a CPU or heap profile from a recently active isolate running the specified Worker version. This endpoint requires the Worker profiling feature to be enabled for the account.`).positional(`version-id`,{type:`string`,description:`Identifies the version by UUID or UUID prefix with a minimum length of eight characters. Use "latest" to select the most recently created version, which may not be deployed. Use "latest-deployed" to profile a version in the active deployment. Versions are tried in order of traffic share until one has a loaded isolate.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifies the Worker by ID or name.`,demandOption:!0}).option(`actor-id`,{type:`string`,description:`Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested version.`}).option(`duration-ms`,{type:`number`,description:`Profile duration in milliseconds.`}).option(`namespace-id`,{type:`string`,description:`Identifies the Durable Object namespace containing the actor to profile. Must be specified together with actor_id.`}).option(`profile-type`,{type:`string`,description:`The profile_type field`,choices:[`cpu`,`heap`],default:`cpu`}).coerce(`profile-type`,e=>E(e,`profile-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const He={command:`profile <version-id>`,describe:`Profile Worker Version`,builder:$,handler:async e=>b({command:`workers versions profile`,classification:{safeFlags:[`profile-type`,`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await f();_({command:`cf workers versions profile`,method:`POST`,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`]))}/profile`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`json`,body:e.body===void 0?T({actor_id:E(e[`actor-id`],`actor-id`,`text`),duration_ms:e[`duration-ms`],namespace_id:E(e[`namespace-id`],`namespace-id`,`text`),profile_type:e[`profile-type`]}):S(e.body)});return}let t=e.body===void 0?void 0:S(e.body);await u(e);let n=e.local?c:await m();if(e.accountId=n,e.body!==void 0){let r=t,i=await v(`Creating`,async()=>M(`/accounts/${n}/workers/workers/${encodeURIComponent(String(e[`worker-id`]))}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:JSON.stringify(r),contentType:`application/json`}));j(e.text===!0?i.toString(`utf-8`):i);return}if(e[`duration-ms`]===void 0)throw Error(`--duration-ms is required (or pass --body with this field set).`);let r={};e[`actor-id`]!==void 0&&w(r,[`actor_id`],E(e[`actor-id`],`actor-id`,`text`)),e[`duration-ms`]!==void 0&&w(r,[`duration_ms`],e[`duration-ms`]),e[`namespace-id`]!==void 0&&w(r,[`namespace_id`],E(e[`namespace-id`],`namespace-id`,`text`)),e[`profile-type`]!==void 0&&w(r,[`profile_type`],e[`profile-type`]);let i=await v(`Creating`,async()=>M(`/accounts/${n}/workers/workers/${encodeURIComponent(String(e[`worker-id`]))}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:Object.keys(r).length>0?r:void 0}));j(e.text===!0?i.toString(`utf-8`):i)})};function Ue(e){return R(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 We=y({command:`create`,describe:`Upload a new Worker Version without deploying it`,builder:Ue,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers versions create.`);await z(e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});const Ge={command:`versions`,describe:`Create, list, inspect, and manage Worker versions`,builder:e=>e.command(s(We,`native`)).command(Fe).command(Re).command(Ve).command(He).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ke=e(`check`,`Profile a Worker's startup performance`,()=>import(`./command-Dl9ICrRK.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function qe(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`,F)}const Je={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:qe,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers triggers deploy.`);if(!e.prebuilt){if(await ne(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){d.success(`--dry-run: exiting now.`);return}d.message(``)}await t(e,()=>Ye(e))}};async function Ye(e){let{workers:t,rootConfig:o}=await B(process.cwd());if(o.buildContext.isPreview){let e=[`cf previews deploy`,`--prebuilt`,...o.buildContext.mode===void 0?[]:[`--mode`,o.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.`)}I(e.mode,o.buildContext.mode),P(o.accountId,e[`temporary-account`]===!0);let s=ee(t,e.worker),{wranglerConfig:c}=te(s,o),l=a(c),{authToken:u,accountId:f}=await r({accountId:o.accountId,complianceRegion:l,dryRun:e[`dry-run`]});i(h(u)),d.section(`Deploy triggers`),await n({...L(s,c,f,e),queueCreateCommand:e=>`cf queues create --queue-name ${e}`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`}),e[`dry-run`]||d.success(`Trigger deploy complete`)}const Xe={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(y(Je,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ze=e(`types`,`Generate types from cloudflare.config.ts`,()=>import(`./command-CqDudQZs.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});const Qe={command:`workers`,describe:`Deploy and manage serverless JavaScript/WASM applications on Cloudflare's global network`,builder:e=>e.command(s(Ke,`preview`)).command(U).command(de).command(me).command(s(Ze,`preview`)).command(ce).command(ve).command(Me).command(s(Xe,`native`)).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Qe as default};
|