cf 1.0.0-beta.27 → 1.0.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +5787 -1914
- package/dist/_meta/hand-written-commands.json +2 -2
- package/dist/_meta/schemas.json +796 -557
- package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-D9edOyag.mjs} +5 -5
- package/dist/{access-BxEprr2f.mjs → access-CKCCSrrU.mjs} +1 -1
- package/dist/{accounts-DU2ZNYqP.mjs → accounts-CNb9U9bK.mjs} +22 -22
- package/dist/{acm-CBCIKBJ4.mjs → acm-CdKTAToZ.mjs} +3 -3
- package/dist/{addressing-BKxiLRHk.mjs → addressing-eZI_C-b0.mjs} +18 -18
- package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
- package/dist/{ai-DqEN_hhg.mjs → ai-Csl_QNwv.mjs} +7 -7
- package/dist/ai-audit-DlqWsQi-.mjs +6 -0
- package/dist/{ai-gateway-B0uiYVHq.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
- package/dist/{ai-search-DbZIxdio.mjs → ai-search-BxyhS3X7.mjs} +17 -17
- package/dist/{ai-security-CvZfP2JC.mjs → ai-security-DvU2iYkY.mjs} +3 -3
- package/dist/{alerting-BjGwBxZT.mjs → alerting-r0G2X9y9.mjs} +10 -10
- package/dist/{analytics-C7kT_H-W.mjs → analytics-C6bfqm-W.mjs} +7 -7
- package/dist/analytics-engine-BlIecoOe.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BbcvDtff.mjs → api-security-DZ7GWOqD.mjs} +26 -26
- package/dist/argo-Bh0_cj49.mjs +14 -0
- package/dist/{artifacts-2R2sxIKO.mjs → artifacts-VZJWVq_6.mjs} +16 -16
- package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
- package/dist/auth-B-h0BHg7.mjs +2 -0
- package/dist/auth-B6tswVxH.mjs +2 -0
- package/dist/{auth-D499YE2n.mjs → auth-clmqFEWU.mjs} +3 -3
- package/dist/{auth-token-BwpERbnG.mjs → auth-token-DW4dJVdj.mjs} +1 -1
- package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-C0ynlGHf.mjs} +47 -47
- package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
- package/dist/billing-B2KusU6g.mjs +22 -0
- package/dist/{blocks-C8vyXIAT.mjs → blocks-BFulF68V.mjs} +1 -1
- package/dist/body-parser-DoewLePl.mjs +2 -0
- package/dist/{body-unions-CjpNjwSW.mjs → body-unions-DNs981Ia.mjs} +1 -1
- package/dist/{bot-management-fwxKIbaB.mjs → bot-management-CXHXgrQC.mjs} +2 -2
- package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
- package/dist/brand-protection-kv1ba80i.mjs +14 -0
- package/dist/browser-run-D-vRoZmf.mjs +40 -0
- package/dist/build-BzJGqb2o.mjs +2 -0
- package/dist/build-FFxzigo4.mjs +2 -0
- package/dist/{builds-CoazxuN-.mjs → builds-BbxINHRP.mjs} +15 -15
- package/dist/cache-BacNNtLu.mjs +36 -0
- package/dist/{cf-hP0SOgC6.mjs → cf-BQ_LRiut.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
- package/dist/{chunk-SOBRPAPT-BKzUiNx_.mjs → chunk-SOBRPAPT-QTjnHSNs.mjs} +1 -1
- package/dist/{cli-Nqf58-1c.mjs → cli-B7vslRfu.mjs} +1 -1
- package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-bzB9JosR.mjs} +6 -6
- package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
- package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
- package/dist/{cloudforce-one-CCaIBOAo.mjs → cloudforce-one-DWBPQDA3.mjs} +71 -71
- package/dist/{command-C4OgtX_x.mjs → command-AVwd7XjE.mjs} +1 -1
- package/dist/{command-C5Kqc5Km.mjs → command-B87T_f2f.mjs} +1 -1
- package/dist/{command-CelQVrZL.mjs → command-CEHhi3t0.mjs} +1 -1
- package/dist/{command-ByYf12-8.mjs → command-CYmQE79n.mjs} +1 -1
- package/dist/{command-pMoNdd22.mjs → command-CbxXc5IW.mjs} +1 -1
- package/dist/{command-Bih1HLr3.mjs → command-Ce8CVLth.mjs} +1 -1
- package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
- package/dist/{command-BASaTmJc.mjs → command-D4YcwpVp.mjs} +1 -1
- package/dist/{command-BxZBNPxG.mjs → command-D895kdlh.mjs} +1 -1
- package/dist/{command-CrAlzysj.mjs → command-D9Qyi1B0.mjs} +1 -1
- package/dist/{command-BiIVclNA.mjs → command-DeutqL1n.mjs} +1 -1
- package/dist/{command-C0qCuw03.mjs → command-Dl9ICrRK.mjs} +1 -1
- package/dist/{command-CZAR85ba.mjs → command-DtCSe8Hy.mjs} +1 -1
- package/dist/{command-C2FVMd1b.mjs → command-DwzVtmb3.mjs} +1 -1
- package/dist/{command-CFxyp8Uo.mjs → command-wtBubtZ4.mjs} +1 -1
- package/dist/{completions-DRzBiqpv.mjs → completions-BvdKtzsX.mjs} +1 -1
- package/dist/{connector-interrupts-CrTeSyaM.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
- package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
- package/dist/{connectors-D1WFLJoE.mjs → connectors-DZFGNw3i.mjs} +4 -4
- package/dist/containers-B06OGOEB.mjs +380 -0
- package/dist/{containers-BOBEs1Gk.mjs → containers-DCzQCo79.mjs} +8 -8
- package/dist/{content-scan-D1GfPSL0.mjs → content-scan-XhnNJqXf.mjs} +4 -4
- package/dist/{context-Dp4CXG22.mjs → context-BY1Eh_Qe.mjs} +1 -1
- package/dist/{cps-D4uhzg3k.mjs → cps-CohlxvuN.mjs} +2 -2
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/{csam-scanner-DOOUBeBM.mjs → csam-scanner-BV4bHq8v.mjs} +2 -2
- package/dist/{custom-csrs-DtdFo5YZ.mjs → custom-csrs-BVdMQjYq.mjs} +2 -2
- package/dist/{custom-hostnames-ccdlELaD.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
- package/dist/{custom-nameservers-p3gDjfva.mjs → custom-nameservers-CapMDyly.mjs} +2 -2
- package/dist/{custom-pages-DAkKVzgR.mjs → custom-pages-BVIniWfq.mjs} +5 -5
- package/dist/{d1-CDIyRdh4.mjs → d1-nJCOJZb8.mjs} +20 -22
- package/dist/{delegate-B4bKqF7i.mjs → delegate-CcL6RoGw.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BaC5Ty7F.mjs → deploy-DJMnWFNk.mjs} +1 -1
- package/dist/{deploy-context-DTTgNGro.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
- package/dist/{deploy-input-mAy06fAI.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
- package/dist/{dev-De-HszNT.mjs → dev-GsYHvMah.mjs} +1 -1
- package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
- package/dist/{dist-D5qkmHhC.mjs → dist-D-ihn_mV.mjs} +42 -33
- package/dist/{dls-DWBiYzY1.mjs → dls-N1x8sAK3.mjs} +3 -3
- package/dist/{dns-wMjf1t6-.mjs → dns-DATWP-PF.mjs} +25 -25
- package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-n3Y2ui6W.mjs} +4 -4
- package/dist/{docs-BA7qslb2.mjs → docs-CRc_WOXh.mjs} +1 -1
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
- package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
- package/dist/{email-auth-BShMFXn4.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
- package/dist/{email-domains-CDSbVclP.mjs → email-domains-uL22-zRY.mjs} +2 -2
- package/dist/{email-routing-CBCkbg_F.mjs → email-routing-CV43rMJC.mjs} +12 -12
- package/dist/{email-security-CnNa1YON.mjs → email-security-DK_SJ0yi.mjs} +38 -38
- package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-CTQafGec.mjs} +11 -11
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/{errors-DatLr-iR.mjs → errors-VG1mgwJl.mjs} +1 -1
- package/dist/{field-extractors-BwGdMnTr.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
- package/dist/{firewall-CY_oem-d.mjs → firewall-CW-fAI9m.mjs} +12 -12
- package/dist/{flagship-Bat5EZCk.mjs → flagship-RiLnDwfJ.mjs} +8 -8
- package/dist/{fraud-CSUKLh8X.mjs → fraud-DvfBBTe8.mjs} +2 -2
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
- package/dist/{healthchecks-uC43QKQd.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
- package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
- package/dist/{iam-8T74DNhH.mjs → iam-LlGEzRCq.mjs} +14 -14
- package/dist/{images-C3JUaf6b.mjs → images-C5WqUXkK.mjs} +11 -11
- package/dist/index.mjs +1 -1
- package/dist/{init-BEVVz4_P.mjs → init-EVsjBrOz.mjs} +2 -2
- package/dist/{intel-DRy4rHrt.mjs → intel-vcWyslaX.mjs} +14 -14
- package/dist/{interactive-CKHdGvkh.mjs → interactive-BCDFSPtq.mjs} +1 -1
- package/dist/{internal-CamuESs0.mjs → internal-BhV9WjLp.mjs} +1 -1
- package/dist/{ips-DinCNnWj.mjs → ips-CqHjVsqd.mjs} +1 -1
- package/dist/k2-CZT2Pd5J.mjs +10 -0
- package/dist/kv-Ipa7dnvF.mjs +12 -0
- package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
- package/dist/{leaked-credential-checks-CSZd9hBQ.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
- package/dist/{live-B6AsI_E5.mjs → live-C9L1bNuE.mjs} +1 -1
- package/dist/{load-balancers-gap5u4b1.mjs → load-balancers-Cb3VkSfc.mjs} +21 -21
- package/dist/local-D5Vq6ooZ.mjs +2 -0
- package/dist/{local-CgBhtmON.mjs → local-DIJ7SIKC.mjs} +1 -1
- package/dist/{local-runtime-CmlJ20uJ.mjs → local-runtime-BZjgkacr.mjs} +1 -1
- package/dist/{login-BJHaTERg.mjs → login-DG5ebyab.mjs} +1 -1
- package/dist/login-DRJugxya.mjs +2 -0
- package/dist/{logpush-qhlxsioM.mjs → logpush-C5Gw7F_9.mjs} +16 -16
- package/dist/{logs-bI54CJ0w.mjs → logs-y3REfHbb.mjs} +8 -8
- package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
- package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-BPV_POf5.mjs} +129 -129
- package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
- package/dist/{managed-transforms-CUC-uAbW.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
- package/dist/{mcp-CyI0sDmL.mjs → mcp-RPtrISTy.mjs} +6 -6
- package/dist/{mesh-Czr0UCP4.mjs → mesh-DZ4QHBPE.mjs} +5 -5
- package/dist/{migrate-DKDWYrz2.mjs → migrate-CRIUqGi2.mjs} +1 -1
- package/dist/{monetization-NUgfDtSy.mjs → monetization-CVZqM8Xo.mjs} +4 -4
- package/dist/{network-B42zrBic.mjs → network-DLt2JUo1.mjs} +15 -15
- package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
- package/dist/{o11y-oEUpMC3O.mjs → o11y-ySxrnP1Z.mjs} +45 -43
- package/dist/{oauth-BmSFLp_s.mjs → oauth-CFVUl-Wv.mjs} +1 -1
- package/dist/{oauth-BLQ1-y3R.mjs → oauth-Cidoyxfp.mjs} +1 -1
- package/dist/{observability-BxhJQCgZ.mjs → observability-C-KNh__y.mjs} +1 -1
- package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
- package/dist/organizations-DbeeWUL4.mjs +71 -0
- package/dist/output-BZQEl3mK.mjs +2 -0
- package/dist/package-B7RgwuFR.mjs +2 -0
- package/dist/{page-rules-J6LhwR-s.mjs → page-rules-DRw763O1.mjs} +4 -4
- package/dist/{pages-BksdnChs.mjs → pages-DfQnxiTk.mjs} +12 -12
- package/dist/{pay-per-crawl-BLcbHRoR.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
- package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-wdEhl8k4.mjs} +11 -11
- package/dist/{pipelines-B5AoB3f3.mjs → pipelines-DbyrI6F4.mjs} +11 -11
- package/dist/{precursor-D3VH2MXT.mjs → precursor-Dx8lN4UJ.mjs} +2 -2
- package/dist/previews-DEVNSip2.mjs +6 -0
- package/dist/{progress-DLri-rA7.mjs → progress-yvPscjYg.mjs} +1 -1
- package/dist/{prompt-D0dXwuME.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
- package/dist/{queues-BsAck4To.mjs → queues-DgMc7Z6A.mjs} +18 -18
- package/dist/{r2-BYjdHDEZ.mjs → r2-BpTVicIq.mjs} +21 -21
- package/dist/{radar-CvLtu-Vr.mjs → radar-DW-S1VUh.mjs} +11 -11
- package/dist/{raw-fetch-DQeDx1wT.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
- package/dist/{ready-gsGEaWLL.mjs → ready-d0li0X6r.mjs} +1 -1
- package/dist/{realtime-DiCEgFTC.mjs → realtime-DMKHLYF4.mjs} +41 -41
- package/dist/{registrar-D4wdgWpo.mjs → registrar-D23gfKBi.mjs} +5 -5
- package/dist/{registrar-sandbox-B6yopzdG.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
- package/dist/{reporting-BiHgnT8L.mjs → reporting-WX8P3Y0k.mjs} +2 -2
- package/dist/{request-headers-CoxHUNcB.mjs → request-headers-C0FpeBhz.mjs} +1 -1
- package/dist/{request-tracers-817HTytF.mjs → request-tracers-qd7XOAka.mjs} +2 -2
- package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
- package/dist/{rules-CRhe_ca9.mjs → rules-CB0QQTB3.mjs} +5 -5
- package/dist/{rulesets-CKyc-Xlx.mjs → rulesets-DmqwixUC.mjs} +6 -6
- package/dist/{rum-BfnWHW_d.mjs → rum-BZ_24qZU.mjs} +9 -9
- package/dist/{run-Ciw_GIrC.mjs → run-BOKI1uWa.mjs} +1 -1
- package/dist/run-DBqOjD1P.mjs +2 -0
- package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
- package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
- package/dist/{schema-flags-DrqvwQNw.mjs → schema-flags-CXm9iIv6.mjs} +1 -1
- package/dist/{scim-C4iRWNYB.mjs → scim-DchxaJfE.mjs} +8 -8
- package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-oAft1cFE.mjs} +5 -5
- package/dist/{security-insights-SlUGW3F_.mjs → security-insights-DMm0qg_m.mjs} +15 -15
- package/dist/{security-txt-C3YS0REz.mjs → security-txt-CIt0494b.mjs} +2 -2
- package/dist/{session-D2yuwO4i.mjs → session-vzNfUhPl.mjs} +1 -1
- package/dist/{shared--uVkAAd7.mjs → shared-MK-_lkbn.mjs} +1 -1
- package/dist/{signed-url-ClLk45_J.mjs → signed-url-gNangfwc.mjs} +1 -1
- package/dist/{smart-shield-Dn95hqUH.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
- package/dist/{snippets-BNUKOajz.mjs → snippets-DdoDYXW-.mjs} +3 -3
- package/dist/{spawn-DuT4snxu.mjs → spawn-B5F4OIHG.mjs} +1 -1
- package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-DLYIHelC.mjs} +3 -3
- package/dist/{speed-BrVeZRyX.mjs → speed-DugG9Tm9.mjs} +2 -2
- package/dist/{sql-BX1pBqj3.mjs → sql-Bb56llsb.mjs} +2 -2
- package/dist/src-BoSDeQ9m.mjs +133 -0
- package/dist/{ssl-Bx4LCutF.mjs → ssl-Bg4X3WGk.mjs} +24 -24
- package/dist/startup-profile-DQVkZZpb.mjs +2 -0
- package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-DZL2DC44.mjs} +1 -1
- package/dist/state-DW3QZtfh.mjs +2 -0
- package/dist/{state-BmzOLELo.mjs → state-mr5ux1Nb.mjs} +1 -1
- package/dist/{stream-BRzr6yh0.mjs → stream-BuZYDbNR.mjs} +21 -21
- package/dist/{tags-xVzjZxdt.mjs → tags-SKz2odE_.mjs} +3 -3
- package/dist/{telemetry-CJ9URio3.mjs → telemetry-B4zmCpT0.mjs} +1 -1
- package/dist/telemetry-DkDUr4KK.mjs +2 -0
- package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-BhkhBerL.mjs} +2 -2
- package/dist/tenants-DD-GMq0K.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
- package/dist/{tunnels-DQVXKUKA.mjs → tunnels-D90ztENM.mjs} +6 -6
- package/dist/{turnstile-B_Ugzgom.mjs → turnstile-DhSU_Xar.mjs} +4 -4
- package/dist/ui-xjCox-gU.mjs +2 -0
- package/dist/{update-check-DHUo4FOJ.mjs → update-check-CRttabfu.mjs} +1 -1
- package/dist/{update-check-DRr0eRhB.mjs → update-check-HltjTMDE.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
- package/dist/{url-scanner-BH4PLy16.mjs → url-scanner-BRdWwka4.mjs} +3 -3
- package/dist/{user-Bn82Qw0Y.mjs → user-Cmb1_Wu5.mjs} +50 -50
- package/dist/{vectorize-DoVVz_sh.mjs → vectorize-BTBerJME.mjs} +11 -11
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-6Bpy6Bgt.mjs +2 -0
- package/dist/{waiting-rooms-QUW131o3.mjs → waiting-rooms-LymmKIGr.mjs} +13 -13
- package/dist/{web-assets-CgQXsp8m.mjs → web-assets-LHPQsrnY.mjs} +21 -21
- package/dist/{web3-TY9s6Swn.mjs → web3-BsOio0Ae.mjs} +12 -12
- package/dist/workers-BnLiOjZf.mjs +39 -0
- package/dist/{workers-builds-BgGY0IGk.mjs → workers-builds-sKpITeRk.mjs} +4 -4
- package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
- package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-D8lefWDo.mjs} +3 -3
- package/dist/{workflows-6m85DdqF.mjs → workflows-B-ZIG3y7.mjs} +22 -22
- package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-6E6wT_LZ.mjs} +66 -57
- package/dist/{zaraz-8WSJ7l0L.mjs → zaraz-BBKki5WS.mjs} +11 -11
- package/dist/{zero-trust-DK0cqDZv.mjs → zero-trust-BZDXM5r6.mjs} +165 -165
- package/dist/{zones-DTAcguf6.mjs → zones-B-UV_DGE.mjs} +24 -24
- package/package.json +14 -14
- package/dist/ai-audit-BmzOgt6x.mjs +0 -6
- package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-D1VONzu-.mjs +0 -14
- package/dist/auth-CspwoBlp.mjs +0 -2
- package/dist/auth-FK2eLQ02.mjs +0 -2
- package/dist/billing-DRNww0iC.mjs +0 -24
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/brand-protection-BVICLzBc.mjs +0 -26
- package/dist/browser-run-CEk-NIgP.mjs +0 -40
- package/dist/build-CRm2TQq8.mjs +0 -2
- package/dist/build-DO_GNhRl.mjs +0 -2
- package/dist/cache-jlLJLSu7.mjs +0 -36
- package/dist/containers-DINLx5_i.mjs +0 -380
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/k2-wsanPL3y.mjs +0 -10
- package/dist/kv-BLSPcEnH.mjs +0 -12
- package/dist/local-CFsO9Tkg.mjs +0 -2
- package/dist/login-BfuOf-Yi.mjs +0 -2
- package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
- package/dist/organization-CEnlXwrl.mjs +0 -70
- package/dist/organizations-Dt86ToxE.mjs +0 -4
- package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-CiRJBRHO.mjs +0 -2
- package/dist/previews-DzJ85fsr.mjs +0 -6
- package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
- package/dist/run-DD45EQTm.mjs +0 -2
- package/dist/src-DPnUfK4c.mjs +0 -131
- package/dist/startup-profile-tZNb2HGz.mjs +0 -2
- package/dist/state-Uwfrmw5I.mjs +0 -2
- package/dist/telemetry-Pt5GpCKD.mjs +0 -2
- package/dist/ui-FYultowZ.mjs +0 -2
- package/dist/version-Zr2oF8mY.mjs +0 -2
- package/dist/workers-B3uJqJKc.mjs +0 -39
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{K as e}from"./dist-
|
|
2
|
+
import{K as e}from"./dist-D-ihn_mV.mjs";import{t}from"./version-6Bpy6Bgt.mjs";import{o as n}from"./blocks-BFulF68V.mjs";import"./api-Dnt6lRJG.mjs";import{t as r}from"./path-DRw6Y-nd.mjs";import{t as i}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as a}from"./local-DIJ7SIKC.mjs";import{n as o}from"./auth-B-h0BHg7.mjs";import{a as s,n as c,t as l}from"./context-BY1Eh_Qe.mjs";import{t as u}from"./auth-token-DW4dJVdj.mjs";import{E as d,S as ee,T as f,_ as p,b as te,f as m,h as ne,p as re,s as h,t as g,u as ie,v as ae}from"./deploy-context-YCW3eqP1.mjs";import{n as _}from"./request-headers-C0FpeBhz.mjs";import{t as v}from"./output-BZQEl3mK.mjs";import{t as y}from"./dry-run-kJbjn4kG.mjs";import{t as b}from"./progress-yvPscjYg.mjs";import{n as x,t as S}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as C,n as w,t as T}from"./body-parser-DoewLePl.mjs";import{n as E}from"./input-validation-D7z60HJH.mjs";import{a as D,i as O,n as k}from"./prompt-CEpZ-lQZ.mjs";var A={method:`POST`,path:e=>r`/accounts/${e.account_id}/containers/applications`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function oe(e){return e.usage('$0 containers applications create\n\nCreate a Containers application. Use `scheduling_policy: "default"` for a scheduler-backed application. The Containers scheduler maintains the requested instance count and manages deployment configuration, placement, scaling, versions, and rollouts. Use `scheduling_policy: "durable_object"` for a Durable Object-managed application. Each Durable Object creates and manages the lifecycle of its container instance. Supply `name`, `scheduling_policy`, and `durable_objects`, with optional `configuration` and optional top-level `observability` settings. Deployment configuration, scaling, constraints, versions, and rollouts do not apply.').option(`configuration-authorized-keys`,{type:`string`,description:`The configuration.authorized_keys field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`configuration-command`,{type:`string`,array:!0,description:`The command that runs when the container starts, passed to the entrypoint.
|
|
3
3
|
You can override this at run-time. If you override only the command,
|
|
4
4
|
it gets passed to the default entrypoint specified in the image.
|
|
5
5
|
`}).option(`configuration-entrypoint`,{type:`string`,array:!0,description:`The entry point for the container, specifying the executable to run when the container starts.
|
|
@@ -17,11 +17,11 @@ Specify both entrypoint and command at run-time to completely replace the image
|
|
|
17
17
|
Defaults to 0.
|
|
18
18
|
`}).option(`scheduling-policy`,{type:`string`,description:`Selects a scheduler-backed application. Use \`default\` when the Containers
|
|
19
19
|
scheduler should maintain the requested number of instances and manage deployment
|
|
20
|
-
configuration, placement, scaling, versions, and rollouts.`,choices:[`default`,`durable_object`]}).coerce(`scheduling-policy`,e=>E(e,`scheduling-policy`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Create a Containers application. Set `scheduling_policy` to `default` for a scheduler-backed application with deployment configuration, instance counts, constraints, versions, and rollouts. Set it to `durable_object` for a Durable Object-managed application where each Durable Object creates and manages the lifecycle of its container instance. For `durable_object` requests, supply `name`, `scheduling_policy`, and `durable_objects`, with optional `configuration` and top-level `observability` settings. "}).conflicts(`configuration-command`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-command`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-entrypoint`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-entrypoint`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-environment-variables`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-environment-variables`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-image`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-image`,[`instances`,`max-instances`]).conflicts(`configuration-instance-type`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-instance-type`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-observability-logs-enabled`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-observability-logs-enabled`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-wrangler-ssh-enabled`,[`configuration-command`,`configuration-entrypoint`,`configuration-environment-variables`,`configuration-image`,`configuration-instance-type`,`configuration-observability-logs-enabled`,`constraints-regions`,`instances`,`max-instances`,`rollout-active-grace-period`]).conflicts(`configuration-wrangler-ssh-port`,[`configuration-command`,`configuration-entrypoint`,`configuration-environment-variables`,`configuration-image`,`configuration-instance-type`,`configuration-observability-logs-enabled`,`constraints-regions`,`instances`,`max-instances`,`rollout-active-grace-period`]).conflicts(`constraints-regions`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`constraints-regions`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`durable-objects-namespace-id`,[`durable-objects-class-name`,`durable-objects-script-name`]).conflicts(`durable-objects-class-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-class-name`,[`durable-objects-script-name`]).conflicts(`durable-objects-script-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-script-name`,[`durable-objects-class-name`]).conflicts(`instances`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`instances`,[`configuration-image`,`max-instances`]).conflicts(`max-instances`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`max-instances`,[`configuration-image`,`instances`]).conflicts(`rollout-active-grace-period`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`rollout-active-grace-period`,[`configuration-image`,`instances`,`max-instances`])}const se={command:`create`,describe:`Create a new application`,builder:oe,handler:async e=>S({command:`containers applications create`,classification:{safeFlags:[`configuration-instance-type`,`configuration-observability-logs-enabled`,`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`scheduling-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications`,pathParams:{},bodyKind:`json`,body:e.body===void 0?T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),command:e[`configuration-command`],entrypoint:e[`configuration-entrypoint`],environment_variables:C(e[`configuration-environment-variables`],`configuration-environment-variables`),image:E(e[`configuration-image`],`configuration-image`,`text`),instance_type:e[`configuration-instance-type`],observability:{logs:{enabled:e[`configuration-observability-logs-enabled`]}},wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},durable_objects:{namespace_id:E(e[`durable-objects-namespace-id`],`durable-objects-namespace-id`,`text`),class_name:E(e[`durable-objects-class-name`],`durable-objects-class-name`,`text`),script_name:E(e[`durable-objects-script-name`],`durable-objects-script-name`,`text`)},instances:e.instances,max_instances:e[`max-instances`],name:E(e.name,`name`,`text`),observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`],scheduling_policy:e[`scheduling-policy`]}):w(e.body)});return}let t=await o(e),
|
|
20
|
+
configuration, placement, scaling, versions, and rollouts.`,choices:[`default`,`durable_object`]}).coerce(`scheduling-policy`,e=>E(e,`scheduling-policy`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Create a Containers application. Set `scheduling_policy` to `default` for a scheduler-backed application with deployment configuration, instance counts, constraints, versions, and rollouts. Set it to `durable_object` for a Durable Object-managed application where each Durable Object creates and manages the lifecycle of its container instance. For `durable_object` requests, supply `name`, `scheduling_policy`, and `durable_objects`, with optional `configuration` and top-level `observability` settings. "}).conflicts(`configuration-command`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-command`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-entrypoint`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-entrypoint`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-environment-variables`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-environment-variables`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-image`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-image`,[`instances`,`max-instances`]).conflicts(`configuration-instance-type`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-instance-type`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-observability-logs-enabled`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`configuration-observability-logs-enabled`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`configuration-wrangler-ssh-enabled`,[`configuration-command`,`configuration-entrypoint`,`configuration-environment-variables`,`configuration-image`,`configuration-instance-type`,`configuration-observability-logs-enabled`,`constraints-regions`,`instances`,`max-instances`,`rollout-active-grace-period`]).conflicts(`configuration-wrangler-ssh-port`,[`configuration-command`,`configuration-entrypoint`,`configuration-environment-variables`,`configuration-image`,`configuration-instance-type`,`configuration-observability-logs-enabled`,`constraints-regions`,`instances`,`max-instances`,`rollout-active-grace-period`]).conflicts(`constraints-regions`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`constraints-regions`,[`configuration-image`,`instances`,`max-instances`]).conflicts(`durable-objects-namespace-id`,[`durable-objects-class-name`,`durable-objects-script-name`]).conflicts(`durable-objects-class-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-class-name`,[`durable-objects-script-name`]).conflicts(`durable-objects-script-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-script-name`,[`durable-objects-class-name`]).conflicts(`instances`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`instances`,[`configuration-image`,`max-instances`]).conflicts(`max-instances`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`max-instances`,[`configuration-image`,`instances`]).conflicts(`rollout-active-grace-period`,[`configuration-wrangler-ssh-enabled`,`configuration-wrangler-ssh-port`]).implies(`rollout-active-grace-period`,[`configuration-image`,`instances`,`max-instances`])}const se={command:`create`,describe:`Create a new application`,builder:oe,handler:async e=>S({command:`containers applications create`,classification:{safeFlags:[`configuration-instance-type`,`configuration-observability-logs-enabled`,`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`scheduling-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications`,pathParams:{},bodyKind:`json`,body:e.body===void 0?T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),command:e[`configuration-command`],entrypoint:e[`configuration-entrypoint`],environment_variables:C(e[`configuration-environment-variables`],`configuration-environment-variables`),image:E(e[`configuration-image`],`configuration-image`,`text`),instance_type:e[`configuration-instance-type`],observability:{logs:{enabled:e[`configuration-observability-logs-enabled`]}},wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},durable_objects:{namespace_id:E(e[`durable-objects-namespace-id`],`durable-objects-namespace-id`,`text`),class_name:E(e[`durable-objects-class-name`],`durable-objects-class-name`,`text`),script_name:E(e[`durable-objects-script-name`],`durable-objects-script-name`,`text`)},instances:e.instances,max_instances:e[`max-instances`],name:E(e.name,`name`,`text`),observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`],scheduling_policy:e[`scheduling-policy`]}):w(e.body)});return}let t=e.body===void 0?void 0:w(e.body),n=await o(e),r=e.local?a:await l();if(e.accountId=r,e.body!==void 0){let e=t,i=await b(`Creating`,async()=>n.send(A,{body:e,account_id:r}));v(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await D(`name`,`The name for this application.`)),e[`scheduling-policy`]===void 0&&(e[`scheduling-policy`]=await O(`scheduling-policy`,"Selects a scheduler-backed application. Use `default` when the Containers scheduler should maintain the requested number of instances and manage deployment configuration, placement, scaling, versions, and rollouts.",[`default`,`durable_object`]));let i=T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),command:e[`configuration-command`],entrypoint:e[`configuration-entrypoint`],environment_variables:C(e[`configuration-environment-variables`],`configuration-environment-variables`),image:E(e[`configuration-image`],`configuration-image`,`text`),instance_type:e[`configuration-instance-type`],observability:{logs:{enabled:e[`configuration-observability-logs-enabled`]}},wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},durable_objects:{namespace_id:E(e[`durable-objects-namespace-id`],`durable-objects-namespace-id`,`text`),class_name:E(e[`durable-objects-class-name`],`durable-objects-class-name`,`text`),script_name:E(e[`durable-objects-script-name`],`durable-objects-script-name`,`text`)},instances:e.instances,max_instances:e[`max-instances`],name:E(e.name,`name`,`text`),observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`],scheduling_policy:e[`scheduling-policy`]}),c=await b(`Creating`,async()=>n.send(A,{body:i,account_id:r}));v(c,{successLabel:`Created`})})};var ce={method:`DELETE`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function j(e){return e.usage(`$0 containers applications delete <application-id>
|
|
21
21
|
|
|
22
22
|
Deletes a single application by id.`).positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,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 M={command:`delete <application-id>`,describe:`Delete a single application by id`,builder:j,handler:async e=>S({command:`containers applications delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,!await k({force:!!e.force,message:`This operation permanently deletes the application and stops its containers.`}))return;let r=await b(`Deleting`,async()=>t.send(ce,{account_id:n,application_id:e[`application-id`]}));v(r,{successLabel:`Deleted`})})};var N={method:`PATCH`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function P(e){return e.usage("$0 containers applications edit <application-id>\n\nModifies a single application by id. Durable Object-managed application settings are published to runtime metadata without creating deployments or rollouts. Top-level `observability` for these applications supports only `logs.enabled`. The supported fields depend on the existing application's scheduling policy. For scheduler-backed applications, changes that replace instance deployment configuration, including the image, require a rollout.").positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`configuration-authorized-keys`,{type:`string`,description:`The configuration.authorized_keys field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`configuration-wrangler-ssh-enabled`,{type:`boolean`,description:`The configuration.wrangler_ssh.enabled field`}).option(`configuration-wrangler-ssh-port`,{type:`number`,description:`The configuration.wrangler_ssh.port field`}).option(`constraints-jurisdiction`,{type:`string`,description:`Restricts placement to datacenters in the selected jurisdiction. Choose "eu", "fedramp", or "us". When combined with regions, EU supports EEUR and WEUR while FedRAMP and US support ENAM and WNAM.`}).option(`constraints-regions`,{type:`string`,array:!0,description:`The constraints.regions field`}).option(`max-instances`,{type:`number`,description:`Maximum number of instances that an autoscaling application can run.`}).option(`observability-logs-enabled`,{type:`boolean`,description:`The observability.logs.enabled field`}).option(`rollout-active-grace-period`,{type:`number`,description:`Grace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds.
|
|
23
23
|
Defaults to 0.
|
|
24
|
-
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for modifying a Containers application without replacing its instances. Durable Object-managed applications support only top-level observability.logs.enabled. The other fields apply to scheduler-backed applications, where deployment configuration changes such as image, resource allocation, command, and environment variables require an application rollout. `})}const F={command:`edit <application-id>`,describe:`Modify an application`,builder:P,handler:async e=>S({command:`containers applications edit`,classification:{safeFlags:[`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},max_instances:e[`max-instances`],observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`]}):w(e.body)});return}let t=await o(e),
|
|
24
|
+
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for modifying a Containers application without replacing its instances. Durable Object-managed applications support only top-level observability.logs.enabled. The other fields apply to scheduler-backed applications, where deployment configuration changes such as image, resource allocation, command, and environment variables require an application rollout. `})}const F={command:`edit <application-id>`,describe:`Modify an application`,builder:P,handler:async e=>S({command:`containers applications edit`,classification:{safeFlags:[`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},max_instances:e[`max-instances`],observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`]}):w(e.body)});return}let t=e.body===void 0?void 0:w(e.body),n=await o(e),r=e.local?a:await l();if(e.accountId=r,e.body!==void 0){let i=t,a=await b(`Updating`,async()=>n.send(N,{body:i,account_id:r,application_id:e[`application-id`]}));v(a,{successLabel:`Updated`});return}let i=T({configuration:{authorized_keys:C(e[`configuration-authorized-keys`],`configuration-authorized-keys`),wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:E(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},max_instances:e[`max-instances`],observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`]}),c=await b(`Updating`,async()=>n.send(N,{body:i,account_id:r,application_id:e[`application-id`]}));v(c,{successLabel:`Updated`})})};var I={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function L(e){return e.usage(`$0 containers applications get <application-id>
|
|
25
25
|
|
|
26
26
|
Returns a single application by id.`).positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get <application-id>`,describe:`Get a single application by id`,builder:L,handler:async e=>S({command:`containers applications get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();e.accountId=n;let r=await b(`Loading`,async()=>t.send(I,{account_id:n,application_id:e[`application-id`]}));v(r,{successLabel:`Loaded`})})};var z={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}/instances/${e.instance_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function B(e){return e.usage(`$0 containers applications instances get <instance-id>
|
|
27
27
|
|
|
@@ -58,18 +58,18 @@ Specify both entrypoint and command at run-time to completely replace the image
|
|
|
58
58
|
- "standard-2": 1 vCPU, 6 GiB memory, 12 GB disk
|
|
59
59
|
- "standard-3": 2 vCPU, 8 GiB memory, 16 GB disk
|
|
60
60
|
- "standard-4": 4 vCPU, 12 GiB memory, 20 GB disk
|
|
61
|
-
`,choices:[`lite`,`basic`,`standard-1`,`standard-2`,`standard-3`,`standard-4`],default:`lite`}).coerce(`target-configuration-instance-type`,e=>E(e,`target-configuration-instance-type`,`text`)).option(`target-configuration-observability-logs-enabled`,{type:`boolean`,description:`The target_configuration.observability.logs.enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body to create a new rollout for a scheduler-backed application.`})}const pe={command:`create <application-id>`,describe:`Create a new rollout for an application`,builder:fe,handler:async e=>S({command:`containers applications rollouts create`,classification:{safeFlags:[`kind`,`strategy`,`target-configuration-instance-type`,`target-configuration-observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications rollouts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/rollouts`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?T({description:E(e.description,`description`,`text`),kind:e.kind,percentage:e.percentage,step_percentage:e[`step-percentage`],steps:C(e.steps,`steps`),strategy:e.strategy,target_configuration:{authorized_keys:C(e[`target-configuration-authorized-keys`],`target-configuration-authorized-keys`),command:e[`target-configuration-command`],entrypoint:e[`target-configuration-entrypoint`],environment_variables:C(e[`target-configuration-environment-variables`],`target-configuration-environment-variables`),image:E(e[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:e[`target-configuration-instance-type`],observability:{logs:{enabled:e[`target-configuration-observability-logs-enabled`]}}}}):w(e.body)});return}let t=await o(e),
|
|
61
|
+
`,choices:[`lite`,`basic`,`standard-1`,`standard-2`,`standard-3`,`standard-4`],default:`lite`}).coerce(`target-configuration-instance-type`,e=>E(e,`target-configuration-instance-type`,`text`)).option(`target-configuration-observability-logs-enabled`,{type:`boolean`,description:`The target_configuration.observability.logs.enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body to create a new rollout for a scheduler-backed application.`})}const pe={command:`create <application-id>`,describe:`Create a new rollout for an application`,builder:fe,handler:async e=>S({command:`containers applications rollouts create`,classification:{safeFlags:[`kind`,`strategy`,`target-configuration-instance-type`,`target-configuration-observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications rollouts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/rollouts`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?T({description:E(e.description,`description`,`text`),kind:e.kind,percentage:e.percentage,step_percentage:e[`step-percentage`],steps:C(e.steps,`steps`),strategy:e.strategy,target_configuration:{authorized_keys:C(e[`target-configuration-authorized-keys`],`target-configuration-authorized-keys`),command:e[`target-configuration-command`],entrypoint:e[`target-configuration-entrypoint`],environment_variables:C(e[`target-configuration-environment-variables`],`target-configuration-environment-variables`),image:E(e[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:e[`target-configuration-instance-type`],observability:{logs:{enabled:e[`target-configuration-observability-logs-enabled`]}}}}):w(e.body)});return}let t=e.body===void 0?void 0:w(e.body),n=await o(e),r=e.local?a:await l();if(e.accountId=r,e.body!==void 0){let i=t,a=await b(`Creating`,async()=>n.send(K,{body:i,account_id:r,application_id:e[`application-id`]}));v(a,{successLabel:`Created`});return}e.description===void 0&&(e.description=await D(`description`,`Description of the rollout process.`)),e.strategy===void 0&&(e.strategy=await O(`strategy`,`Strategy used for the rollout. - "rolling": Step-based rollout with health gates. Actively replaces instances to reach each step's target percentage. - "new_instances": Percentage control over version distribution. Version sync actively replaces instances to match the configured percentage. The "full_auto" kind advances through fixed percentage targets after target-version health is observed. `,[`rolling`,`new_instances`]));let i=T({description:E(e.description,`description`,`text`),kind:e.kind,percentage:e.percentage,step_percentage:e[`step-percentage`],steps:C(e.steps,`steps`),strategy:e.strategy,target_configuration:{authorized_keys:C(e[`target-configuration-authorized-keys`],`target-configuration-authorized-keys`),command:e[`target-configuration-command`],entrypoint:e[`target-configuration-entrypoint`],environment_variables:C(e[`target-configuration-environment-variables`],`target-configuration-environment-variables`),image:E(e[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:e[`target-configuration-instance-type`],observability:{logs:{enabled:e[`target-configuration-observability-logs-enabled`]}}}}),c=await b(`Creating`,async()=>n.send(K,{body:i,account_id:r,application_id:e[`application-id`]}));v(c,{successLabel:`Created`})})},me={command:`rollouts`,describe:`Manage rollouts for scheduler-backed applications`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/applications/${e.application_id}/versions`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function ge(e){return e.usage('$0 containers applications versions list\n\nReturns all versions for a scheduler-backed application with `scheduling_policy: "default"`. Versions and rollouts do not apply to applications with `scheduling_policy: "durable_object"`.').option(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`list`,describe:`List all application versions`,builder:ge,handler:async e=>S({command:`containers applications versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers applications versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/versions`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();e.accountId=n;let r=await b(`Loading`,async()=>t.send(he,{account_id:n,application_id:e[`application-id`]}));v(r,{successLabel:`Loaded`})})},ve={command:`versions`,describe:`Inspect versions of scheduler-backed applications`,builder:e=>e.command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`applications`,describe:`Manage Containers applications`,builder:e=>e.command(se).command(M).command(F).command(R).command(de).command(G).command(me).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:e=>r`/accounts/${e.account_id}/containers/image-preparations`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function be(e){return e.usage(`$0 containers images prepare
|
|
62
62
|
|
|
63
|
-
Idempotently starts or observes preparation of the runtime artifacts required to run one digest-pinned managed container image on Cloudflare's network. Returns 202 while durable preparation continues and 200 when the image is ready or preparation has reached a terminal error.`).option(`image`,{type:`string`,description:`Image url.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A digest-pinned managed container image to prepare for the new runtime.`})}const xe={command:`prepare`,describe:`Prepare a container image`,builder:be,handler:async e=>S({command:`containers images prepare`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers images prepare`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/image-preparations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?T({image:E(e.image,`image`,`text`)}):w(e.body)});return}let t=await o(e),
|
|
63
|
+
Idempotently starts or observes preparation of the runtime artifacts required to run one digest-pinned managed container image on Cloudflare's network. Returns 202 while durable preparation continues and 200 when the image is ready or preparation has reached a terminal error.`).option(`image`,{type:`string`,description:`Image url.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A digest-pinned managed container image to prepare for the new runtime.`})}const xe={command:`prepare`,describe:`Prepare a container image`,builder:be,handler:async e=>S({command:`containers images prepare`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers images prepare`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/image-preparations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?T({image:E(e.image,`image`,`text`)}):w(e.body)});return}let t=e.body===void 0?void 0:w(e.body),n=await o(e),r=e.local?a:await l();if(e.accountId=r,e.body!==void 0){let e=t,i=await b(`Creating`,async()=>n.send(q,{body:e,account_id:r}));v(i,{successLabel:`Created`});return}e.image===void 0&&(e.image=await D(`image`,`Image url.`));let i=T({image:E(e.image,`image`,`text`)}),c=await b(`Creating`,async()=>n.send(q,{body:i,account_id:r}));v(c,{successLabel:`Created`})})};async function J(){let t=await u(),n=await l(),r={compliance_region:await c()};return h.HEADERS=_(),m(n,t,e(r)),{accountId:n,complianceConfig:r}}function Se(e){return e.positional(`image`,{type:`string`,demandOption:!0,description:`Image and tag to delete, of the form IMAGE:TAG`}).option(`force`,{type:`boolean`,alias:`f`,default:!1,description:`Skip the deletion confirmation prompt`})}var Ce=x({command:`delete <image>`,describe:`Delete an image tag from the Cloudflare managed registry`,builder:Se,async handler(e){if(e.local)throw Error("--local is not supported with `cf containers images delete`.");if(te(e.image),!await k({force:e.force,message:`Delete ${e.image}? This action cannot be undone.`}))return;let t=await J(),r=await b(`Deleting`,()=>ne({...t,image:e.image}));v({image:e.image,...r},{quiet:e.quiet}),r.warning&&console.warn(n(r.warning))}},{command:`containers images delete`,classification:{safeFlags:[`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}});function we(e){return e.option(`filter`,{type:`string`,description:`Regex to filter repository names`})}var Te=x({command:`list`,describe:`List images in the Cloudflare managed registry`,builder:we,async handler(e){if(e.local)throw Error("--local is not supported with `cf containers images list`.");e.filter!==void 0&&new RegExp(e.filter);let t=await J(),n=await b(`Loading`,()=>ae({...t,filter:e.filter}));v(n,{quiet:e.quiet})}},{command:`containers images list`,classification:{safeFlags:[]}});const Ee={command:`images`,describe:`Operations for images`,builder:e=>e.command(i(Ce,`preview`)).command(i(Te,`preview`)).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:e=>r`/accounts/${e.account_id}/containers/registries`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function De(e){return e.usage(`$0 containers registries create
|
|
64
64
|
|
|
65
65
|
Registers credentials for a supported private external image registry so Containers can pull images from it. This endpoint does not create a registry or upload an image. Public Docker Hub images and images in the Cloudflare managed registry do not require this configuration. Refer to [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported registries and instructions for storing registry credentials.`).option(`auth-private-credential-secret-name`,{type:`string`,description:`Name of the secret within the store.`}).option(`auth-private-credential-store-id`,{type:`string`,description:`Identifier of the Secrets Store containing the secret.`}).option(`auth-public-credential`,{type:`string`,description:`The non-secret part of the registry credential: an AWS access key ID for ECR,
|
|
66
66
|
a username for Docker Hub, or a service account email for Google Artifact Registry.
|
|
67
67
|
`}).option(`domain`,{type:`string`,description:"Hostname of the private registry, without a scheme or image path. Supported\nhostnames are `docker.io`, AWS ECR hostnames, and Google Artifact Registry\n`*-docker.pkg.dev` hostnames.\n"}).option(`is-public`,{type:`boolean`,description:`Omit this field or set it to \`false\`. Public Docker Hub images do not require
|
|
68
68
|
registry configuration and cannot be added with this endpoint.
|
|
69
|
-
`}).option(`kind`,{type:`string`,description:"Registry provider. This must match `domain`: `DockerHub` for `docker.io`,\n`ECR` for AWS ECR, or `GAR` for Google Artifact Registry.\n",choices:[`ECR`,`DockerHub`,`GAR`]}).coerce(`kind`,e=>E(e,`kind`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configuration for connecting Containers to a supported private external image registry. See [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported providers and credential setup instructions. `})}const Oe={command:`create`,describe:`Configure a private external image registry`,builder:De,handler:async e=>S({command:`containers registries create`,classification:{safeFlags:[`is-public`,`kind`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers registries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?T({auth:{private_credential:{secret_name:E(e[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:E(e[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:E(e[`auth-public-credential`],`auth-public-credential`,`text`)},domain:E(e.domain,`domain`,`text`),is_public:e[`is-public`],kind:e.kind}):w(e.body)});return}let t=await o(e),
|
|
69
|
+
`}).option(`kind`,{type:`string`,description:"Registry provider. This must match `domain`: `DockerHub` for `docker.io`,\n`ECR` for AWS ECR, or `GAR` for Google Artifact Registry.\n",choices:[`ECR`,`DockerHub`,`GAR`]}).coerce(`kind`,e=>E(e,`kind`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configuration for connecting Containers to a supported private external image registry. See [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported providers and credential setup instructions. `})}const Oe={command:`create`,describe:`Configure a private external image registry`,builder:De,handler:async e=>S({command:`containers registries create`,classification:{safeFlags:[`is-public`,`kind`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers registries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?T({auth:{private_credential:{secret_name:E(e[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:E(e[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:E(e[`auth-public-credential`],`auth-public-credential`,`text`)},domain:E(e.domain,`domain`,`text`),is_public:e[`is-public`],kind:e.kind}):w(e.body)});return}let t=e.body===void 0?void 0:w(e.body),n=await o(e),r=e.local?a:await l();if(e.accountId=r,e.body!==void 0){let e=t,i=await b(`Creating`,async()=>n.send(Y,{body:e,account_id:r}));v(i,{successLabel:`Created`});return}e[`auth-private-credential-secret-name`]===void 0&&(e[`auth-private-credential-secret-name`]=await D(`auth-private-credential-secret-name`,`Name of the secret within the store.`)),e[`auth-private-credential-store-id`]===void 0&&(e[`auth-private-credential-store-id`]=await D(`auth-private-credential-store-id`,`Identifier of the Secrets Store containing the secret.`)),e[`auth-public-credential`]===void 0&&(e[`auth-public-credential`]=await D(`auth-public-credential`,`The non-secret part of the registry credential: an AWS access key ID for ECR, a username for Docker Hub, or a service account email for Google Artifact Registry. `)),e.domain===void 0&&(e.domain=await D(`domain`,"Hostname of the private registry, without a scheme or image path. Supported hostnames are `docker.io`, AWS ECR hostnames, and Google Artifact Registry `*-docker.pkg.dev` hostnames. ")),e.kind===void 0&&(e.kind=await O(`kind`,"Registry provider. This must match `domain`: `DockerHub` for `docker.io`, `ECR` for AWS ECR, or `GAR` for Google Artifact Registry. ",[`ECR`,`DockerHub`,`GAR`]));let i=T({auth:{private_credential:{secret_name:E(e[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:E(e[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:E(e[`auth-public-credential`],`auth-public-credential`,`text`)},domain:E(e.domain,`domain`,`text`),is_public:e[`is-public`],kind:e.kind}),c=await b(`Creating`,async()=>n.send(Y,{body:i,account_id:r}));v(c,{successLabel:`Created`})})};var X={method:`POST`,path:e=>r`/accounts/${e.account_id}/containers/registries/${e.domain}/credentials`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function ke(e){return e.usage(`$0 containers registries credentials generate <domain>
|
|
70
70
|
|
|
71
|
-
Generates credentials for accessing a configured container image registry.`).positional(`domain`,{type:`string`,description:`The domain to get credentials for.`,demandOption:!0}).option(`expiration-minutes`,{type:`number`,description:`The number of minutes Cloudflare managed registry credentials stay valid. Required for managed registries and must remain positive. Cloudflare ignores this value for external registries.`}).option(`permissions`,{type:`string`,array:!0,description:`The permissions for Cloudflare managed registry credentials. Required for managed registries. Cloudflare ignores this value for external registries.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specifies the configuration for the image registry credential to create. Cloudflare requires both fields for managed registries. For external registries, Cloudflare ignores both fields, and the registry provider determines the returned credentials' permissions and lifetime.`})}const Ae={command:`generate <domain>`,describe:`Generate a JWT to interact with the specified image registry.`,builder:ke,handler:async e=>S({command:`containers registries credentials generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers registries credentials generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}/credentials`,pathParams:{domain:String(e.domain??``)},bodyKind:`json`,body:e.body===void 0?T({expiration_minutes:e[`expiration-minutes`],permissions:e.permissions}):w(e.body)});return}let t=await o(e),
|
|
71
|
+
Generates credentials for accessing a configured container image registry.`).positional(`domain`,{type:`string`,description:`The domain to get credentials for.`,demandOption:!0}).option(`expiration-minutes`,{type:`number`,description:`The number of minutes Cloudflare managed registry credentials stay valid. Required for managed registries and must remain positive. Cloudflare ignores this value for external registries.`}).option(`permissions`,{type:`string`,array:!0,description:`The permissions for Cloudflare managed registry credentials. Required for managed registries. Cloudflare ignores this value for external registries.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specifies the configuration for the image registry credential to create. Cloudflare requires both fields for managed registries. For external registries, Cloudflare ignores both fields, and the registry provider determines the returned credentials' permissions and lifetime.`})}const Ae={command:`generate <domain>`,describe:`Generate a JWT to interact with the specified image registry.`,builder:ke,handler:async e=>S({command:`containers registries credentials generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers registries credentials generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}/credentials`,pathParams:{domain:String(e.domain??``)},bodyKind:`json`,body:e.body===void 0?T({expiration_minutes:e[`expiration-minutes`],permissions:e.permissions}):w(e.body)});return}let t=e.body===void 0?void 0:w(e.body),n=await o(e),r=e.local?a:await l();if(e.accountId=r,e.body!==void 0){let i=t,a=await b(`Creating`,async()=>n.send(X,{body:i,account_id:r,domain:e.domain}));v(a,{successLabel:`Created`});return}let i=T({expiration_minutes:e[`expiration-minutes`],permissions:e.permissions}),c=await b(`Creating`,async()=>n.send(X,{body:i,account_id:r,domain:e.domain}));v(c,{successLabel:`Created`})})},je={command:`credentials`,describe:`Generate image registry credentials`,builder:e=>e.command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Me={method:`DELETE`,path:e=>r`/accounts/${e.account_id}/containers/registries/${e.domain}`,errors:{403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Ne(e){return e.usage(`$0 containers registries delete <domain>
|
|
72
72
|
|
|
73
73
|
Delete a registry from the account, this will prevent Containers from pulling images from the registry.`).positional(`domain`,{type:`string`,description:`The domain to delete.`,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 Pe={command:`delete <domain>`,describe:`Delete a registry from the account`,builder:Ne,handler:async e=>S({command:`containers registries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await s();y({command:`cf containers registries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}`,pathParams:{domain:String(e.domain??``)},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();if(e.accountId=n,!await k({force:!!e.force,message:`This operation deletes the registry configuration. Containers will no longer be able to pull images from it.`}))return;let r=await b(`Deleting`,async()=>t.send(Me,{account_id:n,domain:e.domain}));v(r,{successLabel:`Deleted`})})};var Fe={method:`GET`,path:e=>r`/accounts/${e.account_id}/containers/registries`,errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function Ie(e){return e.usage(`$0 containers registries list
|
|
74
74
|
|
|
75
|
-
Get the list of configured registries in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`Get the list of configured registries in the account`,builder:Ie,handler:async e=>S({command:`containers registries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await s();y({command:`cf containers registries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();e.accountId=n;let r=await b(`Loading`,async()=>t.send(Fe,{account_id:n}));v(r,{successLabel:`Loaded`})})},Le={command:`registries`,describe:`Manage Containers image registries`,builder:e=>e.command(Oe).command(Pe).command(Z).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(e){return e.positional(`path`,{type:`string`,demandOption:!0,description:`Directory containing the Dockerfile to build`}).option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Name and optional tag for the built image`}).option(`push`,{alias:`p`,type:`boolean`,default:!1,description:`Push the built image to Cloudflare's managed registry`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var ze=x({command:`build <path>`,describe:`Build a Container image`,builder:Re,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers build`.");let n={compliance_region:t.push?await c():`public`},r=t.push?await u():``,i=g(r);p({logger:i.logger,fetchResult:i.fetchResult,fetchPagedListResult:i.fetchPagedListResult}),t.push&&m(await l(),r,e(n)),await ie({PATH:t.path,tag:t.tag,push:t.push,pathToDocker:t[`path-to-docker`]},n)}},{command:`containers build`,classification:{safeFlags:[`push`],shortFlagAliases:{p:{canonical:`push`,type:`boolean`},t:{canonical:`tag`,type:`value`}}}});function Be(e){return e.option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Tag of the local image to push`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var Ve=x({command:`push`,describe:`Push a local image to the Cloudflare managed registry`,builder:Be,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers push`.");let n=await u(),r=await l(),i={compliance_region:await c()},a=g(n);p({logger:a.logger,fetchResult:a.fetchResult,fetchPagedListResult:a.fetchPagedListResult}),m(r,n,e(i)),await ee({TAG:t.tag,pathToDocker:t[`path-to-docker`]},r,i)}},{command:`containers push`,classification:{safeFlags:[],shortFlagAliases:{t:{canonical:`tag`,type:`value`}}}});function He(e){return e.positional(`id`,{type:`string`,demandOption:!0,description:`ID of the container instance`}).positional(`ssh-command`,{type:`string`,array:!0,description:`Command and arguments to run in the container`}).options(re).middleware(e=>{f(e)&&(e.quiet=!0)},!0).parserConfiguration({"populate--":!0,"unknown-options-as-args":!0,"parse-positional-numbers":!1})}const Q={command:`ssh <id> [ssh-command..]`,describe:`SSH into a container`,builder:He,handler:async n=>{if(n.local)throw Error("--local is not supported with `cf containers ssh`.");let r=await u(),i=await l(),a={compliance_region:await c()},o=g(r);p({logger:o.logger,fetchResult:o.fetchResult}),h.HEADERS=_(),m(i,r,e(a)),await d({...n,id:n.id,command:[...n[`ssh-command`]??[],...Array.isArray(n[`--`])?n[`--`].map(String):[]]},t)}},$=x(Q,{command:`containers ssh`,recordArgs:!1});var Ue={...$,handler:async e=>{if(f(e)){let{markCommandReported:t}=await import(`./telemetry-
|
|
75
|
+
Get the list of configured registries in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`Get the list of configured registries in the account`,builder:Ie,handler:async e=>S({command:`containers registries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await s();y({command:`cf containers registries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`none`});return}let t=await o(e),n=e.local?a:await l();e.accountId=n;let r=await b(`Loading`,async()=>t.send(Fe,{account_id:n}));v(r,{successLabel:`Loaded`})})},Le={command:`registries`,describe:`Manage Containers image registries`,builder:e=>e.command(Oe).command(Pe).command(Z).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(e){return e.positional(`path`,{type:`string`,demandOption:!0,description:`Directory containing the Dockerfile to build`}).option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Name and optional tag for the built image`}).option(`push`,{alias:`p`,type:`boolean`,default:!1,description:`Push the built image to Cloudflare's managed registry`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var ze=x({command:`build <path>`,describe:`Build a Container image`,builder:Re,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers build`.");let n={compliance_region:t.push?await c():`public`},r=t.push?await u():``,i=g(r);p({logger:i.logger,fetchResult:i.fetchResult,fetchPagedListResult:i.fetchPagedListResult}),t.push&&m(await l(),r,e(n)),await ie({PATH:t.path,tag:t.tag,push:t.push,pathToDocker:t[`path-to-docker`]},n)}},{command:`containers build`,classification:{safeFlags:[`push`],shortFlagAliases:{p:{canonical:`push`,type:`boolean`},t:{canonical:`tag`,type:`value`}}}});function Be(e){return e.option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Tag of the local image to push`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var Ve=x({command:`push`,describe:`Push a local image to the Cloudflare managed registry`,builder:Be,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers push`.");let n=await u(),r=await l(),i={compliance_region:await c()},a=g(n);p({logger:a.logger,fetchResult:a.fetchResult,fetchPagedListResult:a.fetchPagedListResult}),m(r,n,e(i)),await ee({TAG:t.tag,pathToDocker:t[`path-to-docker`]},r,i)}},{command:`containers push`,classification:{safeFlags:[],shortFlagAliases:{t:{canonical:`tag`,type:`value`}}}});function He(e){return e.positional(`id`,{type:`string`,demandOption:!0,description:`ID of the container instance`}).positional(`ssh-command`,{type:`string`,array:!0,description:`Command and arguments to run in the container`}).options(re).middleware(e=>{f(e)&&(e.quiet=!0)},!0).parserConfiguration({"populate--":!0,"unknown-options-as-args":!0,"parse-positional-numbers":!1})}const Q={command:`ssh <id> [ssh-command..]`,describe:`SSH into a container`,builder:He,handler:async n=>{if(n.local)throw Error("--local is not supported with `cf containers ssh`.");let r=await u(),i=await l(),a={compliance_region:await c()},o=g(r);p({logger:o.logger,fetchResult:o.fetchResult}),h.HEADERS=_(),m(i,r,e(a)),await d({...n,id:n.id,command:[...n[`ssh-command`]??[],...Array.isArray(n[`--`])?n[`--`].map(String):[]]},t)}},$=x(Q,{command:`containers ssh`,recordArgs:!1});var Ue={...$,handler:async e=>{if(f(e)){let{markCommandReported:t}=await import(`./telemetry-B4zmCpT0.mjs`);return t(),Q.handler(e)}return $.handler(e)}};const We={command:`containers`,describe:`Deploy and manage Containers applications on Cloudflare's global network`,builder:e=>e.command(i(ze,`preview`)).command(i(Ve,`preview`)).command(i(Ue,`preview`)).command(ye).command(Ee).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{We as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,t as c}from"./body-parser-DoewLePl.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-CEpZ-lQZ.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads`,body:`json`};function m(e){return e.usage(`$0 content-scan expressions create
|
|
3
3
|
|
|
4
|
-
Create one or more Content Scanning custom expressions, appending them to the existing list of the zone, and return the updated list. Each expression reaches content objects the scanner cannot find automatically, for example \`lookup_json_string(http.request.body.raw, "file")\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of Content Scanning custom expressions to create.`})}const h={command:`create`,describe:`Create Content Scanning custom expressions for a zone.`,builder:m,handler:async e=>o({command:`content-scan expressions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),
|
|
4
|
+
Create one or more Content Scanning custom expressions, appending them to the existing list of the zone, and return the updated list. Each expression reaches content objects the scanner cannot find automatically, for example \`lookup_json_string(http.request.body.raw, "file")\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of Content Scanning custom expressions to create.`})}const h={command:`create`,describe:`Create Content Scanning custom expressions for a zone.`,builder:m,handler:async e=>o({command:`content-scan expressions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let o=e.body===void 0?void 0:s(e.body),c=await t(e),l=await n({zone:e.zone},c,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>c.send(p,{body:e,zone_id:l}));r(t,{successLabel:`Created`})}})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads/${t.expression_id}`};function _(e){return e.usage(`$0 content-scan expressions delete <expression-id>
|
|
5
5
|
|
|
6
6
|
Delete the Content Scanning custom expression with the given identifier and return the expressions that remain. Content objects reached only by the deleted expression are no longer scanned.`).positional(`expression-id`,{type:`string`,description:`Defines the unique ID for this Content Scanning custom expression.`,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 v={command:`delete <expression-id>`,describe:`Delete a Content Scanning custom expression from a zone.`,builder:_,handler:async e=>o({command:`content-scan expressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads/${e[`expression-id`]==null?`<expression-id>`:encodeURIComponent(String(e[`expression-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"expression-id":String(e[`expression-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force,message:`This operation deletes a Content Scanning custom expression.`}))return;let c=await a(`Deleting`,async()=>o.send(g,{zone_id:s,expression_id:e[`expression-id`]}));r(c,{successLabel:`Deleted`})})};var y={method:`GET`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads`};function b(e){return e.usage(`$0 content-scan expressions list
|
|
7
7
|
|
|
8
8
|
List the Content Scanning custom expressions configured for the zone, each with its own identifier. A custom expression tells the scanner how to reach content objects in a request it cannot parse on its own, such as files Base64-encoded inside a JSON body.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List the Content Scanning custom expressions of a zone.`,builder:b,handler:async e=>o({command:`content-scan expressions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(y,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var S={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads/${t.expression_id}`,body:`json`};function C(e){return e.usage(`$0 content-scan expressions update <expression-id>
|
|
9
9
|
|
|
10
|
-
Update the Content Scanning custom expression with the given identifier and return the updated list of expressions.`).positional(`expression-id`,{type:`string`,description:`Defines the unique ID for this Content Scanning custom expression.`,demandOption:!0}).option(`payload`,{type:`string`,description:`Defines the custom content extraction expression used to reach content objects in the request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Content Scanning custom expression to update.`})}const w={command:`update <expression-id>`,describe:`Update a Content Scanning custom expression for a zone.`,builder:C,handler:async e=>o({command:`content-scan expressions update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads/${e[`expression-id`]==null?`<expression-id>`:encodeURIComponent(String(e[`expression-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"expression-id":String(e[`expression-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({payload:l(e.payload,`payload`,`text`)}):s(e.body)});return}let o=await t(e),
|
|
10
|
+
Update the Content Scanning custom expression with the given identifier and return the updated list of expressions.`).positional(`expression-id`,{type:`string`,description:`Defines the unique ID for this Content Scanning custom expression.`,demandOption:!0}).option(`payload`,{type:`string`,description:`Defines the custom content extraction expression used to reach content objects in the request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Content Scanning custom expression to update.`})}const w={command:`update <expression-id>`,describe:`Update a Content Scanning custom expression for a zone.`,builder:C,handler:async e=>o({command:`content-scan expressions update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads/${e[`expression-id`]==null?`<expression-id>`:encodeURIComponent(String(e[`expression-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"expression-id":String(e[`expression-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({payload:l(e.payload,`payload`,`text`)}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),d=await t(e),f=await n({zone:e.zone},d,{quiet:e.quiet});if(e.zoneId=f,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>d.send(S,{body:t,zone_id:f,expression_id:e[`expression-id`]}));r(n,{successLabel:`Updated`});return}e.payload===void 0&&(e.payload=await u(`payload`,`Defines the custom content extraction expression used to reach content objects in the request.`));let p=c({payload:l(e.payload,`payload`,`text`)}),m=await a(`Updating`,async()=>d.send(S,{body:p,zone_id:f,expression_id:e[`expression-id`]}));r(m,{successLabel:`Updated`})})},T={command:`expressions`,describe:`Custom expressions that tell the scanner how to reach content objects it cannot parse on its own`,builder:e=>e.command(h).command(v).command(x).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`GET`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/settings`};function D(e){return e.usage(`$0 content-scan get
|
|
11
11
|
|
|
12
|
-
Get the current Content Scanning status for the zone, together with the date the status was last modified.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get the Content Scanning status for a zone.`,builder:D,handler:async e=>o({command:`content-scan get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(E,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var k={method:`PUT`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/settings`,body:`json`};function A(e){return e.usage("$0 content-scan update\n\nUpdate the Content Scanning status by setting the status value to `enabled` or `disabled`. This is equivalent to calling the dedicated enable and disable endpoints.").option(`value`,{type:`string`,description:`The status value for Content Scanning.`,choices:[`enabled`,`disabled`]}).coerce(`value`,e=>l(e,`value`,`text`)).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:`Content Scanning settings to update.`})}const j={command:`update`,describe:`Update the Content Scanning status for a zone.`,builder:A,handler:async e=>o({command:`content-scan update`,classification:{safeFlags:[`value`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf content-scan update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({value:e.value}):s(e.body)});return}let o=await t(e),
|
|
12
|
+
Get the current Content Scanning status for the zone, together with the date the status was last modified.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get the Content Scanning status for a zone.`,builder:D,handler:async e=>o({command:`content-scan get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(E,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var k={method:`PUT`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/settings`,body:`json`};function A(e){return e.usage("$0 content-scan update\n\nUpdate the Content Scanning status by setting the status value to `enabled` or `disabled`. This is equivalent to calling the dedicated enable and disable endpoints.").option(`value`,{type:`string`,description:`The status value for Content Scanning.`,choices:[`enabled`,`disabled`]}).coerce(`value`,e=>l(e,`value`,`text`)).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:`Content Scanning settings to update.`})}const j={command:`update`,describe:`Update the Content Scanning status for a zone.`,builder:A,handler:async e=>o({command:`content-scan update`,classification:{safeFlags:[`value`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf content-scan update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({value:e.value}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),l=await t(e),u=await n({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,!await f({force:!!e.force,message:`This operation toggles Content Scanning for a zone.`}))return;if(e.body!==void 0){let e=o,t=await a(`Updating`,async()=>l.send(k,{body:e,zone_id:u}));r(t,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await d(`value`,`The status value for Content Scanning.`,[`enabled`,`disabled`]));let p=c({value:e.value}),m=await a(`Updating`,async()=>l.send(k,{body:p,zone_id:u}));r(m,{successLabel:`Updated`})})},M={command:`content-scan`,describe:`Malicious uploads detection, scan uploaded content in HTTP requests for malware and malicious payloads`,builder:e=>e.command(O).command(j).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,r as t}from"./project-settings-nBMEx1f-.mjs";import{n}from"./resolve-C3FmNlSO.mjs";function r(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function i(n={}){let r=process.env.CLOUDFLARE_ACCOUNT_ID;if(r)return{value:r,source:`env`};if(n.skipProjectSettings)return;let i=t(void 0,n),a=i===void 0?await e(void 0,n):i;if(a?.settings?.accountId)return{value:a.settings.accountId,source:`settings`,path:a.path}}async function a(){let{getActiveAccountId:e,isTemporaryAccountRequested:t}=await import(`./oauth-
|
|
2
|
+
import{i as e,r as t}from"./project-settings-nBMEx1f-.mjs";import{n}from"./resolve-C3FmNlSO.mjs";function r(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function i(n={}){let r=process.env.CLOUDFLARE_ACCOUNT_ID;if(r)return{value:r,source:`env`};if(n.skipProjectSettings)return;let i=t(void 0,n),a=i===void 0?await e(void 0,n):i;if(a?.settings?.accountId)return{value:a.settings.accountId,source:`settings`,path:a.path}}async function a(){let{getActiveAccountId:e,isTemporaryAccountRequested:t}=await import(`./oauth-Cidoyxfp.mjs`);if(t())return;let n=await i();if(n)return n.value;try{return e()}catch{return}}async function o(e){let{getOrSelectAccountId:t,isTemporaryAccountRequested:n,requireTemporaryAccount:r}=await import(`./oauth-Cidoyxfp.mjs`);if(n())return(await r(e)).accountId;let a=await i(e);return a&&s(a.value,h(a,`accountId`)),t(a?.value,e)}function s(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function c(e,t,n){if(e?.zoneId)return l(e.zoneId,t);let i=r(`CLOUDFLARE_ZONE_ID`,e?.zone);if(i){if(!n?.quiet&&i.source!==`flag`){let e=h(i);console.error(`Using zone: ${i.value} (from ${e})`)}return l(i.value,t)}throw Error(`No zone specified.
|
|
3
3
|
|
|
4
4
|
Please provide one of the following:
|
|
5
5
|
1. Zone as a positional argument: cf dns records list <zone>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-B-h0BHg7.mjs";import{t}from"./output-BZQEl3mK.mjs";import{t as n}from"./dry-run-kJbjn4kG.mjs";import{t as r}from"./progress-yvPscjYg.mjs";import{t as i}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as a,r as o,t as s}from"./body-parser-DoewLePl.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";var l={method:`GET`,path:()=>`/user/communication_preferences`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function u(e){return e.usage(`$0 cps get
|
|
3
3
|
|
|
4
4
|
Retrieve the communication preferences for the authenticated user, including email verification status, marketing subscription opt-in/opt-out state, and language locale. Callers authenticate with standard Cloudflare API tokens or keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get communication preferences`,builder:u,handler:async a=>i({command:`cps get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf cps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/communication_preferences`,pathParams:{},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.send(l));t(o,{successLabel:`Loaded`})})};var f={method:`PUT`,path:()=>`/user/communication_preferences`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function p(e){return e.usage(`$0 cps update
|
|
5
5
|
|
|
6
|
-
Set one or more communication preferences for the authenticated user. Supply a map of preference keys to subscription states, and an optional language locale. This endpoint does not modify email verification settings. Callers authenticate with standard Cloudflare API tokens or keys.`).option(`language-locale`,{type:`string`,description:`The user's preferred language locale for communications. If omitted, the language locale does not change.`,choices:[`en-US`,`es-ES`,`de-DE`,`fr-FR`,`it-IT`,`ja-JP`,`ko-KR`,`pt-BR`,`zh-CN`,`zh-TW`]}).coerce(`language-locale`,e=>c(e,`language-locale`,`text`)).option(`preferences`,{type:`string`,description:`Preference keys mapped to subscription states to update. Only the preferences in this map change; others remain unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating communication preferences. An email field in the payload is ignored; email verification state is managed separately, so the field is excluded from this schema.`})}const m={command:`update`,describe:`Update communication preferences`,builder:p,handler:async c=>i({command:`cps update`,classification:{safeFlags:[`language-locale`,`dry-run`]}},c,async()=>{if(c.dryRun){n({command:`cf cps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/communication_preferences`,pathParams:{},bodyKind:`json`,body:c.body===void 0?s({"language-locale":c[`language-locale`],preferences:o(c.preferences,`preferences`)},[[`preferences`]]):a(c.body)});return}let i=await e(c);if(c.body){let e=
|
|
6
|
+
Set one or more communication preferences for the authenticated user. Supply a map of preference keys to subscription states, and an optional language locale. This endpoint does not modify email verification settings. Callers authenticate with standard Cloudflare API tokens or keys.`).option(`language-locale`,{type:`string`,description:`The user's preferred language locale for communications. If omitted, the language locale does not change.`,choices:[`en-US`,`es-ES`,`de-DE`,`fr-FR`,`it-IT`,`ja-JP`,`ko-KR`,`pt-BR`,`zh-CN`,`zh-TW`]}).coerce(`language-locale`,e=>c(e,`language-locale`,`text`)).option(`preferences`,{type:`string`,description:`Preference keys mapped to subscription states to update. Only the preferences in this map change; others remain unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating communication preferences. An email field in the payload is ignored; email verification state is managed separately, so the field is excluded from this schema.`})}const m={command:`update`,describe:`Update communication preferences`,builder:p,handler:async c=>i({command:`cps update`,classification:{safeFlags:[`language-locale`,`dry-run`]}},c,async()=>{if(c.dryRun){n({command:`cf cps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/communication_preferences`,pathParams:{},bodyKind:`json`,body:c.body===void 0?s({"language-locale":c[`language-locale`],preferences:o(c.preferences,`preferences`)},[[`preferences`]]):a(c.body)});return}let i=c.body===void 0?void 0:a(c.body),l=await e(c);if(c.body!==void 0){let e=i,n=await r(`Updating`,async()=>l.send(f,{body:e}));t(n,{successLabel:`Updated`});return}let u=s({"language-locale":c[`language-locale`],preferences:o(c.preferences,`preferences`)},[[`preferences`]]),d=await r(`Updating`,async()=>l.send(f,{body:u}));t(d,{successLabel:`Updated`})})},h={command:`cps`,describe:`cps`,builder:e=>e.command(d).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,r as c,t as l}from"./body-parser-DoewLePl.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";var d={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/settings/csam_scanner_third_party`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function f(e){return e.usage("$0 csam-scanner edit\n\nUpdate the CSAM Scanner configuration for a zone. Allows enabling or disabling CSAM scanning, updating the notification email, and configuring scanning sources. This is a partial update: fields omitted from `value` keep their current setting, and `sources` is merged per source (`null` clears all sources). Send an empty `email` to clear the notification address. When a new email is provided, email verification is triggered automatically. The `enabled` field is a toggle; the server may adjust it based on whether the notification email is verified. Returns 403 if the zone or account is locked by Trust & Safety.").option(`id`,{type:`string`,description:`The feature identifier.`,choices:[`csam_scanner`]}).coerce(`id`,e=>u(e,`id`,`text`)).option(`value-email`,{type:`string`,description:`Notification email address for CSAM scan results. When changed,
|
|
3
3
|
email verification is triggered automatically.
|
|
4
4
|
`}).option(`value-enabled`,{type:`boolean`,description:`Whether CSAM scanning is enabled for this zone.`}).option(`value-resend-email`,{type:`boolean`,description:`Set to true to trigger re-sending the email verification.
|
|
5
5
|
Write-only; never appears in responses (omitted when false).
|
|
6
|
-
`}).option(`value-sources`,{type:`string`,description:`Map of scanning sources and their enabled state. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating CSAM Scanner configuration. `})}const p={command:`edit`,describe:`Update CSAM Scanner setting`,builder:f,handler:async e=>o({command:`csam-scanner edit`,classification:{safeFlags:[`id`,`value-enabled`,`value-resend-email`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf csam-scanner edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/csam_scanner_third_party`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({id:e.id,value:{email:u(e[`value-email`],`value-email`,`text`),enabled:e[`value-enabled`],resend_email:e[`value-resend-email`],sources:c(e[`value-sources`],`value-sources`)}},[[`value`,`sources`]]):s(e.body)});return}let o=await t(e),
|
|
6
|
+
`}).option(`value-sources`,{type:`string`,description:`Map of scanning sources and their enabled state. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating CSAM Scanner configuration. `})}const p={command:`edit`,describe:`Update CSAM Scanner setting`,builder:f,handler:async e=>o({command:`csam-scanner edit`,classification:{safeFlags:[`id`,`value-enabled`,`value-resend-email`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf csam-scanner edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/csam_scanner_third_party`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({id:e.id,value:{email:u(e[`value-email`],`value-email`,`text`),enabled:e[`value-enabled`],resend_email:e[`value-resend-email`],sources:c(e[`value-sources`],`value-sources`)}},[[`value`,`sources`]]):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),f=await t(e),p=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>f.send(d,{body:e,zone_id:p}));r(t,{successLabel:`Updated`});return}let m=l({id:e.id,value:{email:u(e[`value-email`],`value-email`,`text`),enabled:e[`value-enabled`],resend_email:e[`value-resend-email`],sources:c(e[`value-sources`],`value-sources`)}},[[`value`,`sources`]]),h=await a(`Updating`,async()=>f.send(d,{body:m,zone_id:p}));r(h,{successLabel:`Updated`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/csam_scanner_third_party`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 csam-scanner get
|
|
7
7
|
|
|
8
8
|
Retrieve the current CSAM Scanner configuration for a zone. The notification email is masked by default in responses.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Get CSAM Scanner setting`,builder:h,handler:async e=>o({command:`csam-scanner get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf csam-scanner get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/csam_scanner_third_party`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Loaded`})})},_={command:`csam-scanner`,describe:`csam-scanner`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
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,i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as u,t as d}from"./body-parser-DoewLePl.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-CEpZ-lQZ.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs`,body:`json`};function g(e){return e.usage(`$0 custom-csrs create
|
|
3
3
|
|
|
4
4
|
Generate a new custom Certificate Signing Request (CSR) for an account or zone. Cloudflare generates and securely stores the private key associated with the CSR.
|
|
5
5
|
|
|
6
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`common-name`,{type:`string`,description:`The common name (domain) for the CSR. Must be at most 64 characters.`}).option(`country`,{type:`string`,description:`Two-letter ISO 3166-1 alpha-2 country code.`}).option(`description`,{type:`string`,description:`Optional description for the CSR.`}).option(`key-type`,{type:`string`,description:`Key algorithm to use for the CSR. Defaults to rsa2048 if not specified.`,choices:[`rsa2048`,`p256v1`],default:`rsa2048`}).coerce(`key-type`,e=>f(e,`key-type`,`text`)).option(`locality`,{type:`string`,description:`City or locality name.`}).option(`name`,{type:`string`,description:`Human-readable name for the CSR.`}).option(`organization`,{type:`string`,description:`Organization name.`}).option(`organizational-unit`,{type:`string`,description:`Organizational unit name.`}).option(`sans`,{type:`string`,array:!0,description:`Subject Alternative Names for the CSR. At least one SAN is required.`}).option(`state`,{type:`string`,description:`State or province 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 custom CSR.`})}const _={command:`create`,describe:`Create Custom CSR`,builder:g,handler:async e=>l({command:`custom-csrs create`,classification:{safeFlags:[`key-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({common_name:f(e[`common-name`],`common-name`,`text`),country:f(e.country,`country`,`text`),description:f(e.description,`description`,`text`),key_type:e[`key-type`],locality:f(e.locality,`locality`,`text`),name:f(e.name,`name`,`text`),organization:f(e.organization,`organization`,`text`),organizational_unit:f(e[`organizational-unit`],`organizational-unit`,`text`),sans:e.sans,state:f(e.state,`state`,`text`)}):u(e.body)});return}let l=await n(e),
|
|
6
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`common-name`,{type:`string`,description:`The common name (domain) for the CSR. Must be at most 64 characters.`}).option(`country`,{type:`string`,description:`Two-letter ISO 3166-1 alpha-2 country code.`}).option(`description`,{type:`string`,description:`Optional description for the CSR.`}).option(`key-type`,{type:`string`,description:`Key algorithm to use for the CSR. Defaults to rsa2048 if not specified.`,choices:[`rsa2048`,`p256v1`],default:`rsa2048`}).coerce(`key-type`,e=>f(e,`key-type`,`text`)).option(`locality`,{type:`string`,description:`City or locality name.`}).option(`name`,{type:`string`,description:`Human-readable name for the CSR.`}).option(`organization`,{type:`string`,description:`Organization name.`}).option(`organizational-unit`,{type:`string`,description:`Organizational unit name.`}).option(`sans`,{type:`string`,array:!0,description:`Subject Alternative Names for the CSR. At least one SAN is required.`}).option(`state`,{type:`string`,description:`State or province 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 custom CSR.`})}const _={command:`create`,describe:`Create Custom CSR`,builder:g,handler:async e=>l({command:`custom-csrs create`,classification:{safeFlags:[`key-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({common_name:f(e[`common-name`],`common-name`,`text`),country:f(e.country,`country`,`text`),description:f(e.description,`description`,`text`),key_type:e[`key-type`],locality:f(e.locality,`locality`,`text`),name:f(e.name,`name`,`text`),organization:f(e.organization,`organization`,`text`),organizational_unit:f(e[`organizational-unit`],`organizational-unit`,`text`),sans:e.sans,state:f(e.state,`state`,`text`)}):u(e.body)});return}let l=e.body===void 0?void 0:u(e.body),m=await n(e),g=e.zone===void 0?`accounts`:`zones`,_=g===`zones`?await i({zone:e.zone},m,{quiet:e.quiet}):e.local?t:await a();if(g===`zones`?e.zoneId=_:e.accountId=_,e.body!==void 0){let e=l,t=await c(`Creating`,async()=>m.send(h,{body:e,account_or_zone:g,account_or_zone_id:_}));o(t,{successLabel:`Created`});return}if(e[`common-name`]===void 0&&(e[`common-name`]=await p(`common-name`,`The common name (domain) for the CSR. Must be at most 64 characters.`)),e.country===void 0&&(e.country=await p(`country`,`Two-letter ISO 3166-1 alpha-2 country code.`)),e.locality===void 0&&(e.locality=await p(`locality`,`City or locality name.`)),e.organization===void 0&&(e.organization=await p(`organization`,`Organization name.`)),e.sans===void 0)throw Error(`--sans is required (or pass --body with this field set).`);e.state===void 0&&(e.state=await p(`state`,`State or province name.`));let v=d({common_name:f(e[`common-name`],`common-name`,`text`),country:f(e.country,`country`,`text`),description:f(e.description,`description`,`text`),key_type:e[`key-type`],locality:f(e.locality,`locality`,`text`),name:f(e.name,`name`,`text`),organization:f(e.organization,`organization`,`text`),organizational_unit:f(e[`organizational-unit`],`organizational-unit`,`text`),sans:e.sans,state:f(e.state,`state`,`text`)}),y=await c(`Creating`,async()=>m.send(h,{body:v,account_or_zone:g,account_or_zone_id:_}));o(y,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs/${t.custom_csr_id}`};function y(e){return e.usage(`$0 custom-csrs delete <custom-csr-id>
|
|
7
7
|
|
|
8
8
|
Delete a custom Certificate Signing Request (CSR) and its associated private key.
|
|
9
9
|
|
|
@@ -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{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as s,n as c,r as l,t as u}from"./body-parser-DoewLePl.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-CEpZ-lQZ.mjs";var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}/certificate_pack/${t.certificate_pack_id}/certificates/${t.certificate_id}`};function h(e){return e.usage(`$0 custom-hostnames certificate-pack certificates delete <certificate-id>
|
|
3
3
|
|
|
4
4
|
Delete a single custom certificate from a certificate pack that contains two bundled certificates. Deletion is subject to the following constraints. You cannot delete a certificate if it is the only remaining certificate in the pack. At least one certificate must remain in the pack.`).positional(`certificate-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <certificate-id>`,describe:`Delete Single Certificate And Key For Custom Hostname`,builder:h,handler:async e=>o({command:`custom-hostnames certificate-pack certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames certificate-pack certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}/certificate_pack/${e[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(e[`certificate-pack-id`]))}/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``),"certificate-pack-id":String(e[`certificate-pack-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(c,{successLabel:`Deleted`})})};var _={method:`PUT`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}/certificate_pack/${t.certificate_pack_id}/certificates/${t.certificate_id}`,body:`json`};function v(e){return e.usage(`$0 custom-hostnames certificate-pack certificates update <certificate-id>
|
|
5
5
|
|
|
6
|
-
Replace a single custom certificate within a certificate pack that contains two bundled certificates. The replacement must adhere to the following constraints. You can only replace an RSA certificate with another RSA certificate or an ECDSA certificate with another ECDSA certificate.`).positional(`certificate-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).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 <certificate-id>`,describe:`Replace Custom Certificate and Custom Key In Custom Hostname`,builder:v,handler:async e=>o({command:`custom-hostnames certificate-pack certificates update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames certificate-pack certificates update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}/certificate_pack/${e[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(e[`certificate-pack-id`]))}/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``),"certificate-pack-id":String(e[`certificate-pack-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_certificate:d(e[`custom-certificate`],`custom-certificate`,`text`),custom_key:d(e[`custom-key`],`custom-key`,`text`)}):c(e.body),sensitiveBodyPaths:[[`custom_key`]]});return}let o=await t(e),
|
|
6
|
+
Replace a single custom certificate within a certificate pack that contains two bundled certificates. The replacement must adhere to the following constraints. You can only replace an RSA certificate with another RSA certificate or an ECDSA certificate with another ECDSA certificate.`).positional(`certificate-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).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 <certificate-id>`,describe:`Replace Custom Certificate and Custom Key In Custom Hostname`,builder:v,handler:async e=>o({command:`custom-hostnames certificate-pack certificates update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames certificate-pack certificates update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}/certificate_pack/${e[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(e[`certificate-pack-id`]))}/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``),"certificate-pack-id":String(e[`certificate-pack-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_certificate:d(e[`custom-certificate`],`custom-certificate`,`text`),custom_key:d(e[`custom-key`],`custom-key`,`text`)}):c(e.body),sensitiveBodyPaths:[[`custom_key`]]});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),l=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>s.send(_,{body:t,zone_id:l,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(n,{successLabel:`Updated`});return}e[`custom-certificate`]===void 0&&(e[`custom-certificate`]=await f(`custom-certificate`,`If a custom uploaded certificate is used.`)),e[`custom-key`]===void 0&&(e[`custom-key`]=await f(`custom-key`,`The key for a custom uploaded certificate.`,{kind:`secret`}));let p=u({custom_certificate:d(e[`custom-certificate`],`custom-certificate`,`text`),custom_key:d(e[`custom-key`],`custom-key`,`text`)}),m=await a(`Updating`,async()=>s.send(_,{body:p,zone_id:l,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(m,{successLabel:`Updated`})})},b={command:`certificates`,describe:`Operations for certificate-pack.certificates`,builder:e=>e.command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`certificate-pack`,describe:`Operations for certificate-pack`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`POST`,path:t=>e`/zones/${t.zone_id}/custom_hostnames`,body:`json`};function C(e){return e.usage(`$0 custom-hostnames create
|
|
7
7
|
|
|
8
|
-
Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, txt, email—should be used, with 'http' recommended if the CNAME is already in place (or will be soon). Specifying 'email' will send an email to the WHOIS contacts on file for the base domain plus hostmaster, postmaster, webmaster, admin, administrator. If http is used and the domain is not already pointing to the Managed CNAME host, the PATCH method must be used once it is (to complete validation). Enable bundling of certificates using the custom_cert_bundle field. The bundling process requires the following condition One certificate in the bundle must use an RSA, and the other must use an ECDSA.`).option(`custom-metadata`,{type:`string`,description:`Unique key/value metadata for this hostname. These are per-hostname (customer) settings. Provide as a JSON object or @path/to/file.json.`}).option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`hostname`,{type:`string`,description:`The custom hostname that will point to your hostname via CNAME.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).coerce(`ssl-bundle-method`,e=>d(e,`ssl-bundle-method`,`text`)).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).coerce(`ssl-certificate-authority`,e=>d(e,`ssl-certificate-authority`,`text`)).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-cert-bundle`,{type:`string`,description:`Array of custom certificate and key pairs (1 or 2 pairs allowed). Provide as a JSON array of objects or @path/to/file.json.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).coerce(`ssl-method`,e=>d(e,`ssl-method`,`text`)).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-early-hints`,e=>d(e,`ssl-settings-early-hints`,`text`)).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-http2`,e=>d(e,`ssl-settings-http2`,`text`)).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`ssl-settings-min-tls-version`,e=>d(e,`ssl-settings-min-tls-version`,`text`)).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-tls-1-3`,e=>d(e,`ssl-settings-tls-1-3`,`text`)).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).coerce(`ssl-type`,e=>d(e,`ssl-type`,`text`)).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).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 w={command:`create`,describe:`Create Custom Hostname`,builder:C,handler:async e=>o({command:`custom-hostnames create`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:d(e.hostname,`hostname`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]):c(e.body),sensitiveBodyPaths:[[`ssl`,`custom_key`]]});return}let o=await t(e),
|
|
8
|
+
Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, txt, email—should be used, with 'http' recommended if the CNAME is already in place (or will be soon). Specifying 'email' will send an email to the WHOIS contacts on file for the base domain plus hostmaster, postmaster, webmaster, admin, administrator. If http is used and the domain is not already pointing to the Managed CNAME host, the PATCH method must be used once it is (to complete validation). Enable bundling of certificates using the custom_cert_bundle field. The bundling process requires the following condition One certificate in the bundle must use an RSA, and the other must use an ECDSA.`).option(`custom-metadata`,{type:`string`,description:`Unique key/value metadata for this hostname. These are per-hostname (customer) settings. Provide as a JSON object or @path/to/file.json.`}).option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`hostname`,{type:`string`,description:`The custom hostname that will point to your hostname via CNAME.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).coerce(`ssl-bundle-method`,e=>d(e,`ssl-bundle-method`,`text`)).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).coerce(`ssl-certificate-authority`,e=>d(e,`ssl-certificate-authority`,`text`)).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-cert-bundle`,{type:`string`,description:`Array of custom certificate and key pairs (1 or 2 pairs allowed). Provide as a JSON array of objects or @path/to/file.json.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).coerce(`ssl-method`,e=>d(e,`ssl-method`,`text`)).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-early-hints`,e=>d(e,`ssl-settings-early-hints`,`text`)).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-http2`,e=>d(e,`ssl-settings-http2`,`text`)).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`ssl-settings-min-tls-version`,e=>d(e,`ssl-settings-min-tls-version`,`text`)).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-tls-1-3`,e=>d(e,`ssl-settings-tls-1-3`,`text`)).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).coerce(`ssl-type`,e=>d(e,`ssl-type`,`text`)).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).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 w={command:`create`,describe:`Create Custom Hostname`,builder:C,handler:async e=>o({command:`custom-hostnames create`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:d(e.hostname,`hostname`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]):c(e.body),sensitiveBodyPaths:[[`ssl`,`custom_key`]]});return}let o=e.body===void 0?void 0:c(e.body),p=await t(e),m=await n({zone:e.zone},p,{quiet:e.quiet});if(e.zoneId=m,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>p.send(S,{body:e,zone_id:m}));r(t,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await f(`hostname`,`The custom hostname that will point to your hostname via CNAME.`));let h=u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:d(e.hostname,`hostname`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]),g=await a(`Creating`,async()=>p.send(S,{body:h,zone_id:m}));r(g,{successLabel:`Created`})})};var T={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}`};function E(e){return e.usage(`$0 custom-hostnames delete <custom-hostname-id>
|
|
9
9
|
|
|
10
10
|
Permanently deletes a custom hostname and revokes any SSL certificates that were issued for it. This action cannot be undone.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const D={command:`delete <custom-hostname-id>`,describe:`Delete Custom Hostname (and any issued SSL certificates)`,builder:E,handler:async e=>o({command:`custom-hostnames delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(T,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`]}));r(c,{successLabel:`Deleted`})})};var O={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}`,body:`json`};function k(e){return e.usage(`$0 custom-hostnames edit <custom-hostname-id>
|
|
11
11
|
|
|
12
|
-
Modify SSL configuration for a custom hostname. When sent with SSL config that matches existing config, used to indicate that hostname should pass domain control validation (DCV). Can also be used to change validation type, e.g., from 'http' to 'email'. Bundle an existing certificate with another certificate by using the "custom_cert_bundle" field. The bundling process supports combining certificates as long as the following condition is met. One certificate must use the RSA algorithm, and the other must use the ECDSA algorithm.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-metadata`,{type:`string`,description:`Unique key/value metadata for this hostname. These are per-hostname (customer) settings. Provide as a JSON object or @path/to/file.json.`}).option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).coerce(`ssl-bundle-method`,e=>d(e,`ssl-bundle-method`,`text`)).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).coerce(`ssl-certificate-authority`,e=>d(e,`ssl-certificate-authority`,`text`)).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-cert-bundle`,{type:`string`,description:`Array of custom certificate and key pairs (1 or 2 pairs allowed). Provide as a JSON array of objects or @path/to/file.json.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).coerce(`ssl-method`,e=>d(e,`ssl-method`,`text`)).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-early-hints`,e=>d(e,`ssl-settings-early-hints`,`text`)).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-http2`,e=>d(e,`ssl-settings-http2`,`text`)).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`ssl-settings-min-tls-version`,e=>d(e,`ssl-settings-min-tls-version`,`text`)).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-tls-1-3`,e=>d(e,`ssl-settings-tls-1-3`,`text`)).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).coerce(`ssl-type`,e=>d(e,`ssl-type`,`text`)).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`edit <custom-hostname-id>`,describe:`Edit Custom Hostname`,builder:k,handler:async e=>o({command:`custom-hostnames edit`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]):c(e.body),sensitiveBodyPaths:[[`ssl`,`custom_key`]]});return}let o=await t(e),
|
|
12
|
+
Modify SSL configuration for a custom hostname. When sent with SSL config that matches existing config, used to indicate that hostname should pass domain control validation (DCV). Can also be used to change validation type, e.g., from 'http' to 'email'. Bundle an existing certificate with another certificate by using the "custom_cert_bundle" field. The bundling process supports combining certificates as long as the following condition is met. One certificate must use the RSA algorithm, and the other must use the ECDSA algorithm.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-metadata`,{type:`string`,description:`Unique key/value metadata for this hostname. These are per-hostname (customer) settings. Provide as a JSON object or @path/to/file.json.`}).option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).coerce(`ssl-bundle-method`,e=>d(e,`ssl-bundle-method`,`text`)).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).coerce(`ssl-certificate-authority`,e=>d(e,`ssl-certificate-authority`,`text`)).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-cert-bundle`,{type:`string`,description:`Array of custom certificate and key pairs (1 or 2 pairs allowed). Provide as a JSON array of objects or @path/to/file.json.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).coerce(`ssl-method`,e=>d(e,`ssl-method`,`text`)).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-early-hints`,e=>d(e,`ssl-settings-early-hints`,`text`)).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-http2`,e=>d(e,`ssl-settings-http2`,`text`)).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).coerce(`ssl-settings-min-tls-version`,e=>d(e,`ssl-settings-min-tls-version`,`text`)).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).coerce(`ssl-settings-tls-1-3`,e=>d(e,`ssl-settings-tls-1-3`,`text`)).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).coerce(`ssl-type`,e=>d(e,`ssl-type`,`text`)).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`edit <custom-hostname-id>`,describe:`Edit Custom Hostname`,builder:k,handler:async e=>o({command:`custom-hostnames edit`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]):c(e.body),sensitiveBodyPaths:[[`ssl`,`custom_key`]]});return}let o=e.body===void 0?void 0:c(e.body),f=await t(e),p=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>f.send(O,{body:t,zone_id:p,custom_hostname_id:e[`custom-hostname-id`]}));r(n,{successLabel:`Updated`});return}let m=u({custom_metadata:l(e[`custom-metadata`],`custom-metadata`),custom_origin_server:d(e[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:d(e[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:e[`ssl-bundle-method`],certificate_authority:e[`ssl-certificate-authority`],cloudflare_branding:e[`ssl-cloudflare-branding`],custom_cert_bundle:s(e[`ssl-custom-cert-bundle`],`ssl-custom-cert-bundle`),custom_certificate:d(e[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:d(e[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:d(e[`ssl-custom-key`],`ssl-custom-key`,`text`),method:e[`ssl-method`],settings:{ciphers:e[`ssl-settings-ciphers`],early_hints:e[`ssl-settings-early-hints`],http2:e[`ssl-settings-http2`],min_tls_version:e[`ssl-settings-min-tls-version`],tls_1_3:e[`ssl-settings-tls-1-3`]},type:e[`ssl-type`],wildcard:e[`ssl-wildcard`]}},[[`custom_metadata`]]),h=await a(`Updating`,async()=>f.send(O,{body:m,zone_id:p,custom_hostname_id:e[`custom-hostname-id`]}));r(h,{successLabel:`Updated`})})};var j={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/fallback_origin`};function M(e){return e.usage(`$0 custom-hostnames fallback-origin delete
|
|
13
13
|
|
|
14
14
|
Removes the fallback origin configuration for custom hostnames on a zone. Custom hostnames without specific origins will no longer have a fallback.`).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 N={command:`delete`,describe:`Delete Fallback Origin for Custom Hostnames`,builder:M,handler:async e=>o({command:`custom-hostnames fallback-origin delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(j,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var P={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/fallback_origin`};function F(e){return e.usage(`$0 custom-hostnames fallback-origin get
|
|
15
15
|
|
|
16
16
|
Retrieves the current fallback origin configuration for custom hostnames on a zone. The fallback origin handles traffic when specific custom hostname origins are unavailable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Get Fallback Origin for Custom Hostnames`,builder:F,handler:async e=>o({command:`custom-hostnames fallback-origin get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(P,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/fallback_origin`,body:`json`};function R(e){return e.usage(`$0 custom-hostnames fallback-origin update
|
|
17
17
|
|
|
18
|
-
Updates the fallback origin configuration for custom hostnames on a zone. Sets the default origin server for custom hostname traffic.`).option(`origin`,{type:`string`,description:`Your origin hostname that requests to your custom hostnames will be sent to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update`,describe:`Update Fallback Origin for Custom Hostnames`,builder:R,handler:async e=>o({command:`custom-hostnames fallback-origin update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({origin:d(e.origin,`origin`,`text`)}):c(e.body)});return}let o=await t(e),
|
|
18
|
+
Updates the fallback origin configuration for custom hostnames on a zone. Sets the default origin server for custom hostname traffic.`).option(`origin`,{type:`string`,description:`Your origin hostname that requests to your custom hostnames will be sent to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update`,describe:`Update Fallback Origin for Custom Hostnames`,builder:R,handler:async e=>o({command:`custom-hostnames fallback-origin update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames fallback-origin update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({origin:d(e.origin,`origin`,`text`)}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),l=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>s.send(L,{body:e,zone_id:l}));r(t,{successLabel:`Updated`});return}e.origin===void 0&&(e.origin=await f(`origin`,`Your origin hostname that requests to your custom hostnames will be sent to.`));let p=u({origin:d(e.origin,`origin`,`text`)}),m=await a(`Updating`,async()=>s.send(L,{body:p,zone_id:l}));r(m,{successLabel:`Updated`})})},B={command:`fallback-origin`,describe:`Operations for fallback-origin`,builder:e=>e.command(N).command(I).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}`};function H(e){return e.usage(`$0 custom-hostnames get <custom-hostname-id>
|
|
19
19
|
|
|
20
20
|
Retrieves detailed information about a specific custom hostname, including SSL certificate status, ownership verification, and origin configuration.`).positional(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <custom-hostname-id>`,describe:`Custom Hostname Details`,builder:H,handler:async e=>o({command:`custom-hostnames get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(V,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`]}));r(c,{successLabel:`Loaded`})})};var W={method:`GET`,path:t=>e`/zones/${t.zone_id}/custom_hostnames`,query:[`hostname`,`hostname.exact`,`hostname.startsWith`,`hostname.contain`,`id`,`page`,`per_page`,`order`,`direction`,`ssl_status`,`hostname_status`,`certificate_authority`,`wildcard`,`custom_origin_server`,`ssl`]};function G(e){return e.usage(`$0 custom-hostnames list
|
|
21
21
|
|
|
@@ -1,9 +1,9 @@
|
|
|
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,i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as u,t as d}from"./body-parser-DoewLePl.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-CEpZ-lQZ.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_ns`,body:`json`};function g(e){return e.usage(`$0 custom-nameservers create
|
|
3
3
|
|
|
4
4
|
Adds a custom nameserver to the account or zone for use as a vanity nameserver on zones.
|
|
5
5
|
|
|
6
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,default:1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Add account or zone Custom Nameserver`,builder:g,handler:async e=>l({command:`custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_ns`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({ns_name:f(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}):u(e.body)});return}let l=await n(e),
|
|
6
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,default:1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Add account or zone Custom Nameserver`,builder:g,handler:async e=>l({command:`custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_ns`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({ns_name:f(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}):u(e.body)});return}let l=e.body===void 0?void 0:u(e.body),m=await n(e),g=e.zone===void 0?`accounts`:`zones`,_=g===`zones`?await i({zone:e.zone},m,{quiet:e.quiet}):e.local?t:await a();if(g===`zones`?e.zoneId=_:e.accountId=_,e.body!==void 0){let e=l,t=await c(`Creating`,async()=>m.send(h,{body:e,account_or_zone:g,account_or_zone_id:_}));o(t,{successLabel:`Created`});return}e[`ns-name`]===void 0&&(e[`ns-name`]=await p(`ns-name`,`The FQDN of the name server.`));let v=d({ns_name:f(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}),y=await c(`Creating`,async()=>m.send(h,{body:v,account_or_zone:g,account_or_zone_id:_}));o(y,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/custom_ns/${t.custom_ns_id}`};function y(e){return e.usage(`$0 custom-nameservers delete <custom-ns-id>
|
|
7
7
|
|
|
8
8
|
Removes a custom nameserver from the account.`).positional(`custom-ns-id`,{type:`string`,description:`The FQDN of the name server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <custom-ns-id>`,describe:`Delete Account Custom Nameserver`,builder:y,handler:async e=>l({command:`custom-nameservers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf custom-nameservers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/custom_ns/${e[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(e[`custom-ns-id`]))}`,pathParams:{"custom-ns-id":String(e[`custom-ns-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await m({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(v,{account_id:l,custom_ns_id:e[`custom-ns-id`]}));o(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_ns`};function S(e){return e.usage(`$0 custom-nameservers get
|
|
9
9
|
|