cf 1.0.0-beta.20 → 1.0.0-beta.21
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/README.md +1 -1
- package/dist/_meta/commands.json +911 -751
- package/dist/_meta/schemas.json +401 -382
- package/dist/{abuse-reports-mKv00yPh.mjs → abuse-reports-CbUAnJxd.mjs} +1 -1
- package/dist/{access-CyRjTbhh.mjs → access-C-78DlxL.mjs} +1 -1
- package/dist/{accounts-BmF_YKvG.mjs → accounts-DEqQPxCz.mjs} +8 -15
- package/dist/{acm-BcIFiAb8.mjs → acm-jmhCq3Yh.mjs} +2 -3
- package/dist/{addressing-D6xVD7MM.mjs → addressing-BeYFpQvC.mjs} +12 -23
- package/dist/{agent-memory-Blldunhv.mjs → agent-memory-Chlovb7j.mjs} +5 -9
- package/dist/{ai-CU8tdTfC.mjs → ai-BndH3HYN.mjs} +2 -3
- package/dist/{ai-audit-Id3hq5pV.mjs → ai-audit-BUJ-70O_.mjs} +1 -1
- package/dist/{ai-gateway-BKeZ28CQ.mjs → ai-gateway-CCk7VKhL.mjs} +9 -15
- package/dist/{ai-search-DOiZEmn7.mjs → ai-search-BexET_wp.mjs} +6 -11
- package/dist/{ai-security-CioADDZi.mjs → ai-security-D4MxRlxX.mjs} +3 -5
- package/dist/{alerting-BzN1N3Se.mjs → alerting-rw8Oi3x7.mjs} +5 -9
- package/dist/{analytics-engine-CugCQfDe.mjs → analytics-engine-Bk7dQLcm.mjs} +1 -1
- package/dist/{analytics-Cte-DrzH.mjs → analytics-q-guNEOK.mjs} +1 -1
- package/dist/{api-security-CCs0g510.mjs → api-security-BDc6gkf1.mjs} +9 -17
- package/dist/{argo-BHBFZnmO.mjs → argo-CnLIqm0i.mjs} +1 -1
- package/dist/args-BAOHroBC.mjs +2 -0
- package/dist/{artifacts-BzAwvrCD.mjs → artifacts-Cil33dzV.mjs} +4 -7
- package/dist/{audit-logs-jWivEKCy.mjs → audit-logs--E2Eclb7.mjs} +1 -1
- package/dist/auth-B0lEsD_1.mjs +2 -0
- package/dist/{auth-BUQscD5b.mjs → auth-BcNLQji1.mjs} +1 -1
- package/dist/auth-BtZmY6sE.mjs +2 -0
- package/dist/{auth-token-T0aqYgl9.mjs → auth-token-aF5AVLlH.mjs} +1 -1
- package/dist/{autoconfig-CBdcYYf4.mjs → autoconfig-Dbp6J25P.mjs} +88 -88
- package/dist/{basin-catalog-_8w_4599.mjs → basin-catalog-dnVyzopm.mjs} +3 -5
- package/dist/{billing-Ce0WN0yw.mjs → billing-Fqp3jB2V.mjs} +2 -3
- package/dist/{blocks-CFAm0Ma3.mjs → blocks-BOQH-Won.mjs} +1 -1
- package/dist/{bot-management-DskcSr4B.mjs → bot-management-SEDgo1Xg.mjs} +1 -1
- package/dist/{botnet-feed-CmBm13-D.mjs → botnet-feed-DPqR4M0Y.mjs} +2 -3
- package/dist/{brand-protection-DTuFrsN0.mjs → brand-protection-B8vwKfM9.mjs} +2 -3
- package/dist/{browser-run-CXdzSOHa.mjs → browser-run-BybYDq3I.mjs} +3 -5
- package/dist/build-BqGmiORA.mjs +2 -0
- package/dist/build-CWlpWVBf.mjs +2 -0
- package/dist/{builds-_1u5Nx6f.mjs → builds-CvtOG-Gk.mjs} +8 -15
- package/dist/cache-Bme_d2Wx.mjs +36 -0
- package/dist/cf-fIBhEAxU.mjs +18 -0
- package/dist/chunk-DSGVRFIS-DHC6NOIj.mjs +2 -0
- package/dist/{chunk-2K52M2W5-iYNzknM1.mjs → chunk-XVBBSNW2-DfMyGS-l.mjs} +8 -8
- package/dist/{cli-DyhOdzMo.mjs → cli-CIKDqm-u.mjs} +3 -3
- package/dist/{client-side-security-DnnYaRsd.mjs → client-side-security-ZQeRoo1t.mjs} +2 -3
- package/dist/{cloud-connector-Ct6b6pz8.mjs → cloud-connector-BeunZlNV.mjs} +1 -1
- package/dist/{cloudflared-CHLpWU35.mjs → cloudflared-DbzoIouQ.mjs} +1 -1
- package/dist/{cloudforce-one-Rl6nCCm0.mjs → cloudforce-one-D20t9ojD.mjs} +26 -51
- package/dist/{command-BwgvUpNx.mjs → command-B3uWlw57.mjs} +1 -1
- package/dist/{command-DuLxEkGq.mjs → command-BGRucANI.mjs} +1 -1
- package/dist/{command-BONLLcyz.mjs → command-C6kE7BU0.mjs} +1 -1
- package/dist/{command-DOpykk8X.mjs → command-C9CNvZi_.mjs} +1 -1
- package/dist/{command-BRpBIju7.mjs → command-CQ5qHE7n.mjs} +1 -1
- package/dist/{command-CHGc-KZ7.mjs → command-CkZkTjIj.mjs} +1 -1
- package/dist/{command-BRXOUAGD.mjs → command-CqKRlHGv.mjs} +1 -1
- package/dist/{command-BwlIi3Bv.mjs → command-CtlD6MEi.mjs} +1 -1
- package/dist/{command-CXzje7qc.mjs → command-CzWWQv8j.mjs} +1 -1
- package/dist/{command-BMYi_gS-.mjs → command-DWWuXQV8.mjs} +1 -1
- package/dist/{command-CPDQPdss.mjs → command-DkwmylF2.mjs} +1 -1
- package/dist/{command-CMa807gY.mjs → command-MxFFWqMg.mjs} +1 -1
- package/dist/{command-BVO9UOuU.mjs → command-orlUsdgf.mjs} +1 -1
- package/dist/{command-CVoDyQnL.mjs → command-prWMAJbg.mjs} +1 -1
- package/dist/{command-0WS5I_JW.mjs → command-rUCxlpQI.mjs} +1 -1
- package/dist/command-resolution-DAQ4PWUt.mjs +2 -0
- package/dist/{completions-DMwrvK_S.mjs → completions-2Otv0HMd.mjs} +1 -1
- package/dist/{connector-interrupts-DyWilINb.mjs → connector-interrupts-Dfhxupmg.mjs} +1 -1
- package/dist/{connector-telemetry-events-BUW9qTOs.mjs → connector-telemetry-events-CLVpDTIa.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-Djs5QssR.mjs → connector-telemetry-snapshots-E_1tmNmQ.mjs} +1 -1
- package/dist/{connectors-e_cpzDEm.mjs → connectors-ChJpQFSl.mjs} +2 -3
- package/dist/{containers-CEH15JUu.mjs → containers-Cj5-9nUg.mjs} +6 -9
- package/dist/containers-CzAZfmnj.mjs +380 -0
- package/dist/{content-scan-B6Ahw9JA.mjs → content-scan-CIA_9PV8.mjs} +3 -5
- package/dist/{context-Sgba0fZP.mjs → context-DVh8Wyfs.mjs} +2 -2
- package/dist/{cps-uDD0SSJ-.mjs → cps-hJkqdsHx.mjs} +1 -1
- package/dist/{csam-scanner-BSUl7jGn.mjs → csam-scanner-cCVO3lNF.mjs} +1 -1
- package/dist/{custom-csrs-BDcXggph.mjs → custom-csrs-BrTWUZ0c.mjs} +2 -3
- package/dist/{custom-hostnames-UmIlwkwt.mjs → custom-hostnames-C4ft77oC.mjs} +4 -7
- package/dist/{custom-nameservers-D7kU6d--.mjs → custom-nameservers-BWfrZhD1.mjs} +2 -3
- package/dist/{custom-pages-CkhIQCfM.mjs → custom-pages-DqTMKtRc.mjs} +2 -3
- package/dist/{d1-myRLEAGs.mjs → d1-B58AA9PA.mjs} +3 -6
- package/dist/delegate-D7yYckA4.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BJqCpycz.mjs → deploy-CEROLAdh.mjs} +1 -1
- package/dist/deploy-context-Do89WayB.mjs +56 -0
- package/dist/{deploy-input-v2DryyLP.mjs → deploy-input-DyMuMsi5.mjs} +1 -1
- package/dist/{dev-S1PJi83q.mjs → dev-BaFS7kOM.mjs} +2 -2
- package/dist/{diagnostics-q65rcNIk.mjs → diagnostics-4gfYj7Pf.mjs} +2 -3
- package/dist/dialog-D5lus4M4.mjs +2 -0
- package/dist/discover-6kAmVMPp.mjs +2 -0
- package/dist/discover-C06Syc2B.mjs +2 -0
- package/dist/dist-BtzWfAjU.mjs +453 -0
- package/dist/dls-ClWVxTBg.mjs +16 -0
- package/dist/{dns-DhARjFQs.mjs → dns-CML-wxIt.mjs} +68 -68
- package/dist/{dns-firewall-BP6r9QG6.mjs → dns-firewall-CL0b3dJ1.mjs} +2 -3
- package/dist/{docs-CReGWDrw.mjs → docs-BeYBHwUN.mjs} +1 -1
- package/dist/{dotenv-Ck-6V1hm.mjs → dotenv-CmPRiXmU.mjs} +1 -1
- package/dist/{dry-run-BBjUQUhR.mjs → dry-run-gy0Hl9xo.mjs} +1 -1
- package/dist/{durable-objects-tOJy-5te.mjs → durable-objects-uZECeq_f.mjs} +1 -1
- package/dist/{email-auth-Bq9sq_2j.mjs → email-auth-CCNW798I.mjs} +1 -1
- package/dist/email-domains-1rD1d84O.mjs +12 -0
- package/dist/{email-routing-CYo4dp50.mjs → email-routing-CYv-LrbV.mjs} +4 -7
- package/dist/{email-security-CNtWET2d.mjs → email-security-CWEUYPYo.mjs} +16 -31
- package/dist/{email-sending-BvagNLRr.mjs → email-sending-DHSzCfJx.mjs} +3 -5
- package/dist/{errors-DpbAQQv8.mjs → errors-ol9sMqSe.mjs} +8 -8
- package/dist/{field-extractors-C9R3Qivh.mjs → field-extractors-CuBM_uO4.mjs} +2 -3
- package/dist/{firewall-DsgUY-Qv.mjs → firewall-SMIUSypF.mjs} +4 -7
- package/dist/flagship-D3v6iDdw.mjs +24 -0
- package/dist/{fraud-24l8dKyk.mjs → fraud-B2f7O15X.mjs} +1 -1
- package/dist/{google-tag-gateway-CAkudP5W.mjs → google-tag-gateway-BwOc62Gy.mjs} +1 -1
- package/dist/{gt-D6YemCLh.mjs → gt-BQkaDQDq.mjs} +1 -1
- package/dist/{healthchecks-CEGMe3lO.mjs → healthchecks-BQXHnihB.mjs} +3 -5
- package/dist/{hyperdrive-DLDaOU2O.mjs → hyperdrive-Bd6Yfje3.mjs} +2 -3
- package/dist/{iam-ChldOMSL.mjs → iam-qJPI1_aZ.mjs} +5 -9
- package/dist/{images-Ba9tS5wT.mjs → images-goHZJOxy.mjs} +6 -11
- package/dist/index.mjs +1 -1
- package/dist/init-CVx0Ya1E.mjs +43 -0
- package/dist/{intel-DbLRah4Y.mjs → intel-CwiqwJI9.mjs} +18 -21
- package/dist/interactive-CHcvofEp.mjs +2 -0
- package/dist/{interactive-d_lFnSev.mjs → interactive-D4E8PdaW.mjs} +31 -31
- package/dist/interactive-wQM7Blhm.mjs +2 -0
- package/dist/internal-5cnlw9mH.mjs +4 -0
- package/dist/{ips-BGyzyQLL.mjs → ips-KBxmXhvO.mjs} +1 -1
- package/dist/{k2-BVQ3MqEl.mjs → k2-KhIP5NFT.mjs} +2 -3
- package/dist/kv-CCem2sEY.mjs +12 -0
- package/dist/{lazy-command-D0I6itZs.mjs → lazy-command-BMhD5ffF.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dga83Qy3.mjs → leaked-credential-checks-BkPZiwE2.mjs} +3 -5
- package/dist/live-BhHzxFna.mjs +4 -0
- package/dist/{load-balancers-D9cB6of8.mjs → load-balancers-17GBXdju.mjs} +5 -9
- package/dist/local-CAs8RWYW.mjs +2 -0
- package/dist/{local-B7ZJ78al.mjs → local-CSH3UMpD.mjs} +1 -1
- package/dist/{local-runtime-DB545Gqq.mjs → local-runtime-KOFLRZeZ.mjs} +1 -1
- package/dist/log-BWdaOGOW.mjs +66 -0
- package/dist/log-DZfik9Jk.mjs +2 -0
- package/dist/login-BTiflOun.mjs +2 -0
- package/dist/login-Buhvx6Fi.mjs +5 -0
- package/dist/{logpush-Ccmr0Y_I.mjs → logpush-BCCUxa4J.mjs} +3 -5
- package/dist/{logs-CZBMuuBC.mjs → logs-4CwupKRG.mjs} +2 -3
- package/dist/{magic-cloud-networking-BwOxZVql.mjs → magic-cloud-networking-Xy6SC-V-.mjs} +4 -7
- package/dist/{magic-network-monitoring-Cx5kKdbk.mjs → magic-network-monitoring-B8pRZp2g.mjs} +3 -5
- package/dist/{magic-transit-BJwg3sVK.mjs → magic-transit-CwfO3OOX.mjs} +36 -67
- package/dist/managed-defense-CtFLuvuB.mjs +18 -0
- package/dist/{managed-transforms-C-HMtesC.mjs → managed-transforms-Hto8OCBS.mjs} +2 -3
- package/dist/{mcp-bGKgzz6F.mjs → mcp-SQ0MAVUJ.mjs} +3 -5
- package/dist/{mesh-DeQIll19.mjs → mesh-C8A6tVqA.mjs} +3 -5
- package/dist/{migrate-B6HsPeFh.mjs → migrate-Dufxsb_F.mjs} +1 -1
- package/dist/{monetization-B-TIrpA5.mjs → monetization-CYVaCAe9.mjs} +3 -5
- package/dist/{network-BrjykU-I.mjs → network-CJBTdEM3.mjs} +5 -9
- package/dist/{network-interconnects-I06kbxIl.mjs → network-interconnects-CKlNFj3i.mjs} +3 -5
- package/dist/{o11y-Ba0Fa98_.mjs → o11y-5x2Q8CWm.mjs} +8 -15
- package/dist/{oauth-BH-uQd3C.mjs → oauth-BN6_FpYp.mjs} +1 -1
- package/dist/oauth-D_A8AcIS.mjs +4 -0
- package/dist/{oauth-clients-Dd5gvDqf.mjs → oauth-clients-qKXg8ZH3.mjs} +3 -5
- package/dist/{oauth-scopes-CXpH3Syj.mjs → oauth-scopes-Ct1jDyC5.mjs} +1 -1
- package/dist/{organization-DKPqwe3j.mjs → organization-lBQSeqS1.mjs} +3 -5
- package/dist/{organizations-Cq4iy-Yr.mjs → organizations-DEX8Er3g.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DSB1sbYV.mjs → origin-post-quantum-encryption-DUsxVGCs.mjs} +1 -1
- package/dist/output-BJEgbI0G.mjs +2 -0
- package/dist/package-BqSbnt6u.mjs +2 -0
- package/dist/{page-rules-CDWTYaf7.mjs → page-rules-BMt6nt03.mjs} +2 -3
- package/dist/{pages-Dgtm51Uj.mjs → pages-Jxa92ECz.mjs} +7 -13
- package/dist/{pay-per-crawl-CHenxdhv.mjs → pay-per-crawl-Cv0044CZ.mjs} +3 -5
- package/dist/{pay-per-use-Bd5l0hBi.mjs → pay-per-use-DGEeG-dC.mjs} +2 -3
- package/dist/{pipelines-GsyD6nUM.mjs → pipelines-CEC78A3w.mjs} +5 -9
- package/dist/{precursor-mO-Zua09.mjs → precursor-Ba0Ejhzt.mjs} +1 -1
- package/dist/previews-DnZbUTym.mjs +6 -0
- package/dist/progress-CtGsPOpV.mjs +2 -0
- package/dist/prompt-YrI7ltMa.mjs +4 -0
- package/dist/{queues-D8cAr2lB.mjs → queues-Chq997uj.mjs} +6 -11
- package/dist/{r2-CJiJbG6b.mjs → r2-BFgZDs-F.mjs} +17 -33
- package/dist/{radar-PUZ_PCZ8.mjs → radar-DJdDzLJw.mjs} +1 -1
- package/dist/{raw-fetch-DSdFjojI.mjs → raw-fetch-BE3QgdTE.mjs} +1 -1
- package/dist/ready-Cok0aqke.mjs +4 -0
- package/dist/{realtime-X6uQsldp.mjs → realtime-BHWWCiKp.mjs} +10 -19
- package/dist/{registrar-BqZdUTss.mjs → registrar-9Y-1IQ0n.mjs} +1 -1
- package/dist/{registrar-sandbox-CmM3e1QN.mjs → registrar-sandbox-DTS1kRnb.mjs} +1 -1
- package/dist/{registry-D0tMkLv6.mjs → registry-Bm-GgDC3.mjs} +1 -1
- package/dist/{reporting-DFVz98Xg.mjs → reporting-D5RbKQJf.mjs} +1 -1
- package/dist/request-headers-KhW_hy36.mjs +2 -0
- package/dist/{request-tracers-BC1u2WDU.mjs → request-tracers-wxWCjmHo.mjs} +1 -1
- package/dist/{resource-sharing-CdEn5Iex.mjs → resource-sharing-BGoaVvJa.mjs} +5 -9
- package/dist/rolldown-runtime-BNtqjh-B.mjs +2 -0
- package/dist/{rules-B663VetJ.mjs → rules-Cd3EjhdF.mjs} +3 -5
- package/dist/{rulesets-p4EijVr6.mjs → rulesets-Bnz3rSBT.mjs} +4 -7
- package/dist/{rum-CHHXe4KK.mjs → rum-CK9HEe3O.mjs} +3 -5
- package/dist/run-Be6Js7D6.mjs +2 -0
- package/dist/run-DnZGQbq_.mjs +2 -0
- package/dist/sanitization-DkVWMHkc.mjs +2 -0
- package/dist/{schema-B38ojvsS.mjs → schema-DuLIZRhA.mjs} +1 -1
- package/dist/{schema-flags-z7yn0JZ_.mjs → schema-flags-BrDlFwLv.mjs} +1 -1
- package/dist/{scim-BMnUa4Oz.mjs → scim-UdqaWnOu.mjs} +3 -5
- package/dist/{secrets-store-EYrhEzVG.mjs → secrets-store-Bf5v96LC.mjs} +3 -5
- package/dist/{security-insights-C-AwDwXb.mjs → security-insights-BAGySlGu.mjs} +1 -1
- package/dist/{security-txt-CQMe8TD3.mjs → security-txt-D0fMmjHs.mjs} +2 -3
- package/dist/session-6xqrJWXy.mjs +2 -0
- package/dist/shared-DYRRG9A-.mjs +2 -0
- package/dist/signed-url-Ce0muRem.mjs +4 -0
- package/dist/{smart-shield-CHSuitaH.mjs → smart-shield-CCy7_M3j.mjs} +3 -5
- package/dist/{snippets-DGSBz4lg.mjs → snippets-Bc8m3HSV.mjs} +3 -5
- package/dist/spawn-BAEdy9kS.mjs +5 -0
- package/dist/{spectrum-59LhYG1t.mjs → spectrum-DtNX8WBX.mjs} +2 -3
- package/dist/{speed-CMCfoG3s.mjs → speed-TbkeWV_x.mjs} +3 -5
- package/dist/{sql-MxWaTDdj.mjs → sql-DI319y25.mjs} +1 -1
- package/dist/src-COwxoocl.mjs +2 -0
- package/dist/{src-J3Yss3VM.mjs → src-Dc6ojwUW.mjs} +5 -5
- package/dist/{ssl-DTTFZR9x.mjs → ssl-D0MIzFl2.mjs} +9 -17
- package/dist/startup-profile-CZYtQziF.mjs +2 -0
- package/dist/{startup-profile-bp348qmf.mjs → startup-profile-DlWrt4Fm.mjs} +5 -5
- package/dist/state-B3Uy1jPX.mjs +2 -0
- package/dist/{state-CqAtTENS.mjs → state-DazGSbRx.mjs} +1 -1
- package/dist/{stream-gVG_7si-.mjs → stream-4Mrb8HEo.mjs} +14 -27
- package/dist/tags-BP25qydR.mjs +22 -0
- package/dist/telemetry-CvZean4s.mjs +2 -0
- package/dist/telemetry-DKSJSLtq.mjs +2 -0
- package/dist/{tenant-custom-nameservers-DBmmUcxn.mjs → tenant-custom-nameservers-BzVP85Tq.mjs} +2 -3
- package/dist/{tenant-Qv_PC8gW.mjs → tenant-jmfZqEZ4.mjs} +1 -1
- package/dist/{tools-B1ajcUAF.mjs → tools-C-vmgYSv.mjs} +1 -1
- package/dist/{tunnels-CHNKPYRV.mjs → tunnels-BNswR1Dj.mjs} +4 -6
- package/dist/{turnstile-C60RxPo2.mjs → turnstile-BgsTP2fz.mjs} +2 -3
- package/dist/ui-Bo6DCvbS.mjs +2 -0
- package/dist/{update-check-BHarE3V9.mjs → update-check-BOF1hn_I.mjs} +1 -1
- package/dist/update-check-C7mfEeQ7.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-3t6Xpafi.mjs → url-normalization-Bqrs4-2F.mjs} +2 -3
- package/dist/{url-scanner-DNG__DiK.mjs → url-scanner-Dm4Fps5T.mjs} +1 -1
- package/dist/{user-B4i7OIFK.mjs → user-u_LxzLM4.mjs} +8 -15
- package/dist/{vectorize-y3PCQDDf.mjs → vectorize-DLGiOyd4.mjs} +3 -5
- package/dist/version-DmTuWNZ5.mjs +2 -0
- package/dist/{waiting-rooms-xkZLvPkT.mjs → waiting-rooms-DmgJgJXb.mjs} +4 -7
- package/dist/{web-assets-BlqHZywy.mjs → web-assets-rNhZWP-6.mjs} +7 -13
- package/dist/{web3-DGAJMcLv.mjs → web3-BVBdFt8E.mjs} +3 -5
- package/dist/{workers-cCNBx0Bc.mjs → workers-CjUKJvH8.mjs} +18 -22
- package/dist/{workers-builds-COKp3NfU.mjs → workers-builds-D3Q97l7X.mjs} +1 -1
- package/dist/{workers-for-platforms-CAtiWI_G.mjs → workers-for-platforms-C_fcw30y.mjs} +5 -9
- package/dist/{workers-vpc-ChBfXwPy.mjs → workers-vpc-CnRO3Stc.mjs} +2 -3
- package/dist/{workflows-BYhgJvyR.mjs → workflows-cpHFe5v6.mjs} +5 -9
- package/dist/{wrangler-migration-B12OR2bu.mjs → wrangler-migration-DQehjmoh.mjs} +74 -74
- package/dist/{zaraz-BW0kvRCK.mjs → zaraz-BRj0J7vK.mjs} +1 -1
- package/dist/{zero-trust-DSeWXkNV.mjs → zero-trust-CVZKDLCB.mjs} +75 -149
- package/dist/{zone-B-YJG2UA.mjs → zone-N6ccK70C.mjs} +1 -1
- package/dist/{zones-B8pqPHu8.mjs → zones-C4S_kpGz.mjs} +49 -52
- package/package.json +12 -12
- package/dist/auth-CdEGiJ5Y.mjs +0 -2
- package/dist/auth-DF_ml7rE.mjs +0 -2
- package/dist/build-BJHRK6qE.mjs +0 -2
- package/dist/build-D7s3a8zW.mjs +0 -2
- package/dist/cache-CDPUUv_O.mjs +0 -45
- package/dist/cf-3vj8dGYz.mjs +0 -18
- package/dist/chunk-DSGVRFIS-RUG6Dtqz.mjs +0 -2
- package/dist/containers-CcZHRM9g.mjs +0 -376
- package/dist/delegate-Tgfxa-MZ.mjs +0 -2
- package/dist/deploy-context-DIAl408H.mjs +0 -56
- package/dist/dialog-BnIgdgWi.mjs +0 -2
- package/dist/discover-DEjUARkU.mjs +0 -2
- package/dist/discover-P20XeGBF.mjs +0 -2
- package/dist/dist-CX6dDtzj.mjs +0 -449
- package/dist/dist-DAeCUX-u.mjs +0 -60
- package/dist/dls-CMTrCDjZ.mjs +0 -17
- package/dist/flagship-geGDHp9H.mjs +0 -28
- package/dist/init-C08hBFYn.mjs +0 -43
- package/dist/interactive-pjVqirHx.mjs +0 -2
- package/dist/kv-Cd8vbPWK.mjs +0 -15
- package/dist/local-CFZtOOxg.mjs +0 -2
- package/dist/log-CRbgNbDp.mjs +0 -3
- package/dist/login-C3Bahro9.mjs +0 -5
- package/dist/login-DvsRxI3E.mjs +0 -2
- package/dist/logo-matches-jeNkUxAq.mjs +0 -6
- package/dist/logos-pxN5aumY.mjs +0 -7
- package/dist/managed-defense-C_KLy4oB.mjs +0 -18
- package/dist/matches-DnjBnG-Y.mjs +0 -6
- package/dist/oauth-Cf3-g-kk.mjs +0 -4
- package/dist/output-CpiIVa7Q.mjs +0 -2
- package/dist/previews-oHUiD54J.mjs +0 -7
- package/dist/progress-B1dpmxCT.mjs +0 -2
- package/dist/prompt-Y5OBwDVE.mjs +0 -4
- package/dist/queries-CS0sYfte.mjs +0 -9
- package/dist/request-headers-Bg8_Idw3.mjs +0 -2
- package/dist/run-0EozpORq.mjs +0 -2
- package/dist/run-DKg70Sqf.mjs +0 -2
- package/dist/session-3DgztoAI.mjs +0 -2
- package/dist/shared-o8saqcSK.mjs +0 -2
- package/dist/source-AlTrHNem.mjs +0 -6
- package/dist/spawn-BZd__5sj.mjs +0 -10
- package/dist/startup-profile-DJsOtbVN.mjs +0 -2
- package/dist/state-Dvzl3aSj.mjs +0 -2
- package/dist/submit-wJYcQB8d.mjs +0 -4
- package/dist/tags-BwFKjaOr.mjs +0 -23
- package/dist/telemetry-BczXOpQn.mjs +0 -2
- package/dist/telemetry-CE15pfOU.mjs +0 -2
- package/dist/ui-CBhKUPys.mjs +0 -2
- package/dist/update-check-C3RhhXja.mjs +0 -2
- package/dist/url-info-By6VD20A.mjs +0 -4
- package/dist/version-izjB0Yrl.mjs +0 -2
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,i as a,t as o}from"./context-DVh8Wyfs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-CtGsPOpV.mjs";import{t as u}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-YrI7ltMa.mjs";var v={method:`POST`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas`,body:`json`,constants:{kind:`openapi_v3`}};function ee(e){return e.usage(`$0 api-security schema-validation schemas create
|
|
3
3
|
|
|
4
4
|
Uploads an OpenAPI schema that defines expected request formats for API operations.`).option(`kind`,{type:`string`,description:`The kind of the schema`,choices:[`openapi_v3`]}).coerce(`kind`,e=>m(e,`kind`,`text`)).option(`name`,{type:`string`,description:`A human-readable name for the schema`}).option(`source`,{type:`string`,description:`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`}).option(`validation-enabled`,{type:`boolean`,description:`An indicator if this schema is enabled`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Upload a schema`,builder:ee,handler:async e=>u({command:`api-security schema-validation schemas create`,classification:{safeFlags:[`kind`,`validation-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf api-security schema-validation schemas create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/schemas`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({kind:e.kind,name:m(e.name,`name`,`text`),source:m(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}):f(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=f(e.body),i=await l(`Creating`,async()=>t.send(v,{body:r,zone_id:n}));s(i,{successLabel:`Created`});return}if(e.kind===void 0&&(e.kind=await g(`kind`,`The kind of the schema`,[`openapi_v3`])),e.name===void 0&&(e.name=await h(`name`,`A human-readable name for the schema`)),e.source===void 0&&(e.source=await h(`source`,`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`)),e[`validation-enabled`]===void 0)throw Error(`--validation-enabled is required (or pass --body with this field set).`);let i=p({kind:e.kind,name:m(e.name,`name`,`text`),source:m(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}),o=await l(`Creating`,async()=>t.send(v,{body:i,zone_id:n}));s(o,{successLabel:`Created`})})};var te={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas/${t.schema_id}`};function ne(e){return e.usage(`$0 api-security schema-validation schemas delete <schema-id>
|
|
5
5
|
|
|
6
|
-
Permanently removes an uploaded OpenAPI schema from API Security. Operations using this schema will lose their validation rules.`).positional(`schema-id`,{type:`string`,description:`The unique identifier of the schema`,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 re={command:`delete <schema-id>`,describe:`Delete a schema`,builder:ne,handler:async e=>u({command:`api-security schema-validation schemas delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf api-security schema-validation schemas delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/schemas/${e[`schema-id`]==null?`<schema-id>`:encodeURIComponent(String(e[`schema-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"schema-id":String(e[`schema-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await _({force:!!e.force,message:`This operation permanently deletes the uploaded schema and removes its validation coverage.`})){
|
|
7
|
-
`);return}let i=await l(`Deleting`,async()=>t.send(te,{zone_id:n,schema_id:e[`schema-id`]}));s(i,{successLabel:`Deleted`})})};var ie={method:`GET`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas/${t.schema_id}`,query:[`omit_source`]};function ae(e){return e.usage(`$0 api-security schema-validation schemas get <schema-id>
|
|
6
|
+
Permanently removes an uploaded OpenAPI schema from API Security. Operations using this schema will lose their validation rules.`).positional(`schema-id`,{type:`string`,description:`The unique identifier of the schema`,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 re={command:`delete <schema-id>`,describe:`Delete a schema`,builder:ne,handler:async e=>u({command:`api-security schema-validation schemas delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf api-security schema-validation schemas delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/schemas/${e[`schema-id`]==null?`<schema-id>`:encodeURIComponent(String(e[`schema-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"schema-id":String(e[`schema-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await _({force:!!e.force,message:`This operation permanently deletes the uploaded schema and removes its validation coverage.`}))return;let i=await l(`Deleting`,async()=>t.send(te,{zone_id:n,schema_id:e[`schema-id`]}));s(i,{successLabel:`Deleted`})})};var ie={method:`GET`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas/${t.schema_id}`,query:[`omit_source`]};function ae(e){return e.usage(`$0 api-security schema-validation schemas get <schema-id>
|
|
8
7
|
|
|
9
8
|
Gets the contents and metadata of a specific OpenAPI schema uploaded to API Security.`).positional(`schema-id`,{type:`string`,description:`The unique identifier of the schema`,demandOption:!0}).option(`omit-source`,{type:`boolean`,description:`Omit the source-files of schemas and only retrieve their meta-data.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <schema-id>`,describe:`Get details of a schema`,builder:ae,handler:async e=>u({command:`api-security schema-validation schemas get`,classification:{safeFlags:[`omit-source`,`dry-run`]}},e,async()=>{let t={omit_source:e[`omit-source`]};if(e.dryRun){c({command:`cf api-security schema-validation schemas get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/schemas/${e[`schema-id`]==null?`<schema-id>`:encodeURIComponent(String(e[`schema-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"schema-id":String(e[`schema-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e),i=await a({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let o=await l(`Loading`,async()=>n.send(ie,{zone_id:i,schema_id:e[`schema-id`],...t}));s(o,{successLabel:`Loaded`})})};var se={method:`GET`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas/hosts`,query:[`page`,`per_page`]};function ce(e){return e.usage(`$0 api-security schema-validation schemas hosts list
|
|
10
9
|
|
|
@@ -32,8 +31,7 @@ Retrieves the current global schema validation settings for a zone.`).option(`dr
|
|
|
32
31
|
|
|
33
32
|
Updates schema validation settings for multiple API operations in a single request. Efficient for applying consistent validation rules across endpoints.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`bulk-edit`,describe:`Bulk edit per-operation schema validation settings`,builder:O,handler:async e=>u({command:`api-security schema-validation settings operations bulk-edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf api-security schema-validation settings operations bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/settings/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let t=await r(e),i=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=i,e.body){let n=f(e.body),r=await l(`Updating`,async()=>t.send(D,{body:n,zone_id:i}));s(r,{successLabel:`Updated`});return}let o=await l(`Updating`,async()=>n(t,`PATCH`,`/zones/${e.zoneId}/schema_validation/settings/operations`));s(o,{successLabel:`Updated`})})};var A={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/schema_validation/settings/operations/${t.operation_id}`};function j(e){return e.usage(`$0 api-security schema-validation settings operations delete <operation-id>
|
|
34
33
|
|
|
35
|
-
Removes custom schema validation settings for a specific API operation, reverting to zone-level defaults.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const M={command:`delete <operation-id>`,describe:`Delete per-operation schema validation setting`,builder:j,handler:async e=>u({command:`api-security schema-validation settings operations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf api-security schema-validation settings operations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/settings/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await _({force:!!e.force,message:`This operation deletes the operation-specific schema validation setting and restores the zone default.`})){
|
|
36
|
-
`);return}let i=await l(`Deleting`,async()=>t.send(A,{zone_id:n,operation_id:e[`operation-id`]}));s(i,{successLabel:`Deleted`})})};var N={method:`GET`,path:t=>e`/zones/${t.zone_id}/schema_validation/settings/operations/${t.operation_id}`};function xe(e){return e.usage(`$0 api-security schema-validation settings operations get <operation-id>
|
|
34
|
+
Removes custom schema validation settings for a specific API operation, reverting to zone-level defaults.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const M={command:`delete <operation-id>`,describe:`Delete per-operation schema validation setting`,builder:j,handler:async e=>u({command:`api-security schema-validation settings operations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf api-security schema-validation settings operations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/settings/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await _({force:!!e.force,message:`This operation deletes the operation-specific schema validation setting and restores the zone default.`}))return;let i=await l(`Deleting`,async()=>t.send(A,{zone_id:n,operation_id:e[`operation-id`]}));s(i,{successLabel:`Deleted`})})};var N={method:`GET`,path:t=>e`/zones/${t.zone_id}/schema_validation/settings/operations/${t.operation_id}`};function xe(e){return e.usage(`$0 api-security schema-validation settings operations get <operation-id>
|
|
37
35
|
|
|
38
36
|
Retrieves the schema validation settings configured for a specific API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get <operation-id>`,describe:`Get per-operation schema validation setting`,builder:xe,handler:async e=>u({command:`api-security schema-validation settings operations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf api-security schema-validation settings operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/settings/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(N,{zone_id:n,operation_id:e[`operation-id`]}));s(i,{successLabel:`Loaded`})})};var Ce={method:`GET`,path:t=>e`/zones/${t.zone_id}/schema_validation/settings/operations`,query:[`page`,`per_page`]};function we(e){return e.usage(`$0 api-security schema-validation settings operations list
|
|
39
37
|
|
|
@@ -63,8 +61,7 @@ Updates the configuration's complete key set while allowing omitted fields on ex
|
|
|
63
61
|
|
|
64
62
|
Replaces the configuration's complete key set. Symmetric keys must include their key material.`).positional(`config-id`,{type:`string`,description:`Token Configuration ID`,demandOption:!0}).option(`keys`,{type:`string`,description:`The keys field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request payload for create and PUT credentials operations. Provided keys define the complete stored key set. Key identities (`{alg,kid}`) must be unique."})}const We={command:`update <config-id>`,describe:`Replace token validation credentials`,builder:Ue,handler:async e=>u({command:`api-security token-validation configurations credentials update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf api-security token-validation configurations credentials update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/token_validation/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}/credentials`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"config-id":String(e[`config-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({keys:d(e.keys,`keys`)}):f(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=f(e.body),i=await l(`Updating`,async()=>t.send(z,{body:r,zone_id:n,config_id:e[`config-id`]}));s(i,{successLabel:`Updated`});return}if(e.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let i=p({keys:d(e.keys,`keys`)}),o=await l(`Updating`,async()=>t.send(z,{body:i,zone_id:n,config_id:e[`config-id`]}));s(o,{successLabel:`Updated`})})},Ge={command:`credentials`,describe:`Operations for token-validation.configurations.credentials`,builder:e=>e.command(He).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ke={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/token_validation/config/${t.config_id}`};function qe(e){return e.usage(`$0 api-security token-validation configurations delete <config-id>
|
|
65
63
|
|
|
66
|
-
Deletes a JWT validation configuration from the zone.`).positional(`config-id`,{type:`string`,description:`Token Configuration 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 Je={command:`delete <config-id>`,describe:`Delete a token validation configuration`,builder:qe,handler:async e=>u({command:`api-security token-validation configurations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf api-security token-validation configurations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/token_validation/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await _({force:!!e.force,message:`This operation deletes the token validation configuration. The request is rejected if rules, operations, or JWT authentication identifiers still reference it.`})){
|
|
67
|
-
`);return}let i=await l(`Deleting`,async()=>t.send(Ke,{zone_id:n,config_id:e[`config-id`]}));s(i,{successLabel:`Deleted`})})};var B={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/token_validation/config/${t.config_id}`,body:`json`};function Ye(e){return e.usage(`$0 api-security token-validation configurations edit <config-id>
|
|
64
|
+
Deletes a JWT validation configuration from the zone.`).positional(`config-id`,{type:`string`,description:`Token Configuration 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 Je={command:`delete <config-id>`,describe:`Delete a token validation configuration`,builder:qe,handler:async e=>u({command:`api-security token-validation configurations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf api-security token-validation configurations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/token_validation/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await _({force:!!e.force,message:`This operation deletes the token validation configuration. The request is rejected if rules, operations, or JWT authentication identifiers still reference it.`}))return;let i=await l(`Deleting`,async()=>t.send(Ke,{zone_id:n,config_id:e[`config-id`]}));s(i,{successLabel:`Deleted`})})};var B={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/token_validation/config/${t.config_id}`,body:`json`};function Ye(e){return e.usage(`$0 api-security token-validation configurations edit <config-id>
|
|
68
65
|
|
|
69
66
|
Updates only the supplied fields on a JWT validation configuration.`).positional(`config-id`,{type:`string`,description:`Token Configuration ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`title`,{type:`string`,description:`The title 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:`edit <config-id>`,describe:`Edit a token validation configuration`,builder:Ye,handler:async e=>u({command:`api-security token-validation configurations edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf api-security token-validation configurations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/token_validation/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"config-id":String(e[`config-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),title:m(e.title,`title`,`text`)}):f(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=f(e.body),i=await l(`Updating`,async()=>t.send(B,{body:r,zone_id:n,config_id:e[`config-id`]}));s(i,{successLabel:`Updated`});return}let i=p({description:m(e.description,`description`,`text`),title:m(e.title,`title`,`text`)}),o=await l(`Updating`,async()=>t.send(B,{body:i,zone_id:n,config_id:e[`config-id`]}));s(o,{successLabel:`Updated`})})};var Ze={method:`GET`,path:t=>e`/zones/${t.zone_id}/token_validation/config/${t.config_id}`};function Qe(e){return e.usage(`$0 api-security token-validation configurations get <config-id>
|
|
70
67
|
|
|
@@ -81,8 +78,7 @@ Creates a token validation rule for the zone.`).option(`action`,{type:`string`,d
|
|
|
81
78
|
For details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/).
|
|
82
79
|
`}).option(`selector-exclude`,{type:`string`,description:"Ignore operations that were otherwise included by `include`. Provide as a JSON array of objects or @path/to/file.json."}).option(`selector-include`,{type:`string`,description:`Select all matching operations. Provide as a JSON array of objects or @path/to/file.json.`}).option(`title`,{type:`string`,description:`A human-readable name for the rule.`}).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 dt={command:`create`,describe:`Create a token validation rule`,builder:ut,handler:async e=>u({command:`api-security token-validation rules create`,classification:{safeFlags:[`action`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf api-security token-validation rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/token_validation/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({action:e.action,description:m(e.description,`description`,`text`),enabled:e.enabled,expression:m(e.expression,`expression`,`text`),selector:{exclude:d(e[`selector-exclude`],`selector-exclude`),include:d(e[`selector-include`],`selector-include`)},title:m(e.title,`title`,`text`)}):f(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=f(e.body),i=await l(`Creating`,async()=>t.send(V,{body:r,zone_id:n}));s(i,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await g(`action`,"Action to take on requests that match operations included in `selector` and fail `expression`.",[`log`,`block`])),e.description===void 0&&(e.description=await h(`description`,"A human-readable description that gives more details than `title`.")),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.expression===void 0&&(e.expression=await h(`expression`,"Rule expression. Requests that fail to match this expression will be subject to `action`. For details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). ")),e.title===void 0&&(e.title=await h(`title`,`A human-readable name for the rule.`));let i=p({action:e.action,description:m(e.description,`description`,`text`),enabled:e.enabled,expression:m(e.expression,`expression`,`text`),selector:{exclude:d(e[`selector-exclude`],`selector-exclude`),include:d(e[`selector-include`],`selector-include`)},title:m(e.title,`title`,`text`)}),o=await l(`Creating`,async()=>t.send(V,{body:i,zone_id:n}));s(o,{successLabel:`Created`})})};var ft={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/token_validation/rules/${t.rule_id}`};function pt(e){return e.usage(`$0 api-security token-validation rules delete <rule-id>
|
|
83
80
|
|
|
84
|
-
Deletes a token validation rule from the zone.`).positional(`rule-id`,{type:`string`,description:`Token Validation Rule 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 mt={command:`delete <rule-id>`,describe:`Delete a token validation rule`,builder:pt,handler:async e=>u({command:`api-security token-validation rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf api-security token-validation rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/token_validation/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await _({force:!!e.force,message:`This operation deletes the token validation rule from the zone.`})){
|
|
85
|
-
`);return}let i=await l(`Deleting`,async()=>t.send(ft,{zone_id:n,rule_id:e[`rule-id`]}));s(i,{successLabel:`Deleted`})})};var H={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/token_validation/rules/${t.rule_id}`,body:`json`};function ht(e){return e.usage(`$0 api-security token-validation rules edit <rule-id>
|
|
81
|
+
Deletes a token validation rule from the zone.`).positional(`rule-id`,{type:`string`,description:`Token Validation Rule 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 mt={command:`delete <rule-id>`,describe:`Delete a token validation rule`,builder:pt,handler:async e=>u({command:`api-security token-validation rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf api-security token-validation rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/token_validation/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await _({force:!!e.force,message:`This operation deletes the token validation rule from the zone.`}))return;let i=await l(`Deleting`,async()=>t.send(ft,{zone_id:n,rule_id:e[`rule-id`]}));s(i,{successLabel:`Deleted`})})};var H={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/token_validation/rules/${t.rule_id}`,body:`json`};function ht(e){return e.usage(`$0 api-security token-validation rules edit <rule-id>
|
|
86
82
|
|
|
87
83
|
Updates only the supplied fields on a token validation rule.`).positional(`rule-id`,{type:`string`,description:`Token Validation Rule ID`,demandOption:!0}).option(`action`,{type:`string`,description:"Action to take on requests that match operations included in `selector` and fail `expression`.",choices:[`log`,`block`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`description`,{type:`string`,description:"A human-readable description that gives more details than `title`."}).option(`enabled`,{type:`boolean`,description:`Toggle rule on or off.`}).option(`expression`,{type:`string`,description:`Rule expression. Requests that fail to match this expression will be subject to \`action\`.
|
|
88
84
|
|
|
@@ -100,8 +96,7 @@ Creates a new credential within a credential set.`).positional(`credential-set-i
|
|
|
100
96
|
Never returned in responses.
|
|
101
97
|
`}).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 Ot={command:`create <credential-set-id>`,describe:`Create credential`,builder:Dt,handler:async e=>u({command:`api-security vulnerability-scanner credential-sets credentials create`,classification:{safeFlags:[`location`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner credential-sets credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/credential_sets/${e[`credential-set-id`]==null?`<credential-set-id>`:encodeURIComponent(String(e[`credential-set-id`]))}/credentials`,pathParams:{"credential-set-id":String(e[`credential-set-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({location:e.location,location_name:m(e[`location-name`],`location-name`,`text`),name:m(e.name,`name`,`text`),value:m(e.value,`value`,`text`)}):f(e.body),sensitiveBodyPaths:[[`value`]]});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(W,{body:t,account_id:a,credential_set_id:e[`credential-set-id`]}));s(r,{successLabel:`Created`});return}e.location===void 0&&(e.location=await g(`location`,`Where the credential is attached in outgoing requests.`,[`header`,`cookie`])),e[`location-name`]===void 0&&(e[`location-name`]=await h(`location-name`,`Name of the header or cookie where the credential is attached. `)),e.name===void 0&&(e.name=await h(`name`,`Human-readable name.`)),e.value===void 0&&(e.value=await h(`value`,`The credential value (e.g. API key, session token). Write-only. Never returned in responses. `,{kind:`secret`}));let u=p({location:e.location,location_name:m(e[`location-name`],`location-name`,`text`),name:m(e.name,`name`,`text`),value:m(e.value,`value`,`text`)}),d=await l(`Creating`,async()=>n.send(W,{body:u,account_id:a,credential_set_id:e[`credential-set-id`]}));s(d,{successLabel:`Created`})})};var kt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/credential_sets/${t.credential_set_id}/credentials/${t.credential_id}`};function At(e){return e.usage(`$0 api-security vulnerability-scanner credential-sets credentials delete <credential-id>
|
|
102
98
|
|
|
103
|
-
Deletes a credential.`).positional(`credential-id`,{type:`string`,description:`Credential identifier.`,demandOption:!0}).option(`credential-set-id`,{type:`string`,description:`Credential set identifier.`,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 jt={command:`delete <credential-id>`,describe:`Delete credential`,builder:At,handler:async e=>u({command:`api-security vulnerability-scanner credential-sets credentials delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner credential-sets credentials delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/credential_sets/${e[`credential-set-id`]==null?`<credential-set-id>`:encodeURIComponent(String(e[`credential-set-id`]))}/credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}`,pathParams:{"credential-set-id":String(e[`credential-set-id`]??``),"credential-id":String(e[`credential-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force,message:`This operation permanently deletes the credential from the credential set.`})){
|
|
104
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(kt,{account_id:a,credential_set_id:e[`credential-set-id`],credential_id:e[`credential-id`]}));s(u,{successLabel:`Deleted`})})};var G={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/credential_sets/${t.credential_set_id}/credentials/${t.credential_id}`,body:`json`};function Mt(e){return e.usage(`$0 api-security vulnerability-scanner credential-sets credentials edit <credential-id>
|
|
99
|
+
Deletes a credential.`).positional(`credential-id`,{type:`string`,description:`Credential identifier.`,demandOption:!0}).option(`credential-set-id`,{type:`string`,description:`Credential set identifier.`,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 jt={command:`delete <credential-id>`,describe:`Delete credential`,builder:At,handler:async e=>u({command:`api-security vulnerability-scanner credential-sets credentials delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner credential-sets credentials delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/credential_sets/${e[`credential-set-id`]==null?`<credential-set-id>`:encodeURIComponent(String(e[`credential-set-id`]))}/credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}`,pathParams:{"credential-set-id":String(e[`credential-set-id`]??``),"credential-id":String(e[`credential-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force,message:`This operation permanently deletes the credential from the credential set.`}))return;let u=await l(`Deleting`,async()=>n.send(kt,{account_id:a,credential_set_id:e[`credential-set-id`],credential_id:e[`credential-id`]}));s(u,{successLabel:`Deleted`})})};var G={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/credential_sets/${t.credential_set_id}/credentials/${t.credential_id}`,body:`json`};function Mt(e){return e.usage(`$0 api-security vulnerability-scanner credential-sets credentials edit <credential-id>
|
|
105
100
|
|
|
106
101
|
Updates a credential with only the provided fields; omitted fields remain unchanged.`).positional(`credential-id`,{type:`string`,description:`Credential identifier.`,demandOption:!0}).option(`credential-set-id`,{type:`string`,description:`Credential set identifier.`,demandOption:!0}).option(`location`,{type:`string`,description:`Where the credential is attached in outgoing requests.`,choices:[`header`,`cookie`]}).coerce(`location`,e=>m(e,`location`,`text`)).option(`location-name`,{type:`string`,description:`Name of the header or cookie where the credential is attached.
|
|
107
102
|
`}).option(`name`,{type:`string`,description:`Human-readable name.`}).option(`value`,{type:`string`,description:`The credential value. Write-only. Never returned in responses.
|
|
@@ -115,8 +110,7 @@ Replaces a credential. All fields must be provided.`).positional(`credential-id`
|
|
|
115
110
|
`}).option(`name`,{type:`string`,description:`Human-readable name.`}).option(`value`,{type:`string`,description:`The credential value. Write-only. Never returned in responses.
|
|
116
111
|
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Full replacement. Provide all fields.`})}const Vt={command:`update <credential-id>`,describe:`Update credential`,builder:Bt,handler:async e=>u({command:`api-security vulnerability-scanner credential-sets credentials update`,classification:{safeFlags:[`location`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner credential-sets credentials update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/credential_sets/${e[`credential-set-id`]==null?`<credential-set-id>`:encodeURIComponent(String(e[`credential-set-id`]))}/credentials/${e[`credential-id`]==null?`<credential-id>`:encodeURIComponent(String(e[`credential-id`]))}`,pathParams:{"credential-set-id":String(e[`credential-set-id`]??``),"credential-id":String(e[`credential-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({location:e.location,location_name:m(e[`location-name`],`location-name`,`text`),name:m(e.name,`name`,`text`),value:m(e.value,`value`,`text`)}):f(e.body),sensitiveBodyPaths:[[`value`]]});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(K,{body:t,account_id:a,credential_set_id:e[`credential-set-id`],credential_id:e[`credential-id`]}));s(r,{successLabel:`Updated`});return}e.location===void 0&&(e.location=await g(`location`,`Where the credential is attached in outgoing requests.`,[`header`,`cookie`])),e[`location-name`]===void 0&&(e[`location-name`]=await h(`location-name`,`Name of the header or cookie where the credential is attached. `)),e.name===void 0&&(e.name=await h(`name`,`Human-readable name.`)),e.value===void 0&&(e.value=await h(`value`,`The credential value. Write-only. Never returned in responses. `,{kind:`secret`}));let u=p({location:e.location,location_name:m(e[`location-name`],`location-name`,`text`),name:m(e.name,`name`,`text`),value:m(e.value,`value`,`text`)}),d=await l(`Updating`,async()=>n.send(K,{body:u,account_id:a,credential_set_id:e[`credential-set-id`],credential_id:e[`credential-id`]}));s(d,{successLabel:`Updated`})})},Ht={command:`credentials`,describe:`Operations for vulnerability-scanner.credential-sets.credentials`,builder:e=>e.command(Ot).command(jt).command(Nt).command(It).command(zt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ut={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/credential_sets/${t.credential_set_id}`};function Wt(e){return e.usage(`$0 api-security vulnerability-scanner credential-sets delete <credential-set-id>
|
|
117
112
|
|
|
118
|
-
Deletes a credential set and all of its credentials.`).positional(`credential-set-id`,{type:`string`,description:`Credential set identifier.`,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 Gt={command:`delete <credential-set-id>`,describe:`Delete credential set`,builder:Wt,handler:async e=>u({command:`api-security vulnerability-scanner credential-sets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner credential-sets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/credential_sets/${e[`credential-set-id`]==null?`<credential-set-id>`:encodeURIComponent(String(e[`credential-set-id`]))}`,pathParams:{"credential-set-id":String(e[`credential-set-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force,message:`This operation permanently deletes the credential set and every credential it contains.`})){
|
|
119
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(Ut,{account_id:a,credential_set_id:e[`credential-set-id`]}));s(u,{successLabel:`Deleted`})})};var q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/credential_sets/${t.credential_set_id}`,body:`json`};function Kt(e){return e.usage(`$0 api-security vulnerability-scanner credential-sets edit <credential-set-id>
|
|
113
|
+
Deletes a credential set and all of its credentials.`).positional(`credential-set-id`,{type:`string`,description:`Credential set identifier.`,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 Gt={command:`delete <credential-set-id>`,describe:`Delete credential set`,builder:Wt,handler:async e=>u({command:`api-security vulnerability-scanner credential-sets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner credential-sets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/credential_sets/${e[`credential-set-id`]==null?`<credential-set-id>`:encodeURIComponent(String(e[`credential-set-id`]))}`,pathParams:{"credential-set-id":String(e[`credential-set-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force,message:`This operation permanently deletes the credential set and every credential it contains.`}))return;let u=await l(`Deleting`,async()=>n.send(Ut,{account_id:a,credential_set_id:e[`credential-set-id`]}));s(u,{successLabel:`Deleted`})})};var q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/credential_sets/${t.credential_set_id}`,body:`json`};function Kt(e){return e.usage(`$0 api-security vulnerability-scanner credential-sets edit <credential-set-id>
|
|
120
114
|
|
|
121
115
|
Updates a credential set with only the provided fields; omitted fields remain unchanged.`).positional(`credential-set-id`,{type:`string`,description:`Credential set identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`Human-readable name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Applies a partial update. Only the provided fields change; omitted fields remain unchanged.`})}const qt={command:`edit <credential-set-id>`,describe:`Edit credential set`,builder:Kt,handler:async e=>u({command:`api-security vulnerability-scanner credential-sets edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner credential-sets edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/credential_sets/${e[`credential-set-id`]==null?`<credential-set-id>`:encodeURIComponent(String(e[`credential-set-id`]))}`,pathParams:{"credential-set-id":String(e[`credential-set-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(q,{body:t,account_id:a,credential_set_id:e[`credential-set-id`]}));s(r,{successLabel:`Updated`});return}let u=p({name:m(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(q,{body:u,account_id:a,credential_set_id:e[`credential-set-id`]}));s(d,{successLabel:`Updated`})})};var Jt={method:`GET`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/credential_sets/${t.credential_set_id}`};function Yt(e){return e.usage(`$0 api-security vulnerability-scanner credential-sets get <credential-set-id>
|
|
122
116
|
|
|
@@ -128,8 +122,7 @@ Replaces a credential set. All fields must be provided.`).positional(`credential
|
|
|
128
122
|
|
|
129
123
|
Creates and starts a new vulnerability scan. The response may include non-fatal warnings in the \`messages\` array.`).option(`credential-sets-attacker`,{type:`string`,description:`Credential set ID for the attacker.`}).option(`credential-sets-owner`,{type:`string`,description:`Credential set ID for the resource owner.`}).option(`open-api`,{type:`string`,description:`OpenAPI schema definition for the API under test. The scanner
|
|
130
124
|
uses this to discover endpoints and construct requests.
|
|
131
|
-
`}).option(`scan-type`,{type:`string`,description:`The scan_type field`,choices:[`bola`]}).coerce(`scan-type`,e=>m(e,`scan-type`,`text`)).option(`target-environment-id`,{type:`string`,description:`The target environment to scan.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Create a new vulnerability scan. The `scan_type` discriminator selects the scan variant and its required context fields. "})}const an={command:`create`,describe:`Create scan`,builder:rn,handler:async e=>u({command:`api-security vulnerability-scanner scans create`,classification:{safeFlags:[`scan-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/scans`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({credential_sets:{attacker:m(e[`credential-sets-attacker`],`credential-sets-attacker`,`text`),owner:m(e[`credential-sets-owner`],`credential-sets-owner`,`text`)},open_api:m(e[`open-api`],`open-api`,`text`),scan_type:e[`scan-type`],target_environment_id:m(e[`target-environment-id`],`target-environment-id`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`credential-sets-attacker`]===void 0&&(e[`credential-sets-attacker`]=await h(`credential-sets-attacker`,`Credential set ID for the attacker.`)),e[`credential-sets-owner`]===void 0&&(e[`credential-sets-owner`]=await h(`credential-sets-owner`,`Credential set ID for the resource owner.`)),e[`open-api`]===void 0&&(e[`open-api`]=await h(`open-api`,`OpenAPI schema definition for the API under test. The scanner uses this to discover endpoints and construct requests. `)),e[`scan-type`]===void 0&&(e[`scan-type`]=await g(`scan-type`,`The scan_type field`,[`bola`])),e[`target-environment-id`]===void 0&&(e[`target-environment-id`]=await h(`target-environment-id`,`The target environment to scan.`));let u=p({credential_sets:{attacker:m(e[`credential-sets-attacker`],`credential-sets-attacker`,`text`),owner:m(e[`credential-sets-owner`],`credential-sets-owner`,`text`)},open_api:m(e[`open-api`],`open-api`,`text`),scan_type:e[`scan-type`],target_environment_id:m(e[`target-environment-id`],`target-environment-id`,`text`)}),d=await l(`Creating`,async()=>n.send(Y,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var on={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/scans/${t.scan_id}`};function sn(e){return e.usage("$0 api-security vulnerability-scanner scans delete <scan-id>\n\nDeletes a scan and all associated data. Only scans in a terminal state (`finished`, `failed`) may be deleted. Attempting to delete a scan that is still being created or executed (`created`, `scheduled`, `planning`, `running`) returns `400`.").positional(`scan-id`,{type:`string`,description:`Scan identifier.`,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 cn={command:`delete <scan-id>`,describe:`Delete scan`,builder:sn,handler:async e=>u({command:`api-security vulnerability-scanner scans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner scans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force,message:`This operation permanently deletes the completed or failed scan and all associated scan data.`})){
|
|
132
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(on,{account_id:a,scan_id:e[`scan-id`]}));s(u,{successLabel:`Deleted`})})};var ln={method:`GET`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/scans/${t.scan_id}`};function un(e){return e.usage(`$0 api-security vulnerability-scanner scans get <scan-id>
|
|
125
|
+
`}).option(`scan-type`,{type:`string`,description:`The scan_type field`,choices:[`bola`]}).coerce(`scan-type`,e=>m(e,`scan-type`,`text`)).option(`target-environment-id`,{type:`string`,description:`The target environment to scan.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Create a new vulnerability scan. The `scan_type` discriminator selects the scan variant and its required context fields. "})}const an={command:`create`,describe:`Create scan`,builder:rn,handler:async e=>u({command:`api-security vulnerability-scanner scans create`,classification:{safeFlags:[`scan-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/scans`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({credential_sets:{attacker:m(e[`credential-sets-attacker`],`credential-sets-attacker`,`text`),owner:m(e[`credential-sets-owner`],`credential-sets-owner`,`text`)},open_api:m(e[`open-api`],`open-api`,`text`),scan_type:e[`scan-type`],target_environment_id:m(e[`target-environment-id`],`target-environment-id`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`credential-sets-attacker`]===void 0&&(e[`credential-sets-attacker`]=await h(`credential-sets-attacker`,`Credential set ID for the attacker.`)),e[`credential-sets-owner`]===void 0&&(e[`credential-sets-owner`]=await h(`credential-sets-owner`,`Credential set ID for the resource owner.`)),e[`open-api`]===void 0&&(e[`open-api`]=await h(`open-api`,`OpenAPI schema definition for the API under test. The scanner uses this to discover endpoints and construct requests. `)),e[`scan-type`]===void 0&&(e[`scan-type`]=await g(`scan-type`,`The scan_type field`,[`bola`])),e[`target-environment-id`]===void 0&&(e[`target-environment-id`]=await h(`target-environment-id`,`The target environment to scan.`));let u=p({credential_sets:{attacker:m(e[`credential-sets-attacker`],`credential-sets-attacker`,`text`),owner:m(e[`credential-sets-owner`],`credential-sets-owner`,`text`)},open_api:m(e[`open-api`],`open-api`,`text`),scan_type:e[`scan-type`],target_environment_id:m(e[`target-environment-id`],`target-environment-id`,`text`)}),d=await l(`Creating`,async()=>n.send(Y,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var on={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/scans/${t.scan_id}`};function sn(e){return e.usage("$0 api-security vulnerability-scanner scans delete <scan-id>\n\nDeletes a scan and all associated data. Only scans in a terminal state (`finished`, `failed`) may be deleted. Attempting to delete a scan that is still being created or executed (`created`, `scheduled`, `planning`, `running`) returns `400`.").positional(`scan-id`,{type:`string`,description:`Scan identifier.`,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 cn={command:`delete <scan-id>`,describe:`Delete scan`,builder:sn,handler:async e=>u({command:`api-security vulnerability-scanner scans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner scans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force,message:`This operation permanently deletes the completed or failed scan and all associated scan data.`}))return;let u=await l(`Deleting`,async()=>n.send(on,{account_id:a,scan_id:e[`scan-id`]}));s(u,{successLabel:`Deleted`})})};var ln={method:`GET`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/scans/${t.scan_id}`};function un(e){return e.usage(`$0 api-security vulnerability-scanner scans get <scan-id>
|
|
133
126
|
|
|
134
127
|
Returns a single scan by ID.`).positional(`scan-id`,{type:`string`,description:`Scan identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dn={command:`get <scan-id>`,describe:`Get scan`,builder:un,handler:async e=>u({command:`api-security vulnerability-scanner scans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ln,{account_id:a,scan_id:e[`scan-id`]}));s(u,{successLabel:`Loaded`})})};var fn={method:`GET`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/scans`,query:[`page`,`per_page`]};function pn(e){return e.usage(`$0 api-security vulnerability-scanner scans list
|
|
135
128
|
|
|
@@ -138,8 +131,7 @@ Returns all scans for the account.`).option(`page`,{type:`number`,description:`P
|
|
|
138
131
|
Creates a new target environment for the account.`).option(`description`,{type:`string`,description:`Optional description.`}).option(`name`,{type:`string`,description:`Human-readable name.`}).option(`target-type`,{type:`string`,description:`The target.type field`,choices:[`zone`]}).coerce(`target-type`,e=>m(e,`target-type`,`text`)).option(`target-zone-tag`,{type:`string`,description:`Cloudflare zone tag. The zone must belong to the account.
|
|
139
132
|
`}).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:`create`,describe:`Create target environment`,builder:gn,handler:async e=>u({command:`api-security vulnerability-scanner target-environments create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner target-environments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/target_environments`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),target:{type:e[`target-type`],zone_tag:m(e[`target-zone-tag`],`target-zone-tag`,`text`)}}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(X,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Human-readable name.`)),e[`target-type`]===void 0&&(e[`target-type`]=await g(`target-type`,`The target.type field`,[`zone`])),e[`target-zone-tag`]===void 0&&(e[`target-zone-tag`]=await h(`target-zone-tag`,`Cloudflare zone tag. The zone must belong to the account. `));let u=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),target:{type:e[`target-type`],zone_tag:m(e[`target-zone-tag`],`target-zone-tag`,`text`)}}),d=await l(`Creating`,async()=>n.send(X,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var vn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/target_environments/${t.target_environment_id}`};function yn(e){return e.usage(`$0 api-security vulnerability-scanner target-environments delete <target-environment-id>
|
|
140
133
|
|
|
141
|
-
Removes a target environment.`).positional(`target-environment-id`,{type:`string`,description:`Target environment identifier.`,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 bn={command:`delete <target-environment-id>`,describe:`Delete target environment`,builder:yn,handler:async e=>u({command:`api-security vulnerability-scanner target-environments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner target-environments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/target_environments/${e[`target-environment-id`]==null?`<target-environment-id>`:encodeURIComponent(String(e[`target-environment-id`]))}`,pathParams:{"target-environment-id":String(e[`target-environment-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force,message:`This operation permanently deletes the target environment from Vulnerability Scanner.`})){
|
|
142
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(vn,{account_id:a,target_environment_id:e[`target-environment-id`]}));s(u,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/target_environments/${t.target_environment_id}`,body:`json`};function Q(e){return e.usage(`$0 api-security vulnerability-scanner target-environments edit <target-environment-id>
|
|
134
|
+
Removes a target environment.`).positional(`target-environment-id`,{type:`string`,description:`Target environment identifier.`,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 bn={command:`delete <target-environment-id>`,describe:`Delete target environment`,builder:yn,handler:async e=>u({command:`api-security vulnerability-scanner target-environments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf api-security vulnerability-scanner target-environments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vuln_scanner/target_environments/${e[`target-environment-id`]==null?`<target-environment-id>`:encodeURIComponent(String(e[`target-environment-id`]))}`,pathParams:{"target-environment-id":String(e[`target-environment-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force,message:`This operation permanently deletes the target environment from Vulnerability Scanner.`}))return;let u=await l(`Deleting`,async()=>n.send(vn,{account_id:a,target_environment_id:e[`target-environment-id`]}));s(u,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/vuln_scanner/target_environments/${t.target_environment_id}`,body:`json`};function Q(e){return e.usage(`$0 api-security vulnerability-scanner target-environments edit <target-environment-id>
|
|
143
135
|
|
|
144
136
|
Updates a target environment with only the provided fields; omitted fields remain unchanged.`).positional(`target-environment-id`,{type:`string`,description:`Target environment identifier.`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description. Omit to leave unchanged, set to \`null\`
|
|
145
137
|
to clear, or provide a string to update.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{i as p}from"./prompt-YrI7ltMa.mjs";var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/argo/count_zones_enabled`};function h(e){return e.usage(`$0 argo smart-routing count-zones-enabled-for-account
|
|
3
3
|
|
|
4
4
|
Returns the number of zones that have Argo Smart Routing enabled for the specified account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`count-zones-enabled-for-account`,describe:`Get count of zones with Argo Smart Routing enabled for account`,builder:h,handler:async e=>l({command:`argo smart-routing count-zones-enabled-for-account`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf argo smart-routing count-zones-enabled-for-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/argo/count_zones_enabled`,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(m,{account_id:l}));o(u,{successLabel:`Loaded`})})};var _={method:`GET`,path:()=>`/user/argo/count_zones_enabled`};function v(e){return e.usage(`$0 argo smart-routing count-zones-enabled-for-user
|
|
5
5
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
function e(e=process.argv.slice(2)){let t=!1;for(let[n,r]of e.entries()){if(r===`--`)break;r===`--quiet=false`||r===`-q=false`||r===`--no-quiet`?t=!1:r===`--quiet=true`||r===`-q=true`?t=!0:(r===`--quiet`||r===`-q`)&&(t=e[n+1]!==`false`)}return t}export{e as t};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-YrI7ltMa.mjs";import{n as m,t as h}from"./raw-fetch-BE3QgdTE.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function _(e){return e.usage(`$0 artifacts namespaces create
|
|
3
3
|
|
|
4
4
|
Creates an empty Artifacts namespace for an account.`).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`unrestricted`,`us`,`eu`,`fedramp`],default:`unrestricted`}).coerce(`jurisdiction`,e=>d(e,`jurisdiction`,`text`)).option(`namespace`,{type:`string`,description:`The namespace 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 v={command:`create`,describe:`Create a namespace`,builder:_,handler:async e=>c({command:`artifacts namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({jurisdiction:e.jurisdiction,namespace:d(e.namespace,`namespace`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(g,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.namespace===void 0&&(e.namespace=await f(`namespace`,`The namespace field`));let m=u({jurisdiction:e.jurisdiction,namespace:d(e.namespace,`namespace`,`text`)}),h=await s(`Creating`,async()=>c.send(g,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function te(e){return e.usage(`$0 artifacts namespaces delete <namespace>
|
|
5
5
|
|
|
6
|
-
Deletes an empty Artifacts namespace.`).positional(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`delete <namespace>`,describe:`Delete a namespace`,builder:te,handler:async e=>c({command:`artifacts namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}`,pathParams:{namespace:String(e.namespace??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force})){
|
|
7
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(ee,{account_id:l,namespace:e.namespace}));a(u,{successLabel:`Deleted`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function b(e){return e.usage(`$0 artifacts namespaces get <namespace>
|
|
6
|
+
Deletes an empty Artifacts namespace.`).positional(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`delete <namespace>`,describe:`Delete a namespace`,builder:te,handler:async e=>c({command:`artifacts namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}`,pathParams:{namespace:String(e.namespace??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ee,{account_id:l,namespace:e.namespace}));a(u,{successLabel:`Deleted`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function b(e){return e.usage(`$0 artifacts namespaces get <namespace>
|
|
8
7
|
|
|
9
8
|
Returns an Artifacts namespace summary.`).positional(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <namespace>`,describe:`Get a namespace`,builder:b,handler:async e=>c({command:`artifacts namespaces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}`,pathParams:{namespace:String(e.namespace??``)},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(y,{account_id:l,namespace:e.namespace}));a(u,{successLabel:`Loaded`})})};var S={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function C(e){return e.usage(`$0 artifacts namespaces list
|
|
10
9
|
|
|
@@ -16,8 +15,7 @@ Returns decoded metadata for an immutable Git commit object. Commit responses ar
|
|
|
16
15
|
|
|
17
16
|
Creates a Git-compatible Artifacts repository in a namespace.`).positional(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`default-branch`,{type:`string`,description:`Git branch name. Must match /^[a-zA-Z0-9][a-zA-Z0-9._/-]*$/, must not contain '..', and must not end with '/' or '.'.`}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`read-only`,{type:`boolean`,description:`The read_only 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 P={command:`create <namespace>`,describe:`Create a repository`,builder:N,handler:async e=>c({command:`artifacts namespaces repos create`,classification:{safeFlags:[`read-only`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces repos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/repos`,pathParams:{namespace:String(e.namespace??``)},bodyKind:`json`,body:e.body===void 0?u({default_branch:d(e[`default-branch`],`default-branch`,`text`),description:d(e.description,`description`,`text`),name:d(e.name,`name`,`text`),read_only:e[`read-only`]}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(M,{body:t,account_id:p,namespace:e.namespace}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`The name field`));let m=u({default_branch:d(e[`default-branch`],`default-branch`,`text`),description:d(e.description,`description`,`text`),name:d(e.name,`name`,`text`),read_only:e[`read-only`]}),h=await s(`Creating`,async()=>c.send(M,{body:m,account_id:p,namespace:e.namespace}));a(h,{successLabel:`Created`})})};var F={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos/${t.name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function I(e){return e.usage(`$0 artifacts namespaces repos delete <name>
|
|
18
17
|
|
|
19
|
-
Deletes a repository and schedules cleanup of its backing data.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <name>`,describe:`Delete a repository`,builder:I,handler:async e=>c({command:`artifacts namespaces repos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces repos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/repos/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force})){
|
|
20
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(F,{account_id:l,namespace:e.namespace,name:e.name}));a(u,{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 artifacts namespaces repos files get <name>
|
|
18
|
+
Deletes a repository and schedules cleanup of its backing data.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <name>`,describe:`Delete a repository`,builder:I,handler:async e=>c({command:`artifacts namespaces repos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces repos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/repos/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(F,{account_id:l,namespace:e.namespace,name:e.name}));a(u,{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 artifacts namespaces repos files get <name>
|
|
21
19
|
|
|
22
20
|
Returns raw bytes for a file resolved by ref and path.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`ref`,{type:`string`,description:`Git ref, branch, tag, or commit hash.`,demandOption:!0}).option(`path`,{type:`string`,description:`File path.`,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 z={command:`get <name>`,describe:`Read a file`,builder:R,handler:async e=>c({command:`artifacts namespaces repos files get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{let a={ref:e.ref,path:e.path};if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces repos files get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/repos/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}/file`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``)},query:a,bodyKind:`none`});return}await n(e);let c=e.local?t:await i();e.accountId=c;let l=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await s(`Loading`,async()=>h(`/accounts/${c}/artifacts/namespaces/${encodeURIComponent(String(e.namespace))}/repos/${encodeURIComponent(String(e.name))}/file${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(e.text===!0?u.toString(`utf-8`):u)})},B={command:`files`,describe:`Operations for namespaces.repos.files`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos/${t.name}/fork`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function H(e){return e.usage(`$0 artifacts namespaces repos fork <name>
|
|
23
21
|
|
|
@@ -39,5 +37,4 @@ Returns decoded entries for an immutable Git tree object. Tree responses are cac
|
|
|
39
37
|
|
|
40
38
|
Creates a scoped Git token for a repository.`).positional(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`repo`,{type:`string`,description:`The repo field`}).option(`scope`,{type:`string`,description:`The scope field`,choices:[`read`,`write`]}).coerce(`scope`,e=>d(e,`scope`,`text`)).option(`ttl`,{type:`number`,description:`The ttl 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 $={command:`create <namespace>`,describe:`Create a repository token`,builder:be,handler:async e=>c({command:`artifacts namespaces tokens create`,classification:{safeFlags:[`scope`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tokens`,pathParams:{namespace:String(e.namespace??``)},bodyKind:`json`,body:e.body===void 0?u({repo:d(e.repo,`repo`,`text`),scope:e.scope,ttl:e.ttl}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Q,{body:t,account_id:p,namespace:e.namespace}));a(n,{successLabel:`Created`});return}e.repo===void 0&&(e.repo=await f(`repo`,`The repo field`));let m=u({repo:d(e.repo,`repo`,`text`),scope:e.scope,ttl:e.ttl}),h=await s(`Creating`,async()=>c.send(Q,{body:m,account_id:p,namespace:e.namespace}));a(h,{successLabel:`Created`})})};var xe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/tokens/${t.id}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Se(e){return e.usage(`$0 artifacts namespaces tokens revoke <id>
|
|
41
39
|
|
|
42
|
-
Revokes an Artifacts repository token. Token IDs are resolved through an eventually consistent index, so revoking a token within about a second of creating it can return 404; retry after a short delay.`).positional(`id`,{type:`string`,description:`Token ID. Must match /^[0-9a-z]{16}$/.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ce={command:`revoke <id>`,describe:`Revoke a token`,builder:Se,handler:async e=>c({command:`artifacts namespaces tokens revoke`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces tokens revoke`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tokens/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{namespace:String(e.namespace??``),id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force})){
|
|
43
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(xe,{account_id:l,namespace:e.namespace,id:e.id}));a(u,{successLabel:`Deleted`})})},we={command:`tokens`,describe:`Operations for namespaces.tokens`,builder:e=>e.command($).command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Te={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(v).command(ne).command(x).command(w).command(ye).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ee={command:`artifacts`,describe:`artifacts`,builder:e=>e.command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ee as default};
|
|
40
|
+
Revokes an Artifacts repository token. Token IDs are resolved through an eventually consistent index, so revoking a token within about a second of creating it can return 404; retry after a short delay.`).positional(`id`,{type:`string`,description:`Token ID. Must match /^[0-9a-z]{16}$/.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ce={command:`revoke <id>`,describe:`Revoke a token`,builder:Se,handler:async e=>c({command:`artifacts namespaces tokens revoke`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces tokens revoke`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/tokens/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{namespace:String(e.namespace??``),id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(xe,{account_id:l,namespace:e.namespace,id:e.id}));a(u,{successLabel:`Deleted`})})},we={command:`tokens`,describe:`Operations for namespaces.tokens`,builder:e=>e.command($).command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Te={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(v).command(ne).command(x).command(w).command(ye).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ee={command:`artifacts`,describe:`artifacts`,builder:e=>e.command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ee as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/audit_logs`,query:[`id`,`export`,`action.type`,`actor.ip`,`actor.email`,`since`,`before`,`zone.name`,`direction`,`per_page`,`page`,`hide_user_logs`]};function u(e){return e.usage(`$0 audit-logs list
|
|
3
3
|
|
|
4
4
|
Gets a list of audit logs for an account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:`Since`}).option(`before`,{type:`string`,description:`Before`}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`list`,describe:`Get account audit logs`,builder:u,handler:async e=>c({command:`audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},e,async()=>{let c={id:e.id,export:e.export,"action.type":e[`action-type`],"actor.ip":e[`actor-ip`],"actor.email":e[`actor-email`],since:e.since,before:e.before,"zone.name":e[`zone-name`],direction:e.direction,per_page:e[`per-page`],page:e.page,hide_user_logs:e[`hide-user-logs`]};if(e.dryRun){let e=await r();o({command:`cf audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/audit_logs`,pathParams:{},query:c,bodyKind:`none`});return}let u=await n(e),d=e.local?t:await i();e.accountId=d;let f=await s(`Loading`,async()=>u.send(l,{account_id:d,...c}));a(f,{successLabel:`Loaded`})})},f={command:`audit-logs`,describe:`audit-logs`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{K as e}from"./dist-BtzWfAjU.mjs";import{n as t,t as n}from"./api-eMuS5GI1.mjs";import{a as r,n as i}from"./context-DVh8Wyfs.mjs";import{l as a}from"./oauth-D_A8AcIS.mjs";import{t as o}from"./auth-token-aF5AVLlH.mjs";import{n as s}from"./request-headers-KhW_hy36.mjs";const c=6e4;function l(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream}var u={method:`GET`,path:()=>`/accounts`,query:[`name`,`page`,`per_page`,`direction`]},d={method:`GET`,path:()=>`/memberships`,query:[`account.name`,`page`,`per_page`,`order`,`direction`,`name`,`status`]};function f(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function p(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function m(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function h(e,t,n){if(n!=null&&n!==``){if(Array.isArray(n))for(let r of n)h(e,t,r);else e.append(t,String(n))}}function g(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))h(t,n,r);return t.toString()}function _(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=g(n??{});return a&&(i.search=a),i.toString()}const v=/* @__PURE__ */ new WeakMap,y=/* @__PURE__ */ new WeakMap;async function b(e,n,r,i={}){let a=e.baseUrl,o=_(r,a,i.query),s={...i.headers},c;i.body!==void 0&&(f(i.body)||typeof i.body==`string`&&p(s)?c=i.body:(s[`Content-Type`]??=`application/json`,c=JSON.stringify(i.body)));let u=i.timeout===void 0&&l(c)?y.get(e):void 0,d=i.timeout??v.get(e)??6e4,h;try{h=await(u??e).fetch(o,{method:n,headers:s,body:c,signal:i.signal},{timeoutInSeconds:i.timeout===void 0?void 0:i.timeout/1e3,abortSignal:i.signal})}catch(e){throw i.signal?.aborted?Error(`Request aborted`):e===`timeout`||e instanceof Error&&e.name===`AbortError`?Error(u?`Request timed out`:`Request timed out after ${d}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!h.ok)throw new t({statusCode:h.status,body:await m(h),rawResponse:{status:h.status,statusText:h.statusText,url:h.url||o,headers:h.headers,redirected:h.redirected,type:h.type}});if(h.status===204)return null;let g=h.headers.get(`content-type`)??``;if(!g.includes(`application/json`)&&i.preserveNonJsonBytes)return Buffer.from(await h.arrayBuffer());let b=await h.text();if(b===``)return null;if(!g.includes(`application/json`))return b;let x=JSON.parse(b);if(x.success===!1){let e=x.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`;throw new t({message:`API error: ${e}`,statusCode:h.status,body:x})}return`result`in x?x.result:x}function x(e){let t={baseUrl:e.baseURL??`https://api.cloudflare.com/client/v4`,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??6e4)/1e3,maxRetries:0,fetch:e.fetch??globalThis.fetch},r=new n(t);return v.set(r,e.timeout??6e4),e.timeout===void 0&&y.set(r,new n({...t,timeoutInSeconds:void 0})),r}async function S(t){if(a())return;let n=await r();if(n)return n;try{let n=await o(),r=e({compliance_region:await i()}),a=t-Date.now();if(a<=0)return;let c=x({apiToken:n,baseURL:r,defaultHeaders:s()}),l={timeoutInSeconds:a/1e3,maxRetries:0},[f,p]=await Promise.allSettled([c.send(u,{per_page:50},l),c.send(d,{per_page:50},l)]);if(f.status===`rejected`)return;let m=f.value;if((m.result_info?.total_count??m.result.length)>m.result.length)return;let h=m.result;if(p.status===`fulfilled`){let e=p.value.result??[];if((p.value.result_info?.total_count??e.length)>e.length)return;let t=new Set(e.map(e=>e.account?.id).filter(e=>e!==void 0));h=h.filter(e=>t.has(e.id))}return h.length===1?h[0]?.id:void 0}catch{return}}async function C(t){if(t.dryRun&&a())throw Error(`This command's dry run cannot be used with --temporary-account. Remove --dry-run to run the command for real.`);let n=e({compliance_region:await i()});if(t.local){let{createLocalFetch:e}=await import(`./local-CAs8RWYW.mjs`);return x({apiToken:`cf-local-mode-no-auth`,baseURL:n,defaultHeaders:s(),fetch:e({persistTo:t.persistTo,apiBaseUrl:n})})}return x({apiToken:await o(),baseURL:n,defaultHeaders:s()})}export{S as a,l as c,b as i,c as l,C as n,d as o,g as r,u as s,x as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./agent-context-DFEgYjEQ.mjs";import{i as n}from"./blocks-BOQH-Won.mjs";import"./ui-Bo6DCvbS.mjs";import{t as r}from"./log-BWdaOGOW.mjs";import{d as i,f as a,i as o,r as s,t as c}from"./oauth-D_A8AcIS.mjs";import{t as l}from"./auth-token-aF5AVLlH.mjs";import{t as u}from"./output-BJEgbI0G.mjs";import{n as d}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as f,c as p,i as m,n as h,o as g,r as _,s as v,t as y}from"./login-Buhvx6Fi.mjs";const b={command:`logout`,describe:`Log out and remove stored credentials`,handler:async t=>{m(t,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let n=s();n!=="default"&&r.warn(`This directory has profile "${n}" active. ${e.code(`cf auth logout`)} removes the default profile's token, not "${n}". To delete "${n}", run:`,`cf auth delete ${n}`),await i(`default`)}},x={command:`whoami`,describe:`Show current user and authentication status`,handler:async e=>{if(e[`temporary-account`]||e[`event-code`]!==void 0)throw Error(`--temporary-account and --event-code are not supported by cf auth whoami.`);let r=process.env.CLOUDFLARE_API_TOKEN,i=a(),s;s=r?`CLOUDFLARE_API_TOKEN environment variable`:i?.oauth_token?`OAuth token from ${o()}`:`none`;let d;try{d=await l()}catch{u({authenticated:!1,error:`Not logged in`}),s===`none`&&t().isAgentic&&console.error(n('Ask the user: "I can put this online for 60 minutes without you signing in. To keep it, complete the temporary-account claim before it expires. Would you like me to deploy it that way?" (https://developers.cloudflare.com/workers/platform/claim-deployments/) If they agree, run `cf deploy --temporary-account`.'));return}let{createCloudflareClientWithToken:f}=await import(`./auth-B0lEsD_1.mjs`),{default:p}=await import(`./get-BTisquA3.mjs`),m=f({apiToken:d}),h,g=[],[_,v]=await Promise.allSettled([m.send(p),c()]);if(_.status===`fulfilled`){let e=_.value;e&&`email`in e&&typeof e.email==`string`&&(h=e.email)}else process.env.DEBUG&&console.error(`User lookup error:`,_.reason);v.status===`fulfilled`?g=v.value:process.env.DEBUG&&console.error(`Account lookup error:`,v.reason);let y=_.status===`fulfilled`||v.status===`fulfilled`,b={authenticated:!0,authSource:s,tokenValid:y,...h&&{email:h},accounts:g};i?.oauth_token&&(b.scopes=i.scopes,b.expiresAt=i.expiration_time),u(b)}},S={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(d(y,{command:`auth login`,classification:h})).command(C(b,`auth logout`)).command(C(x,`auth whoami`)).command(C(f,`auth create`,[`browser`,`device`])).command(C(v,`auth delete`)).command(C(_,`auth activate`)).command(C(g,`auth deactivate`)).command(C(p,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e,t,n=[],r){return d(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{S as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{c as e}from"./chunk-XVBBSNW2-DfMyGS-l.mjs";import{t}from"./errors-ol9sMqSe.mjs";import{c as n,l as r,p as i,s as a}from"./oauth-D_A8AcIS.mjs";async function o(o){if(r())return(await i(o)).apiToken;let s=e({allowGlobalAuthKey:!1});if(s&&`apiToken`in s)return s.apiToken;let c=await a();if(c)return c;throw n()?Error(`Could not refresh your stored OAuth token. Check your connection and retry, or run 'cf auth login' to authenticate again.`):new t(`No authentication token found.
|
|
3
3
|
|
|
4
4
|
Please set one of the following:
|
|
5
5
|
1. Set the CLOUDFLARE_API_TOKEN environment variable
|