cf 1.0.0-beta.27 → 1.0.0-beta.29
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 +10 -3
- package/dist/_meta/commands.json +7966 -5034
- package/dist/_meta/hand-written-commands.json +40 -10
- package/dist/_meta/schemas.json +3153 -3736
- package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
- package/dist/{access-BxEprr2f.mjs → access-Cte4yyIz.mjs} +1 -1
- package/dist/{accounts-DU2ZNYqP.mjs → accounts-G-x-_cEx.mjs} +58 -57
- package/dist/{acm-CBCIKBJ4.mjs → acm-Bg3HqMGG.mjs} +7 -7
- package/dist/{addressing-BKxiLRHk.mjs → addressing-BwEofGEm.mjs} +46 -46
- package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
- package/dist/ai-DWWRIQIt.mjs +30 -0
- package/dist/ai-audit-CMEBz6ZP.mjs +6 -0
- package/dist/ai-gateway-D2s0isU-.mjs +76 -0
- package/dist/ai-search-a0uqr9yJ.mjs +74 -0
- package/dist/{ai-security-CvZfP2JC.mjs → ai-security-H_RqjRoL.mjs} +4 -4
- package/dist/alerting-Bgp9rE4I.mjs +52 -0
- package/dist/analytics-CFYM82FD.mjs +17 -0
- package/dist/analytics-engine-BLiEaLxb.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BbcvDtff.mjs → api-security-B0YtHglt.mjs} +63 -63
- package/dist/argo-BPwbzHY7.mjs +14 -0
- package/dist/{artifacts-2R2sxIKO.mjs → artifacts-B6UwC2PH.mjs} +20 -20
- package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-kG97iEnI.mjs} +2 -2
- package/dist/auth-Czr8ChBB.mjs +2 -0
- package/dist/auth-DA1PHaHi.mjs +2 -0
- package/dist/auth-Dwfa4S3h.mjs +7 -0
- package/dist/{auth-token-BwpERbnG.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
- package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-B4tFR6ua.mjs} +118 -114
- package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
- package/dist/billing-TERxOuLR.mjs +22 -0
- package/dist/{blocks-C8vyXIAT.mjs → blocks-C3Im7AT0.mjs} +1 -1
- package/dist/body-parser-HN91kAf0.mjs +2 -0
- package/dist/{body-unions-CjpNjwSW.mjs → body-unions-D9OSaf4M.mjs} +1 -1
- package/dist/{bot-management-fwxKIbaB.mjs → bot-management-SZw9jTOC.mjs} +4 -4
- package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
- package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
- package/dist/browser-run-BvjfMK3f.mjs +40 -0
- package/dist/build-CCwo_ydV.mjs +2 -0
- package/dist/build-yQOzZg6Z.mjs +2 -0
- package/dist/builds-tMa3sbQU.mjs +62 -0
- package/dist/cache-b_EPh6Is.mjs +36 -0
- package/dist/cf-DmvZ2L51.mjs +18 -0
- package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
- package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
- package/dist/cli-Cc7ujzAy.mjs +4 -0
- package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
- package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
- package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
- package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
- package/dist/{command-BxZBNPxG.mjs → command-BQbZw4Kx.mjs} +1 -1
- package/dist/command-BVct0Dvr.mjs +2 -0
- package/dist/{command-BiIVclNA.mjs → command-C4_lMRkw.mjs} +1 -1
- package/dist/command-CJ3ldWrA.mjs +2 -0
- package/dist/command-CyOdBNur.mjs +2 -0
- package/dist/command-D2XkyO1e.mjs +2 -0
- package/dist/command-DHODgfFZ.mjs +2 -0
- package/dist/command-DIIaZx_f.mjs +2 -0
- package/dist/command-DONwHpqZ.mjs +2 -0
- package/dist/command-DdYnSf-8.mjs +2 -0
- package/dist/command-DqOU7Ql2.mjs +2 -0
- package/dist/{command-pMoNdd22.mjs → command-HW7k43qu.mjs} +1 -1
- package/dist/command-NqM0lo4a.mjs +2 -0
- package/dist/command-bwVDyMv4.mjs +2 -0
- package/dist/command-yzqs4m83.mjs +2 -0
- package/dist/{completions-DRzBiqpv.mjs → completions-0YKvIyBT.mjs} +2 -2
- package/dist/connector-interrupts-CsunbRsr.mjs +6 -0
- package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
- package/dist/{connectors-D1WFLJoE.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
- package/dist/containers-BiA_bpPR.mjs +76 -0
- package/dist/{content-scan-D1GfPSL0.mjs → content-scan-4SA2nacB.mjs} +6 -6
- package/dist/{context-Dp4CXG22.mjs → context-BGm5_wTT.mjs} +1 -1
- package/dist/{cps-D4uhzg3k.mjs → cps-WDmD3V5I.mjs} +3 -3
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
- package/dist/custom-csrs-D-lvkyRV.mjs +18 -0
- package/dist/custom-hostnames-B5BQX5m6.mjs +24 -0
- package/dist/custom-nameservers-CZrRjcjx.mjs +12 -0
- package/dist/custom-pages-CWwjtfbj.mjs +38 -0
- package/dist/d1-N81q-FAr.mjs +50 -0
- package/dist/{delegate-B4bKqF7i.mjs → delegate-livNdiwK.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-Ok4ncy06.mjs +2 -0
- package/dist/deploy-context-B_lLfxt7.mjs +55 -0
- package/dist/deploy-input-JZlEJwKB.mjs +2 -0
- package/dist/dev-DxbkJkzc.mjs +4 -0
- package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
- package/dist/dialog-CD94-Kzw.mjs +2 -0
- package/dist/discover-D9FNaCDK.mjs +2 -0
- package/dist/discover-DGsMj9ZN.mjs +2 -0
- package/dist/{dist-D5qkmHhC.mjs → dist-BxhwE-W1.mjs} +202 -193
- package/dist/{dls-DWBiYzY1.mjs → dls-5OXuxLAB.mjs} +8 -8
- package/dist/dns-Burep9O7.mjs +142 -0
- package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
- package/dist/docs-BFVK88kB.mjs +3 -0
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-qsnRlRk6.mjs} +1 -1
- package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
- package/dist/email-auth--2KCzZNA.mjs +6 -0
- package/dist/email-routing-DzaExfVf.mjs +44 -0
- package/dist/{email-security-CnNa1YON.mjs → email-security-DwQJszzy.mjs} +71 -71
- package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-mQd2qB-o.mjs} +21 -21
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/errors-C_bGcR0X.mjs +11 -0
- package/dist/field-extractors-MVOizTlB.mjs +8 -0
- package/dist/{firewall-CY_oem-d.mjs → firewall-DtSIlkfL.mjs} +19 -19
- package/dist/flagship-9E5gwNki.mjs +24 -0
- package/dist/{fraud-CSUKLh8X.mjs → fraud-DjqhVJdf.mjs} +3 -3
- package/dist/generate-BzOnRBij.mjs +2 -0
- package/dist/generate-DfxZtpn9.mjs +2 -0
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
- package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
- package/dist/gt-BV-jij5q.mjs +4 -0
- package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
- package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
- package/dist/{iam-8T74DNhH.mjs → iam-BK6N7NdQ.mjs} +31 -31
- package/dist/{images-C3JUaf6b.mjs → images-3bCWE6Ml.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-BgCF9K8h.mjs +43 -0
- package/dist/intel-BQ58CJLt.mjs +62 -0
- package/dist/{interactive-CKHdGvkh.mjs → interactive-JBA3qOUa.mjs} +9 -9
- package/dist/{internal-CamuESs0.mjs → internal-CWPz0sBF.mjs} +2 -2
- package/dist/{ips-DinCNnWj.mjs → ips-3WYegiVW.mjs} +2 -2
- package/dist/k2-Bc_hjmiv.mjs +10 -0
- package/dist/kv-DbShBhhg.mjs +12 -0
- package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
- package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
- package/dist/{live-B6AsI_E5.mjs → live-BTtMv1a6.mjs} +2 -2
- package/dist/load-balancers-C2hg52WA.mjs +84 -0
- package/dist/{local-CgBhtmON.mjs → local-B3zt9PXR.mjs} +1 -1
- package/dist/local-DRxctCh9.mjs +2 -0
- package/dist/local-runtime-BOnDiMDc.mjs +2 -0
- package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
- package/dist/log-DBAHla_W.mjs +2 -0
- package/dist/login-CK3nn9a5.mjs +2 -0
- package/dist/{login-BJHaTERg.mjs → login-DiR-buzS.mjs} +3 -3
- package/dist/{logpush-qhlxsioM.mjs → logpush-CitvUX-J.mjs} +22 -22
- package/dist/{logs-bI54CJ0w.mjs → logs-CfWHu4Ir.mjs} +14 -16
- package/dist/magic-network-monitoring-gU6yzzML.mjs +34 -0
- package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
- package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
- package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
- package/dist/{mcp-CyI0sDmL.mjs → mcp-DqhQJVaz.mjs} +15 -15
- package/dist/{mesh-Czr0UCP4.mjs → mesh-DXVZBNDC.mjs} +12 -12
- package/dist/{migrate-DKDWYrz2.mjs → migrate-CmXyk9vX.mjs} +1 -1
- package/dist/{monetization-NUgfDtSy.mjs → monetization-CWg-mySr.mjs} +9 -9
- package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
- package/dist/{network-B42zrBic.mjs → network-jtgq5eb4.mjs} +24 -24
- package/dist/o11y-eYYs59X9.mjs +88 -0
- package/dist/oauth-BgDZMd72.mjs +5 -0
- package/dist/{oauth-BLQ1-y3R.mjs → oauth-V37G-PaV.mjs} +1 -1
- package/dist/{observability-BxhJQCgZ.mjs → observability-CB72eC4T.mjs} +2 -2
- package/dist/ohttp-gateway-K9ToEft8.mjs +8 -0
- package/dist/organizations-BllV7l_c.mjs +70 -0
- package/dist/output-hFMAotFl.mjs +2 -0
- package/dist/package-oNVeacC9.mjs +2 -0
- package/dist/page-rules-BVmi-ZFW.mjs +35 -0
- package/dist/pages-5spcBpX1.mjs +48 -0
- package/dist/pay-per-crawl-BgsdGcBi.mjs +36 -0
- package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
- package/dist/pipelines-CbtmLRxt.mjs +40 -0
- package/dist/{precursor-D3VH2MXT.mjs → precursor-Dk8YOKf_.mjs} +2 -2
- package/dist/previews-Bv1HMMtO.mjs +6 -0
- package/dist/progress-DE_G09u2.mjs +2 -0
- package/dist/project-settings-D_S-UC8I.mjs +3 -0
- package/dist/prompt-D274Im1O.mjs +4 -0
- package/dist/queues-DGCYUr4g.mjs +52 -0
- package/dist/r2-DtCk-Nfi.mjs +112 -0
- package/dist/{radar-CvLtu-Vr.mjs → radar-1CwqOsMZ.mjs} +150 -150
- package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
- package/dist/{ready-gsGEaWLL.mjs → ready-CcoEA7M7.mjs} +2 -2
- package/dist/{realtime-DiCEgFTC.mjs → realtime-DFUxwIG5.mjs} +80 -81
- package/dist/registrar-Cl1snz8z.mjs +43 -0
- package/dist/registrar-sandbox-Cne9BVCZ.mjs +58 -0
- package/dist/{reporting-BiHgnT8L.mjs → reporting-D9FC-Z-3.mjs} +7 -7
- package/dist/request-headers-Bopp5lH_.mjs +2 -0
- package/dist/request-tracers-CSSB9_aW.mjs +4 -0
- package/dist/resource-sharing-D8yuzJm7.mjs +36 -0
- package/dist/{rules-CRhe_ca9.mjs → rules-DzmOQ3MB.mjs} +8 -8
- package/dist/rulesets-DsTGcgbc.mjs +42 -0
- package/dist/{rum-BfnWHW_d.mjs → rum-DrJLI93T.mjs} +14 -14
- package/dist/run-C5yPsiO2.mjs +2 -0
- package/dist/run-CXWkMU3x.mjs +2 -0
- package/dist/schema-CfZOW8Zw.mjs +2 -0
- package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
- package/dist/schema-flags-DO3kLYBu.mjs +4 -0
- package/dist/scim-0OufLKru.mjs +16 -0
- package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
- package/dist/{security-insights-SlUGW3F_.mjs → security-insights-D2pj8-O-.mjs} +20 -20
- package/dist/{security-txt-C3YS0REz.mjs → security-txt-SKtgW4n-.mjs} +4 -4
- package/dist/session-COdP8BXD.mjs +2 -0
- package/dist/shared-D_2KLpP3.mjs +2 -0
- package/dist/{signed-url-ClLk45_J.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
- package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
- package/dist/snippets-DrrdpLnS.mjs +18 -0
- package/dist/spawn-DNf-Ge8d.mjs +5 -0
- package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-CHBGZbZF.mjs} +11 -11
- package/dist/{speed-BrVeZRyX.mjs → speed-vOlHyG3v.mjs} +11 -11
- package/dist/sql-BCuLxGSf.mjs +4 -0
- package/dist/src-ByCoEqOw.mjs +133 -0
- package/dist/{ssl-Bx4LCutF.mjs → ssl-BA_dcVwF.mjs} +60 -62
- package/dist/startup-profile-CyQk_f_L.mjs +2 -0
- package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
- package/dist/state-B6r-b_-d.mjs +2 -0
- package/dist/{state-BmzOLELo.mjs → state-CTLznbVs.mjs} +1 -1
- package/dist/{containers-DINLx5_i.mjs → static-assets-DGDoaJf1.mjs} +216 -210
- package/dist/stream-CzlqY8hq.mjs +89 -0
- package/dist/{tags-xVzjZxdt.mjs → tags-BLeaslAb.mjs} +8 -8
- package/dist/telemetry-COlodX5Z.mjs +2 -0
- package/dist/{telemetry-CJ9URio3.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
- package/dist/tenants-CRirmhxS.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-BRjRgZnj.mjs} +1 -1
- package/dist/tunnels-nLfIWPYT.mjs +27 -0
- package/dist/{turnstile-B_Ugzgom.mjs → turnstile-CZjXtBCr.mjs} +10 -10
- package/dist/ui-dWsVmFCG.mjs +2 -0
- package/dist/{update-check-DRr0eRhB.mjs → update-check-CXMdVBhW.mjs} +1 -1
- package/dist/{update-check-DHUo4FOJ.mjs → update-check-D_Oky9-u.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
- package/dist/url-scanner-9XW3zLaU.mjs +16 -0
- package/dist/user-Bk1BIqZ5.mjs +103 -0
- package/dist/vectorize-CgOfmWYq.mjs +30 -0
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-CcuBNjqg.mjs +2 -0
- package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
- package/dist/{web-assets-CgQXsp8m.mjs → web-assets-CWU3jrit.mjs} +29 -29
- package/dist/web3-CRpQ5sl4.mjs +26 -0
- package/dist/workers-BZMvamn0.mjs +39 -0
- package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
- package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
- package/dist/workflows-Dd88_Nqc.mjs +48 -0
- package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-BzMTJPdI.mjs} +302 -293
- package/dist/zaraz-BFK0p28R.mjs +22 -0
- package/dist/zero-trust-Cdjfp0Ie.mjs +1008 -0
- package/dist/{zones-DTAcguf6.mjs → zones-DDn5jk6I.mjs} +51 -51
- package/package.json +20 -20
- package/dist/ai-DqEN_hhg.mjs +0 -30
- package/dist/ai-audit-BmzOgt6x.mjs +0 -6
- package/dist/ai-gateway-B0uiYVHq.mjs +0 -74
- package/dist/ai-search-DbZIxdio.mjs +0 -74
- package/dist/alerting-BjGwBxZT.mjs +0 -52
- package/dist/analytics-C7kT_H-W.mjs +0 -17
- package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-D1VONzu-.mjs +0 -14
- package/dist/auth-CspwoBlp.mjs +0 -2
- package/dist/auth-D499YE2n.mjs +0 -7
- package/dist/auth-FK2eLQ02.mjs +0 -2
- package/dist/billing-DRNww0iC.mjs +0 -24
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/brand-protection-BVICLzBc.mjs +0 -26
- package/dist/browser-run-CEk-NIgP.mjs +0 -40
- package/dist/build-CRm2TQq8.mjs +0 -2
- package/dist/build-DO_GNhRl.mjs +0 -2
- package/dist/builds-CoazxuN-.mjs +0 -64
- package/dist/cache-jlLJLSu7.mjs +0 -36
- package/dist/cf-hP0SOgC6.mjs +0 -18
- package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +0 -363
- package/dist/cli-Nqf58-1c.mjs +0 -4
- package/dist/cloudforce-one-CCaIBOAo.mjs +0 -318
- package/dist/command-BASaTmJc.mjs +0 -2
- package/dist/command-Bih1HLr3.mjs +0 -2
- package/dist/command-ByYf12-8.mjs +0 -2
- package/dist/command-C0qCuw03.mjs +0 -2
- package/dist/command-C2FVMd1b.mjs +0 -2
- package/dist/command-C4OgtX_x.mjs +0 -2
- package/dist/command-C5Kqc5Km.mjs +0 -2
- package/dist/command-CFxyp8Uo.mjs +0 -2
- package/dist/command-CZAR85ba.mjs +0 -2
- package/dist/command-CelQVrZL.mjs +0 -2
- package/dist/command-CrAlzysj.mjs +0 -2
- package/dist/command-MxFFWqMg.mjs +0 -2
- package/dist/connector-interrupts-CrTeSyaM.mjs +0 -6
- package/dist/containers-BOBEs1Gk.mjs +0 -75
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/csam-scanner-DOOUBeBM.mjs +0 -8
- package/dist/custom-csrs-DtdFo5YZ.mjs +0 -18
- package/dist/custom-hostnames-ccdlELaD.mjs +0 -24
- package/dist/custom-nameservers-p3gDjfva.mjs +0 -12
- package/dist/custom-pages-DAkKVzgR.mjs +0 -38
- package/dist/d1-CDIyRdh4.mjs +0 -52
- package/dist/deploy-BaC5Ty7F.mjs +0 -2
- package/dist/deploy-context-DTTgNGro.mjs +0 -56
- package/dist/deploy-input-mAy06fAI.mjs +0 -2
- package/dist/dev-De-HszNT.mjs +0 -4
- package/dist/dialog-D5lus4M4.mjs +0 -2
- package/dist/discover-6kAmVMPp.mjs +0 -2
- package/dist/discover-C06Syc2B.mjs +0 -2
- package/dist/dns-wMjf1t6-.mjs +0 -152
- package/dist/docs-BA7qslb2.mjs +0 -3
- package/dist/email-auth-BShMFXn4.mjs +0 -6
- package/dist/email-domains-CDSbVclP.mjs +0 -14
- package/dist/email-routing-CBCkbg_F.mjs +0 -44
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/errors-DatLr-iR.mjs +0 -11
- package/dist/field-extractors-BwGdMnTr.mjs +0 -8
- package/dist/flagship-Bat5EZCk.mjs +0 -24
- package/dist/generate-CeeWW3eX.mjs +0 -3
- package/dist/generate-D6V4Q58z.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/gt-BQkaDQDq.mjs +0 -3
- package/dist/healthchecks-uC43QKQd.mjs +0 -20
- package/dist/init-BEVVz4_P.mjs +0 -43
- package/dist/intel-DRy4rHrt.mjs +0 -62
- package/dist/k2-wsanPL3y.mjs +0 -10
- package/dist/kv-BLSPcEnH.mjs +0 -12
- package/dist/leaked-credential-checks-CSZd9hBQ.mjs +0 -16
- package/dist/load-balancers-gap5u4b1.mjs +0 -84
- package/dist/local-CFsO9Tkg.mjs +0 -2
- package/dist/local-runtime-CmlJ20uJ.mjs +0 -2
- package/dist/log-DZfik9Jk.mjs +0 -2
- package/dist/login-BfuOf-Yi.mjs +0 -2
- package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
- package/dist/managed-transforms-CUC-uAbW.mjs +0 -8
- package/dist/o11y-oEUpMC3O.mjs +0 -86
- package/dist/oauth-BmSFLp_s.mjs +0 -4
- package/dist/organization-CEnlXwrl.mjs +0 -70
- package/dist/organizations-Dt86ToxE.mjs +0 -4
- package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-CiRJBRHO.mjs +0 -2
- package/dist/page-rules-J6LhwR-s.mjs +0 -38
- package/dist/pages-BksdnChs.mjs +0 -48
- package/dist/pay-per-crawl-BLcbHRoR.mjs +0 -36
- package/dist/pipelines-B5AoB3f3.mjs +0 -40
- package/dist/previews-DzJ85fsr.mjs +0 -6
- package/dist/progress-DLri-rA7.mjs +0 -2
- package/dist/project-settings-nBMEx1f-.mjs +0 -3
- package/dist/prompt-D0dXwuME.mjs +0 -4
- package/dist/queues-BsAck4To.mjs +0 -52
- package/dist/r2-BYjdHDEZ.mjs +0 -112
- package/dist/raw-fetch-DQeDx1wT.mjs +0 -2
- package/dist/registrar-D4wdgWpo.mjs +0 -43
- package/dist/registrar-sandbox-B6yopzdG.mjs +0 -58
- package/dist/request-headers-CoxHUNcB.mjs +0 -2
- package/dist/request-tracers-817HTytF.mjs +0 -4
- package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
- package/dist/rulesets-CKyc-Xlx.mjs +0 -42
- package/dist/run-Ciw_GIrC.mjs +0 -2
- package/dist/run-DD45EQTm.mjs +0 -2
- package/dist/schema-DuLIZRhA.mjs +0 -2
- package/dist/schema-flags-DrqvwQNw.mjs +0 -4
- package/dist/scim-C4iRWNYB.mjs +0 -16
- package/dist/session-D2yuwO4i.mjs +0 -2
- package/dist/shared--uVkAAd7.mjs +0 -2
- package/dist/smart-shield-Dn95hqUH.mjs +0 -22
- package/dist/snippets-BNUKOajz.mjs +0 -18
- package/dist/spawn-DuT4snxu.mjs +0 -5
- package/dist/sql-BX1pBqj3.mjs +0 -4
- package/dist/src-DPnUfK4c.mjs +0 -131
- package/dist/startup-profile-tZNb2HGz.mjs +0 -2
- package/dist/state-Uwfrmw5I.mjs +0 -2
- package/dist/stream-BRzr6yh0.mjs +0 -89
- package/dist/telemetry-Pt5GpCKD.mjs +0 -2
- package/dist/tunnels-DQVXKUKA.mjs +0 -27
- package/dist/ui-FYultowZ.mjs +0 -2
- package/dist/url-scanner-BH4PLy16.mjs +0 -16
- package/dist/user-Bn82Qw0Y.mjs +0 -103
- package/dist/vectorize-DoVVz_sh.mjs +0 -30
- package/dist/version-Zr2oF8mY.mjs +0 -2
- package/dist/waiting-rooms-QUW131o3.mjs +0 -52
- package/dist/web3-TY9s6Swn.mjs +0 -26
- package/dist/workers-B3uJqJKc.mjs +0 -39
- package/dist/workers-builds-BgGY0IGk.mjs +0 -14
- package/dist/workflows-6m85DdqF.mjs +0 -48
- package/dist/zaraz-8WSJ7l0L.mjs +0 -22
- package/dist/zero-trust-DK0cqDZv.mjs +0 -1022
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{r as u,t as d}from"./body-parser-HN91kAf0.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{i as p}from"./prompt-D274Im1O.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
|
+
|
|
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();n({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 t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(m,{account_id:l}));s(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
|
+
|
|
6
|
+
Returns the number of zones that have Argo Smart Routing enabled for the authenticated user.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`count-zones-enabled-for-user`,describe:`Get count of zones with Argo Smart Routing enabled for user`,builder:v,handler:async e=>l({command:`argo smart-routing count-zones-enabled-for-user`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf argo smart-routing count-zones-enabled-for-user`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/argo/count_zones_enabled`,pathParams:{},bodyKind:`none`});return}let r=await t(e),i=await c(`Loading`,async()=>r.send(_));s(i,{successLabel:`Loaded`})})};var b={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/argo/smart_routing`,body:`json`};function x(e){return e.usage(`$0 argo smart-routing edit
|
|
7
|
+
|
|
8
|
+
Configures the value of the Argo Smart Routing enablement setting.`).option(`value`,{type:`string`,description:`Specifies the enablement value of Argo Smart Routing.`,choices:[`on`,`off`]}).coerce(`value`,e=>f(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configures the enablement of Argo Smart Routing.`})}const S={command:`edit`,describe:`Patch Argo Smart Routing setting`,builder:x,handler:async e=>l({command:`argo smart-routing edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf argo smart-routing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/argo/smart_routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({value:e.value}):u(e.body)});return}let r=e.body===void 0?void 0:u(e.body),a=await t(e),o=await i({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=o,e.body!==void 0){let e=r,t=await c(`Updating`,async()=>a.send(b,{body:e,zone_id:o}));s(t,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await p(`value`,`Specifies the enablement value of Argo Smart Routing.`,[`on`,`off`]));let l=d({value:e.value}),f=await c(`Updating`,async()=>a.send(b,{body:l,zone_id:o}));s(f,{successLabel:`Updated`})})};var C={method:`GET`,path:t=>e`/zones/${t.zone_id}/argo/smart_routing`};function w(e){return e.usage(`$0 argo smart-routing get
|
|
9
|
+
|
|
10
|
+
Retrieves the value of Argo Smart Routing enablement setting.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get`,describe:`Get Argo Smart Routing setting`,builder:w,handler:async e=>l({command:`argo smart-routing get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf argo smart-routing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/argo/smart_routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await t(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let o=await c(`Loading`,async()=>r.send(C,{zone_id:a}));s(o,{successLabel:`Loaded`})})},E={command:`smart-routing`,describe:`Route traffic through the fastest network paths to your origin using real-time latency data`,builder:e=>e.command(g).command(y).command(S).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/argo/tiered_caching`,body:`json`};function O(e){return e.usage(`$0 argo tiered-caching edit
|
|
11
|
+
|
|
12
|
+
Enables or disables Tiered Cache for a zone. Tiered Cache reduces origin traffic by serving lower-tier cache misses from upper-tier data centers before requesting content from your origin.`).option(`value`,{type:`string`,description:`Enables or disables Tiered Cache.`,choices:[`on`,`off`]}).coerce(`value`,e=>f(e,`value`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Updates whether Tiered Cache is enabled for a zone.`})}const k={command:`edit`,describe:`Update Tiered Cache`,builder:O,handler:async e=>l({command:`argo tiered-caching edit`,classification:{safeFlags:[`value`,`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf argo tiered-caching edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/argo/tiered_caching`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({value:e.value}):u(e.body)});return}let r=e.body===void 0?void 0:u(e.body),a=await t(e),o=await i({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=o,e.body!==void 0){let e=r,t=await c(`Updating`,async()=>a.send(D,{body:e,zone_id:o}));s(t,{successLabel:`Updated`});return}e.value===void 0&&(e.value=await p(`value`,`Enables or disables Tiered Cache.`,[`on`,`off`]));let l=d({value:e.value}),f=await c(`Updating`,async()=>a.send(D,{body:l,zone_id:o}));s(f,{successLabel:`Updated`})})};var A={method:`GET`,path:t=>e`/zones/${t.zone_id}/argo/tiered_caching`};function j(e){return e.usage(`$0 argo tiered-caching get
|
|
13
|
+
|
|
14
|
+
Retrieves whether Tiered Cache is enabled for a zone. Tiered Cache reduces origin traffic by serving lower-tier cache misses from upper-tier data centers before requesting content from your origin.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get`,describe:`Get Tiered Cache`,builder:j,handler:async e=>l({command:`argo tiered-caching get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf argo tiered-caching get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/argo/tiered_caching`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await t(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let o=await c(`Loading`,async()=>r.send(A,{zone_id:a}));s(o,{successLabel:`Loaded`})})},N={command:`tiered-caching`,describe:`Reduce origin load by having upper-tier data centers serve cache misses before reaching your origin`,builder:e=>e.command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`argo`,describe:`Network optimization features that speed up and improve reliability of traffic to your origins`,builder:e=>e.command(E).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./dry-run-qsnRlRk6.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./progress-DE_G09u2.mjs";import{a as f,n as p}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{n as m,t as h}from"./raw-fetch-DhlyWQtk.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
|
-
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=>
|
|
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=>s(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=>l({command:`artifacts namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();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?r({jurisdiction:e.jurisdiction,namespace:s(e.namespace,`namespace`,`text`)}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),m=e.local?c:await a();if(e.accountId=m,e.body!==void 0){let e=l,t=await d(`Creating`,async()=>p.send(g,{body:e,account_id:m}));u(t,{successLabel:`Created`});return}e.namespace===void 0&&(e.namespace=await f(`namespace`,`The namespace field`));let h=r({jurisdiction:e.jurisdiction,namespace:s(e.namespace,`namespace`,`text`)}),_=await d(`Creating`,async()=>p.send(g,{body:h,account_id:m}));u(_,{successLabel:`Created`})})};var y={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 b(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
|
|
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 ee={command:`delete <namespace>`,describe:`Delete a namespace`,builder:b,handler:async e=>l({command:`artifacts namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();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 n=await t(e),r=e.local?c:await a();if(e.accountId=r,!await p({force:!!e.force}))return;let s=await d(`Deleting`,async()=>n.send(y,{account_id:r,namespace:e.namespace}));u(s,{successLabel:`Deleted`})})};var te={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 x(e){return e.usage(`$0 artifacts namespaces get <namespace>
|
|
7
7
|
|
|
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
|
|
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 S={command:`get <namespace>`,describe:`Get a namespace`,builder:x,handler:async e=>l({command:`artifacts namespaces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();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 n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(te,{account_id:r,namespace:e.namespace}));u(s,{successLabel:`Loaded`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function w(e){return e.usage(`$0 artifacts namespaces list
|
|
9
9
|
|
|
10
|
-
Lists Artifacts namespaces for an account.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
10
|
+
Lists Artifacts namespaces for an account.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List namespaces`,builder:w,handler:async e=>l({command:`artifacts namespaces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await i();o({command:`cf artifacts namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/artifacts/namespaces`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),s=e.local?c:await a();e.accountId=s;let l=await d(`Loading`,async()=>r.send(C,{account_id:s,...n}));u(l,{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 artifacts namespaces repos blobs get <hash>
|
|
11
11
|
|
|
12
|
-
Returns raw bytes for an immutable Git blob object. Blob responses are cacheable forever by hash.`).positional(`hash`,{type:`string`,description:`40-character lowercase hexadecimal Git object hash.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,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
|
|
12
|
+
Returns raw bytes for an immutable Git blob object. Blob responses are cacheable forever by hash.`).positional(`hash`,{type:`string`,description:`40-character lowercase hexadecimal Git object hash.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,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 D={command:`get <hash>`,describe:`Read a Git blob`,builder:E,handler:async e=>l({command:`artifacts namespaces repos blobs get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos blobs 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))}/blob/${e.hash==null?`<hash>`:encodeURIComponent(String(e.hash))}`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``),hash:String(e.hash??``)},bodyKind:`none`});return}await t(e);let n=e.local?c:await a();e.accountId=n;let r=await d(`Loading`,async()=>h(`/accounts/${n}/artifacts/namespaces/${encodeURIComponent(String(e.namespace))}/repos/${encodeURIComponent(String(e.name))}/blob/${encodeURIComponent(String(e.hash))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(e.text===!0?r.toString(`utf-8`):r)})},O={command:`blobs`,describe:`Operations for namespaces.repos.blobs`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos/${t.name}/commit/${t.hash}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function A(e){return e.usage(`$0 artifacts namespaces repos commits get <hash>
|
|
13
13
|
|
|
14
|
-
Returns decoded metadata for an immutable Git commit object. Commit responses are cacheable forever by hash.`).positional(`hash`,{type:`string`,description:`40-character lowercase hexadecimal Git object hash.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
14
|
+
Returns decoded metadata for an immutable Git commit object. Commit responses are cacheable forever by hash.`).positional(`hash`,{type:`string`,description:`40-character lowercase hexadecimal Git object hash.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <hash>`,describe:`Read a Git commit`,builder:A,handler:async e=>l({command:`artifacts namespaces repos commits get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos commits 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))}/commit/${e.hash==null?`<hash>`:encodeURIComponent(String(e.hash))}`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``),hash:String(e.hash??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(k,{account_id:r,namespace:e.namespace,name:e.name,hash:e.hash}));u(s,{successLabel:`Loaded`})})},M={command:`commits`,describe:`Operations for namespaces.repos.commits`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`POST`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function P(e){return e.usage(`$0 artifacts namespaces repos create <namespace>
|
|
15
15
|
|
|
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
|
|
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 F={command:`create <namespace>`,describe:`Create a repository`,builder:P,handler:async e=>l({command:`artifacts namespaces repos create`,classification:{safeFlags:[`read-only`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();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?r({default_branch:s(e[`default-branch`],`default-branch`,`text`),description:s(e.description,`description`,`text`),name:s(e.name,`name`,`text`),read_only:e[`read-only`]}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),m=e.local?c:await a();if(e.accountId=m,e.body!==void 0){let t=l,n=await d(`Creating`,async()=>p.send(N,{body:t,account_id:m,namespace:e.namespace}));u(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`The name field`));let h=r({default_branch:s(e[`default-branch`],`default-branch`,`text`),description:s(e.description,`description`,`text`),name:s(e.name,`name`,`text`),read_only:e[`read-only`]}),g=await d(`Creating`,async()=>p.send(N,{body:h,account_id:m,namespace:e.namespace}));u(g,{successLabel:`Created`})})};var I={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 L(e){return e.usage(`$0 artifacts namespaces repos delete <name>
|
|
17
17
|
|
|
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
|
|
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 R={command:`delete <name>`,describe:`Delete a repository`,builder:L,handler:async e=>l({command:`artifacts namespaces repos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();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 n=await t(e),r=e.local?c:await a();if(e.accountId=r,!await p({force:!!e.force}))return;let s=await d(`Deleting`,async()=>n.send(I,{account_id:r,namespace:e.namespace,name:e.name}));u(s,{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 artifacts namespaces repos files get <name>
|
|
19
19
|
|
|
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
|
|
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 B={command:`get <name>`,describe:`Read a file`,builder:z,handler:async e=>l({command:`artifacts namespaces repos files get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{let n={ref:e.ref,path:e.path};if(e.dryRun){let t=await i();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:n,bodyKind:`none`});return}await t(e);let r=e.local?c:await a();e.accountId=r;let s=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l=await d(`Loading`,async()=>h(`/accounts/${r}/artifacts/namespaces/${encodeURIComponent(String(e.namespace))}/repos/${encodeURIComponent(String(e.name))}/file${s?`?`+s:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(e.text===!0?l.toString(`utf-8`):l)})},V={command:`files`,describe:`Operations for namespaces.repos.files`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={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 U(e){return e.usage(`$0 artifacts namespaces repos fork <name>
|
|
21
21
|
|
|
22
|
-
Forks a source repository into a new repository.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`default-branch-only`,{type:`boolean`,description:`The default_branch_only field`}).option(`description`,{type:`string`,description:`The description 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
|
|
22
|
+
Forks a source repository into a new repository.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`default-branch-only`,{type:`boolean`,description:`The default_branch_only field`}).option(`description`,{type:`string`,description:`The description 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 W={command:`fork <name>`,describe:`Fork a repository`,builder:U,handler:async e=>l({command:`artifacts namespaces repos fork`,classification:{safeFlags:[`default-branch-only`,`read-only`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos fork`,method:`POST`,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))}/fork`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?r({default_branch_only:e[`default-branch-only`],description:s(e.description,`description`,`text`),read_only:e[`read-only`]}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),f=await t(e),p=e.local?c:await a();if(e.accountId=p,e.body!==void 0){let t=l,n=await d(`Creating`,async()=>f.send(H,{body:t,account_id:p,namespace:e.namespace,name:e.name}));u(n,{successLabel:`Created`});return}let m=r({default_branch_only:e[`default-branch-only`],description:s(e.description,`description`,`text`),read_only:e[`read-only`]}),h=await d(`Creating`,async()=>f.send(H,{body:m,account_id:p,namespace:e.namespace,name:e.name}));u(h,{successLabel:`Created`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos/${t.name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function K(e){return e.usage(`$0 artifacts namespaces repos get <name>
|
|
23
23
|
|
|
24
|
-
Returns repository metadata.`).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})}const
|
|
24
|
+
Returns repository metadata.`).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})}const q={command:`get <name>`,describe:`Get a repository`,builder:K,handler:async e=>l({command:`artifacts namespaces repos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos 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))}`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(G,{account_id:r,namespace:e.namespace,name:e.name}));u(s,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos/${t.name}/import`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,413:`ContentTooLargeError`,422:`UnprocessableEntityError`,500:`InternalServerError`,502:`BadGatewayError`,503:`ServiceUnavailableError`,504:`GatewayTimeoutError`}};function ne(e){return e.usage(`$0 artifacts namespaces repos import <name>
|
|
25
25
|
|
|
26
|
-
Imports an HTTPS Git repository into an Artifacts repository.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`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(`depth`,{type:`number`,description:`The depth field`}).option(`read-only`,{type:`boolean`,description:`The read_only field`}).option(`url`,{type:`string`,description:`The url 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 Y={command:`import <name>`,describe:`Import a repository`,builder:
|
|
26
|
+
Imports an HTTPS Git repository into an Artifacts repository.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`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(`depth`,{type:`number`,description:`The depth field`}).option(`read-only`,{type:`boolean`,description:`The read_only field`}).option(`url`,{type:`string`,description:`The url 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 Y={command:`import <name>`,describe:`Import a repository`,builder:ne,handler:async e=>l({command:`artifacts namespaces repos import`,classification:{safeFlags:[`read-only`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos import`,method:`POST`,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))}/import`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?r({branch:s(e.branch,`branch`,`text`),depth:e.depth,read_only:e[`read-only`],url:s(e.url,`url`,`text`)}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),m=e.local?c:await a();if(e.accountId=m,e.body!==void 0){let t=l,n=await d(`Creating`,async()=>p.send(J,{body:t,account_id:m,namespace:e.namespace,name:e.name}));u(n,{successLabel:`Created`});return}e.url===void 0&&(e.url=await f(`url`,`The url field`));let h=r({branch:s(e.branch,`branch`,`text`),depth:e.depth,read_only:e[`read-only`],url:s(e.url,`url`,`text`)}),g=await d(`Creating`,async()=>p.send(J,{body:h,account_id:m,namespace:e.namespace,name:e.name}));u(g,{successLabel:`Created`})})};var X={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos`,query:[`limit`,`cursor`,`search`,`sort`,`direction`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Z(e){return e.usage(`$0 artifacts namespaces repos list
|
|
27
27
|
|
|
28
|
-
Lists repositories in a namespace.`).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`search`,{type:`string`,description:`Search`}).option(`sort`,{type:`string`,description:`Sort`,choices:[`created_at`,`updated_at`,`last_push_at`,`name`]}).option(`direction`,{type:`string`,description:`Direction`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`list`,describe:`List repositories`,builder:Z,handler:async e=>
|
|
28
|
+
Lists repositories in a namespace.`).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`search`,{type:`string`,description:`Search`}).option(`sort`,{type:`string`,description:`Sort`,choices:[`created_at`,`updated_at`,`last_push_at`,`name`]}).option(`direction`,{type:`string`,description:`Direction`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`list`,describe:`List repositories`,builder:Z,handler:async e=>l({command:`artifacts namespaces repos list`,classification:{safeFlags:[`sort`,`direction`,`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor,search:e.search,sort:e.sort,direction:e.direction};if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos list`,method:`GET`,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??``)},query:n,bodyKind:`none`});return}let r=await t(e),s=e.local?c:await a();e.accountId=s;let l=await d(`Loading`,async()=>r.send(X,{account_id:s,namespace:e.namespace,...n}));u(l,{successLabel:`Loaded`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos/${t.name}/log`,query:[`ref`,`limit`,`offset`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function ae(e){return e.usage(`$0 artifacts namespaces repos logs get <name>
|
|
29
29
|
|
|
30
|
-
Returns commit metadata walking backwards from a ref, branch, tag, or HEAD.`).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. Defaults to HEAD.`}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <name>`,describe:`Read commit history`,builder:ae,handler:async e=>
|
|
30
|
+
Returns commit metadata walking backwards from a ref, branch, tag, or HEAD.`).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. Defaults to HEAD.`}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <name>`,describe:`Read commit history`,builder:ae,handler:async e=>l({command:`artifacts namespaces repos logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={ref:e.ref,limit:e.limit,offset:e.offset};if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos logs 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))}/log`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``)},query:n,bodyKind:`none`});return}let r=await t(e),s=e.local?c:await a();e.accountId=s;let l=await d(`Loading`,async()=>r.send(ie,{account_id:s,namespace:e.namespace,name:e.name,...n}));u(l,{successLabel:`Loaded`})})},se={command:`logs`,describe:`Operations for namespaces.repos.logs`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ce(e){return e.usage(`$0 artifacts namespaces repos raw get <path>
|
|
31
31
|
|
|
32
|
-
Returns file bytes resolved by ref and path, with a sniffed content type and browser-safe response headers.`).positional(`path`,{type:`string`,description:`File path. May contain slashes.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`ref`,{type:`string`,description:`Git ref, branch, tag, or 40-character commit hash.`,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 le={command:`get <path>`,describe:`Read a raw file with content type`,builder:ce,handler:async e=>
|
|
32
|
+
Returns file bytes resolved by ref and path, with a sniffed content type and browser-safe response headers.`).positional(`path`,{type:`string`,description:`File path. May contain slashes.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`ref`,{type:`string`,description:`Git ref, branch, tag, or 40-character commit hash.`,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 le={command:`get <path>`,describe:`Read a raw file with content type`,builder:ce,handler:async e=>l({command:`artifacts namespaces repos raw get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos raw 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))}/raw/${e.ref==null?`<ref>`:encodeURIComponent(String(e.ref))}/${e.path==null?`<path>`:encodeURIComponent(String(e.path))}`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``),ref:String(e.ref??``),path:String(e.path??``)},bodyKind:`none`});return}await t(e);let n=e.local?c:await a();e.accountId=n;let r=await d(`Loading`,async()=>h(`/accounts/${n}/artifacts/namespaces/${encodeURIComponent(String(e.namespace))}/repos/${encodeURIComponent(String(e.name))}/raw/${encodeURIComponent(String(e.ref))}/${encodeURIComponent(String(e.path))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));m(e.text===!0?r.toString(`utf-8`):r)})},ue={command:`raw`,describe:`Operations for namespaces.repos.raw`,builder:e=>e.command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos/${t.name}/tokens`,query:[`state`,`page`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function fe(e){return e.usage(`$0 artifacts namespaces repos tokens list
|
|
33
33
|
|
|
34
|
-
Lists tokens for a repository.`).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`state`,{type:`string`,description:`State`,choices:[`active`,`expired`,`revoked`,`all`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List repository tokens`,builder:fe,handler:async e=>
|
|
34
|
+
Lists tokens for a repository.`).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`state`,{type:`string`,description:`State`,choices:[`active`,`expired`,`revoked`,`all`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List repository tokens`,builder:fe,handler:async e=>l({command:`artifacts namespaces repos tokens list`,classification:{safeFlags:[`state`,`dry-run`]}},e,async()=>{let n={state:e.state,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos tokens list`,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))}/tokens`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``)},query:n,bodyKind:`none`});return}let r=await t(e),s=e.local?c:await a();e.accountId=s;let l=await d(`Loading`,async()=>r.send(de,{account_id:s,namespace:e.namespace,name:e.name,...n}));u(l,{successLabel:`Loaded`})})},me={command:`tokens`,describe:`Operations for namespaces.repos.tokens`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`GET`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/repos/${t.name}/tree/${t.hash}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function ge(e){return e.usage(`$0 artifacts namespaces repos trees get <hash>
|
|
35
35
|
|
|
36
|
-
Returns decoded entries for an immutable Git tree object. A commit hash returns that commit's root tree; a blob or tag hash returns 422. Tree responses are cacheable forever by hash.`).positional(`hash`,{type:`string`,description:`40-character lowercase hexadecimal Git object hash.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`get <hash>`,describe:`Read a Git tree`,builder:ge,handler:async e=>
|
|
36
|
+
Returns decoded entries for an immutable Git tree object. A commit hash returns that commit's root tree; a blob or tag hash returns 422. Tree responses are cacheable forever by hash.`).positional(`hash`,{type:`string`,description:`40-character lowercase hexadecimal Git object hash.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`get <hash>`,describe:`Read a Git tree`,builder:ge,handler:async e=>l({command:`artifacts namespaces repos trees get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf artifacts namespaces repos trees 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))}/tree/${e.hash==null?`<hash>`:encodeURIComponent(String(e.hash))}`,pathParams:{namespace:String(e.namespace??``),name:String(e.name??``),hash:String(e.hash??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();e.accountId=r;let s=await d(`Loading`,async()=>n.send(he,{account_id:r,namespace:e.namespace,name:e.name,hash:e.hash}));u(s,{successLabel:`Loaded`})})},ve={command:`trees`,describe:`Operations for namespaces.repos.trees`,builder:e=>e.command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`repos`,describe:`Operations for namespaces.repos`,builder:e=>e.command(F).command(R).command(W).command(q).command(Y).command(re).command(O).command(M).command(V).command(se).command(ue).command(me).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}/tokens`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function be(e){return e.usage(`$0 artifacts namespaces tokens create <namespace>
|
|
37
37
|
|
|
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=>
|
|
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=>s(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=>l({command:`artifacts namespaces tokens create`,classification:{safeFlags:[`scope`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();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?r({repo:s(e.repo,`repo`,`text`),scope:e.scope,ttl:e.ttl}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),m=e.local?c:await a();if(e.accountId=m,e.body!==void 0){let t=l,n=await d(`Creating`,async()=>p.send(Q,{body:t,account_id:m,namespace:e.namespace}));u(n,{successLabel:`Created`});return}e.repo===void 0&&(e.repo=await f(`repo`,`The repo field`));let h=r({repo:s(e.repo,`repo`,`text`),scope:e.scope,ttl:e.ttl}),g=await d(`Creating`,async()=>p.send(Q,{body:h,account_id:m,namespace:e.namespace}));u(g,{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>
|
|
39
39
|
|
|
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=>
|
|
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=>l({command:`artifacts namespaces tokens revoke`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();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 n=await t(e),r=e.local?c:await a();if(e.accountId=r,!await p({force:!!e.force}))return;let s=await d(`Deleting`,async()=>n.send(xe,{account_id:r,namespace:e.namespace,id:e.id}));u(s,{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(ee).command(S).command(T).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-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,t as i}from"./context-BGm5_wTT.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-hFMAotFl.mjs";import{t as s}from"./progress-DE_G09u2.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.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
|
-
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();
|
|
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();n({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 t(e),d=e.local?a:await i();e.accountId=d;let f=await s(`Loading`,async()=>u.send(l,{account_id:d,...c}));o(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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{J as e,U as t}from"./dist-BxhwE-W1.mjs";import{t as n}from"./auth-token-CE3Wa5-b.mjs";import{a as r,n as i}from"./context-BGm5_wTT.mjs";import{l as a}from"./oauth-BgDZMd72.mjs";import{n as o}from"./request-headers-Bopp5lH_.mjs";import{i as s,r as c,t as l}from"./api-Dnt6lRJG.mjs";const u=6e4;function d(e){return(n,r)=>{if(!process.env.CLOUDFLARE_API_HEADERS)return e(n,r);let i={...r,duplex:`half`},a=new Request(n,i);return t(a.headers),e(a)}}function f(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream}var p={method:`GET`,path:()=>`/accounts`,query:[`name`,`page`,`per_page`,`direction`]},m={method:`GET`,path:()=>`/memberships`,query:[`account.name`,`page`,`per_page`,`order`,`direction`,`name`,`status`]};function h(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function g(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function _(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function v(e,t,n){if(n!=null&&n!==``){if(Array.isArray(n))for(let r of n)v(e,t,r);else e.append(t,String(n))}}function y(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))v(t,n,r);return t.toString()}function b(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=y(n??{});return a&&(i.search=a),i.toString()}const x=/* @__PURE__ */ new WeakMap,S=/* @__PURE__ */ new WeakMap;async function C(e,t,n,r={}){let i=e.baseUrl,a=b(n,i,r.query),o={...r.headers},l;r.body!==void 0&&(h(r.body)||typeof r.body==`string`&&g(o)?l=r.body:(o[`Content-Type`]??=`application/json`,l=JSON.stringify(r.body)));let u=r.timeout===void 0&&f(l)?S.get(e):void 0,d=r.timeout??x.get(e)??6e4,p;try{p=await(u??e).fetch(a,{method:t,headers:o,body:l,signal:r.signal},{timeoutInSeconds:r.timeout===void 0?void 0:r.timeout/1e3,abortSignal:r.signal})}catch(e){throw r.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(!p.ok)throw new s({statusCode:p.status,body:await _(p),rawResponse:{status:p.status,statusText:p.statusText,url:p.url||a,headers:p.headers,redirected:p.redirected,type:p.type}});if(p.status===204)return null;let m=p.headers.get(`content-type`)??``;if(!m.includes(`application/json`)&&r.preserveNonJsonBytes)return Buffer.from(await p.arrayBuffer());let v=await p.text();if(v===``)return null;if(!m.includes(`application/json`))return v;let y=JSON.parse(v);if(y.success===!1){let e=y.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`;throw new s({message:`API error: ${e}`,statusCode:p.status,body:y})}return`result`in y?c(y.result,y.result_info):y}function w(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.customApiHeaders===!1?e.fetch??globalThis.fetch:d(e.fetch??globalThis.fetch)},n=new l(t);return x.set(n,e.timeout??6e4),e.timeout===void 0&&S.set(n,new l({...t,timeoutInSeconds:void 0})),n}async function T(t){if(a())return;let s=await r();if(s)return s;try{let r=await n(),a=e({compliance_region:await i()}),s=t-Date.now();if(s<=0)return;let c=w({apiToken:r,baseURL:a,defaultHeaders:o()}),l={timeoutInSeconds:s/1e3,maxRetries:0},[u,d]=await Promise.allSettled([c.send(p,{per_page:50},l),c.send(m,{per_page:50},l)]);if(u.status===`rejected`)return;let f=u.value;if((f.result_info?.total_count??f.result.length)>f.result.length)return;let h=f.result;if(d.status===`fulfilled`){let e=d.value.result??[];if((d.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 E(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 r=e({compliance_region:await i()});if(t.local){let{createLocalFetch:e}=await import(`./local-DRxctCh9.mjs`);return w({apiToken:`cf-local-mode-no-auth`,customApiHeaders:!1,baseURL:r,defaultHeaders:o(),fetch:e({persistTo:t.persistTo,apiBaseUrl:r})})}return w({apiToken:await n(),baseURL:r,defaultHeaders:o()})}export{T as a,f as c,C as i,d as l,E as n,m as o,y as r,p as s,w as t,u};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import"./telemetry-COlodX5Z.mjs";import{a as t,c as n,i as r,n as i,o as a,r as o,s,t as c}from"./login-DiR-buzS.mjs";import{i as l}from"./blocks-C3Im7AT0.mjs";import{d as u,f as d,i as f,r as p,t as m}from"./oauth-BgDZMd72.mjs";import"./ui-dWsVmFCG.mjs";import{t as h}from"./log-Brx-wjJW.mjs";import{c as g}from"./chunk-Q5KVZMHK-WOCEMyET.mjs";import{n as _,o as v,s as y}from"./schema-cache-CtqAs0PP.mjs";import{t as b}from"./cf-DmvZ2L51.mjs";import{n as x}from"./run-CXWkMU3x.mjs";import{t as S}from"./agent-context-Dtyy4aKL.mjs";import{t as C}from"./auth-token-CE3Wa5-b.mjs";import{t as w}from"./output-hFMAotFl.mjs";const T={command:`logout`,describe:`Log out and remove stored credentials`,handler:async t=>{r(t,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let n=p();n!=="default"&&h.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 u(`default`)}},E=`oauth-scopes`;function D(e){if(!Array.isArray(e))return;let t=[];for(let n of e){let{id:e,name:r,category:i}=n??{};typeof e==`string`&&t.push({id:e,name:typeof r==`string`?r:e,...typeof i==`string`&&{category:i}})}return t.length>0?t:void 0}function O(e){return new Map(e.map(e=>[e.id,e]))}async function k(e){let t=v(E,[],864e5,D);if(t)return O(t);let[n,{default:r}]=await Promise.all([e(),import(`./list-4MfEFwJN.mjs`)]),i=await n.send(r),a=D(typeof i==`object`&&i&&`result`in i?i.result:i);if(!a)throw Error(`the API returned an unexpected scope catalogue`);return y(E,[],a),O(a)}const A={account_and_billing:`Account & Billing`,ai_and_machine_learning:`AI & Machine Learning`,analytics_and_logs:`Analytics & Logs`,app_security:`App Security`,cache_and_performance:`Cache & Performance`,cloudflare_one_and_zero_trust:`Cloudflare One / Zero Trust`,developer_platform:`Developer Platform`,dns_and_zones:`DNS & Zones`,email_and_messaging:`Email & Messaging`,media:`Media`,network_services:`Network Services`,other:`Other`,rules_and_configuration:`Rules & Configuration`},j=`Uncategorized`,M=[`Other`,j],N=new Set(b),P=/* @__PURE__ */ new Set([`read`,`metadata_read`]),F=/^(.+)([.:])([^.:]+)$/;function I(e){return A[e]??e.split(`_`).map(e=>e===`and`?`&`:e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function L(e,t){return M.indexOf(e)-M.indexOf(t)||e.localeCompare(t)}function R(e){return e.some(e=>F.test(e))}function z(e,t){let n=/* @__PURE__ */ new Map;for(let r of e){let e=F.exec(r);if(!e?.[1]||!e[3])continue;let i=t.get(r),a=i?.category?I(i.category):j,o=n.get(a)??[];o.push({scope:r,resource:e[1],action:e[3]}),n.set(a,o)}return n}function B(e,t,n){let r=t.get(e)??[],i=n.get(e)?.length??0,a=r.filter(({scope:e})=>N.has(e)).length,o=r.length-a,s=i>0?[`${a}/${i}`]:[];return o>0&&s.push(`${o} custom`),s.join(` + `)}function V(t,n){let r=z(t,n),i=z(b,n),a=[...r.keys()].sort(L);if(a.length===0)return``;let o=Math.max(...a.map(e=>e.length));return a.map(t=>`${e.bold(e.info(t.padEnd(o)))} ${e.muted(B(t,r,i))}`).join(`
|
|
3
|
+
`)}const H=e=>` ${e.toLowerCase().replace(/[^a-z0-9]+/g,` `)}`,U=e=>e.toLowerCase().replaceAll(`_`,`-`);function W(e,t){return H(e).includes(H(t).trimEnd())}function G(e){let t=/* @__PURE__ */ new Set([j]);for(let{category:n}of e.values())n&&t.add(I(n));return[...t].sort(L)}function K(t,n,{product:r=``,filter:i=``}={}){let a=z(t,n),o=z(b,n),s=[];for(let t of[...a.keys()].sort(L)){if(!W(t,r))continue;let n=(a.get(t)??[]).filter(({scope:e})=>U(e).includes(U(i)));if(n.length===0)continue;let c=[`${e.bold(e.info(t))} ${e.muted(`(${B(t,a,o)})`)}`],l=/* @__PURE__ */ new Map,u=[...n].sort((e,t)=>Number(!P.has(e.action))-Number(!P.has(t.action))||e.action.localeCompare(t.action));for(let{scope:t,resource:n,action:r}of u){let i=(P.has(r)?e.muted(r):e.warning(r))+(N.has(t)?``:e.muted(` (custom)`));l.set(n,(l.get(n)??/* @__PURE__ */ new Set).add(i))}let d=Math.max(...[...l.keys()].map(e=>e.length));for(let[e,t]of[...l].sort(([e],[t])=>e.localeCompare(t)))c.push(` ${e.padEnd(d)} ${[...t].join(`, `)}`);s.push(c.join(`
|
|
4
|
+
`))}return s.join(`
|
|
5
|
+
|
|
6
|
+
`)}function q(e){let t=p();return t==="default"?e?`cf auth login --force`:`cf auth login`:`cf auth create ${t}`}function J(t){let n=t?.statusCode;return n===401||n===403?`your login was rejected; run ${e.code(q(!0))} to log in again`:_(t)}const Y={command:`scopes [product]`,describe:`Show the OAuth scopes granted to the current login, by product`,builder:e=>e.positional(`product`,{type:`string`,description:`Show the granted permissions in product areas matching this name, such as dns or developer`}).option(`all`,{type:`boolean`,description:`Show every granted permission, grouped by product`,default:!1}).option(`filter`,{type:`string`,description:`Show the granted permissions whose scope contains this term`}),handler:async t=>{if(t[`temporary-account`]||t[`event-code`]!==void 0)throw Error(`--temporary-account and --event-code are not supported by cf auth scopes.`);if(g({allowGlobalAuthKey:!1})!==void 0){h.warn(`${e.code(`CLOUDFLARE_API_TOKEN`)} is set, so its own permissions apply rather than OAuth scopes.`);return}let n=d();if(n?.oauth_token===void 0){h.info(`Not logged in. Run ${e.code(q(!1))} to log in.`);return}let{scopes:r}=n;if(!r){h.info(`This login didn't record its scopes. Run ${e.code(q(!0))} to log in again.`);return}if(!R(r)){h.info(`No product scopes granted. Run ${e.code(q(!0))} to log in with the default scopes.`);return}let i;try{i=await k(async()=>{let{createCommandClient:e}=await import(`./auth-Czr8ChBB.mjs`);return e(t)})}catch(e){h.warn(`Couldn't load Cloudflare's scope catalogue (${J(e)}), so scopes are listed without product groups.`),console.log(r.join(`
|
|
7
|
+
`));return}if(t.product===void 0&&!t.all&&t.filter===void 0){console.log(V(r,i)),h.info(`Run ${e.code(`cf auth scopes <product>`)} to see a product's permissions, or ${e.code(`cf auth scopes --all`)} for every granted product.`);return}let{product:a}=t;a!==void 0&&!G(i).some(e=>W(e,a))?h.info(`No product area matches "${a}". Run ${e.code(`cf auth scopes --filter ${a}`)} to search scope names instead.`):console.log(K(r,i,{product:t.product,filter:t.filter})||e.muted(`No granted scopes match.`))}},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 t=process.env.CLOUDFLARE_API_TOKEN,n=d(),r;r=t?`CLOUDFLARE_API_TOKEN environment variable`:n?.oauth_token?`OAuth token from ${f()}`:`none`;try{await C()}catch{w({authenticated:!1,error:`Not logged in`}),r===`none`&&S().isAgentic&&console.error(l('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{createCommandClient:i}=await import(`./auth-Czr8ChBB.mjs`),{default:a}=await import(`./get-BTisquA3.mjs`),{default:o}=await import(`./verify-B9ILCohg.mjs`),s=await i(e),c,u=[],[p,h,g]=await Promise.allSettled([t?s.send(o):Promise.resolve(void 0),s.send(a),m()]);if(p.status===`rejected`&&process.env.DEBUG&&console.error(`Token verification error:`,p.reason),h.status===`fulfilled`){let e=h.value;e&&`email`in e&&typeof e.email==`string`&&(c=e.email)}else process.env.DEBUG&&console.error(`User lookup error:`,h.reason);g.status===`fulfilled`?u=g.value:process.env.DEBUG&&console.error(`Account lookup error:`,g.reason);let _=null;p.status===`fulfilled`&&[`active`,`disabled`,`expired`].includes(p.value?.status??``)?_=p.value?.status===`active`:(h.status===`fulfilled`||g.status===`fulfilled`)&&(_=!0);let v={authenticated:!0,authSource:r,tokenValid:_,...c&&{email:c},accounts:u};n?.oauth_token&&(v.scopes=n.scopes,v.expiresAt=n.expiration_time),w(v)}},Z={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(x(c,{command:`auth login`,classification:i})).command(Q(T,`auth logout`)).command(Q(X,`auth whoami`)).command(Q(Y,`auth scopes`,[`all`])).command(Q(t,`auth create`,[`browser`,`device`])).command(Q(s,`auth delete`)).command(Q(o,`auth activate`)).command(Q(a,`auth deactivate`)).command(Q(n,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e,t,n=[],r){return x(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{Z as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{c as e}from"./chunk-
|
|
2
|
+
import{c as e}from"./chunk-Q5KVZMHK-WOCEMyET.mjs";import{t}from"./errors-C_bGcR0X.mjs";import{c as n,l as r,p as i,s as a}from"./oauth-BgDZMd72.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
|