cf 1.0.0-beta.26 → 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 +7373 -4926
- package/dist/_meta/hand-written-commands.json +2 -2
- package/dist/_meta/schemas.json +11614 -4465
- package/dist/abuse-reports-D9edOyag.mjs +24 -0
- package/dist/{access-DCOOmDC5.mjs → access-CKCCSrrU.mjs} +1 -1
- package/dist/{accounts-HC6XuIwP.mjs → accounts-CNb9U9bK.mjs} +33 -27
- package/dist/{acm-DYgr6SAR.mjs → acm-CdKTAToZ.mjs} +3 -3
- package/dist/{addressing-BS66pJ_a.mjs → addressing-eZI_C-b0.mjs} +18 -18
- package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
- package/dist/{ai-BiIKznNv.mjs → ai-Csl_QNwv.mjs} +7 -7
- package/dist/ai-audit-DlqWsQi-.mjs +6 -0
- package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
- package/dist/ai-search-BxyhS3X7.mjs +74 -0
- package/dist/{ai-security-BUwS6kVh.mjs → ai-security-DvU2iYkY.mjs} +3 -3
- package/dist/{alerting-BSzuvFk1.mjs → alerting-r0G2X9y9.mjs} +10 -10
- package/dist/analytics-C6bfqm-W.mjs +17 -0
- package/dist/analytics-engine-BlIecoOe.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BBxEJjGv.mjs → api-security-DZ7GWOqD.mjs} +26 -26
- package/dist/argo-Bh0_cj49.mjs +14 -0
- package/dist/{artifacts-B9g9aPrk.mjs → artifacts-VZJWVq_6.mjs} +16 -16
- package/dist/{audit-logs-BhJs-OS2.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-C50SqX9F.mjs → auth-clmqFEWU.mjs} +3 -3
- package/dist/{auth-token-DvNoIhRL.mjs → auth-token-DW4dJVdj.mjs} +1 -1
- package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-C0ynlGHf.mjs} +23 -23
- package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
- package/dist/billing-B2KusU6g.mjs +22 -0
- package/dist/{blocks-DnNrvi8s.mjs → blocks-BFulF68V.mjs} +1 -1
- package/dist/body-parser-DoewLePl.mjs +2 -0
- package/dist/body-unions-DNs981Ia.mjs +2 -0
- package/dist/bot-management-CXHXgrQC.mjs +9 -0
- package/dist/{botnet-feed-lD9s2oLA.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-D3mAH87h.mjs → builds-BbxINHRP.mjs} +27 -27
- package/dist/cache-BacNNtLu.mjs +36 -0
- package/dist/{cf-CpC4giTf.mjs → cf-BQ_LRiut.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
- package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +363 -0
- package/dist/{cli-Cm4Twas4.mjs → cli-B7vslRfu.mjs} +1 -1
- package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-bzB9JosR.mjs} +6 -6
- package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
- package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
- package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-DWBPQDA3.mjs} +126 -124
- package/dist/{command--Y_QAiU2.mjs → command-AVwd7XjE.mjs} +1 -1
- package/dist/{command-DlI7Z_7j.mjs → command-B87T_f2f.mjs} +1 -1
- package/dist/{command-QHmV62Fv.mjs → command-CEHhi3t0.mjs} +1 -1
- package/dist/{command-B-_ba4rQ.mjs → command-CYmQE79n.mjs} +1 -1
- package/dist/{command-DsOv6z9q.mjs → command-CbxXc5IW.mjs} +1 -1
- package/dist/{command-BKNQsGqu.mjs → command-Ce8CVLth.mjs} +1 -1
- package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
- package/dist/{command-BV8-laJK.mjs → command-D4YcwpVp.mjs} +1 -1
- package/dist/{command-BVz2aES3.mjs → command-D895kdlh.mjs} +1 -1
- package/dist/{command-yOG9VUtq.mjs → command-D9Qyi1B0.mjs} +1 -1
- package/dist/{command-CfOqnqlN.mjs → command-DeutqL1n.mjs} +1 -1
- package/dist/{command-Dn39o5xQ.mjs → command-Dl9ICrRK.mjs} +1 -1
- package/dist/{command-CN8NFLs2.mjs → command-DtCSe8Hy.mjs} +1 -1
- package/dist/{command-BsCFkho-.mjs → command-DwzVtmb3.mjs} +1 -1
- package/dist/{command-CQMRxiDz.mjs → command-wtBubtZ4.mjs} +1 -1
- package/dist/{completions-BA52jTea.mjs → completions-BvdKtzsX.mjs} +1 -1
- package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
- package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
- package/dist/{connectors-D8H6rQz9.mjs → connectors-DZFGNw3i.mjs} +4 -4
- package/dist/{containers-D4sa-Eoy.mjs → containers-B06OGOEB.mjs} +212 -212
- package/dist/{containers-Db-eWudu.mjs → containers-DCzQCo79.mjs} +8 -8
- package/dist/{content-scan-DUVq09i8.mjs → content-scan-XhnNJqXf.mjs} +4 -4
- package/dist/{context-BvLXzoMs.mjs → context-BY1Eh_Qe.mjs} +1 -1
- package/dist/{cps-CqaRliZZ.mjs → cps-CohlxvuN.mjs} +2 -2
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-BV4bHq8v.mjs} +2 -4
- package/dist/custom-csrs-BVdMQjYq.mjs +18 -0
- package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
- package/dist/custom-nameservers-CapMDyly.mjs +12 -0
- package/dist/custom-pages-BVIniWfq.mjs +38 -0
- package/dist/d1-nJCOJZb8.mjs +50 -0
- package/dist/{delegate-CMfEjvHn.mjs → delegate-CcL6RoGw.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-DDbmxkiX.mjs → deploy-DJMnWFNk.mjs} +1 -1
- package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
- package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
- package/dist/{dev-BS156bim.mjs → dev-GsYHvMah.mjs} +1 -1
- package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
- package/dist/{dist-DehXZozc.mjs → dist-D-ihn_mV.mjs} +42 -33
- package/dist/{dls-DciZC_gQ.mjs → dls-N1x8sAK3.mjs} +3 -3
- package/dist/{dns-C2YPspGN.mjs → dns-DATWP-PF.mjs} +36 -30
- package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-n3Y2ui6W.mjs} +8 -8
- package/dist/{docs-CYjyBA8q.mjs → docs-CRc_WOXh.mjs} +1 -1
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
- package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
- package/dist/{email-auth-CMCQAu99.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
- package/dist/email-domains-uL22-zRY.mjs +14 -0
- package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CV43rMJC.mjs} +15 -13
- package/dist/{email-security-Bu0fAYh-.mjs → email-security-DK_SJ0yi.mjs} +38 -38
- package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CTQafGec.mjs} +17 -17
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/{errors-C5RGao2J.mjs → errors-VG1mgwJl.mjs} +1 -1
- package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
- package/dist/{firewall-CJ-VIOk1.mjs → firewall-CW-fAI9m.mjs} +30 -14
- package/dist/{flagship-C5PTR1ND.mjs → flagship-RiLnDwfJ.mjs} +8 -8
- package/dist/{fraud-B7hwBheX.mjs → fraud-DvfBBTe8.mjs} +2 -2
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/global-options-DiKj2cQy.mjs +2 -0
- package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
- package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
- package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
- package/dist/iam-LlGEzRCq.mjs +62 -0
- package/dist/{images-Ttea4khD.mjs → images-C5WqUXkK.mjs} +11 -11
- package/dist/index.mjs +1 -1
- package/dist/{init-BeYrAg7Q.mjs → init-EVsjBrOz.mjs} +2 -2
- package/dist/{intel-CJznBf5n.mjs → intel-vcWyslaX.mjs} +18 -19
- package/dist/{interactive-DsU8VDvK.mjs → interactive-BCDFSPtq.mjs} +1 -1
- package/dist/{internal-DOho_iA0.mjs → internal-BhV9WjLp.mjs} +1 -1
- package/dist/{ips-BgNoRwFN.mjs → ips-CqHjVsqd.mjs} +1 -1
- package/dist/{k2-Cj1ORHul.mjs → k2-CZT2Pd5J.mjs} +2 -2
- package/dist/kv-Ipa7dnvF.mjs +12 -0
- package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
- package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
- package/dist/{live-BfrWKfq8.mjs → live-C9L1bNuE.mjs} +1 -1
- package/dist/load-balancers-Cb3VkSfc.mjs +84 -0
- package/dist/local-D5Vq6ooZ.mjs +2 -0
- package/dist/{local-CvzO-cQH.mjs → local-DIJ7SIKC.mjs} +1 -1
- package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-BZjgkacr.mjs} +1 -1
- package/dist/{login-CVWkMh1L.mjs → login-DG5ebyab.mjs} +1 -1
- package/dist/login-DRJugxya.mjs +2 -0
- package/dist/logpush-C5Gw7F_9.mjs +68 -0
- package/dist/logs-y3REfHbb.mjs +51 -0
- package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
- package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BPV_POf5.mjs} +129 -129
- package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
- package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
- package/dist/{mcp-BUOfMkBP.mjs → mcp-RPtrISTy.mjs} +6 -6
- package/dist/{mesh-B1RrhAT1.mjs → mesh-DZ4QHBPE.mjs} +5 -5
- package/dist/{migrate-BTU8AvlP.mjs → migrate-CRIUqGi2.mjs} +1 -1
- package/dist/{monetization-Da3ooFLC.mjs → monetization-CVZqM8Xo.mjs} +9 -5
- package/dist/{network-CjhSzhMm.mjs → network-DLt2JUo1.mjs} +15 -15
- package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
- package/dist/o11y-ySxrnP1Z.mjs +88 -0
- package/dist/{oauth-Dnog5v-Q.mjs → oauth-CFVUl-Wv.mjs} +1 -1
- package/dist/{oauth-DdXkpU44.mjs → oauth-Cidoyxfp.mjs} +1 -1
- package/dist/observability-C-KNh__y.mjs +4 -0
- 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-D2eFbKWb.mjs → page-rules-DRw763O1.mjs} +4 -4
- package/dist/{pages-DYZDvWK6.mjs → pages-DfQnxiTk.mjs} +12 -12
- package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
- package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-wdEhl8k4.mjs} +14 -12
- package/dist/{pipelines-D6pkhlpm.mjs → pipelines-DbyrI6F4.mjs} +11 -11
- package/dist/precursor-Dx8lN4UJ.mjs +4 -0
- package/dist/previews-DEVNSip2.mjs +6 -0
- package/dist/{progress-B-CVX0kn.mjs → progress-yvPscjYg.mjs} +1 -1
- package/dist/{prompt-DJF_Rs5S.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
- package/dist/{queues-DaqLO-UO.mjs → queues-DgMc7Z6A.mjs} +18 -18
- package/dist/{r2-DDIU9JN3.mjs → r2-BpTVicIq.mjs} +43 -43
- package/dist/{radar-D59qCgld.mjs → radar-DW-S1VUh.mjs} +11 -11
- package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
- package/dist/{ready-DgE08svD.mjs → ready-d0li0X6r.mjs} +1 -1
- package/dist/realtime-DMKHLYF4.mjs +170 -0
- package/dist/registrar-D23gfKBi.mjs +43 -0
- package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
- package/dist/{reporting-Dx2YTick.mjs → reporting-WX8P3Y0k.mjs} +2 -2
- package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-C0FpeBhz.mjs} +1 -1
- package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-qd7XOAka.mjs} +2 -2
- package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
- package/dist/{rules-CjgLSlUC.mjs → rules-CB0QQTB3.mjs} +5 -5
- package/dist/rulesets-DmqwixUC.mjs +42 -0
- package/dist/{rum-vPEpMS_h.mjs → rum-BZ_24qZU.mjs} +9 -9
- package/dist/{run-BZ6Fj3jQ.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-C_rvto6Y.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
- package/dist/schema-flags-CXm9iIv6.mjs +4 -0
- package/dist/{scim-BA7XbsSu.mjs → scim-DchxaJfE.mjs} +8 -8
- package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-oAft1cFE.mjs} +5 -5
- package/dist/security-insights-DMm0qg_m.mjs +62 -0
- package/dist/{security-txt-DikhnR2L.mjs → security-txt-CIt0494b.mjs} +2 -2
- package/dist/{session-BOnam-Wv.mjs → session-vzNfUhPl.mjs} +1 -1
- package/dist/{shared-DmmWSObC.mjs → shared-MK-_lkbn.mjs} +1 -1
- package/dist/{signed-url-C-24KbWB.mjs → signed-url-gNangfwc.mjs} +1 -1
- package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
- package/dist/{snippets-Bi3Uq1DF.mjs → snippets-DdoDYXW-.mjs} +3 -3
- package/dist/{spawn-C3hzWVrJ.mjs → spawn-B5F4OIHG.mjs} +1 -1
- package/dist/{spectrum-BaWKMoAl.mjs → spectrum-DLYIHelC.mjs} +3 -3
- package/dist/{speed-DShjlpAs.mjs → speed-DugG9Tm9.mjs} +2 -2
- package/dist/{sql-DCoFf15T.mjs → sql-Bb56llsb.mjs} +2 -2
- package/dist/src-BoSDeQ9m.mjs +133 -0
- package/dist/{ssl-C4nt4pJK.mjs → ssl-Bg4X3WGk.mjs} +24 -24
- package/dist/startup-profile-DQVkZZpb.mjs +2 -0
- package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DZL2DC44.mjs} +1 -1
- package/dist/state-DW3QZtfh.mjs +2 -0
- package/dist/{state-DmjHXZat.mjs → state-mr5ux1Nb.mjs} +1 -1
- package/dist/{stream-CpZbnSpH.mjs → stream-BuZYDbNR.mjs} +21 -21
- package/dist/{tags-BIjQ3Kjh.mjs → tags-SKz2odE_.mjs} +12 -6
- package/dist/{telemetry-BDhqOpUw.mjs → telemetry-B4zmCpT0.mjs} +1 -1
- package/dist/telemetry-DkDUr4KK.mjs +2 -0
- package/dist/tenant-custom-nameservers-BhkhBerL.mjs +8 -0
- package/dist/tenants-DD-GMq0K.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
- package/dist/{tunnels-CXAO2CeL.mjs → tunnels-D90ztENM.mjs} +6 -6
- package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-DhSU_Xar.mjs} +4 -4
- package/dist/ui-xjCox-gU.mjs +2 -0
- package/dist/{update-check-D_Wtw0_D.mjs → update-check-CRttabfu.mjs} +1 -1
- package/dist/{update-check-Dc7cRFlx.mjs → update-check-HltjTMDE.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
- package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BRdWwka4.mjs} +3 -3
- package/dist/{user-BaF0qvvO.mjs → user-Cmb1_Wu5.mjs} +50 -52
- package/dist/{vectorize-D5qiggZU.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-BdmAq7ul.mjs → waiting-rooms-LymmKIGr.mjs} +16 -14
- package/dist/{web-assets-BySw_Tme.mjs → web-assets-LHPQsrnY.mjs} +21 -21
- package/dist/{web3-BKkKf1RF.mjs → web3-BsOio0Ae.mjs} +12 -12
- package/dist/workers-BnLiOjZf.mjs +39 -0
- package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-sKpITeRk.mjs} +4 -4
- package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
- package/dist/workers-vpc-D8lefWDo.mjs +12 -0
- package/dist/{workflows-Cr957c4U.mjs → workflows-B-ZIG3y7.mjs} +22 -22
- package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-6E6wT_LZ.mjs} +67 -58
- package/dist/zaraz-BBKki5WS.mjs +22 -0
- package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-BZDXM5r6.mjs} +487 -409
- package/dist/{zones-BzyjOT10.mjs → zones-B-UV_DGE.mjs} +24 -24
- package/package.json +16 -16
- package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
- package/dist/ai-audit-DI4Rw2wl.mjs +0 -6
- package/dist/ai-search-QOenIzDL.mjs +0 -74
- package/dist/analytics-CQ-Yt1mm.mjs +0 -17
- package/dist/analytics-engine-CdrY5-95.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-BiefH8wc.mjs +0 -14
- package/dist/auth-Czzy5Rs_.mjs +0 -2
- package/dist/auth-D5Yj9eYU.mjs +0 -2
- package/dist/billing-BrLJqlOf.mjs +0 -22
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/bot-management-BSBVuKc0.mjs +0 -9
- package/dist/brand-protection-Byoa1hvj.mjs +0 -26
- package/dist/browser-run-BSVANGzU.mjs +0 -40
- package/dist/build-CPKxZ3kL.mjs +0 -2
- package/dist/build-Dwd1_7o0.mjs +0 -2
- package/dist/cache-0xCdyNg9.mjs +0 -36
- package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
- package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
- package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
- package/dist/d1-BsWI546w.mjs +0 -89
- package/dist/email-domains-1Nx60ETD.mjs +0 -12
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/iam-DuZenYtc.mjs +0 -48
- package/dist/kv-CTyuvcAz.mjs +0 -12
- package/dist/load-balancers-DMTsh-9q.mjs +0 -72
- package/dist/local-CWTti4ot.mjs +0 -2
- package/dist/login-Djz5mvHJ.mjs +0 -2
- package/dist/logpush-OMhp7VgE.mjs +0 -44
- package/dist/logs-BSyyNwso.mjs +0 -35
- package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
- package/dist/magic-network-monitoring-DRRvSrDP.mjs +0 -34
- package/dist/o11y-DeNxXxcp.mjs +0 -86
- package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
- package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
- package/dist/organization-IsxVyWol.mjs +0 -73
- package/dist/organizations-p8Mgo8A7.mjs +0 -4
- package/dist/origin-post-quantum-encryption-Bwysyttf.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-BOE_De2L.mjs +0 -2
- package/dist/precursor-B35P8h6h.mjs +0 -4
- package/dist/previews-B1mqjXaJ.mjs +0 -6
- package/dist/realtime-DWjdrDzv.mjs +0 -168
- package/dist/registrar-uYOU1U27.mjs +0 -43
- package/dist/resource-sharing-CIsLVAcK.mjs +0 -36
- package/dist/rulesets-C7_aZA7m.mjs +0 -34
- package/dist/run-D4-K_cbQ.mjs +0 -2
- package/dist/schema-flags-Cr6kleor.mjs +0 -4
- package/dist/security-insights-ZKtey62s.mjs +0 -40
- package/dist/src-jyCTFHcS.mjs +0 -131
- package/dist/startup-profile-D_Qjgca1.mjs +0 -2
- package/dist/state-C7lNNN31.mjs +0 -2
- package/dist/telemetry-BZdRnr26.mjs +0 -2
- package/dist/tenant-CqYoylyU.mjs +0 -10
- package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
- package/dist/ui-BUCBQ3Sq.mjs +0 -2
- package/dist/version-DNcdABcr.mjs +0 -2
- package/dist/workers-TS0oQ-XH.mjs +0 -39
- package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
- package/dist/zaraz-C8__FhOh.mjs +0 -22
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as l,n as u,r as d,t as f}from"./body-parser-DoewLePl.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-CEpZ-lQZ.mjs";import{t as _}from"./body-unions-DNs981Ia.mjs";var v={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/cancel`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 builds cancel <build-uuid>
|
|
3
3
|
|
|
4
|
-
Cancel a queued or running build.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`cancel <build-uuid>`,describe:`Cancel a Workers build`,builder:
|
|
4
|
+
Cancel a queued or running build.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`cancel <build-uuid>`,describe:`Cancel a Workers build`,builder:y,handler:async e=>c({command:`builds cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds cancel`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/cancel`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Updating`,async()=>c.send(v,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Updated`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/builds`,body:`json`,errors:{401:`UnauthorizedError`}};function x(e){return e.usage(`$0 builds create <trigger-uuid>
|
|
5
5
|
|
|
6
|
-
Start a build for a branch or commit using the selected trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>p(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{
|
|
6
|
+
Start a build for a branch or commit using the selected trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>p(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`seed-repo-branch`,`seed-repo-files`,`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --seed-repo-* flag is set`)}return!0})}const te={command:`create <trigger-uuid>`,describe:`Start a Workers build`,builder:x,handler:async e=>c({command:`builds create`,classification:{safeFlags:[`seed-repo-provider`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/builds`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),d=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>d.send(b,{body:t,account_id:m,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Created`});return}let h=f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),g=await s(`Creating`,async()=>d.send(b,{body:h,account_id:m,trigger_uuid:e[`trigger-uuid`]}));a(g,{successLabel:`Created`})})};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function ne(e){return e.usage(`$0 builds deploy-hooks create <script-name>
|
|
7
7
|
|
|
8
|
-
Create an HTTP hook that starts a build for a selected Worker branch.`).positional(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).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
|
+
Create an HTTP hook that starts a build for a selected Worker branch.`).positional(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`create <script-name>`,describe:`Create a deploy hook`,builder:ne,handler:async e=>c({command:`builds deploy-hooks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>l.send(S,{body:t,account_id:d,script_name:e[`script-name`]}));a(n,{successLabel:`Created`});return}e.branch===void 0&&(e.branch=await m(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await m(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let h=f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),g=await s(`Creating`,async()=>l.send(S,{body:h,account_id:d,script_name:e[`script-name`]}));a(g,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ae(e){return e.usage(`$0 builds deploy-hooks delete <deploy-hook-uuid>
|
|
9
9
|
|
|
10
|
-
Delete a deploy hook so its UUID can no longer start builds.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,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
|
|
10
|
+
Delete a deploy hook so its UUID can no longer start builds.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,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 oe={command:`delete <deploy-hook-uuid>`,describe:`Delete a deploy hook`,builder:ae,handler:async e=>c({command:`builds deploy-hooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ie,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Deleted`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ce(e){return e.usage(`$0 builds deploy-hooks get <deploy-hook-uuid>
|
|
11
11
|
|
|
12
|
-
Retrieve the name, branch, Worker identifier, and timestamps for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <deploy-hook-uuid>`,describe:`Get a deploy hook`,builder:
|
|
12
|
+
Retrieve the name, branch, Worker identifier, and timestamps for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <deploy-hook-uuid>`,describe:`Get a deploy hook`,builder:ce,handler:async e=>c({command:`builds deploy-hooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(se,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,errors:{401:`UnauthorizedError`}};function T(e){return e.usage(`$0 builds deploy-hooks list
|
|
13
13
|
|
|
14
14
|
List the branch-specific deploy hooks configured for a Worker.`).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List deploy hooks`,builder:T,handler:async e=>c({command:`builds deploy-hooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(w,{account_id:l,script_name:e[`script-name`]}));a(u,{successLabel:`Loaded`})})};var D={method:`POST`,path:t=>e`/workers/builds/deploy_hooks/${t.deploy_hook_uuid}`,errors:{404:`NotFoundError`,429:`TooManyRequestsError`}};function O(e){return e.usage(`$0 builds deploy-hooks trigger <deploy-hook-uuid>
|
|
15
15
|
|
|
16
16
|
Trigger a build using a deploy hook. This endpoint does not require authentication - the deploy_hook_uuid acts as a secret token.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`trigger <deploy-hook-uuid>`,describe:`Trigger deploy hook`,builder:O,handler:async e=>c({command:`builds deploy-hooks trigger`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf builds deploy-hooks trigger`,method:`POST`,url:`https://api.cloudflare.com/client/v4/workers/builds/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let t=await n(e),r=await s(`Creating`,async()=>t.send(D,{deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(r,{successLabel:`Created`})})};var A={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function j(e){return e.usage(`$0 builds deploy-hooks update <deploy-hook-uuid>
|
|
17
17
|
|
|
18
|
-
Replace the name and target branch for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`update <deploy-hook-uuid>`,describe:`Update a deploy hook`,builder:j,handler:async e=>c({command:`builds deploy-hooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):u(e.body)});return}let c=await n(e),
|
|
18
|
+
Replace the name and target branch for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`update <deploy-hook-uuid>`,describe:`Update a deploy hook`,builder:j,handler:async e=>c({command:`builds deploy-hooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(A,{body:t,account_id:d,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(n,{successLabel:`Updated`});return}e.branch===void 0&&(e.branch=await m(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await m(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let h=f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),g=await s(`Updating`,async()=>l.send(A,{body:h,account_id:d,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(g,{successLabel:`Updated`})})},N={command:`deploy-hooks`,describe:`Manage branch-specific HTTP hooks that start builds.`,builder:e=>e.command(re).command(oe).command(C).command(E).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function F(e){return e.usage(`$0 builds get <build-uuid>
|
|
19
19
|
|
|
20
20
|
Retrieve status, outcome, timestamps, trigger settings, and source metadata for a build UUID.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <build-uuid>`,describe:`Get a Workers build`,builder:F,handler:async e=>c({command:`builds get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(P,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/account/limits`,errors:{401:`UnauthorizedError`}};function R(e){return e.usage(`$0 builds limits get
|
|
21
21
|
|
|
@@ -23,42 +23,42 @@ Return whether the account's build-minute allowance is exhausted and when it ref
|
|
|
23
23
|
|
|
24
24
|
List paginated build records associated with a Worker tag.`).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List builds for a Worker`,builder:H,handler:async e=>c({command:`builds list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await r();o({command:`cf builds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`external-script-id`]==null?`<external-script-id>`:encodeURIComponent(String(e[`external-script-id`]))}/builds`,pathParams:{"external-script-id":String(e[`external-script-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(V,{account_id:u,external_script_id:e[`external-script-id`],...c}));a(d,{successLabel:`Loaded`})})};var W={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/logs`,query:[`cursor`],errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function G(e){return e.usage(`$0 builds logs get <build-uuid>
|
|
25
25
|
|
|
26
|
-
Retrieve cursor-paginated log lines for a build UUID.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Pagination cursor for log retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
26
|
+
Retrieve cursor-paginated log lines for a build UUID.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Pagination cursor for log retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <build-uuid>`,describe:`Get Workers build logs`,builder:G,handler:async e=>c({command:`builds logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={cursor:e.cursor};if(e.dryRun){let t=await r();o({command:`cf builds logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/logs`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(W,{account_id:u,build_uuid:e[`build-uuid`],...c}));a(d,{successLabel:`Loaded`})})},ue={command:`logs`,describe:`Retrieve build logs.`,builder:e=>e.command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/repos/${t.provider_type}/${t.provider_account_id}/${t.repo_id}/config_autofill`,query:[`branch`,`root_directory`],errors:{401:`UnauthorizedError`}};function fe(e){return e.usage(`$0 builds repos config-autofill get <repo-id>
|
|
27
27
|
|
|
28
|
-
Analyze repository for automatic configuration detection`).positional(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`,demandOption:!0}).option(`provider-type`,{type:`string`,description:`SCM provider type`,demandOption:!0}).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`,demandOption:!0}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
28
|
+
Analyze repository for automatic configuration detection`).positional(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`,demandOption:!0}).option(`provider-type`,{type:`string`,description:`SCM provider type`,demandOption:!0}).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`,demandOption:!0}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <repo-id>`,describe:`Get repository configuration autofill`,builder:fe,handler:async e=>c({command:`builds repos config-autofill get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={branch:e.branch,root_directory:e[`root-directory`]};if(e.dryRun){let t=await r();o({command:`cf builds repos config-autofill get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/${e[`provider-type`]==null?`<provider-type>`:encodeURIComponent(String(e[`provider-type`]))}/${e[`provider-account-id`]==null?`<provider-account-id>`:encodeURIComponent(String(e[`provider-account-id`]))}/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/config_autofill`,pathParams:{"provider-type":String(e[`provider-type`]??``),"provider-account-id":String(e[`provider-account-id`]??``),"repo-id":String(e[`repo-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(de,{account_id:u,provider_type:e[`provider-type`],provider_account_id:e[`provider-account-id`],repo_id:e[`repo-id`],...c}));a(d,{successLabel:`Loaded`})})},me={command:`config-autofill`,describe:`Operations for repos.config-autofill`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections/${t.repo_connection_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ge(e){return e.usage(`$0 builds repos connections delete <repo-connection-uuid>
|
|
29
29
|
|
|
30
|
-
Delete a saved repository connection.`).positional(`repo-connection-uuid`,{type:`string`,description:`Repository connection UUID.`,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
|
|
30
|
+
Delete a saved repository connection.`).positional(`repo-connection-uuid`,{type:`string`,description:`Repository connection UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _e={command:`delete <repo-connection-uuid>`,describe:`Delete a repository connection`,builder:ge,handler:async e=>c({command:`builds repos connections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds repos connections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections/${e[`repo-connection-uuid`]==null?`<repo-connection-uuid>`:encodeURIComponent(String(e[`repo-connection-uuid`]))}`,pathParams:{"repo-connection-uuid":String(e[`repo-connection-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(he,{account_id:l,repo_connection_uuid:e[`repo-connection-uuid`]}));a(u,{successLabel:`Deleted`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections`,body:`json`,errors:{401:`UnauthorizedError`}};function ve(e){return e.usage(`$0 builds repos connections upsert
|
|
31
31
|
|
|
32
|
-
Save the repository connection required by build triggers.`).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`provider-type`,{type:`string`,description:`Source control provider.`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`provider-type`,e=>p(e,`provider-type`,`text`)).option(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`repo-name`,{type:`string`,description:`Human-readable repository name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
32
|
+
Save the repository connection required by build triggers.`).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`provider-type`,{type:`string`,description:`Source control provider.`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`provider-type`,e=>p(e,`provider-type`,`text`)).option(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`repo-name`,{type:`string`,description:`Human-readable repository name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`upsert`,describe:`Create or update a repository connection`,builder:ve,handler:async e=>c({command:`builds repos connections upsert`,classification:{safeFlags:[`provider-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds repos connections upsert`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({provider_account_id:p(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:p(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:p(e[`repo-id`],`repo-id`,`text`),repo_name:p(e[`repo-name`],`repo-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Updating`,async()=>l.send(K,{body:e,account_id:d}));a(t,{successLabel:`Updated`});return}e[`provider-account-id`]===void 0&&(e[`provider-account-id`]=await m(`provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`provider-account-name`]===void 0&&(e[`provider-account-name`]=await m(`provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`provider-type`]===void 0&&(e[`provider-type`]=await h(`provider-type`,`Source control provider.`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`repo-id`]===void 0&&(e[`repo-id`]=await m(`repo-id`,`Provider-specific repository identifier.`)),e[`repo-name`]===void 0&&(e[`repo-name`]=await m(`repo-name`,`Human-readable repository name.`));let g=f({provider_account_id:p(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:p(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:p(e[`repo-id`],`repo-id`,`text`),repo_name:p(e[`repo-name`],`repo-name`,`text`)}),_=await s(`Updating`,async()=>l.send(K,{body:g,account_id:d}));a(_,{successLabel:`Updated`})})},be={command:`connections`,describe:`Operations for repos.connections`,builder:e=>e.command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`repos`,describe:`Manage source repository connections for Workers Builds.`,builder:e=>e.command(me).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,body:`json`,errors:{401:`UnauthorizedError`}};function Se(e){return e.usage(`$0 builds tokens create
|
|
33
33
|
|
|
34
|
-
Create a new build authentication token`).option(`build-token-name`,{type:`string`,description:`The build_token_name field`}).option(`build-token-secret`,{type:`string`,description:`The build_token_secret field`}).option(`cloudflare-token-id`,{type:`string`,description:`The cloudflare_token_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
34
|
+
Create a new build authentication token`).option(`build-token-name`,{type:`string`,description:`The build_token_name field`}).option(`build-token-secret`,{type:`string`,description:`The build_token_secret field`}).option(`cloudflare-token-id`,{type:`string`,description:`The cloudflare_token_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ce={command:`create`,describe:`Create build token`,builder:Se,handler:async e=>c({command:`builds tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({build_token_name:p(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:p(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:p(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(q,{body:e,account_id:d}));a(t,{successLabel:`Created`});return}e[`build-token-name`]===void 0&&(e[`build-token-name`]=await m(`build-token-name`,`The build_token_name field`)),e[`build-token-secret`]===void 0&&(e[`build-token-secret`]=await m(`build-token-secret`,`The build_token_secret field`)),e[`cloudflare-token-id`]===void 0&&(e[`cloudflare-token-id`]=await m(`cloudflare-token-id`,`The cloudflare_token_id field`));let h=f({build_token_name:p(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:p(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:p(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}),g=await s(`Creating`,async()=>l.send(q,{body:h,account_id:d}));a(g,{successLabel:`Created`})})};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/tokens/${t.build_token_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Te(e){return e.usage(`$0 builds tokens delete <build-token-uuid>
|
|
35
35
|
|
|
36
|
-
Delete a stored build token owned by the current user.`).positional(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`,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
|
|
36
|
+
Delete a stored build token owned by the current user.`).positional(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`,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 <build-token-uuid>`,describe:`Delete a build token`,builder:Te,handler:async e=>c({command:`builds tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens/${e[`build-token-uuid`]==null?`<build-token-uuid>`:encodeURIComponent(String(e[`build-token-uuid`]))}`,pathParams:{"build-token-uuid":String(e[`build-token-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(we,{account_id:l,build_token_uuid:e[`build-token-uuid`]}));a(u,{successLabel:`Deleted`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function Oe(e){return e.usage(`$0 builds tokens list
|
|
37
37
|
|
|
38
|
-
List metadata for build tokens available to the current user without returning their secrets.`).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
38
|
+
List metadata for build tokens available to the current user without returning their secrets.`).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`list`,describe:`List build tokens`,builder:Oe,handler:async e=>c({command:`builds tokens list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf builds tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/tokens`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(De,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Ae={command:`tokens`,describe:`Manage credentials used by Workers Builds to deploy Workers.`,builder:e=>e.command(Ce).command(Ee).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/purge_build_cache`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Me(e){return e.usage(`$0 builds triggers cache purge <trigger-uuid>
|
|
39
39
|
|
|
40
|
-
Delete cached dependencies and build artifacts associated with a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,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
|
|
40
|
+
Delete cached dependencies and build artifacts associated with a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ne={command:`purge <trigger-uuid>`,describe:`Purge a trigger's build cache`,builder:Me,handler:async e=>c({command:`builds triggers cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/purge_build_cache`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation purges the build cache for a Workers Builds trigger.`}))return;let u=await s(`Processing`,async()=>c.send(je,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Done`})})},Pe={command:`cache`,describe:`Operations for triggers.cache`,builder:e=>e.command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers`,body:`json`,errors:{401:`UnauthorizedError`}};function Fe(e){return e.usage(`$0 builds triggers create
|
|
41
41
|
|
|
42
|
-
Create a trigger defining the repository connection, Worker tag, commands, filters, cache setting, and build token.`).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!1}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`repo-connection-uuid`,{type:`string`,description:`Repository connection UUID.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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
|
|
42
|
+
Create a trigger defining the repository connection, Worker tag, commands, filters, cache setting, and build token.`).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!1}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`repo-connection-uuid`,{type:`string`,description:`Repository connection UUID.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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:`create`,describe:`Create a build trigger`,builder:Fe,handler:async e=>c({command:`builds triggers create`,classification:{safeFlags:[`build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),external_script_id:p(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:p(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(J,{body:e,account_id:d}));a(t,{successLabel:`Created`});return}if(e[`branch-excludes`]===void 0)throw Error(`--branch-excludes is required (or pass --body with this field set).`);if(e[`branch-includes`]===void 0)throw Error(`--branch-includes is required (or pass --body with this field set).`);if(e[`build-command`]===void 0&&(e[`build-command`]=await m(`build-command`,`Command to build the Worker.`)),e[`build-token-uuid`]===void 0&&(e[`build-token-uuid`]=await m(`build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`deploy-command`]===void 0&&(e[`deploy-command`]=await m(`deploy-command`,`Command to deploy the Worker.`)),e[`external-script-id`]===void 0&&(e[`external-script-id`]=await m(`external-script-id`,`System-generated tag of the Worker. This is not the Worker name.`)),e[`path-excludes`]===void 0)throw Error(`--path-excludes is required (or pass --body with this field set).`);if(e[`path-includes`]===void 0)throw Error(`--path-includes is required (or pass --body with this field set).`);e[`repo-connection-uuid`]===void 0&&(e[`repo-connection-uuid`]=await m(`repo-connection-uuid`,`Repository connection UUID.`)),e[`root-directory`]===void 0&&(e[`root-directory`]=await m(`root-directory`,`Repository directory in which build and deploy commands run.`)),e[`trigger-name`]===void 0&&(e[`trigger-name`]=await m(`trigger-name`,`Human-readable name of the build trigger.`));let h=f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),external_script_id:p(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:p(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}),g=await s(`Creating`,async()=>l.send(J,{body:h,account_id:d}));a(g,{successLabel:`Created`})})};var Le={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Re(e){return e.usage(`$0 builds triggers delete <trigger-uuid>
|
|
43
43
|
|
|
44
|
-
Delete a trigger and cancel its unfinished builds.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,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
|
|
44
|
+
Delete a trigger and cancel its unfinished builds.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,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 ze={command:`delete <trigger-uuid>`,describe:`Delete a build trigger`,builder:Re,handler:async e=>c({command:`builds triggers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation deletes the build trigger and cancels its unfinished builds.`}))return;let u=await s(`Deleting`,async()=>c.send(Le,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})};var Be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables/${t.environment_variable_key}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ve(e){return e.usage(`$0 builds triggers environment-variables delete <environment-variable-key>
|
|
45
45
|
|
|
46
|
-
Delete one build-time variable or secret by key.`).positional(`environment-variable-key`,{type:`string`,description:`Environment variable key.`,demandOption:!0}).option(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,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
|
|
46
|
+
Delete one build-time variable or secret by key.`).positional(`environment-variable-key`,{type:`string`,description:`Environment variable key.`,demandOption:!0}).option(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const He={command:`delete <environment-variable-key>`,describe:`Delete a build variable`,builder:Ve,handler:async e=>c({command:`builds triggers environment-variables delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables/${e[`environment-variable-key`]==null?`<environment-variable-key>`:encodeURIComponent(String(e[`environment-variable-key`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``),"environment-variable-key":String(e[`environment-variable-key`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(Be,{account_id:l,trigger_uuid:e[`trigger-uuid`],environment_variable_key:e[`environment-variable-key`]}));a(u,{successLabel:`Deleted`})})};var Ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,errors:{401:`UnauthorizedError`}};function We(e){return e.usage(`$0 builds triggers environment-variables list
|
|
47
47
|
|
|
48
|
-
List build-time variables configured for a trigger. Secret values are not returned.`).option(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
48
|
+
List build-time variables configured for a trigger. Secret values are not returned.`).option(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`list`,describe:`List build variables`,builder:We,handler:async e=>c({command:`builds triggers environment-variables list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ue,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Loaded`})})};var Ke={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function qe(e){return e.usage(`$0 builds triggers environment-variables upsert <trigger-uuid>
|
|
49
49
|
|
|
50
|
-
Add or replace build-time variables and secrets without changing unspecified keys.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores.`})}const
|
|
50
|
+
Add or replace build-time variables and secrets without changing unspecified keys.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores.`})}const Je={command:`upsert <trigger-uuid>`,describe:`Set build variables`,builder:qe,handler:async e=>c({command:`builds triggers environment-variables upsert`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables upsert`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(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 c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(Ke,{body:t,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`})}})},Ye={command:`environment-variables`,describe:`Operations for triggers.environment-variables`,builder:e=>e.command(He).command(Ge).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.external_script_id}/triggers`,errors:{401:`UnauthorizedError`}};function Ze(e){return e.usage(`$0 builds triggers list
|
|
51
51
|
|
|
52
|
-
List trigger UUIDs and build settings associated with a Worker tag.`).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
52
|
+
List trigger UUIDs and build settings associated with a Worker tag.`).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`list`,describe:`List triggers for a Worker`,builder:Ze,handler:async e=>c({command:`builds triggers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`external-script-id`]==null?`<external-script-id>`:encodeURIComponent(String(e[`external-script-id`]))}/triggers`,pathParams:{"external-script-id":String(e[`external-script-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Xe,{account_id:l,external_script_id:e[`external-script-id`]}));a(u,{successLabel:`Loaded`})})};var Y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function $e(e){return e.usage(`$0 builds triggers update <trigger-uuid>
|
|
53
53
|
|
|
54
|
-
Update commands, cache settings, or branch and path filters for a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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
|
|
54
|
+
Update commands, cache settings, or branch and path filters for a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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 et={command:`update <trigger-uuid>`,describe:`Update a build trigger`,builder:$e,handler:async e=>c({command:`builds triggers update`,classification:{safeFlags:[`build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(Y,{body:t,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`});return}let m=f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}),h=await s(`Updating`,async()=>l.send(Y,{body:m,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(h,{successLabel:`Updated`})})},tt={command:`triggers`,describe:`Configure how repository changes build and deploy Workers.`,builder:e=>e.command(Ie).command(ze).command(Qe).command(et).command(Pe).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds`,query:[`version_ids`],errors:{401:`UnauthorizedError`}};function rt(e){return e.usage(`$0 builds versions get
|
|
55
55
|
|
|
56
|
-
Retrieve builds associated with one or more Worker version IDs.`).option(`version-ids`,{type:`string`,description:`Comma-separated list of version UUIDs (max 20).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
56
|
+
Retrieve builds associated with one or more Worker version IDs.`).option(`version-ids`,{type:`string`,description:`Comma-separated list of version UUIDs (max 20).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get`,describe:`Get builds by Worker version`,builder:rt,handler:async e=>c({command:`builds versions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={version_ids:e[`version-ids`]};if(e.dryRun){let e=await r();o({command:`cf builds versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/builds`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(nt,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},X={command:`versions`,describe:`Find builds associated with Worker versions.`,builder:e=>e.command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function at(e){return e.usage(`$0 builds workers create
|
|
57
57
|
|
|
58
|
-
Connect a Worker tag to a repository and production build settings.`).option(`git-repository-branch`,{type:`string`,description:`Git branch to watch for builds`}).option(`git-repository-provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`git-repository-provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`git-repository-provider-type`,{type:`string`,description:`The git_repository.provider_type field`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`git-repository-provider-type`,e=>p(e,`git-repository-provider-type`,`text`)).option(`git-repository-repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`git-repository-repo-name`,{type:`string`,description:`Human-readable repository name.`}).option(`git-repository-grant-id`,{type:`string`,description:`Grant ID required for grant-backed providers`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`previews-enabled`,{type:`boolean`,description:`Whether Previews are enabled for this Worker`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`script-tag`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a Worker build configuration.`})}const at={command:`create`,describe:`Create Worker build configuration`,builder:it,handler:async e=>c({command:`builds workers create`,classification:{safeFlags:[`git-repository-provider-type`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`git-repository-branch`]===void 0&&(e[`git-repository-branch`]=await m(`git-repository-branch`,`Git branch to watch for builds`)),e[`git-repository-provider-account-id`]===void 0&&(e[`git-repository-provider-account-id`]=await m(`git-repository-provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`git-repository-provider-account-name`]===void 0&&(e[`git-repository-provider-account-name`]=await m(`git-repository-provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`git-repository-provider-type`]===void 0&&(e[`git-repository-provider-type`]=await h(`git-repository-provider-type`,`The git_repository.provider_type field`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`git-repository-repo-id`]===void 0&&(e[`git-repository-repo-id`]=await m(`git-repository-repo-id`,`Provider-specific repository identifier.`)),e[`git-repository-repo-name`]===void 0&&(e[`git-repository-repo-name`]=await m(`git-repository-repo-name`,`Human-readable repository name.`)),e[`previews-base-config-build-command`]===void 0&&(e[`previews-base-config-build-command`]=await m(`previews-base-config-build-command`,`Command to build the Worker.`)),e[`previews-base-config-build-token-uuid`]===void 0&&(e[`previews-base-config-build-token-uuid`]=await m(`previews-base-config-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`previews-base-config-deploy-command`]===void 0&&(e[`previews-base-config-deploy-command`]=await m(`previews-base-config-deploy-command`,`Command to deploy the Worker.`)),e[`previews-enabled`]===void 0)throw Error(`--previews-enabled is required (or pass --body with this field set).`);e[`production-settings-build-command`]===void 0&&(e[`production-settings-build-command`]=await m(`production-settings-build-command`,`Command to build the Worker.`)),e[`production-settings-build-token-uuid`]===void 0&&(e[`production-settings-build-token-uuid`]=await m(`production-settings-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`production-settings-deploy-command`]===void 0&&(e[`production-settings-deploy-command`]=await m(`production-settings-deploy-command`,`Command to deploy the Worker.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await m(`script-tag`,`System-generated tag of the Worker. This is not the Worker name.`));let g=f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]),_=await s(`Creating`,async()=>c.send(Z,{body:g,account_id:l}));a(_,{successLabel:`Created`})})};var Q={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ot(e){return e.usage(`$0 builds workers delete <script-tag>
|
|
58
|
+
Connect a Worker tag to a repository and production build settings.`).option(`git-repository-branch`,{type:`string`,description:`Git branch to watch for builds`}).option(`git-repository-provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`git-repository-provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`git-repository-provider-type`,{type:`string`,description:`The git_repository.provider_type field`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`git-repository-provider-type`,e=>p(e,`git-repository-provider-type`,`text`)).option(`git-repository-repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`git-repository-repo-name`,{type:`string`,description:`Human-readable repository name.`}).option(`git-repository-grant-id`,{type:`string`,description:`Grant ID required for grant-backed providers`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`previews-enabled`,{type:`boolean`,description:`Whether Previews are enabled for this Worker`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`script-tag`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a Worker build configuration.`})}const Q=[{path:[`git_repository`],selector:`provider_type`,variants:[{values:[`github`,`gitlab`],schema:{type:`object`,properties:{branch:{type:`string`},provider_account_id:{type:`string`},provider_account_name:{type:`string`},provider_type:{enum:[`github`,`gitlab`]},repo_id:{type:`string`},repo_name:{type:`string`}},required:[`branch`,`provider_account_id`,`provider_account_name`,`provider_type`,`repo_id`,`repo_name`],additionalProperties:!1}},{values:[`gitlab_internal`,`origin`],schema:{type:`object`,properties:{branch:{type:`string`},grant_id:{type:`string`},provider_account_id:{type:`string`},provider_account_name:{type:`string`},provider_type:{enum:[`gitlab_internal`,`origin`]},repo_id:{type:`string`},repo_name:{type:`string`}},required:[`branch`,`grant_id`,`provider_account_id`,`provider_account_name`,`provider_type`,`repo_id`,`repo_name`],additionalProperties:!1}}]}],ot={command:`create`,describe:`Create Worker build configuration`,builder:at,handler:async e=>c({command:`builds workers create`,classification:{safeFlags:[`git-repository-provider-type`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_(f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]),Q):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(Z,{body:e,account_id:g}));a(t,{successLabel:`Created`});return}if(e[`git-repository-branch`]===void 0&&(e[`git-repository-branch`]=await m(`git-repository-branch`,`Git branch to watch for builds`)),e[`git-repository-provider-account-id`]===void 0&&(e[`git-repository-provider-account-id`]=await m(`git-repository-provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`git-repository-provider-account-name`]===void 0&&(e[`git-repository-provider-account-name`]=await m(`git-repository-provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`git-repository-provider-type`]===void 0&&(e[`git-repository-provider-type`]=await h(`git-repository-provider-type`,`The git_repository.provider_type field`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`git-repository-repo-id`]===void 0&&(e[`git-repository-repo-id`]=await m(`git-repository-repo-id`,`Provider-specific repository identifier.`)),e[`git-repository-repo-name`]===void 0&&(e[`git-repository-repo-name`]=await m(`git-repository-repo-name`,`Human-readable repository name.`)),e[`previews-base-config-build-command`]===void 0&&(e[`previews-base-config-build-command`]=await m(`previews-base-config-build-command`,`Command to build the Worker.`)),e[`previews-base-config-build-token-uuid`]===void 0&&(e[`previews-base-config-build-token-uuid`]=await m(`previews-base-config-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`previews-base-config-deploy-command`]===void 0&&(e[`previews-base-config-deploy-command`]=await m(`previews-base-config-deploy-command`,`Command to deploy the Worker.`)),e[`previews-enabled`]===void 0)throw Error(`--previews-enabled is required (or pass --body with this field set).`);e[`production-settings-build-command`]===void 0&&(e[`production-settings-build-command`]=await m(`production-settings-build-command`,`Command to build the Worker.`)),e[`production-settings-build-token-uuid`]===void 0&&(e[`production-settings-build-token-uuid`]=await m(`production-settings-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`production-settings-deploy-command`]===void 0&&(e[`production-settings-deploy-command`]=await m(`production-settings-deploy-command`,`Command to deploy the Worker.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await m(`script-tag`,`System-generated tag of the Worker. This is not the Worker name.`));let v=f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]);_(v,Q);let y=await s(`Creating`,async()=>l.send(Z,{body:v,account_id:g}));a(y,{successLabel:`Created`})})};var st={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ct(e){return e.usage(`$0 builds workers delete <script-tag>
|
|
59
59
|
|
|
60
|
-
Delete build settings and triggers for a Worker tag and cancel unfinished builds. The Worker is not deleted.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
60
|
+
Delete build settings and triggers for a Worker tag and cancel unfinished builds. The Worker is not deleted.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const lt={command:`delete <script-tag>`,describe:`Delete Worker build configuration`,builder:ct,handler:async e=>c({command:`builds workers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation deletes the Worker build configuration and its triggers, and cancels unfinished builds. The Worker is not deleted.`}))return;let u=await s(`Deleting`,async()=>c.send(st,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Deleted`})})};var ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function dt(e){return e.usage(`$0 builds workers get <script-tag>
|
|
61
61
|
|
|
62
|
-
Retrieve the repository and production build settings associated with a Worker tag.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
62
|
+
Retrieve the repository and production build settings associated with a Worker tag.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`get <script-tag>`,describe:`Get Worker build configuration`,builder:dt,handler:async e=>c({command:`builds workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ut,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,query:[`patch_existing_previews`],body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function pt(e){return e.usage(`$0 builds workers update <script-tag>
|
|
63
63
|
|
|
64
|
-
Update the build configuration for a Worker script. Supports partial updates to git repository settings, production build settings, and Preview settings.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`patch-existing-previews`,{type:`string`,description:`Apply a previews_base_config patch to every existing Preview of the Worker as well as to the base config.`,choices:[`true`,`false`]}).option(`git-repository-branch`,{type:`string`,description:`New git branch to watch for builds`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`previews-enabled`,{type:`boolean`,description:`Enable or disable Previews for this Worker. Enabling requires previews_base_config to already exist or to be sent in the same request.`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Worker build configuration. At least one field must be provided.`})}const
|
|
64
|
+
Update the build configuration for a Worker script. Supports partial updates to git repository settings, production build settings, and Preview settings.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`patch-existing-previews`,{type:`string`,description:`Apply a previews_base_config patch to every existing Preview of the Worker as well as to the base config.`,choices:[`true`,`false`]}).option(`git-repository-branch`,{type:`string`,description:`New git branch to watch for builds`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`previews-enabled`,{type:`boolean`,description:`Enable or disable Previews for this Worker. Enabling requires previews_base_config to already exist or to be sent in the same request.`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Worker build configuration. At least one field must be provided.`})}const mt={command:`update <script-tag>`,describe:`Update Worker build configuration`,builder:pt,handler:async e=>c({command:`builds workers update`,classification:{safeFlags:[`patch-existing-previews`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{let c={patch_existing_previews:e[`patch-existing-previews`]};if(e.dryRun){let t=await r();o({command:`cf builds workers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},query:c,bodyKind:`json`,body:e.body===void 0?f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]):u(e.body)});return}let l=e.body===void 0?void 0:u(e.body),m=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body!==void 0){let t=l;new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Updating`,async()=>m.send($,{body:t,account_id:h,script_tag:e[`script-tag`],...c}));a(n,{successLabel:`Updated`});return}let g=f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let _=await s(`Updating`,async()=>m.send($,{body:g,account_id:h,script_tag:e[`script-tag`],...c}));a(_,{successLabel:`Updated`})})},ht={command:`workers`,describe:`Manage repository-backed build configuration for Workers.`,builder:e=>e.command(ot).command(lt).command(ft).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gt={command:`builds`,describe:`Build and deploy Workers from connected repositories, then inspect build status and logs.`,builder:e=>e.command(ee).command(te).command(I).command(U).command(N).command(B).command(ue).command(xe).command(Ae).command(tt).command(X).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{gt as default};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-B-h0BHg7.mjs";import{i as r}from"./context-BY1Eh_Qe.mjs";import{t as i}from"./output-BZQEl3mK.mjs";import{t as a}from"./dry-run-kJbjn4kG.mjs";import{t as o}from"./progress-yvPscjYg.mjs";import{t as s}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{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}/environments/${t.environment_id}/invalidate_cache`,body:`json`};function h(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:h,handler:async e=>s({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=e.body===void 0?void 0:c(e.body),l=await n(e),u=await r({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation marks the selected content in the environment's cache as stale.`}))return;if(e.body!==void 0){let t=s,n=await o(`Processing`,async()=>l.send(m,{body:t,zone_id:u,environment_id:e[`environment-id`]}));i(n,{successLabel:`Done`});return}let d=await o(`Processing`,async()=>t(l,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`));i(d,{successLabel:`Done`})})};var _={method:`POST`,path:t=>e`/zones/${t.zone_id}/invalidate_cache`,body:`json`};function ee(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").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:`invalidate`,describe:`Invalidate Cached Content`,builder:ee,handler:async e=>s({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=e.body===void 0?void 0:c(e.body),l=await n(e),u=await r({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation marks the selected content in the zone's cache as stale.`}))return;if(e.body!==void 0){let e=s,t=await o(`Processing`,async()=>l.send(_,{body:e,zone_id:u}));i(t,{successLabel:`Done`});return}let d=await o(`Processing`,async()=>t(l,`POST`,`/zones/${e.zoneId}/invalidate_cache`));i(d,{successLabel:`Done`})})};var ne={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/batch`,body:`json`};function re(e){return e.usage("$0 cache origin-cloud-regions bulk delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").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 ie={command:`delete`,describe:`Batch delete origin cloud region mappings`,builder:re,handler:async e=>s({command:`cache origin-cloud-regions bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body,[],100)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:c(e.body,[],100),s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,await p({force:!!e.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})&&e.body!==void 0){let e=t,n=await o(`Deleting`,async()=>s.send(ne,{body:e,zone_id:l}));i(n,{successLabel:`Deleted`})}})};var ae={method:`PUT`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/batch`,body:`json`};function v(e){return e.usage("$0 cache origin-cloud-regions bulk update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").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 y={command:`update`,describe:`Batch create or replace origin cloud region mappings`,builder:v,handler:async e=>s({command:`cache origin-cloud-regions bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body,[],100)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:c(e.body,[],100),s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let e=t,n=await o(`Updating`,async()=>s.send(ae,{body:e,zone_id:l}));i(n,{successLabel:`Updated`})}})},b={command:`bulk`,describe:`Operations for origin-cloud-regions.bulk`,builder:e=>e.command(ie).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function S(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
|
|
3
|
+
|
|
4
|
+
Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address whose mapping should be deleted.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:S,handler:async e=>s({command:`cache origin-cloud-regions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`Are you sure you want to delete this Origin Cloud Region configuration?`}))return;let c=await o(`Deleting`,async()=>t.send(x,{zone_id:s,origin_ip:e[`origin-ip`]}));i(c,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function T(e){return e.usage(`$0 cache origin-cloud-regions get <origin-ip>
|
|
5
|
+
|
|
6
|
+
Returns the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup (RFC 5952 for IPv6). Returns 404 if the zone has no mappings or if the specified IP has no mapping.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address to look up. IPv4 and IPv6 are supported.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <origin-ip>`,describe:`Get an origin cloud region mapping`,builder:T,handler:async e=>s({command:`cache origin-cloud-regions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(w,{zone_id:s,origin_ip:e[`origin-ip`]}));i(c,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions`,query:[`page`,`per_page`]};function O(e){return e.usage(`$0 cache origin-cloud-regions list
|
|
7
|
+
|
|
8
|
+
Returns all IP-to-cloud-region mappings configured for the zone with pagination support. Each mapping tells Cloudflare which cloud vendor and region hosts the origin at that IP, enabling the edge to route via the nearest Tiered Cache upper-tier co-located with that cloud provider. Returns an empty array when no mappings exist.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List origin cloud region mappings`,builder:O,handler:async e=>s({command:`cache origin-cloud-regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf cache origin-cloud-regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let s=await n(e),c=await r({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await o(`Loading`,async()=>s.send(D,{zone_id:c,...t}));i(l,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/supported_regions`};function j(e){return e.usage(`$0 cache origin-cloud-regions regions list-supported
|
|
9
|
+
|
|
10
|
+
Returns the cloud vendors and regions that are valid values for origin cloud region mappings. Each region includes the Tiered Cache upper-tier colocation codes that will be used for cache routing when a mapping targeting that region is active. Requires the zone to have Tiered Cache enabled.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list-supported`,describe:`List supported cloud vendors and regions`,builder:j,handler:async e=>s({command:`cache origin-cloud-regions regions list-supported`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions regions list-supported`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/supported_regions`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(A,{zone_id:s}));i(c,{successLabel:`Loaded`})})},N={command:`regions`,describe:`Operations for origin-cloud-regions.regions`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`PUT`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`,body:`json`};function F(e){return e.usage("$0 cache origin-cloud-regions update <origin-ip>\n\nCreates a new IP-to-cloud-region mapping or replaces the existing mapping for the specified IP. PUT is idempotent — calling it repeatedly with the same body produces the same result. The IP path parameter is normalized to canonical form (RFC 5952 for IPv6) before storage. The vendor and region are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`. Returns 400 if the `origin_ip` in the body does not match the URL path parameter. Returns 403 (code 1164) when the zone has reached the limit of 3,500 IP mappings.").positional(`origin-ip`,{type:`string`,description:`Origin IP address to create or replace.`,demandOption:!0}).option(`region`,{type:`string`,description:`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`}).option(`vendor`,{type:`string`,description:`Cloud vendor hosting the origin. Must be one of the supported vendors.`,choices:[`aws`,`azure`,`gcp`,`oci`]}).coerce(`vendor`,e=>u(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or replacing an origin cloud region mapping.`})}const I={command:`update <origin-ip>`,describe:`Create or replace an origin cloud region mapping`,builder:F,handler:async e=>s({command:`cache origin-cloud-regions update`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`json`,body:e.body===void 0?l({region:u(e.region,`region`,`text`),vendor:e.vendor}):c(e.body)});return}let t=e.body===void 0?void 0:c(e.body),s=await n(e),p=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let n=t,r=await o(`Updating`,async()=>s.send(P,{body:n,zone_id:p,origin_ip:e[`origin-ip`]}));i(r,{successLabel:`Updated`});return}e.region===void 0&&(e.region=await d(`region`,`Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint.`)),e.vendor===void 0&&(e.vendor=await f(`vendor`,`Cloud vendor hosting the origin. Must be one of the supported vendors.`,[`aws`,`azure`,`gcp`,`oci`]));let m=l({region:u(e.region,`region`,`text`),vendor:e.vendor}),h=await o(`Updating`,async()=>s.send(P,{body:m,zone_id:p,origin_ip:e[`origin-ip`]}));i(h,{successLabel:`Updated`})})},L={command:`origin-cloud-regions`,describe:`Manage Origin Cloud Regions routing and failover configurations`,builder:e=>e.command(C).command(E).command(k).command(I).command(b).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/purge_cache`,body:`json`};function z(e){return e.usage("$0 cache purge-environment <environment-id>\n\nDeletes cached content for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/purge_cache`: the next request for purged content is a cache `MISS`, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To keep content cached and have Cloudflare revalidate it instead, use `POST /zones/{zone_id}/environments/{environment_id}/invalidate_cache`. Purging by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`purge-environment <environment-id>`,describe:`Purge Cached Content by Environment`,builder:z,handler:async e=>s({command:`cache purge-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache purge-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/purge_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=e.body===void 0?void 0:c(e.body),l=await n(e),u=await r({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation deletes the selected content from the environment's cache.`}))return;if(e.body!==void 0){let t=s,n=await o(`Processing`,async()=>l.send(R,{body:t,zone_id:u,environment_id:e[`environment-id`]}));i(n,{successLabel:`Done`});return}let d=await o(`Processing`,async()=>t(l,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/purge_cache`));i(d,{successLabel:`Done`})})};var V={method:`POST`,path:t=>e`/zones/${t.zone_id}/purge_cache`,body:`json`};function H(e){return e.usage("$0 cache purge\n\nDeletes cached content in every Cloudflare data center and cache tier, including Cache Reserve. The next request for purged content is a cache `MISS`: Cloudflare fetches the full response from your origin and caches it again. Cloudflare does not serve purged content from cache again, even if your origin is unavailable. To keep content cached and have Cloudflare revalidate it with your origin instead, use `POST /zones/{zone_id}/invalidate_cache`. ### Choose what to purge Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. It does not confirm that any content was cached or removed. To check, request a purged URL and confirm that the `CF-Cache-Status` response header is `MISS`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").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 U={command:`purge`,describe:`Purge Cached Content`,builder:H,handler:async e=>s({command:`cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/purge_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=e.body===void 0?void 0:c(e.body),l=await n(e),u=await r({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,!await p({force:!!e.force,message:`This operation deletes the selected content from the zone's cache.`}))return;if(e.body!==void 0){let e=s,t=await o(`Processing`,async()=>l.send(V,{body:e,zone_id:u}));i(t,{successLabel:`Done`});return}let d=await o(`Processing`,async()=>t(l,`POST`,`/zones/${e.zoneId}/purge_cache`));i(d,{successLabel:`Done`})})};var W={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/regional_tiered_cache`,body:`json`};function G(e){return e.usage(`$0 cache settings regional-tiered-cache edit
|
|
11
|
+
|
|
12
|
+
Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`value`,{type:`string`,description:`Value of the Regional Tiered Cache zone setting.`,choices:[`on`,`off`]}).coerce(`value`,e=>u(e,`value`,`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 K={command:`edit`,describe:`Change Regional Tiered Cache setting`,builder:G,handler:async e=>s({command:`cache settings regional-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings regional-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:e.value}):c(e.body)});return}let t=e.body===void 0?void 0:c(e.body),s=await n(e),u=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await o(`Updating`,async()=>s.send(W,{body:e,zone_id:u}));i(n,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await f(`value`,`Value of the Regional Tiered Cache zone setting.`,[`on`,`off`]));let d=l({value:e.value}),p=await o(`Updating`,async()=>s.send(W,{body:d,zone_id:u}));i(p,{successLabel:`Updated`})})};var q={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/regional_tiered_cache`};function J(e){return e.usage(`$0 cache settings regional-tiered-cache get
|
|
13
|
+
|
|
14
|
+
Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get`,describe:`Get Regional Tiered Cache setting`,builder:J,handler:async e=>s({command:`cache settings regional-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings regional-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/regional_tiered_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(q,{zone_id:s}));i(c,{successLabel:`Loaded`})})},se={command:`regional-tiered-cache`,describe:`Restrict tiered cache topology to data centers within a specific geographic region`,builder:e=>e.command(K).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ce={method:`POST`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve_clear`};function le(e){return e.usage(`$0 cache settings reserve clear
|
|
15
|
+
|
|
16
|
+
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ue={command:`clear`,describe:`Start Cache Reserve Clear`,builder:le,handler:async e=>s({command:`cache settings reserve clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache settings reserve clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`}))return;let c=await o(`Processing`,async()=>t.send(ce,{zone_id:s}));i(c,{successLabel:`Done`})})};var Y={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve`,body:`json`};function de(e){return e.usage(`$0 cache settings reserve edit
|
|
17
|
+
|
|
18
|
+
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`value`,{type:`string`,description:`Value of the Cache Reserve zone setting.`,choices:[`on`,`off`]}).coerce(`value`,e=>u(e,`value`,`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 fe={command:`edit`,describe:`Change Cache Reserve setting`,builder:de,handler:async e=>s({command:`cache settings reserve edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings reserve edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:e.value}):c(e.body)});return}let t=e.body===void 0?void 0:c(e.body),s=await n(e),u=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await o(`Updating`,async()=>s.send(Y,{body:e,zone_id:u}));i(n,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await f(`value`,`Value of the Cache Reserve zone setting.`,[`on`,`off`]));let d=l({value:e.value}),p=await o(`Updating`,async()=>s.send(Y,{body:d,zone_id:u}));i(p,{successLabel:`Updated`})})};var pe={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve`};function me(e){return e.usage(`$0 cache settings reserve get
|
|
19
|
+
|
|
20
|
+
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`get`,describe:`Get Cache Reserve setting`,builder:me,handler:async e=>s({command:`cache settings reserve get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings reserve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(pe,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var ge={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/cache_reserve_clear`};function _e(e){return e.usage(`$0 cache settings reserve status
|
|
21
|
+
|
|
22
|
+
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`status`,describe:`Get Cache Reserve Clear`,builder:_e,handler:async e=>s({command:`cache settings reserve status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings reserve status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/cache_reserve_clear`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(ge,{zone_id:s}));i(c,{successLabel:`Loaded`})})},ye={command:`reserve`,describe:`Persistent storage tier that keeps cached assets even after eviction from edge caches`,builder:e=>e.command(ue).command(fe).command(he).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`,body:`json`};function be(e){return e.usage(`$0 cache settings smart-tiered-cache create
|
|
23
|
+
|
|
24
|
+
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website's origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`value`,e=>u(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const xe={command:`create`,describe:`Create Smart Tiered Cache setting`,builder:be,handler:async e=>s({command:`cache settings smart-tiered-cache create`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings smart-tiered-cache create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:e.value}):c(e.body)});return}let t=e.body===void 0?void 0:c(e.body),s=await n(e),u=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await o(`Creating`,async()=>s.send(X,{body:e,zone_id:u}));i(n,{successLabel:`Created`});return}e.value===void 0&&(e.value=await f(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let d=l({value:e.value}),p=await o(`Creating`,async()=>s.send(X,{body:d,zone_id:u}));i(p,{successLabel:`Created`})})};var Se={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`};function Ce(e){return e.usage(`$0 cache settings smart-tiered-cache delete
|
|
25
|
+
|
|
26
|
+
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).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 we={command:`delete`,describe:`Delete Smart Tiered Cache setting`,builder:Ce,handler:async e=>s({command:`cache settings smart-tiered-cache delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache settings smart-tiered-cache delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await o(`Deleting`,async()=>t.send(Se,{zone_id:s}));i(c,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`,body:`json`};function Te(e){return e.usage(`$0 cache settings smart-tiered-cache edit
|
|
27
|
+
|
|
28
|
+
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`value`,{type:`string`,description:`Enable or disable the Smart Tiered Cache.`,choices:[`on`,`off`]}).coerce(`value`,e=>u(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Smart Tiered Cache.`})}const Ee={command:`edit`,describe:`Patch Smart Tiered Cache setting`,builder:Te,handler:async e=>s({command:`cache settings smart-tiered-cache edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings smart-tiered-cache edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:e.value}):c(e.body)});return}let t=e.body===void 0?void 0:c(e.body),s=await n(e),u=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await o(`Updating`,async()=>s.send(Z,{body:e,zone_id:u}));i(n,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await f(`value`,`Enable or disable the Smart Tiered Cache.`,[`on`,`off`]));let d=l({value:e.value}),p=await o(`Updating`,async()=>s.send(Z,{body:d,zone_id:u}));i(p,{successLabel:`Updated`})})};var De={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/tiered_cache_smart_topology_enable`};function Oe(e){return e.usage(`$0 cache settings smart-tiered-cache get
|
|
29
|
+
|
|
30
|
+
Smart Tiered Cache dynamically selects the single closest upper tier for each of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get`,describe:`Get Smart Tiered Cache setting`,builder:Oe,handler:async e=>s({command:`cache settings smart-tiered-cache get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings smart-tiered-cache get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/tiered_cache_smart_topology_enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(De,{zone_id:s}));i(c,{successLabel:`Loaded`})})},ke={command:`smart-tiered-cache`,describe:`Automatically determine the best upper-tier data centers for tiered cache topology`,builder:e=>e.command(xe).command(we).command(Ee).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ae={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/cache/variants`};function je(e){return e.usage(`$0 cache settings variants delete
|
|
31
|
+
|
|
32
|
+
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).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 Me={command:`delete`,describe:`Delete variants setting`,builder:je,handler:async e=>s({command:`cache settings variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache settings variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await o(`Deleting`,async()=>t.send(Ae,{zone_id:s}));i(c,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/cache/variants`,body:`json`};function Ne(e){return e.usage(`$0 cache settings variants edit
|
|
33
|
+
|
|
34
|
+
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`value-avif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for avif.`}).option(`value-bmp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for bmp.`}).option(`value-gif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for gif.`}).option(`value-jp2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jp2.`}).option(`value-jpeg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpeg.`}).option(`value-jpg`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg.`}).option(`value-jpg2`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for jpg2.`}).option(`value-png`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for png.`}).option(`value-tif`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tif.`}).option(`value-tiff`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for tiff.`}).option(`value-webp`,{type:`string`,array:!0,description:`List of strings with the MIME types of all the variants that should be served for webp.`}).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 Pe={command:`edit`,describe:`Change variants setting`,builder:Ne,handler:async e=>s({command:`cache settings variants edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({value:{avif:e[`value-avif`],bmp:e[`value-bmp`],gif:e[`value-gif`],jp2:e[`value-jp2`],jpeg:e[`value-jpeg`],jpg:e[`value-jpg`],jpg2:e[`value-jpg2`],png:e[`value-png`],tif:e[`value-tif`],tiff:e[`value-tiff`],webp:e[`value-webp`]}}):c(e.body)});return}let t=e.body===void 0?void 0:c(e.body),s=await n(e),u=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=t,n=await o(`Updating`,async()=>s.send($,{body:e,zone_id:u}));i(n,{successLabel:`Updated`});return}let d=l({value:{avif:e[`value-avif`],bmp:e[`value-bmp`],gif:e[`value-gif`],jp2:e[`value-jp2`],jpeg:e[`value-jpeg`],jpg:e[`value-jpg`],jpg2:e[`value-jpg2`],png:e[`value-png`],tif:e[`value-tif`],tiff:e[`value-tiff`],webp:e[`value-webp`]}}),f=await o(`Updating`,async()=>s.send($,{body:d,zone_id:u}));i(f,{successLabel:`Updated`})})};var Fe={method:`GET`,path:t=>e`/zones/${t.zone_id}/cache/variants`};function Ie(e){return e.usage(`$0 cache settings variants get
|
|
35
|
+
|
|
36
|
+
Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`get`,describe:`Get variants setting`,builder:Ie,handler:async e=>s({command:`cache settings variants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache settings variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/cache/variants`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=s;let c=await o(`Loading`,async()=>t.send(Fe,{zone_id:s}));i(c,{successLabel:`Loaded`})})},Re={command:`variants`,describe:`Serve different cached versions of an image based on the Accept header (WebP, AVIF, etc.)`,builder:e=>e.command(Me).command(Pe).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ze={command:`settings`,describe:`Configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(se).command(ye).command(ke).command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Be={command:`cache`,describe:`Purge cached content and configure Cache Reserve, tiered caching, and variant serving`,builder:e=>e.command(te).command(g).command(U).command(B).command(L).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Be as default};
|