cf 1.0.0-beta.26 → 1.0.0-beta.27
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 +1996 -3422
- package/dist/_meta/schemas.json +9249 -2339
- package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
- package/dist/{access-DCOOmDC5.mjs → access-BxEprr2f.mjs} +1 -1
- package/dist/{accounts-HC6XuIwP.mjs → accounts-DU2ZNYqP.mjs} +17 -11
- package/dist/{acm-DYgr6SAR.mjs → acm-CBCIKBJ4.mjs} +1 -1
- package/dist/{addressing-BS66pJ_a.mjs → addressing-BKxiLRHk.mjs} +1 -1
- package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
- package/dist/{ai-BiIKznNv.mjs → ai-DqEN_hhg.mjs} +2 -2
- package/dist/{ai-audit-DI4Rw2wl.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
- package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
- package/dist/ai-search-DbZIxdio.mjs +74 -0
- package/dist/{ai-security-BUwS6kVh.mjs → ai-security-CvZfP2JC.mjs} +1 -1
- package/dist/{alerting-BSzuvFk1.mjs → alerting-BjGwBxZT.mjs} +1 -1
- package/dist/{analytics-CQ-Yt1mm.mjs → analytics-C7kT_H-W.mjs} +4 -4
- package/dist/{analytics-engine-CdrY5-95.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
- package/dist/{api-security-BBxEJjGv.mjs → api-security-BbcvDtff.mjs} +2 -2
- package/dist/{argo-BiefH8wc.mjs → argo-D1VONzu-.mjs} +1 -1
- package/dist/{artifacts-B9g9aPrk.mjs → artifacts-2R2sxIKO.mjs} +1 -1
- package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
- package/dist/auth-CspwoBlp.mjs +2 -0
- package/dist/{auth-C50SqX9F.mjs → auth-D499YE2n.mjs} +3 -3
- package/dist/{auth-D5Yj9eYU.mjs → auth-FK2eLQ02.mjs} +1 -1
- package/dist/{auth-token-DvNoIhRL.mjs → auth-token-BwpERbnG.mjs} +1 -1
- package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-B2w-woU0.mjs} +36 -36
- package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
- package/dist/billing-DRNww0iC.mjs +24 -0
- package/dist/{blocks-DnNrvi8s.mjs → blocks-C8vyXIAT.mjs} +1 -1
- package/dist/body-unions-CjpNjwSW.mjs +2 -0
- package/dist/bot-management-fwxKIbaB.mjs +9 -0
- package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
- package/dist/{brand-protection-Byoa1hvj.mjs → brand-protection-BVICLzBc.mjs} +1 -1
- package/dist/browser-run-CEk-NIgP.mjs +40 -0
- package/dist/build-CRm2TQq8.mjs +2 -0
- package/dist/{build-Dwd1_7o0.mjs → build-DO_GNhRl.mjs} +1 -1
- package/dist/{builds-D3mAH87h.mjs → builds-CoazxuN-.mjs} +26 -26
- package/dist/{cache-0xCdyNg9.mjs → cache-jlLJLSu7.mjs} +1 -1
- package/dist/{cf-CpC4giTf.mjs → cf-hP0SOgC6.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
- package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
- package/dist/{cli-Cm4Twas4.mjs → cli-Nqf58-1c.mjs} +1 -1
- package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
- package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
- package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
- package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
- package/dist/{command-BV8-laJK.mjs → command-BASaTmJc.mjs} +1 -1
- package/dist/{command-CfOqnqlN.mjs → command-BiIVclNA.mjs} +1 -1
- package/dist/{command-BKNQsGqu.mjs → command-Bih1HLr3.mjs} +1 -1
- package/dist/{command-BVz2aES3.mjs → command-BxZBNPxG.mjs} +1 -1
- package/dist/{command-B-_ba4rQ.mjs → command-ByYf12-8.mjs} +1 -1
- package/dist/{command-Dn39o5xQ.mjs → command-C0qCuw03.mjs} +1 -1
- package/dist/{command-BsCFkho-.mjs → command-C2FVMd1b.mjs} +1 -1
- package/dist/{command--Y_QAiU2.mjs → command-C4OgtX_x.mjs} +1 -1
- package/dist/{command-DlI7Z_7j.mjs → command-C5Kqc5Km.mjs} +1 -1
- package/dist/{command-CQMRxiDz.mjs → command-CFxyp8Uo.mjs} +1 -1
- package/dist/{command-CN8NFLs2.mjs → command-CZAR85ba.mjs} +1 -1
- package/dist/{command-QHmV62Fv.mjs → command-CelQVrZL.mjs} +1 -1
- package/dist/{command-yOG9VUtq.mjs → command-CrAlzysj.mjs} +1 -1
- package/dist/{command-DsOv6z9q.mjs → command-pMoNdd22.mjs} +1 -1
- package/dist/{completions-BA52jTea.mjs → completions-DRzBiqpv.mjs} +1 -1
- package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
- package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
- package/dist/{connectors-D8H6rQz9.mjs → connectors-D1WFLJoE.mjs} +1 -1
- package/dist/{containers-Db-eWudu.mjs → containers-BOBEs1Gk.mjs} +4 -4
- package/dist/containers-DINLx5_i.mjs +380 -0
- package/dist/{content-scan-DUVq09i8.mjs → content-scan-D1GfPSL0.mjs} +1 -1
- package/dist/{context-BvLXzoMs.mjs → context-Dp4CXG22.mjs} +1 -1
- package/dist/{cps-CqaRliZZ.mjs → cps-D4uhzg3k.mjs} +1 -1
- package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
- package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
- package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
- package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
- package/dist/custom-pages-DAkKVzgR.mjs +38 -0
- package/dist/d1-CDIyRdh4.mjs +52 -0
- package/dist/{delegate-CMfEjvHn.mjs → delegate-B4bKqF7i.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-DDbmxkiX.mjs → deploy-BaC5Ty7F.mjs} +1 -1
- package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-DTTgNGro.mjs} +1 -1
- package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-mAy06fAI.mjs} +1 -1
- package/dist/{dev-BS156bim.mjs → dev-De-HszNT.mjs} +1 -1
- package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
- package/dist/{dist-DehXZozc.mjs → dist-D5qkmHhC.mjs} +1 -1
- package/dist/{dls-DciZC_gQ.mjs → dls-DWBiYzY1.mjs} +1 -1
- package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
- package/dist/{dns-C2YPspGN.mjs → dns-wMjf1t6-.mjs} +14 -8
- package/dist/{docs-CYjyBA8q.mjs → docs-BA7qslb2.mjs} +1 -1
- package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
- package/dist/{email-auth-CMCQAu99.mjs → email-auth-BShMFXn4.mjs} +1 -1
- package/dist/email-domains-CDSbVclP.mjs +14 -0
- package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CBCkbg_F.mjs} +4 -2
- package/dist/{email-security-Bu0fAYh-.mjs → email-security-CnNa1YON.mjs} +4 -4
- package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
- package/dist/{errors-C5RGao2J.mjs → errors-DatLr-iR.mjs} +1 -1
- package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
- package/dist/{firewall-CJ-VIOk1.mjs → firewall-CY_oem-d.mjs} +25 -9
- package/dist/{flagship-C5PTR1ND.mjs → flagship-Bat5EZCk.mjs} +1 -1
- package/dist/{fraud-B7hwBheX.mjs → fraud-CSUKLh8X.mjs} +2 -2
- package/dist/global-options-DiKj2cQy.mjs +2 -0
- package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
- package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-uC43QKQd.mjs} +1 -1
- package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
- package/dist/iam-8T74DNhH.mjs +62 -0
- package/dist/{images-Ttea4khD.mjs → images-C3JUaf6b.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-BeYrAg7Q.mjs → init-BEVVz4_P.mjs} +1 -1
- package/dist/{intel-CJznBf5n.mjs → intel-DRy4rHrt.mjs} +6 -7
- package/dist/{interactive-DsU8VDvK.mjs → interactive-CKHdGvkh.mjs} +1 -1
- package/dist/{internal-DOho_iA0.mjs → internal-CamuESs0.mjs} +1 -1
- package/dist/{ips-BgNoRwFN.mjs → ips-DinCNnWj.mjs} +1 -1
- package/dist/k2-wsanPL3y.mjs +10 -0
- package/dist/{kv-CTyuvcAz.mjs → kv-BLSPcEnH.mjs} +1 -1
- package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-WB1FOuew.mjs} +1 -1
- package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
- package/dist/{live-BfrWKfq8.mjs → live-B6AsI_E5.mjs} +1 -1
- package/dist/{load-balancers-DMTsh-9q.mjs → load-balancers-gap5u4b1.mjs} +19 -7
- package/dist/local-CFsO9Tkg.mjs +2 -0
- package/dist/{local-CvzO-cQH.mjs → local-CgBhtmON.mjs} +1 -1
- package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
- package/dist/{login-CVWkMh1L.mjs → login-BJHaTERg.mjs} +1 -1
- package/dist/login-BfuOf-Yi.mjs +2 -0
- package/dist/logpush-qhlxsioM.mjs +68 -0
- package/dist/{logs-BSyyNwso.mjs → logs-bI54CJ0w.mjs} +23 -7
- package/dist/{magic-network-monitoring-DRRvSrDP.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
- package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
- package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
- package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
- package/dist/{mcp-BUOfMkBP.mjs → mcp-CyI0sDmL.mjs} +3 -3
- package/dist/{mesh-B1RrhAT1.mjs → mesh-Czr0UCP4.mjs} +2 -2
- package/dist/{migrate-BTU8AvlP.mjs → migrate-DKDWYrz2.mjs} +1 -1
- package/dist/{monetization-Da3ooFLC.mjs → monetization-NUgfDtSy.mjs} +7 -3
- package/dist/{network-CjhSzhMm.mjs → network-B42zrBic.mjs} +1 -1
- package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
- package/dist/{o11y-DeNxXxcp.mjs → o11y-oEUpMC3O.mjs} +6 -6
- package/dist/{oauth-DdXkpU44.mjs → oauth-BLQ1-y3R.mjs} +1 -1
- package/dist/{oauth-Dnog5v-Q.mjs → oauth-BmSFLp_s.mjs} +1 -1
- package/dist/observability-BxhJQCgZ.mjs +4 -0
- package/dist/organization-CEnlXwrl.mjs +70 -0
- package/dist/{organizations-p8Mgo8A7.mjs → organizations-Dt86ToxE.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-Bwysyttf.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
- package/dist/package-CiRJBRHO.mjs +2 -0
- package/dist/{page-rules-D2eFbKWb.mjs → page-rules-J6LhwR-s.mjs} +1 -1
- package/dist/{pages-DYZDvWK6.mjs → pages-BksdnChs.mjs} +4 -4
- package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
- package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
- package/dist/{pipelines-D6pkhlpm.mjs → pipelines-B5AoB3f3.mjs} +5 -5
- package/dist/precursor-D3VH2MXT.mjs +4 -0
- package/dist/{previews-B1mqjXaJ.mjs → previews-DzJ85fsr.mjs} +1 -1
- package/dist/{progress-B-CVX0kn.mjs → progress-DLri-rA7.mjs} +1 -1
- package/dist/{prompt-DJF_Rs5S.mjs → prompt-D0dXwuME.mjs} +1 -1
- package/dist/{queues-DaqLO-UO.mjs → queues-BsAck4To.mjs} +5 -5
- package/dist/{r2-DDIU9JN3.mjs → r2-BYjdHDEZ.mjs} +38 -38
- package/dist/{radar-D59qCgld.mjs → radar-CvLtu-Vr.mjs} +1 -1
- package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
- package/dist/{ready-DgE08svD.mjs → ready-gsGEaWLL.mjs} +1 -1
- package/dist/{realtime-DWjdrDzv.mjs → realtime-DiCEgFTC.mjs} +81 -79
- package/dist/{registrar-uYOU1U27.mjs → registrar-D4wdgWpo.mjs} +8 -8
- package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
- package/dist/{reporting-Dx2YTick.mjs → reporting-BiHgnT8L.mjs} +1 -1
- package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-CoxHUNcB.mjs} +1 -1
- package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-817HTytF.mjs} +1 -1
- package/dist/{resource-sharing-CIsLVAcK.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
- package/dist/{rules-CjgLSlUC.mjs → rules-CRhe_ca9.mjs} +1 -1
- package/dist/rulesets-CKyc-Xlx.mjs +42 -0
- package/dist/{rum-vPEpMS_h.mjs → rum-BfnWHW_d.mjs} +1 -1
- package/dist/{run-BZ6Fj3jQ.mjs → run-Ciw_GIrC.mjs} +1 -1
- package/dist/run-DD45EQTm.mjs +2 -0
- package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
- package/dist/schema-flags-DrqvwQNw.mjs +4 -0
- package/dist/{scim-BA7XbsSu.mjs → scim-C4iRWNYB.mjs} +1 -1
- package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-DgtzZRze.mjs} +1 -1
- package/dist/security-insights-SlUGW3F_.mjs +62 -0
- package/dist/{security-txt-DikhnR2L.mjs → security-txt-C3YS0REz.mjs} +1 -1
- package/dist/{session-BOnam-Wv.mjs → session-D2yuwO4i.mjs} +1 -1
- package/dist/{shared-DmmWSObC.mjs → shared--uVkAAd7.mjs} +1 -1
- package/dist/{signed-url-C-24KbWB.mjs → signed-url-ClLk45_J.mjs} +1 -1
- package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
- package/dist/{snippets-Bi3Uq1DF.mjs → snippets-BNUKOajz.mjs} +1 -1
- package/dist/{spawn-C3hzWVrJ.mjs → spawn-DuT4snxu.mjs} +1 -1
- package/dist/{spectrum-BaWKMoAl.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
- package/dist/{speed-DShjlpAs.mjs → speed-BrVeZRyX.mjs} +1 -1
- package/dist/{sql-DCoFf15T.mjs → sql-BX1pBqj3.mjs} +2 -2
- package/dist/src-DPnUfK4c.mjs +131 -0
- package/dist/{ssl-C4nt4pJK.mjs → ssl-Bx4LCutF.mjs} +3 -3
- package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
- package/dist/startup-profile-tZNb2HGz.mjs +2 -0
- package/dist/{state-DmjHXZat.mjs → state-BmzOLELo.mjs} +1 -1
- package/dist/state-Uwfrmw5I.mjs +2 -0
- package/dist/{stream-CpZbnSpH.mjs → stream-BRzr6yh0.mjs} +1 -1
- package/dist/{tags-BIjQ3Kjh.mjs → tags-xVzjZxdt.mjs} +11 -5
- package/dist/{telemetry-BDhqOpUw.mjs → telemetry-CJ9URio3.mjs} +1 -1
- package/dist/telemetry-Pt5GpCKD.mjs +2 -0
- package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
- package/dist/{tunnels-CXAO2CeL.mjs → tunnels-DQVXKUKA.mjs} +3 -3
- package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-B_Ugzgom.mjs} +1 -1
- package/dist/ui-FYultowZ.mjs +2 -0
- package/dist/{update-check-D_Wtw0_D.mjs → update-check-DHUo4FOJ.mjs} +1 -1
- package/dist/{update-check-Dc7cRFlx.mjs → update-check-DRr0eRhB.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
- package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BH4PLy16.mjs} +1 -1
- package/dist/{user-BaF0qvvO.mjs → user-Bn82Qw0Y.mjs} +10 -12
- package/dist/{vectorize-D5qiggZU.mjs → vectorize-DoVVz_sh.mjs} +1 -1
- package/dist/version-Zr2oF8mY.mjs +2 -0
- package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
- package/dist/{web-assets-BySw_Tme.mjs → web-assets-CgQXsp8m.mjs} +2 -2
- package/dist/{web3-BKkKf1RF.mjs → web3-TY9s6Swn.mjs} +3 -3
- package/dist/workers-B3uJqJKc.mjs +39 -0
- package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
- package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
- package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
- package/dist/{workflows-Cr957c4U.mjs → workflows-6m85DdqF.mjs} +7 -7
- package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
- package/dist/{zaraz-C8__FhOh.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
- package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
- package/dist/{zones-BzyjOT10.mjs → zones-DTAcguf6.mjs} +3 -3
- package/package.json +14 -14
- package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
- package/dist/ai-search-QOenIzDL.mjs +0 -74
- package/dist/auth-Czzy5Rs_.mjs +0 -2
- package/dist/billing-BrLJqlOf.mjs +0 -22
- package/dist/bot-management-BSBVuKc0.mjs +0 -9
- package/dist/browser-run-BSVANGzU.mjs +0 -40
- package/dist/build-CPKxZ3kL.mjs +0 -2
- package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
- package/dist/containers-D4sa-Eoy.mjs +0 -380
- package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
- package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
- package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
- package/dist/d1-BsWI546w.mjs +0 -89
- package/dist/email-domains-1Nx60ETD.mjs +0 -12
- package/dist/iam-DuZenYtc.mjs +0 -48
- package/dist/k2-Cj1ORHul.mjs +0 -10
- package/dist/local-CWTti4ot.mjs +0 -2
- package/dist/login-Djz5mvHJ.mjs +0 -2
- package/dist/logpush-OMhp7VgE.mjs +0 -44
- package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
- package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
- package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
- package/dist/organization-IsxVyWol.mjs +0 -73
- package/dist/package-BOE_De2L.mjs +0 -2
- package/dist/precursor-B35P8h6h.mjs +0 -4
- package/dist/rulesets-C7_aZA7m.mjs +0 -34
- package/dist/run-D4-K_cbQ.mjs +0 -2
- package/dist/schema-flags-Cr6kleor.mjs +0 -4
- package/dist/security-insights-ZKtey62s.mjs +0 -40
- package/dist/src-jyCTFHcS.mjs +0 -131
- package/dist/startup-profile-D_Qjgca1.mjs +0 -2
- package/dist/state-C7lNNN31.mjs +0 -2
- package/dist/telemetry-BZdRnr26.mjs +0 -2
- package/dist/tenant-CqYoylyU.mjs +0 -10
- package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
- package/dist/ui-BUCBQ3Sq.mjs +0 -2
- package/dist/version-DNcdABcr.mjs +0 -2
- package/dist/workers-TS0oQ-XH.mjs +0 -39
- package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,i,t as a}from"./context-BvLXzoMs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-B-CVX0kn.mjs";import{t as l}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as u,r as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-DJF_Rs5S.mjs";var g={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/fields`};function _(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
|
|
3
|
-
|
|
4
|
-
Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <dataset-id>`,describe:`List fields`,builder:_,handler:async e=>l({command:`logpush account-datasets fields get`,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 logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/fields`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(g,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));o(f,{successLabel:`Loaded`})})},v={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/jobs`};function b(e){return e.usage(`$0 logpush account-datasets jobs get <dataset-id>
|
|
5
|
-
|
|
6
|
-
Lists Logpush jobs for an account or zone for a dataset.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <dataset-id>`,describe:`List Logpush jobs for a dataset`,builder:b,handler:async e=>l({command:`logpush account-datasets jobs get`,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 logpush account-datasets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/jobs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(y,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));o(f,{successLabel:`Loaded`})})},S={command:`jobs`,describe:`Operations for account-datasets.jobs`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},te={command:`account-datasets`,describe:`Operations for account-datasets`,builder:e=>e.command(v).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/jobs`,body:`json`};function ne(e){return e.usage(`$0 logpush account-jobs create
|
|
7
|
-
|
|
8
|
-
Creates a new Logpush job for an account or zone.`).option(`dataset`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,choices:/* @__PURE__ */ `access_requests.account_abuse_protection_events.ai_gateway_events.audit_logs.audit_logs_v2.biso_user_actions.casb_findings.device_posture_results.dex_application_tests.dex_device_state_events.dlp_forensic_copies.dns_firewall_logs.dns_logs.email_security_alerts.email_security_post_delivery_events.firewall_events.gateway_dns.gateway_http.gateway_network.http_requests.ipsec_logs.magic_bgp_logs.magic_ids_detections.mcp_portal_logs.mnm_flow_logs.nel_reports.network_analytics_logs.page_shield_events.sinkhole_http_logs.spectrum_events.ssh_logs.turnstile_events.warp_config_changes.warp_toggle_changes.websocket_analytics.workers_trace_events.zaraz_events.zero_trust_network_sessions`.split(`.`),default:`http_requests`}).coerce(`dataset`,e=>p(e,`dataset`,`text`)).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`,default:!1}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets.",default:!1}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`],default:`high`}).coerce(`frequency`,e=>p(e,`frequency`,`text`)).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`],default:``}).coerce(`kind`,e=>p(e,`kind`,`text`)).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`max-upload-bytes`,{type:`number`,description:"The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size."}).option(`max-upload-interval-seconds`,{type:`number`,description:"The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this."}).option(`max-upload-records`,{type:`number`,description:"The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).coerce(`output-options-output-type`,e=>p(e,`output-options-output-type`,`text`)).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).coerce(`output-options-timestamp-format`,e=>p(e,`output-options-timestamp-format`,`text`)).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`create`,describe:`Create Logpush job`,builder:ne,handler:async e=>l({command:`logpush account-jobs create`,classification:{safeFlags:[`dataset`,`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`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 logpush account-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/jobs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({dataset:e.dataset,destination_conf:p(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:p(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`],frequency:e.frequency,kind:e.kind,logpull_options:p(e[`logpull-options`],`logpull-options`,`text`),max_upload_bytes:e[`max-upload-bytes`],max_upload_interval_seconds:e[`max-upload-interval-seconds`],max_upload_records:e[`max-upload-records`],name:p(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:p(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:p(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:p(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:e[`output-options-output-type`],record_delimiter:p(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:p(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:p(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:p(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:e[`output-options-timestamp-format`]},ownership_challenge:p(e[`ownership-challenge`],`ownership-challenge`,`text`)}):u(e.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let l=await n(e),d=e.zone===void 0?`accounts`:`zones`,h=d===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(d===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(C,{body:t,account_or_zone:d,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await m(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=f({dataset:e.dataset,destination_conf:p(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:p(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`],frequency:e.frequency,kind:e.kind,logpull_options:p(e[`logpull-options`],`logpull-options`,`text`),max_upload_bytes:e[`max-upload-bytes`],max_upload_interval_seconds:e[`max-upload-interval-seconds`],max_upload_records:e[`max-upload-records`],name:p(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:p(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:p(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:p(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:e[`output-options-output-type`],record_delimiter:p(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:p(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:p(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:p(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:e[`output-options-timestamp-format`]},ownership_challenge:p(e[`ownership-challenge`],`ownership-challenge`,`text`)}),_=await c(`Creating`,async()=>l.send(C,{body:g,account_or_zone:d,account_or_zone_id:h}));o(_,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/jobs/${t.job_id}`};function ae(e){return e.usage(`$0 logpush account-jobs delete <job-id>
|
|
9
|
-
|
|
10
|
-
Deletes a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const oe={command:`delete <job-id>`,describe:`Delete Logpush job`,builder:ae,handler:async e=>l({command:`logpush account-jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 logpush account-jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await h({force:!!e.force,message:`This operation deletes the Logpush job.`}))return;let f=await c(`Deleting`,async()=>l.send(ie,{account_or_zone:u,account_or_zone_id:d,job_id:e[`job-id`]}));o(f,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/jobs/${t.job_id}`};function T(e){return e.usage(`$0 logpush account-jobs get <job-id>
|
|
11
|
-
|
|
12
|
-
Gets the details of a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <job-id>`,describe:`Get Logpush job details`,builder:T,handler:async e=>l({command:`logpush account-jobs get`,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 logpush account-jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(w,{account_or_zone:u,account_or_zone_id:d,job_id:e[`job-id`]}));o(f,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/jobs`};function O(e){return e.usage(`$0 logpush account-jobs list
|
|
13
|
-
|
|
14
|
-
Lists Logpush jobs for an account or zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List Logpush jobs`,builder:O,handler:async e=>l({command:`logpush account-jobs list`,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 logpush account-jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/jobs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(D,{account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})};var A={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/jobs/${t.job_id}`,body:`json`};function j(e){return e.usage(`$0 logpush account-jobs update <job-id>
|
|
15
|
-
|
|
16
|
-
Updates a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets."}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`]}).coerce(`frequency`,e=>p(e,`frequency`,`text`)).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`]}).coerce(`kind`,e=>p(e,`kind`,`text`)).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`max-upload-bytes`,{type:`number`,description:"The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size."}).option(`max-upload-interval-seconds`,{type:`number`,description:"The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this."}).option(`max-upload-records`,{type:`number`,description:"The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).coerce(`output-options-output-type`,e=>p(e,`output-options-output-type`,`text`)).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).coerce(`output-options-timestamp-format`,e=>p(e,`output-options-timestamp-format`,`text`)).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`update <job-id>`,describe:`Update Logpush job`,builder:j,handler:async e=>l({command:`logpush account-jobs update`,classification:{safeFlags:[`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`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 logpush account-jobs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"job-id":String(e[`job-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:p(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`],frequency:e.frequency,kind:e.kind,logpull_options:p(e[`logpull-options`],`logpull-options`,`text`),max_upload_bytes:e[`max-upload-bytes`],max_upload_interval_seconds:e[`max-upload-interval-seconds`],max_upload_records:e[`max-upload-records`],name:p(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:p(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:p(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:p(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:e[`output-options-output-type`],record_delimiter:p(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:p(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:p(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:p(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:e[`output-options-timestamp-format`]},ownership_challenge:p(e[`ownership-challenge`],`ownership-challenge`,`text`)}):u(e.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let l=await n(e),d=e.zone===void 0?`accounts`:`zones`,m=d===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(d===`zones`?e.zoneId=m:e.accountId=m,e.body){let t=u(e.body),n=await c(`Updating`,async()=>l.send(A,{body:t,account_or_zone:d,account_or_zone_id:m,job_id:e[`job-id`]}));o(n,{successLabel:`Updated`});return}let h=f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:p(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`],frequency:e.frequency,kind:e.kind,logpull_options:p(e[`logpull-options`],`logpull-options`,`text`),max_upload_bytes:e[`max-upload-bytes`],max_upload_interval_seconds:e[`max-upload-interval-seconds`],max_upload_records:e[`max-upload-records`],name:p(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:p(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:p(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:p(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:e[`output-options-output-type`],record_delimiter:p(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:p(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:p(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:p(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:e[`output-options-timestamp-format`]},ownership_challenge:p(e[`ownership-challenge`],`ownership-challenge`,`text`)}),g=await c(`Updating`,async()=>l.send(A,{body:h,account_or_zone:d,account_or_zone_id:m,job_id:e[`job-id`]}));o(g,{successLabel:`Updated`})})},N={command:`account-jobs`,describe:`Operations for account-jobs`,builder:e=>e.command(re).command(oe).command(E).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/ownership`,body:`json`};function F(e){return e.usage(`$0 logpush account-ownership create
|
|
17
|
-
|
|
18
|
-
Gets a new ownership challenge sent to your destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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 I={command:`create`,describe:`Get ownership challenge`,builder:F,handler:async e=>l({command:`logpush account-ownership 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 logpush account-ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/ownership`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`)}):u(e.body),sensitiveBodyPaths:[[`destination_conf`]]});return}let l=await n(e),d=e.zone===void 0?`accounts`:`zones`,h=d===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(d===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(P,{body:t,account_or_zone:d,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await m(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`)}),_=await c(`Creating`,async()=>l.send(P,{body:g,account_or_zone:d,account_or_zone_id:h}));o(_,{successLabel:`Created`})})};var L={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/ownership/validate`,body:`json`};function R(e){return e.usage(`$0 logpush account-ownership validate create
|
|
19
|
-
|
|
20
|
-
Validates ownership challenge of the destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`create`,describe:`Validate ownership challenge`,builder:R,handler:async e=>l({command:`logpush account-ownership validate 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 logpush account-ownership validate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/ownership/validate`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:p(e[`ownership-challenge`],`ownership-challenge`,`text`)}):u(e.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let l=await n(e),d=e.zone===void 0?`accounts`:`zones`,h=d===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(d===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(L,{body:t,account_or_zone:d,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await m(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`})),e[`ownership-challenge`]===void 0&&(e[`ownership-challenge`]=await m(`ownership-challenge`,`Ownership challenge token to prove destination ownership.`,{kind:`secret`}));let g=f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:p(e[`ownership-challenge`],`ownership-challenge`,`text`)}),_=await c(`Creating`,async()=>l.send(L,{body:g,account_or_zone:d,account_or_zone_id:h}));o(_,{successLabel:`Created`})})},B={command:`validate`,describe:`Operations for account-ownership.validate`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`account-ownership`,describe:`Operations for account-ownership`,builder:e=>e.command(I).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/validate/destination/exists`,body:`json`};function U(e){return e.usage(`$0 logpush account-validate destination-exists-delete
|
|
21
|
-
|
|
22
|
-
Checks if there is an existing job with a destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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:`destination-exists-delete`,describe:`Check destination exists`,builder:U,handler:async e=>l({command:`logpush account-validate destination-exists-delete`,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 logpush account-validate destination-exists-delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/validate/destination/exists`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`)}):u(e.body),sensitiveBodyPaths:[[`destination_conf`]]});return}let l=await n(e),d=e.zone===void 0?`accounts`:`zones`,h=d===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(d===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(H,{body:t,account_or_zone:d,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await m(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`)}),_=await c(`Creating`,async()=>l.send(H,{body:g,account_or_zone:d,account_or_zone_id:h}));o(_,{successLabel:`Created`})})};var G={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/validate/destination`,body:`json`};function K(e){return e.usage(`$0 logpush account-validate destination delete
|
|
23
|
-
|
|
24
|
-
Validates destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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 q={command:`delete`,describe:`Validate destination`,builder:K,handler:async e=>l({command:`logpush account-validate destination delete`,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 logpush account-validate destination delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/validate/destination`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`)}):u(e.body),sensitiveBodyPaths:[[`destination_conf`]]});return}let l=await n(e),d=e.zone===void 0?`accounts`:`zones`,h=d===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(d===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(G,{body:t,account_or_zone:d,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await m(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=f({destination_conf:p(e[`destination-conf`],`destination-conf`,`text`)}),_=await c(`Creating`,async()=>l.send(G,{body:g,account_or_zone:d,account_or_zone_id:h}));o(_,{successLabel:`Created`})})},se={command:`destination`,describe:`Operations for account-validate.destination`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/validate/origin`,body:`json`};function ce(e){return e.usage(`$0 logpush account-validate origin create
|
|
25
|
-
|
|
26
|
-
Validates logpull origin with logpull_options.`).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).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 le={command:`create`,describe:`Validate origin`,builder:ce,handler:async e=>l({command:`logpush account-validate origin 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 logpush account-validate origin create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logpush/validate/origin`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({logpull_options:p(e[`logpull-options`],`logpull-options`,`text`)}):u(e.body)});return}let l=await n(e),d=e.zone===void 0?`accounts`:`zones`,h=d===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(d===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(J,{body:t,account_or_zone:d,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e[`logpull-options`]===void 0&&(e[`logpull-options`]=await m(`logpull-options`,"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."));let g=f({logpull_options:p(e[`logpull-options`],`logpull-options`,`text`)}),_=await c(`Creating`,async()=>l.send(J,{body:g,account_or_zone:d,account_or_zone_id:h}));o(_,{successLabel:`Created`})})},ue={command:`origin`,describe:`Operations for account-validate.origin`,builder:e=>e.command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},de={command:`account-validate`,describe:`Operations for account-validate`,builder:e=>e.command(W).command(se).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:t=>e`/zones/${t.zone_id}/logpush/edge/jobs`,body:`json`};function fe(e){return e.usage(`$0 logpush edge create
|
|
27
|
-
|
|
28
|
-
Creates a new Instant Logs job for a zone.`).option(`fields`,{type:`string`,description:`Comma-separated list of fields.`}).option(`filter`,{type:`string`,description:`Filters to drill down into specific events.`}).option(`sample`,{type:`number`,description:`The sample parameter is the sample rate of the records set by the client: "sample": 1 is 100% of records "sample": 10 is 10% and so on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pe={command:`create`,describe:`Create Instant Logs job`,builder:fe,handler:async e=>l({command:`logpush edge create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf logpush edge create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/edge/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({fields:p(e.fields,`fields`,`text`),filter:p(e.filter,`filter`,`text`),sample:e.sample}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Creating`,async()=>t.send(Y,{body:n,zone_id:r}));o(i,{successLabel:`Created`});return}let a=f({fields:p(e.fields,`fields`,`text`),filter:p(e.filter,`filter`,`text`),sample:e.sample}),l=await c(`Creating`,async()=>t.send(Y,{body:a,zone_id:r}));o(l,{successLabel:`Created`})})};var me={method:`GET`,path:t=>e`/zones/${t.zone_id}/logpush/edge/jobs`};function he(e){return e.usage(`$0 logpush edge get
|
|
29
|
-
|
|
30
|
-
Lists Instant Logs jobs for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`get`,describe:`List Instant Logs jobs`,builder:he,handler:async e=>l({command:`logpush edge get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf logpush edge get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/edge/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(me,{zone_id:r}));o(a,{successLabel:`Loaded`})})},_e={command:`edge`,describe:`Operations for edge`,builder:e=>e.command(pe).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/logpush/transformers/${t.transformer_id}/content`,query:[`version_id`]};function ye(e){return e.usage(`$0 logpush transformers content get <transformer-id>
|
|
31
|
-
|
|
32
|
-
Returns the SQL query content for a transformer. Without query params, returns the latest version. With \`version_id\`, returns the specified version.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`version-id`,{type:`number`,description:`Specific version ID to retrieve. When omitted, the latest version is returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`get <transformer-id>`,describe:`Get transformer content`,builder:ye,handler:async e=>l({command:`logpush transformers content get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={version_id:e[`version-id`]};if(e.dryRun){let t=await r();s({command:`cf logpush transformers content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers/${e[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(e[`transformer-id`]))}/content`,pathParams:{"transformer-id":String(e[`transformer-id`]??``)},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ve,{account_id:u,transformer_id:e[`transformer-id`],...i}));o(d,{successLabel:`Loaded`})})},xe={command:`content`,describe:`Operations for transformers.content`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/logpush/transformers`,body:`json`};function Se(e){return e.usage(`$0 logpush transformers create
|
|
33
|
-
|
|
34
|
-
Creates a new custom log transformer for an account.`).option(`code`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`description`,{type:`string`,description:`Optional customer-provided description.`}).option(`name`,{type:`string`,description:`Customer-provided name for identification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ce={command:`create`,describe:`Create transformer`,builder:Se,handler:async e=>l({command:`logpush transformers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf logpush transformers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({code:p(e.code,`code`,`text`),description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}):u(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),n=await c(`Creating`,async()=>i.send(X,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.code===void 0&&(e.code=await m(`code`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`)),e.name===void 0&&(e.name=await m(`name`,`Customer-provided name for identification.`));let d=f({code:p(e.code,`code`,`text`),description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}),h=await c(`Creating`,async()=>i.send(X,{body:d,account_id:l}));o(h,{successLabel:`Created`})})};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/logpush/transformers/${t.transformer_id}`,errors:{409:`ConflictError`}};function Te(e){return e.usage(`$0 logpush transformers delete <transformer-id>
|
|
35
|
-
|
|
36
|
-
Deletes a custom log transformer. Returns 409 Conflict if any active logpush jobs reference the transformer.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ee={command:`delete <transformer-id>`,describe:`Delete transformer`,builder:Te,handler:async e=>l({command:`logpush transformers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf logpush transformers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers/${e[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(e[`transformer-id`]))}`,pathParams:{"transformer-id":String(e[`transformer-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(we,{account_id:l,transformer_id:e[`transformer-id`]}));o(u,{successLabel:`Deleted`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/logpush/transformers/${t.transformer_id}`};function Oe(e){return e.usage(`$0 logpush transformers get <transformer-id>
|
|
37
|
-
|
|
38
|
-
Gets a single custom log transformer by ID.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`get <transformer-id>`,describe:`Get transformer`,builder:Oe,handler:async e=>l({command:`logpush transformers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf logpush transformers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers/${e[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(e[`transformer-id`]))}`,pathParams:{"transformer-id":String(e[`transformer-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(De,{account_id:l,transformer_id:e[`transformer-id`]}));o(u,{successLabel:`Loaded`})})};var Ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/logpush/transformers`};function je(e){return e.usage(`$0 logpush transformers list
|
|
39
|
-
|
|
40
|
-
Lists all custom log transformers for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`list`,describe:`List transformers`,builder:je,handler:async e=>l({command:`logpush transformers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf logpush transformers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(Ae,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/logpush/transformers/preview`,body:`json`};function Ne(e){return e.usage(`$0 logpush transformers preview
|
|
41
|
-
|
|
42
|
-
Executes a SQL transformer against a single input record and returns the transformed output. This is a stateless endpoint — nothing is persisted.`).option(`input`,{type:`string`,description:`A single log record to transform (JSON object). Provide as a JSON object or @path/to/file.json.`}).option(`sql`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pe={command:`preview`,describe:`Preview transformer`,builder:Ne,handler:async e=>l({command:`logpush transformers preview`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf logpush transformers preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers/preview`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({input:d(e.input,`input`,!0),sql:p(e.sql,`sql`,`text`)},[[`input`]]):u(e.body,[{path:[`input`],flag:`input`}])});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body,[{path:[`input`],flag:`input`}]),n=await c(`Loading`,async()=>i.send(Z,{body:t,account_id:l}));o(n,{successLabel:`Loaded`});return}if(e.input===void 0)throw Error(`--input is required (or pass --body with this field set).`);e.sql===void 0&&(e.sql=await m(`sql`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`));let h=f({input:d(e.input,`input`,!0),sql:p(e.sql,`sql`,`text`)},[[`input`]]),g=await c(`Loading`,async()=>i.send(Z,{body:h,account_id:l}));o(g,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/logpush/transformers/${t.transformer_id}`,body:`json`};function Fe(e){return e.usage("$0 logpush transformers update <transformer-id>\n\nUpdates an existing custom log transformer. When `code` is provided, the SQL query is validated and a new version is created. When `code` is omitted, only the name and description are updated. Omitting `description` clears the existing description.").positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`code`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`description`,{type:`string`,description:`Optional customer-provided description.`}).option(`name`,{type:`string`,description:`Customer-provided name for identification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ie={command:`update <transformer-id>`,describe:`Update transformer`,builder:Fe,handler:async e=>l({command:`logpush transformers update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf logpush transformers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers/${e[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(e[`transformer-id`]))}`,pathParams:{"transformer-id":String(e[`transformer-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({code:p(e.code,`code`,`text`),description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}):u(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),n=await c(`Updating`,async()=>i.send(Q,{body:t,account_id:l,transformer_id:e[`transformer-id`]}));o(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await m(`name`,`Customer-provided name for identification.`));let d=f({code:p(e.code,`code`,`text`),description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}),h=await c(`Updating`,async()=>i.send(Q,{body:d,account_id:l,transformer_id:e[`transformer-id`]}));o(h,{successLabel:`Updated`})})};var Le={method:`GET`,path:t=>e`/accounts/${t.account_id}/logpush/transformers/${t.transformer_id}/versions`,query:[`limit`]};function $(e){return e.usage(`$0 logpush transformers versions list
|
|
43
|
-
|
|
44
|
-
Returns version metadata for a transformer, newest first. Each version corresponds to a SQL query update.`).option(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Maximum number of versions to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Re={command:`list`,describe:`List transformer versions`,builder:$,handler:async e=>l({command:`logpush transformers versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={limit:e.limit};if(e.dryRun){let t=await r();s({command:`cf logpush transformers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/logpush/transformers/${e[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(e[`transformer-id`]))}/versions`,pathParams:{"transformer-id":String(e[`transformer-id`]??``)},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Le,{account_id:u,transformer_id:e[`transformer-id`],...i}));o(d,{successLabel:`Loaded`})})},ze={command:`versions`,describe:`Operations for transformers.versions`,builder:e=>e.command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Be={command:`transformers`,describe:`Operations for transformers`,builder:e=>e.command(Ce).command(Ee).command(ke).command(Me).command(Pe).command(Ie).command(xe).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ve={command:`logpush`,describe:`logpush`,builder:e=>e.command(te).command(N).command(V).command(de).command(_e).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ve as default};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{i as n,n as r}from"./auth-D5Yj9eYU.mjs";import{a as i,t as a}from"./context-BvLXzoMs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-B-CVX0kn.mjs";import{t as l}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as u,s as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-DJF_Rs5S.mjs";import{n as _,t as v}from"./raw-fetch-BrOxDN9k.mjs";function y(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
|
|
3
|
-
|
|
4
|
-
Create a new Catalog Sync (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`description`,{type:`string`,description:`The description field`}).option(`destination-type`,{type:`string`,description:`The destination_type field`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).coerce(`destination-type`,e=>p(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>p(e,`update-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`create`,describe:`Create Catalog Sync`,builder:y,handler:async e=>l({command:`magic-cloud-networking catalog-syncs create`,classification:{safeFlags:[`destination-type`,`update-mode`,`dry-run`]}},e,async()=>{let l={};if(e.forwarded!==void 0&&(l.forwarded=String(e.forwarded)),e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),destination_type:e[`destination-type`],name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}):u(e.body)});return}let g=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`destination-type`]===void 0&&(e[`destination-type`]=await h(`destination-type`,`The destination_type field`,[`NONE`,`ZERO_TRUST_LIST`])),e.name===void 0&&(e.name=await m(`name`,`The name field`)),e[`update-mode`]===void 0&&(e[`update-mode`]=await h(`update-mode`,`The update_mode field`,[`AUTO`,`MANUAL`]));let v={};e.description!==void 0&&d(v,[`description`],p(e.description,`description`,`text`)),e[`destination-type`]!==void 0&&d(v,[`destination_type`],e[`destination-type`]),e.name!==void 0&&d(v,[`name`],p(e.name,`name`,`text`)),e.policy!==void 0&&d(v,[`policy`],p(e.policy,`policy`,`text`)),e[`update-mode`]!==void 0&&d(v,[`update_mode`],e[`update-mode`]);let y=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}`,query:[`delete_destination`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function te(e){return e.usage(`$0 magic-cloud-networking catalog-syncs delete <sync-id>
|
|
5
|
-
|
|
6
|
-
Delete a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`delete-destination`,{type:`boolean`,description:`Delete destination`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`delete <sync-id>`,describe:`Delete Catalog Sync`,builder:te,handler:async e=>l({command:`magic-cloud-networking catalog-syncs delete`,classification:{safeFlags:[`delete-destination`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={delete_destination:e[`delete-destination`]};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}`,pathParams:{"sync-id":String(e[`sync-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await g({force:!!e.force}))return;let d=await c(`Deleting`,async()=>l.send(b,{account_id:u,sync_id:e[`sync-id`],...n}));o(d,{successLabel:`Deleted`})})};var x={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function re(e){return e.usage(`$0 magic-cloud-networking catalog-syncs edit <sync-id>
|
|
7
|
-
|
|
8
|
-
Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>p(e,`update-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`edit <sync-id>`,describe:`Patch Catalog Sync`,builder:re,handler:async e=>l({command:`magic-cloud-networking catalog-syncs edit`,classification:{safeFlags:[`update-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}`,pathParams:{"sync-id":String(e[`sync-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(x,{body:t,account_id:l,sync_id:e[`sync-id`]}));o(r,{successLabel:`Updated`});return}let d=f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}),m=await c(`Updating`,async()=>n.send(x,{body:d,account_id:l,sync_id:e[`sync-id`]}));o(m,{successLabel:`Updated`})})};var ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function oe(e){return e.usage(`$0 magic-cloud-networking catalog-syncs get <sync-id>
|
|
9
|
-
|
|
10
|
-
Read a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <sync-id>`,describe:`Read Catalog Sync`,builder:oe,handler:async e=>l({command:`magic-cloud-networking catalog-syncs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}`,pathParams:{"sync-id":String(e[`sync-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ae,{account_id:l,sync_id:e[`sync-id`]}));o(u,{successLabel:`Loaded`})})};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 magic-cloud-networking catalog-syncs list
|
|
11
|
-
|
|
12
|
-
List Catalog Syncs (Closed Beta).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List Catalog Syncs`,builder:S,handler:async e=>l({command:`magic-cloud-networking catalog-syncs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking catalog-syncs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ce,{account_id:l}));o(u,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/prebuilt-policies`,query:[`destination_type`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 magic-cloud-networking catalog-syncs prebuilt-policies list
|
|
13
|
-
|
|
14
|
-
List prebuilt catalog sync policies (Closed Beta).`).option(`destination-type`,{type:`string`,description:`Specify type of destination, omit to return all.`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Prebuilt Policies`,builder:T,handler:async e=>l({command:`magic-cloud-networking catalog-syncs prebuilt-policies list`,classification:{safeFlags:[`destination-type`,`dry-run`]}},e,async()=>{let n={destination_type:e[`destination-type`]};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking catalog-syncs prebuilt-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs/prebuilt-policies`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(w,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},D={command:`prebuilt-policies`,describe:`Operations for catalog-syncs.prebuilt-policies`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}/refresh`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function k(e){return e.usage(`$0 magic-cloud-networking catalog-syncs refresh <sync-id>
|
|
15
|
-
|
|
16
|
-
Refresh a Catalog Sync's destination by running the sync policy against latest resource catalog (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`refresh <sync-id>`,describe:`Run Catalog Sync`,builder:k,handler:async e=>l({command:`magic-cloud-networking catalog-syncs refresh`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs refresh`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}/refresh`,pathParams:{"sync-id":String(e[`sync-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(O,{account_id:l,sync_id:e[`sync-id`]}));o(u,{successLabel:`Created`})})};var j={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function M(e){return e.usage(`$0 magic-cloud-networking catalog-syncs update <sync-id>
|
|
17
|
-
|
|
18
|
-
Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>p(e,`update-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`update <sync-id>`,describe:`Update Catalog Sync`,builder:M,handler:async e=>l({command:`magic-cloud-networking catalog-syncs update`,classification:{safeFlags:[`update-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}`,pathParams:{"sync-id":String(e[`sync-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(j,{body:t,account_id:l,sync_id:e[`sync-id`]}));o(r,{successLabel:`Updated`});return}let d=f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}),m=await c(`Updating`,async()=>n.send(j,{body:d,account_id:l,sync_id:e[`sync-id`]}));o(m,{successLabel:`Updated`})})},P={command:`catalog-syncs`,describe:`Operations for catalog-syncs`,builder:e=>e.command(ee).command(ne).command(ie).command(se).command(C).command(A).command(N).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 magic-cloud-networking cloud-integrations create
|
|
19
|
-
|
|
20
|
-
Create a new Cloud Integration (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`]}).coerce(`cloud-type`,e=>p(e,`cloud-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`create`,describe:`Create Cloud Integration`,builder:F,handler:async e=>l({command:`magic-cloud-networking cloud-integrations create`,classification:{safeFlags:[`cloud-type`,`dry-run`]}},e,async()=>{let l={};if(e.forwarded!==void 0&&(l.forwarded=String(e.forwarded)),e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({cloud_type:e[`cloud-type`],description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`)}):u(e.body)});return}let g=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloud-type`]===void 0&&(e[`cloud-type`]=await h(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`])),e[`friendly-name`]===void 0&&(e[`friendly-name`]=await m(`friendly-name`,`The friendly_name field`));let v={};e[`cloud-type`]!==void 0&&d(v,[`cloud_type`],e[`cloud-type`]),e.description!==void 0&&d(v,[`description`],p(e.description,`description`,`text`)),e[`friendly-name`]!==void 0&&d(v,[`friendly_name`],p(e[`friendly-name`],`friendly-name`,`text`));let y=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};var L={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function R(e){return e.usage(`$0 magic-cloud-networking cloud-integrations delete <provider-id>
|
|
21
|
-
|
|
22
|
-
Delete a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const z={command:`delete <provider-id>`,describe:`Delete Cloud Integration`,builder:R,handler:async e=>l({command:`magic-cloud-networking cloud-integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}`,pathParams:{"provider-id":String(e[`provider-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(L,{account_id:l,provider_id:e[`provider-id`]}));o(u,{successLabel:`Deleted`})})};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/discover`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function V(e){return e.usage(`$0 magic-cloud-networking cloud-integrations discover-all
|
|
23
|
-
|
|
24
|
-
Run discovery for all Cloud Integrations in an account (Closed Beta).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`discover-all`,describe:`Run Discovery for All Integrations`,builder:V,handler:async e=>l({command:`magic-cloud-networking cloud-integrations discover-all`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking cloud-integrations discover-all`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/providers/discover`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(B,{account_id:l}));o(u,{successLabel:`Created`})})};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}/discover`,query:[`v2`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function W(e){return e.usage(`$0 magic-cloud-networking cloud-integrations discover <provider-id>
|
|
25
|
-
|
|
26
|
-
Run discovery for a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`discover <provider-id>`,describe:`Run Discovery`,builder:W,handler:async e=>l({command:`magic-cloud-networking cloud-integrations discover`,classification:{safeFlags:[`v2`,`dry-run`]}},e,async()=>{let n={v2:e.v2};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations discover`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}/discover`,pathParams:{"provider-id":String(e[`provider-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Creating`,async()=>l.send(U,{account_id:u,provider_id:e[`provider-id`],...n}));o(d,{successLabel:`Created`})})};var K={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function le(e){return e.usage(`$0 magic-cloud-networking cloud-integrations edit <provider-id>
|
|
27
|
-
|
|
28
|
-
Update a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`aws-arn`,{type:`string`,description:`The aws_arn field`}).option(`azure-subscription-id`,{type:`string`,description:`The azure_subscription_id field`}).option(`azure-tenant-id`,{type:`string`,description:`The azure_tenant_id field`}).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`gcp-project-id`,{type:`string`,description:`The gcp_project_id field`}).option(`gcp-service-account-email`,{type:`string`,description:`The gcp_service_account_email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`edit <provider-id>`,describe:`Patch Cloud Integration`,builder:le,handler:async e=>l({command:`magic-cloud-networking cloud-integrations edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}`,pathParams:{"provider-id":String(e[`provider-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({aws_arn:p(e[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:p(e[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:p(e[`azure-tenant-id`],`azure-tenant-id`,`text`),description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`),gcp_project_id:p(e[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:p(e[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(K,{body:t,account_id:l,provider_id:e[`provider-id`]}));o(r,{successLabel:`Updated`});return}let d=f({aws_arn:p(e[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:p(e[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:p(e[`azure-tenant-id`],`azure-tenant-id`,`text`),description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`),gcp_project_id:p(e[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:p(e[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}),m=await c(`Updating`,async()=>n.send(K,{body:d,account_id:l,provider_id:e[`provider-id`]}));o(m,{successLabel:`Updated`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}`,query:[`status`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function fe(e){return e.usage(`$0 magic-cloud-networking cloud-integrations get <provider-id>
|
|
29
|
-
|
|
30
|
-
Read a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`status`,{type:`boolean`,description:`Status`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <provider-id>`,describe:`Read Cloud Integration`,builder:fe,handler:async e=>l({command:`magic-cloud-networking cloud-integrations get`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let n={status:e.status};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}`,pathParams:{"provider-id":String(e[`provider-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(de,{account_id:u,provider_id:e[`provider-id`],...n}));o(d,{successLabel:`Loaded`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}/initial_setup`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function he(e){return e.usage(`$0 magic-cloud-networking cloud-integrations initial-setup <provider-id>
|
|
31
|
-
|
|
32
|
-
Get initial configuration to complete Cloud Integration setup (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`initial-setup <provider-id>`,describe:`Get Cloud Integration Setup Config`,builder:he,handler:async e=>l({command:`magic-cloud-networking cloud-integrations initial-setup`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations initial-setup`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}/initial_setup`,pathParams:{"provider-id":String(e[`provider-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(me,{account_id:l,provider_id:e[`provider-id`]}));o(u,{successLabel:`Loaded`})})};var _e={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers`,query:[`status`,`order_by`,`desc`,`cloudflare`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ve(e){return e.usage(`$0 magic-cloud-networking cloud-integrations list
|
|
33
|
-
|
|
34
|
-
List Cloud Integrations (Closed Beta).`).option(`status`,{type:`boolean`,description:`Status`}).option(`order-by`,{type:`string`,description:`One of ["updated_at", "id", "cloud_type", "name"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`cloudflare`,{type:`boolean`,description:`Cloudflare`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`list`,describe:`List Cloud Integrations`,builder:ve,handler:async e=>l({command:`magic-cloud-networking cloud-integrations list`,classification:{safeFlags:[`status`,`desc`,`cloudflare`,`dry-run`]}},e,async()=>{let n={status:e.status,order_by:e[`order-by`],desc:e.desc,cloudflare:e.cloudflare};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking cloud-integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/providers`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(_e,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function be(e){return e.usage(`$0 magic-cloud-networking cloud-integrations update <provider-id>
|
|
35
|
-
|
|
36
|
-
Update a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`aws-arn`,{type:`string`,description:`The aws_arn field`}).option(`azure-subscription-id`,{type:`string`,description:`The azure_subscription_id field`}).option(`azure-tenant-id`,{type:`string`,description:`The azure_tenant_id field`}).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`gcp-project-id`,{type:`string`,description:`The gcp_project_id field`}).option(`gcp-service-account-email`,{type:`string`,description:`The gcp_service_account_email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const xe={command:`update <provider-id>`,describe:`Update Cloud Integration`,builder:be,handler:async e=>l({command:`magic-cloud-networking cloud-integrations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}`,pathParams:{"provider-id":String(e[`provider-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({aws_arn:p(e[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:p(e[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:p(e[`azure-tenant-id`],`azure-tenant-id`,`text`),description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`),gcp_project_id:p(e[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:p(e[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(q,{body:t,account_id:l,provider_id:e[`provider-id`]}));o(r,{successLabel:`Updated`});return}let d=f({aws_arn:p(e[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:p(e[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:p(e[`azure-tenant-id`],`azure-tenant-id`,`text`),description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`),gcp_project_id:p(e[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:p(e[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}),m=await c(`Updating`,async()=>n.send(q,{body:d,account_id:l,provider_id:e[`provider-id`]}));o(m,{successLabel:`Updated`})})},Se={command:`cloud-integrations`,describe:`Operations for cloud-integrations`,builder:e=>e.command(I).command(z).command(G).command(H).command(ue).command(pe).command(ge).command(ye).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/magic_wan_address_space`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function Ce(e){return e.usage(`$0 magic-cloud-networking on-ramps address-spaces edit
|
|
37
|
-
|
|
38
|
-
Update the Magic WAN Address Space (Closed Beta).`).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const we={command:`edit`,describe:`Patch Magic WAN Address Space`,builder:Ce,handler:async e=>l({command:`magic-cloud-networking on-ramps address-spaces edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps address-spaces edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/magic_wan_address_space`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({prefixes:e.prefixes}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(J,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);let d=f({prefixes:e.prefixes}),p=await c(`Updating`,async()=>n.send(J,{body:d,account_id:l}));o(p,{successLabel:`Updated`})})};var Te={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/magic_wan_address_space`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ee(e){return e.usage(`$0 magic-cloud-networking on-ramps address-spaces list
|
|
39
|
-
|
|
40
|
-
Read the Magic WAN Address Space (Closed Beta).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`list`,describe:`Read Magic WAN Address Space`,builder:Ee,handler:async e=>l({command:`magic-cloud-networking on-ramps address-spaces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking on-ramps address-spaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/onramps/magic_wan_address_space`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Te,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/magic_wan_address_space`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function Oe(e){return e.usage(`$0 magic-cloud-networking on-ramps address-spaces update
|
|
41
|
-
|
|
42
|
-
Update the Magic WAN Address Space (Closed Beta).`).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ke={command:`update`,describe:`Update Magic WAN Address Space`,builder:Oe,handler:async e=>l({command:`magic-cloud-networking on-ramps address-spaces update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps address-spaces update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/magic_wan_address_space`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({prefixes:e.prefixes}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(Y,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);let d=f({prefixes:e.prefixes}),p=await c(`Updating`,async()=>n.send(Y,{body:d,account_id:l}));o(p,{successLabel:`Updated`})})},Ae={command:`address-spaces`,describe:`Operations for on-ramps.address-spaces`,builder:e=>e.command(we).command(De).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}/apply`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Me(e){return e.usage(`$0 magic-cloud-networking on-ramps apply <onramp-id>
|
|
43
|
-
|
|
44
|
-
Apply an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ne={command:`apply <onramp-id>`,describe:`Apply On-ramp`,builder:Me,handler:async e=>l({command:`magic-cloud-networking on-ramps apply`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps apply`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}/apply`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(je,{account_id:l,onramp_id:e[`onramp-id`]}));o(u,{successLabel:`Created`})})};function Pe(e){return e.usage(`$0 magic-cloud-networking on-ramps create
|
|
45
|
-
|
|
46
|
-
Create a new On-ramp (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`adopted-hub-id`,{type:`string`,description:`The adopted_hub_id field`}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`cloud-asn`,{type:`number`,description:`Sets the cloud-side ASN. If unset or zero, the cloud's default ASN takes effect.`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`]}).coerce(`cloud-type`,e=>p(e,`cloud-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`dynamic-routing`,{type:`boolean`,description:`Enables BGP routing. When enabling this feature, set both install_routes_in_cloud and install_routes_in_magic_wan to false.`}).option(`hub-provider-id`,{type:`string`,description:`The hub_provider_id field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`region`,{type:`string`,description:`The region field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`OnrampTypeSingle`,`OnrampTypeHub`]}).coerce(`type`,e=>p(e,`type`,`text`)).option(`vpc`,{type:`string`,description:`The vpc field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fe={command:`create`,describe:`Create On-ramp`,builder:Pe,handler:async e=>l({command:`magic-cloud-networking on-ramps create`,classification:{safeFlags:[`cloud-type`,`dynamic-routing`,`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`type`,`dry-run`]}},e,async()=>{let l={};if(e.forwarded!==void 0&&(l.forwarded=String(e.forwarded)),e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({adopted_hub_id:p(e[`adopted-hub-id`],`adopted-hub-id`,`text`),attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],cloud_asn:e[`cloud-asn`],cloud_type:e[`cloud-type`],description:p(e.description,`description`,`text`),dynamic_routing:e[`dynamic-routing`],hub_provider_id:p(e[`hub-provider-id`],`hub-provider-id`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),region:p(e.region,`region`,`text`),type:e.type,vpc:p(e.vpc,`vpc`,`text`)}):u(e.body)});return}let g=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e[`cloud-type`]===void 0&&(e[`cloud-type`]=await h(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`])),e[`dynamic-routing`]===void 0)throw Error(`--dynamic-routing is required (or pass --body with this field set).`);if(e[`install-routes-in-cloud`]===void 0)throw Error(`--install-routes-in-cloud is required (or pass --body with this field set).`);if(e[`install-routes-in-magic-wan`]===void 0)throw Error(`--install-routes-in-magic-wan is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await m(`name`,`The name field`)),e.type===void 0&&(e.type=await h(`type`,`The type field`,[`OnrampTypeSingle`,`OnrampTypeHub`]));let v={};e[`adopted-hub-id`]!==void 0&&d(v,[`adopted_hub_id`],p(e[`adopted-hub-id`],`adopted-hub-id`,`text`)),e[`attached-hubs`]!==void 0&&d(v,[`attached_hubs`],e[`attached-hubs`]),e[`attached-vpcs`]!==void 0&&d(v,[`attached_vpcs`],e[`attached-vpcs`]),e[`cloud-asn`]!==void 0&&d(v,[`cloud_asn`],e[`cloud-asn`]),e[`cloud-type`]!==void 0&&d(v,[`cloud_type`],e[`cloud-type`]),e.description!==void 0&&d(v,[`description`],p(e.description,`description`,`text`)),e[`dynamic-routing`]!==void 0&&d(v,[`dynamic_routing`],e[`dynamic-routing`]),e[`hub-provider-id`]!==void 0&&d(v,[`hub_provider_id`],p(e[`hub-provider-id`],`hub-provider-id`,`text`)),e[`install-routes-in-cloud`]!==void 0&&d(v,[`install_routes_in_cloud`],e[`install-routes-in-cloud`]),e[`install-routes-in-magic-wan`]!==void 0&&d(v,[`install_routes_in_magic_wan`],e[`install-routes-in-magic-wan`]),e[`manage-hub-to-hub-attachments`]!==void 0&&d(v,[`manage_hub_to_hub_attachments`],e[`manage-hub-to-hub-attachments`]),e[`manage-vpc-to-hub-attachments`]!==void 0&&d(v,[`manage_vpc_to_hub_attachments`],e[`manage-vpc-to-hub-attachments`]),e.name!==void 0&&d(v,[`name`],p(e.name,`name`,`text`)),e.region!==void 0&&d(v,[`region`],p(e.region,`region`,`text`)),e.type!==void 0&&d(v,[`type`],e.type),e.vpc!==void 0&&d(v,[`vpc`],p(e.vpc,`vpc`,`text`));let y=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};var Ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}`,query:[`destroy`,`force`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Le(e){return e.usage(`$0 magic-cloud-networking on-ramps delete <onramp-id>
|
|
47
|
-
|
|
48
|
-
Delete an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`destroy`,{type:`boolean`,description:`Destroy`}).option(`force`,{type:`boolean`,description:`Force`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Re={command:`delete <onramp-id>`,describe:`Delete On-ramp`,builder:Le,handler:async e=>l({command:`magic-cloud-networking on-ramps delete`,classification:{safeFlags:[`destroy`,`force`,`dry-run`]}},e,async()=>{let n={destroy:e.destroy,force:e.force};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await g({force:!!e.force}))return;let d=await c(`Deleting`,async()=>l.send(Ie,{account_id:u,onramp_id:e[`onramp-id`],...n}));o(d,{successLabel:`Deleted`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function ze(e){return e.usage(`$0 magic-cloud-networking on-ramps edit <onramp-id>
|
|
49
|
-
|
|
50
|
-
Update an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`description`,{type:`string`,description:`The description field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`vpc`,{type:`string`,description:`The vpc field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Be={command:`edit <onramp-id>`,describe:`Patch On-ramp`,builder:ze,handler:async e=>l({command:`magic-cloud-networking on-ramps edit`,classification:{safeFlags:[`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],description:p(e.description,`description`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),vpc:p(e.vpc,`vpc`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(X,{body:t,account_id:l,onramp_id:e[`onramp-id`]}));o(r,{successLabel:`Updated`});return}let d=f({attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],description:p(e.description,`description`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),vpc:p(e.vpc,`vpc`,`text`)}),m=await c(`Updating`,async()=>n.send(X,{body:d,account_id:l,onramp_id:e[`onramp-id`]}));o(m,{successLabel:`Updated`})})};function Ve(e){return e.usage(`$0 magic-cloud-networking on-ramps export <onramp-id>
|
|
51
|
-
|
|
52
|
-
Export an On-ramp to terraform ready file(s) (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const He={command:`export <onramp-id>`,describe:`Export as Terraform`,builder:Ve,handler:async e=>l({command:`magic-cloud-networking on-ramps export`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}/export`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await a();e.accountId=n;let o=await c(`Loading`,async()=>v(`/accounts/${n}/magic/cloud/onramps/${encodeURIComponent(String(e[`onramp-id`]))}/export`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo}));_(e.text===!0?o.toString(`utf-8`):o)})};var Ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}`,query:[`status`,`vpcs`,`post_apply_resources`,`planned_resources`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function We(e){return e.usage(`$0 magic-cloud-networking on-ramps get <onramp-id>
|
|
53
|
-
|
|
54
|
-
Read an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`status`,{type:`boolean`,description:`Status`}).option(`vpcs`,{type:`boolean`,description:`Vpcs`}).option(`post-apply-resources`,{type:`boolean`,description:`Post apply resources`}).option(`planned-resources`,{type:`boolean`,description:`Planned resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get <onramp-id>`,describe:`Read On-ramp`,builder:We,handler:async e=>l({command:`magic-cloud-networking on-ramps get`,classification:{safeFlags:[`status`,`vpcs`,`post-apply-resources`,`planned-resources`,`dry-run`]}},e,async()=>{let n={status:e.status,vpcs:e.vpcs,post_apply_resources:e[`post-apply-resources`],planned_resources:e[`planned-resources`]};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ue,{account_id:u,onramp_id:e[`onramp-id`],...n}));o(d,{successLabel:`Loaded`})})};var Ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps`,query:[`order_by`,`desc`,`status`,`vpcs`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function qe(e){return e.usage(`$0 magic-cloud-networking on-ramps list
|
|
55
|
-
|
|
56
|
-
List On-ramps (Closed Beta).`).option(`order-by`,{type:`string`,description:`One of ["updated_at", "id", "cloud_type", "name"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`status`,{type:`boolean`,description:`Status`}).option(`vpcs`,{type:`boolean`,description:`Vpcs`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Je={command:`list`,describe:`List On-ramps`,builder:qe,handler:async e=>l({command:`magic-cloud-networking on-ramps list`,classification:{safeFlags:[`desc`,`status`,`vpcs`,`dry-run`]}},e,async()=>{let n={order_by:e[`order-by`],desc:e.desc,status:e.status,vpcs:e.vpcs};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking on-ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/onramps`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ke,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Ye={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}/plan`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Xe(e){return e.usage(`$0 magic-cloud-networking on-ramps plan <onramp-id>
|
|
57
|
-
|
|
58
|
-
Plan an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`plan <onramp-id>`,describe:`Plan On-ramp`,builder:Xe,handler:async e=>l({command:`magic-cloud-networking on-ramps plan`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps plan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}/plan`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Ye,{account_id:l,onramp_id:e[`onramp-id`]}));o(u,{successLabel:`Created`})})};var Z={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function Qe(e){return e.usage(`$0 magic-cloud-networking on-ramps update <onramp-id>
|
|
59
|
-
|
|
60
|
-
Update an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`description`,{type:`string`,description:`The description field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`vpc`,{type:`string`,description:`The vpc field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $e={command:`update <onramp-id>`,describe:`Update On-ramp`,builder:Qe,handler:async e=>l({command:`magic-cloud-networking on-ramps update`,classification:{safeFlags:[`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],description:p(e.description,`description`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),vpc:p(e.vpc,`vpc`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(Z,{body:t,account_id:l,onramp_id:e[`onramp-id`]}));o(r,{successLabel:`Updated`});return}let d=f({attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],description:p(e.description,`description`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),vpc:p(e.vpc,`vpc`,`text`)}),m=await c(`Updating`,async()=>n.send(Z,{body:d,account_id:l,onramp_id:e[`onramp-id`]}));o(m,{successLabel:`Updated`})})},et={command:`on-ramps`,describe:`Operations for on-ramps`,builder:e=>e.command(Ne).command(Fe).command(Re).command(Be).command(He).command(Ge).command(Je).command(Ze).command($e).command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tt(e){return e.usage(`$0 magic-cloud-networking resources export
|
|
61
|
-
|
|
62
|
-
Export resources in the Resource Catalog as a JSON file (Closed Beta).`).option(`provider-id`,{type:`string`,description:`Provider ID`}).option(`resource-type`,{type:`string`,array:!0,description:`Resource type`}).option(`resource-id`,{type:`string`,array:!0,description:`Resource ID`}).option(`region`,{type:`string`,description:`Region`}).option(`resource-group`,{type:`string`,description:`Resource group`}).option(`search`,{type:`string`,array:!0,description:`Search`}).option(`order-by`,{type:`string`,description:`One of ["id", "resource_type", "region"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const nt={command:`export`,describe:`Export Resources`,builder:tt,handler:async e=>l({command:`magic-cloud-networking resources export`,classification:{safeFlags:[`desc`,`v2`,`dry-run`,`text`]}},e,async()=>{let n={provider_id:e[`provider-id`],resource_type:e[`resource-type`],resource_id:e[`resource-id`],region:e.region,resource_group:e[`resource-group`],search:e.search,order_by:e[`order-by`],desc:e.desc,v2:e.v2};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking resources export`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/resources/export`,pathParams:{},query:n,bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>v(`/accounts/${o}/magic/cloud/resources/export${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));_(e.text===!0?u.toString(`utf-8`):u)})};var Q={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/resources/${t.resource_id}`,query:[`v2`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function rt(e){return e.usage(`$0 magic-cloud-networking resources get <resource-id>
|
|
63
|
-
|
|
64
|
-
Read an resource from the Resource Catalog (Closed Beta).`).positional(`resource-id`,{type:`string`,description:`Resource ID`,demandOption:!0}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get <resource-id>`,describe:`Read Resource`,builder:rt,handler:async e=>l({command:`magic-cloud-networking resources get`,classification:{safeFlags:[`v2`,`dry-run`]}},e,async()=>{let n={v2:e.v2};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/resources/${e[`resource-id`]==null?`<resource-id>`:encodeURIComponent(String(e[`resource-id`]))}`,pathParams:{"resource-id":String(e[`resource-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Q,{account_id:u,resource_id:e[`resource-id`],...n}));o(d,{successLabel:`Loaded`})})};var at={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/resources`,query:[`provider_id`,`resource_type`,`resource_id`,`region`,`resource_group`,`managed`,`search`,`order_by`,`desc`,`per_page`,`page`,`cloudflare`,`v2`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function ot(e){return e.usage(`$0 magic-cloud-networking resources list
|
|
65
|
-
|
|
66
|
-
List resources in the Resource Catalog (Closed Beta).`).option(`provider-id`,{type:`string`,description:`Provider ID`}).option(`resource-type`,{type:`string`,array:!0,description:`Resource type`}).option(`resource-id`,{type:`string`,array:!0,description:`Resource ID`}).option(`region`,{type:`string`,description:`Region`}).option(`resource-group`,{type:`string`,description:`Resource group`}).option(`managed`,{type:`boolean`,description:`Managed`}).option(`search`,{type:`string`,array:!0,description:`Search`}).option(`order-by`,{type:`string`,description:`One of ["id", "resource_type", "region"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`page`,{type:`number`,description:`Page`}).option(`cloudflare`,{type:`boolean`,description:`Cloudflare`}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const st={command:`list`,describe:`List Resources`,builder:ot,handler:async e=>l({command:`magic-cloud-networking resources list`,classification:{safeFlags:[`managed`,`desc`,`cloudflare`,`v2`,`dry-run`]}},e,async()=>{let n={provider_id:e[`provider-id`],resource_type:e[`resource-type`],resource_id:e[`resource-id`],region:e.region,resource_group:e[`resource-group`],managed:e.managed,search:e.search,order_by:e[`order-by`],desc:e.desc,per_page:e[`per-page`],page:e.page,cloudflare:e.cloudflare,v2:e.v2};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/resources`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(at,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/resources/policy-preview`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function ct(e){return e.usage(`$0 magic-cloud-networking resources policy-preview
|
|
67
|
-
|
|
68
|
-
Preview Rego query result against the latest resource catalog (Closed Beta).`).option(`policy`,{type:`string`,description:`The policy field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const lt={command:`policy-preview`,describe:`Preview Rego Query`,builder:ct,handler:async e=>l({command:`magic-cloud-networking resources policy-preview`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking resources policy-preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/resources/policy-preview`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({policy:p(e.policy,`policy`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.policy===void 0&&(e.policy=await m(`policy`,`The policy field`));let d=f({policy:p(e.policy,`policy`,`text`)}),h=await c(`Creating`,async()=>n.send($,{body:d,account_id:l}));o(h,{successLabel:`Created`})})},ut={command:`resources`,describe:`Operations for resources`,builder:e=>e.command(nt).command(it).command(st).command(lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},dt={command:`magic-cloud-networking`,describe:`magic-cloud-networking`,builder:e=>e.command(P).command(Se).command(et).command(ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{dt as default};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,t as i}from"./context-BvLXzoMs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-B-CVX0kn.mjs";import{t as c}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-DJF_Rs5S.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function g(e){return e.usage(`$0 oauth-clients create
|
|
3
|
-
|
|
4
|
-
Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>d(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).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:`Create OAuth Client`,builder:g,handler:async e=>c({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`)}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}if(e[`client-name`]===void 0&&(e[`client-name`]=await f(`client-name`,`Human-readable name of the OAuth client.`)),e[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(e[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(e[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(e.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);e[`token-endpoint-auth-method`]===void 0&&(e[`token-endpoint-auth-method`]=await p(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let g=u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`)}),_=await s(`Creating`,async()=>c.send(h,{body:g,account_id:m}));a(_,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}/rotate_secret`};function y(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
|
|
5
|
-
|
|
6
|
-
Removes the old client secret after a rotation, keeping only the new one. Use this after you have updated your client configuration to use the new secret. The \`has_rotated_secret\` field on the client indicates whether there is an old secret to delete.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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-rotated-secret <oauth-client-id>`,describe:`Delete Rotated OAuth Client Secret`,builder:y,handler:async e=>c({command:`oauth-clients delete-rotated-secret`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients delete-rotated-secret`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`};function S(e){return e.usage(`$0 oauth-clients delete <oauth-client-id>
|
|
7
|
-
|
|
8
|
-
Delete an OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <oauth-client-id>`,describe:`Delete OAuth Client`,builder:S,handler:async e=>c({command:`oauth-clients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let u=await s(`Deleting`,async()=>c.send(x,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`};function T(e){return e.usage(`$0 oauth-clients get <oauth-client-id>
|
|
9
|
-
|
|
10
|
-
Get details of a specific OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <oauth-client-id>`,describe:`OAuth Client Details`,builder:T,handler:async e=>c({command:`oauth-clients get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(w,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));a(u,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/oauth_clients`};function O(e){return e.usage(`$0 oauth-clients list
|
|
11
|
-
|
|
12
|
-
List all OAuth clients for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List OAuth Clients`,builder:O,handler:async e=>c({command:`oauth-clients list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf oauth-clients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l}));a(u,{successLabel:`Loaded`})})};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}/rotate_secret`};function j(e){return e.usage("$0 oauth-clients rotate-secret <oauth-client-id>\n\nCreates a second client secret so you can update your client configuration before deleting the old one. The `has_rotated_secret` field on the client will be set to `true`.").positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`rotate-secret <oauth-client-id>`,describe:`Rotate OAuth Client Secret`,builder:j,handler:async e=>c({command:`oauth-clients rotate-secret`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients rotate-secret`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(A,{account_id:l,oauth_client_id:e[`oauth-client-id`]}));a(u,{successLabel:`Created`})})};var N={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}`,body:`json`};function P(e){return e.usage(`$0 oauth-clients update <oauth-client-id>
|
|
13
|
-
|
|
14
|
-
Update an existing OAuth client. Only include fields you want to update.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>d(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`visibility`,{type:`string`,description:"Promote the OAuth client from private to public visibility. Only `public` is accepted; demotion to `private` is not supported. Promotion requires a non-empty client name, logo URI, verified client URI host, and at least one non-identity scope.",choices:[`public`]}).coerce(`visibility`,e=>d(e,`visibility`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update request for an OAuth client. Only include fields you want to update.`})}const F={command:`update <oauth-client-id>`,describe:`Update OAuth Client`,builder:P,handler:async e=>c({command:`oauth-clients update`,classification:{safeFlags:[`token-endpoint-auth-method`,`visibility`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients/${e[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(e[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(e[`oauth-client-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`),visibility:e.visibility}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:f,oauth_client_id:e[`oauth-client-id`]}));a(n,{successLabel:`Updated`});return}let p=u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`),visibility:e.visibility}),m=await s(`Updating`,async()=>c.send(N,{body:p,account_id:f,oauth_client_id:e[`oauth-client-id`]}));a(m,{successLabel:`Updated`})})},I={command:`oauth-clients`,describe:`oauth-clients`,builder:e=>e.command(_).command(C).command(b).command(E).command(k).command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{I as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./list-ByCv9-Fl.mjs";import{n as t}from"./auth-D5Yj9eYU.mjs";import{t as n}from"./output-BJEgbI0G.mjs";import{t as r}from"./dry-run-gy0Hl9xo.mjs";import{t as i}from"./progress-B-CVX0kn.mjs";import{t as a}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";function o(e){return e.usage(`$0 oauth-scopes list
|
|
3
|
-
|
|
4
|
-
List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`List OAuth Scopes`,builder:o,handler:async o=>a({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let a=await t(o),s=await i(`Loading`,async()=>a.send(e));n(s,{successLabel:`Loaded`})})},c={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|