cf 1.0.0-beta.1 → 1.0.0-beta.11
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 +12 -0
- package/dist/_meta/commands.json +11448 -13819
- package/dist/_meta/hand-written-commands.json +579 -41
- package/dist/_meta/schemas.json +14496 -16450
- package/dist/abuse-reports-DX5xgeka.mjs +24 -0
- package/dist/access-DuHs0Mii.mjs +2 -0
- package/dist/{account-tags-DAf-hq1m.mjs → account-tags-CiKwgOWd.mjs} +6 -6
- package/dist/{accounts-BDIKjiG2.mjs → accounts-DfXSHrkF.mjs} +63 -57
- package/dist/{acm-D-q1FVWJ.mjs → acm-BgSr3Ig4.mjs} +7 -7
- package/dist/{addressing-0w2U1NEy.mjs → addressing-B70NFnrX.mjs} +43 -43
- package/dist/agent-context-GRiQ4zRU.mjs +2 -0
- package/dist/{agent-memory-Drumm4qd.mjs → agent-memory-DJRquHeq.mjs} +15 -15
- package/dist/ai-CP2oIS-I.mjs +29 -0
- package/dist/{ai-audit-CPrmohqf.mjs → ai-audit-Bn_BfMFS.mjs} +3 -3
- package/dist/ai-gateway-CrrEtzUP.mjs +82 -0
- package/dist/{ai-search-B5l4IDSR.mjs → ai-search-C4YWVTCa.mjs} +42 -42
- package/dist/{ai-security-C7_IGDDl.mjs → ai-security-Bt_fG65f.mjs} +4 -4
- package/dist/{alerting-B6m1Rhf4.mjs → alerting-CRr88fVR.mjs} +26 -26
- package/dist/{analytics-nnzFBB_7.mjs → analytics-XqS9OP5B.mjs} +11 -12
- package/dist/{analytics_engine-BvjKCwn1.mjs → analytics_engine-CzmYem4f.mjs} +2 -2
- package/dist/{api-security-B9IozS2a.mjs → api-security-gB1FHrHq.mjs} +57 -57
- package/dist/{argo-C_QcqR6P.mjs → argo-wFCAsYx7.mjs} +5 -5
- package/dist/args-CXgkQKK7.mjs +2 -0
- package/dist/{artifacts-DDFNpYBz.mjs → artifacts-qFjlNRqb.mjs} +20 -20
- package/dist/{audit-logs-cTzNV0DV.mjs → audit-logs-CpPUjMUP.mjs} +2 -2
- package/dist/auth-7Fk7PVIC.mjs +2 -0
- package/dist/auth-BmJ946bE.mjs +2 -0
- package/dist/auth-Br-t8vL_.mjs +2 -0
- package/dist/auth-token-DeG33BMQ.mjs +8 -0
- package/dist/autoconfig-D-copdZG.mjs +511 -0
- package/dist/banner-Xk4xBN8U.mjs +2 -0
- package/dist/basin-catalog-CshcpsAH.mjs +46 -0
- package/dist/{billing-DU2X-q-x.mjs → billing-B-xNxxiP.mjs} +11 -11
- package/dist/{bot-management-BHAAoZOh.mjs → bot-management-DhafeA2J.mjs} +4 -4
- package/dist/{botnet-feed-DOOnGVVY.mjs → botnet-feed-D6uCLE_D.mjs} +5 -5
- package/dist/{brand-protection-C_DYa7IK.mjs → brand-protection-c3WiHbYn.mjs} +13 -13
- package/dist/browser-extension-Dee2Y1qn.mjs +2 -0
- package/dist/{browser-run-Dw-vgWGR.mjs → browser-run-D9_cwaSD.mjs} +24 -24
- package/dist/build-9ihDp-Gy.mjs +2 -0
- package/dist/build-DrG6TqMw.mjs +2 -0
- package/dist/{builds-CO0MmSd3.mjs → builds-Dl8if-2k.mjs} +32 -32
- package/dist/cache-CIZokBjd.mjs +45 -0
- package/dist/{certificate-authorities-Dmxh7w-Z.mjs → certificate-authorities-NUQzCDK8.mjs} +3 -3
- package/dist/cf-DfQfIu3q.mjs +18 -0
- package/dist/chunk-FT2NMTJB-BFqlGcem.mjs +97 -0
- package/dist/chunk-KKDV4JPS-B_t8sDTz.mjs +2 -0
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +2 -0
- package/dist/chunk-WMOON6TZ-B8xCqjB1.mjs +2 -0
- package/dist/cli-aChy8ou_.mjs +6 -0
- package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
- package/dist/client-certificates-qgLpBn8t.mjs +13 -0
- package/dist/{client-side-security-D7NWV0YH.mjs → client-side-security-DZO6Xw14.mjs} +14 -14
- package/dist/{cloud-connector-XMFOTNqT.mjs → cloud-connector-C7vGDCzX.mjs} +3 -3
- package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-CEfZhSQH.mjs} +1 -1
- package/dist/{cloudforce-one-Cew4MHvA.mjs → cloudforce-one-CE7y5UkF.mjs} +237 -246
- package/dist/command-07vhr56i.mjs +2 -0
- package/dist/command-B6TpINoN.mjs +2 -0
- package/dist/command-BWC9CbE7.mjs +2 -0
- package/dist/command-BsmF3J_l.mjs +2 -0
- package/dist/command-C2pNxAeL.mjs +2 -0
- package/dist/command-C65Ed0o9.mjs +2 -0
- package/dist/command-Cdx___59.mjs +2 -0
- package/dist/command-CrtDkZNs.mjs +2 -0
- package/dist/command-D0MKPucK.mjs +2 -0
- package/dist/command-DHdWKtqx.mjs +2 -0
- package/dist/command-Ds5OVat3.mjs +2 -0
- package/dist/command-Dv6YavZa.mjs +2 -0
- package/dist/command-dAYWrB5y.mjs +2 -0
- package/dist/command-eM48o0J6.mjs +2 -0
- package/dist/command-maDJWJgu.mjs +2 -0
- package/dist/{completions-xPLd1cvL.mjs → completions-D0280hul.mjs} +26 -26
- package/dist/{connector-interrupts-BfQN_pm6.mjs → connector-interrupts-CVjFhU-C.mjs} +3 -3
- package/dist/{connector-telemetry-events-B7qLZsZJ.mjs → connector-telemetry-events-Bu3LKP6T.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-Ckvg9BPc.mjs → connector-telemetry-snapshots-BbDTIc06.mjs} +3 -3
- package/dist/{connectors-BhvAP5fb.mjs → connectors-DGtx-rPI.mjs} +7 -7
- package/dist/{containers-Cq1gtnq6.mjs → containers-CzNbBrYE.mjs} +70 -72
- package/dist/{containers-Bl3EY-cy.mjs → containers-DEFrbNgO.mjs} +17 -17
- package/dist/{content-scan-BYGe9fFj.mjs → content-scan-BCtWBCqd.mjs} +6 -6
- package/dist/context-CquYYyS3.mjs +7 -0
- package/dist/{cps-BWMDWeVq.mjs → cps-C8BbnbuD.mjs} +1 -1
- package/dist/{csamScanner-DMYGzLNi.mjs → csamScanner-CsJ9H2fA.mjs} +3 -3
- package/dist/{ct-alerting-Vq4l2s7n.mjs → ct-alerting-CYsQZO2H.mjs} +3 -3
- package/dist/{custom-certificates-BDEHH0Ym.mjs → custom-certificates-CA8HqolM.mjs} +8 -8
- package/dist/{custom-csrs-CHSkZNdX.mjs → custom-csrs-D0P2vWJE.mjs} +5 -5
- package/dist/{custom-hostnames-Bch3iQZC.mjs → custom-hostnames-CzYMChbh.mjs} +12 -12
- package/dist/{custom-nameservers-Tdvu1-vr.mjs → custom-nameservers-Cet3oF56.mjs} +5 -5
- package/dist/{custom-pages-rFsiIXlr.mjs → custom-pages-DUkHIaTP.mjs} +10 -10
- package/dist/d1-B2duXfH2.mjs +41 -0
- package/dist/{dcv-delegation-D6xiYj2l.mjs → dcv-delegation-BkdRVEAH.mjs} +2 -2
- package/dist/{delegate-GctF_lrq.mjs → delegate-CCGgla7X.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-D04Xvm0m.mjs → deploy-BdWBEbLj.mjs} +1 -1
- package/dist/{deploy-input-COEKxOA1.mjs → deploy-input-LmLfj6kI.mjs} +1 -1
- package/dist/dev-BHkVwAea.mjs +4 -0
- package/dist/{diagnostics-BZVAAguV.mjs → diagnostics-9Wj5UWBL.mjs} +7 -7
- package/dist/dialog-Dpi-UVbz.mjs +2 -0
- package/dist/discover-BYkHr5Ja.mjs +2 -0
- package/dist/discover-t6E9lpf3.mjs +2 -0
- package/dist/{dist-BpadEMNY.mjs → dist-Cpb7_h4N.mjs} +35 -35
- package/dist/dist-D1iG7guo.mjs +366 -0
- package/dist/dist-zep5OXGt.mjs +48 -0
- package/dist/{dls-BsnURYja.mjs → dls-Caya7FZc.mjs} +8 -8
- package/dist/{dns-B_nTXhuM.mjs → dns-BLNa0GrP.mjs} +72 -63
- package/dist/{dns-firewall-DDsrdulo.mjs → dns-firewall-ChCvC5rT.mjs} +8 -8
- package/dist/dot-prop-IITUZ2XW-BsZYdILY.mjs +2 -0
- package/dist/dotenv-CcQjGlV0.mjs +4 -0
- package/dist/dry-run-p9Q7nMZ5.mjs +2 -0
- package/dist/durable-objects-DuRbdp7N.mjs +6 -0
- package/dist/{email-auth-CzjtGH6g.mjs → email-auth-C28s03aI.mjs} +3 -3
- package/dist/{email-routing-B92fty1-.mjs → email-routing-Ci-xjXIN.mjs} +24 -24
- package/dist/email-security-DPU6xvI9.mjs +158 -0
- package/dist/{email-sending-B7f95epu.mjs → email-sending-kTVAlVKO.mjs} +23 -23
- package/dist/error-sanitization-BbEw--0B.mjs +2 -0
- package/dist/error-sanitization-p5rmb53x.mjs +2 -0
- package/dist/errors-cuuW88wR.mjs +3 -0
- package/dist/{fieldExtractors-DL_H1m7E.mjs → fieldExtractors-ceaXu4zD.mjs} +4 -4
- package/dist/firewall-BND3qSY2.mjs +36 -0
- package/dist/flagship-DfxbNzgx.mjs +28 -0
- package/dist/{fraud-DU_YCLC5.mjs → fraud-DgyYv_CC.mjs} +3 -3
- package/dist/generate-9P8Q_RiO.mjs +2 -0
- package/dist/generate-VxmGG8BF.mjs +3 -0
- package/dist/{google-tag-gateway-xqN-QudN.mjs → google-tag-gateway-v3p7murv.mjs} +3 -3
- package/dist/gt-KlYHH-UC.mjs +2 -0
- package/dist/{healthchecks-COnq1YOx.mjs → healthchecks-CByb4qYA.mjs} +10 -10
- package/dist/{hostnames-CxRAY_Pp.mjs → hostnames-3CqeMF5g.mjs} +6 -6
- package/dist/hyperdrive-CmyYTE-K.mjs +37 -0
- package/dist/{iam-CtX9NPCy.mjs → iam-CV_M681j.mjs} +24 -24
- package/dist/{images-CuWFOsGw.mjs → images-DaLPjskW.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-CBKifk5L.mjs +39 -0
- package/dist/{intel-BeGV3VXt.mjs → intel-MpftjuPB.mjs} +36 -36
- package/dist/interactive-D80kbTap.mjs +32 -0
- package/dist/interactive-mJQ_IrGd.mjs +2 -0
- package/dist/{ips-d6aoKAI4.mjs → ips-WWvPwSBc.mjs} +1 -1
- package/dist/k2-D0QYUFqT.mjs +13 -0
- package/dist/keyless-certificates-DqILy3t9.mjs +13 -0
- package/dist/{keys-Fyf3vWcA.mjs → keys-DhX4AcqF.mjs} +2 -2
- package/dist/kv-DLUfUL0_.mjs +15 -0
- package/dist/lazy-command--5YpWUVY.mjs +2 -0
- package/dist/{leaked-credential-checks-B7ewx3W-.mjs → leaked-credential-checks-C0U1oYM5.mjs} +8 -8
- package/dist/{load-balancers-DHD4f2CT.mjs → load-balancers-BJKI9lm7.mjs} +39 -39
- package/dist/local-DkYQiSQQ.mjs +2 -0
- package/dist/{local-B6b2OIBW.mjs → local-rYpzEQb-.mjs} +1 -1
- package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-DZTTIe6x.mjs} +1 -1
- package/dist/login-CnE2Ii_F.mjs +2 -0
- package/dist/login-bnylLTit.mjs +5 -0
- package/dist/{logo-matches-BAX8v3iL.mjs → logo-matches-DFZybI0C.mjs} +3 -3
- package/dist/{logos-BWBVGwU6.mjs → logos-Da2YtqSN.mjs} +4 -4
- package/dist/{logpush-CZKR8DHO.mjs → logpush-Q7WIEHS1.mjs} +23 -23
- package/dist/logs-c3b3USyS.mjs +36 -0
- package/dist/{magic-cloud-networking-DttrBXqd.mjs → magic-cloud-networking-BoyDmFq3.mjs} +37 -37
- package/dist/{magic-network-monitoring-9VXDSYuL.mjs → magic-network-monitoring-BkUbpMUp.mjs} +18 -18
- package/dist/{magic-transit-Dsu_cSGM.mjs → magic-transit-4-THD45G.mjs} +161 -165
- package/dist/{managed-defense-SYreve4W.mjs → managed-defense-CTMqSp6z.mjs} +9 -9
- package/dist/{managed-transforms-CzSy_xPw.mjs → managed-transforms-DcYAvqTe.mjs} +4 -4
- package/dist/{matches-qf7GReyu.mjs → matches-hnU16rSJ.mjs} +3 -3
- package/dist/{mcp-DYSk5_gc.mjs → mcp-kZX4irfN.mjs} +15 -15
- package/dist/{mesh-DdY07OYt.mjs → mesh-Dxzvvso6.mjs} +12 -12
- package/dist/migrate-BNvUWrjy.mjs +2 -0
- package/dist/monetization-Dsqj9DCA.mjs +20 -0
- package/dist/mtls-certificates-BSbMwIna.mjs +13 -0
- package/dist/{network-interconnects-C4uUoeNa.mjs → network-interconnects-osO_vAPu.mjs} +17 -17
- package/dist/{network-DpaZ5LJL.mjs → network-mEnXTEiG.mjs} +24 -24
- package/dist/oauth-CeZ3d_dB.mjs +9 -0
- package/dist/{oauth-clients-D7Ou7oAS.mjs → oauth-clients-CWPHi-Yn.mjs} +7 -7
- package/dist/{oauth-scopes-BFoE82Mv.mjs → oauth-scopes-CxpRD6d7.mjs} +1 -1
- package/dist/{oauth-nsTDJ0dF.mjs → oauth-w0fWmrwU.mjs} +1 -1
- package/dist/{observability-smcOFbC1.mjs → observability-BxL2RqWZ.mjs} +44 -44
- package/dist/open-PCXX3ZDZ-C7gpxSsl.mjs +4 -0
- package/dist/{organization-Dyf_0mq4.mjs → organization-DNieJ1xJ.mjs} +7 -7
- package/dist/{organizations-D7zGPLVm.mjs → organizations-BIXPmTy5.mjs} +1 -1
- package/dist/{origin-ca-certificates-DJrp29gv.mjs → origin-ca-certificates-dVJvSIH8.mjs} +3 -3
- package/dist/{origin-post-quantum-encryption-BYj3kJiq.mjs → origin-post-quantum-encryption-CO6tDW1t.mjs} +3 -3
- package/dist/{origin-tls-client-auth-j0tGh6Fy.mjs → origin-tls-client-auth-DeTY8aN2.mjs} +14 -14
- package/dist/output-ClYel9WX.mjs +2 -0
- package/dist/{page-rules-CLzba_nr.mjs → page-rules-DA552Ra4.mjs} +7 -7
- package/dist/pages-B0x7tidm.mjs +54 -0
- package/dist/{pay-per-crawl-DbaTVI8V.mjs → pay-per-crawl-DoTg9VP7.mjs} +32 -32
- package/dist/{pay-per-use-BEvtoppJ.mjs → pay-per-use-yRO2QBfe.mjs} +3 -3
- package/dist/{pipelines-lps71uoA.mjs → pipelines-CQxrm9ao.mjs} +20 -20
- package/dist/precursor-FiGYDRV9.mjs +4 -0
- package/dist/previews-BthBa50j.mjs +4 -0
- package/dist/progress-TLUEIYE6.mjs +2 -0
- package/dist/prompt-Ck_1PCHm.mjs +3 -0
- package/dist/{queries-EJYlFw8m.mjs → queries-C0RRdol7.mjs} +4 -4
- package/dist/{queues-CozKGaA4.mjs → queues-sLgvjsRP.mjs} +29 -35
- package/dist/r2-C2PllL6i.mjs +125 -0
- package/dist/r2-data-catalog-Bg7zq1IB.mjs +2 -0
- package/dist/{radar-NmpdyMo5.mjs → radar-Bez6k9Dw.mjs} +1 -1
- package/dist/raw-fetch-DNxNCoeP.mjs +2 -0
- package/dist/{realtime-iWTz8WbH.mjs → realtime-D-HSXznX.mjs} +78 -78
- package/dist/{registrar-Cza1L8i_.mjs → registrar-DwHrG9QR.mjs} +9 -9
- package/dist/{registrar-sandbox-BP4GQg5s.mjs → registrar-sandbox-jNukmzQP.mjs} +6 -6
- package/dist/{registry-vreNkX6u.mjs → registry-CsSLAAOE.mjs} +1 -1
- package/dist/{reporting-gvXX2MxY.mjs → reporting-DolhAb10.mjs} +7 -7
- package/dist/request-headers-Lhj314mk.mjs +2 -0
- package/dist/{request-tracers-F8a_aj32.mjs → request-tracers-w72hKc33.mjs} +2 -2
- package/dist/resolve-Djf2xgBx.mjs +2 -0
- package/dist/{resource-sharing-D6XWIDmb.mjs → resource-sharing-DTrSkqI4.mjs} +18 -18
- package/dist/{resource-tagging-c_z4VZt0.mjs → resource-tagging-aURR4fIJ.mjs} +2 -2
- package/dist/{rules-_QDaG3U5.mjs → rules-C8a7cV-W.mjs} +8 -8
- package/dist/{rulesets-Bc4ZuPG_.mjs → rulesets-RJ6yBefy.mjs} +20 -20
- package/dist/{rum-ChPyfpM2.mjs → rum-Bk1dPW4p.mjs} +14 -14
- package/dist/run-BJOAPmsz.mjs +2 -0
- package/dist/run-iFM5TxtQ.mjs +2 -0
- package/dist/{schema-flags-C9lbLgE-.mjs → schema-flags-PagOq-G2.mjs} +2 -2
- package/dist/schema-v7mOxMdx.mjs +2 -0
- package/dist/{scim-BjiswXbC.mjs → scim-C0FmjkkV.mjs} +10 -10
- package/dist/{secrets-store-Cn3D5a0d.mjs → secrets-store-cG_5RMzK.mjs} +11 -11
- package/dist/security-insights-DVAqroY5.mjs +40 -0
- package/dist/{security-txt-CaR5Idmz.mjs → security-txt-rfrrdiZV.mjs} +4 -4
- package/dist/session-B6mFkaVZ.mjs +2 -0
- package/dist/shared-BqsWoApw.mjs +2 -0
- package/dist/{smart-shield-CphSzoh4.mjs → smart-shield-_HA814Im.mjs} +11 -11
- package/dist/{snippets-r-Mre0cE.mjs → snippets-mRelEw0p.mjs} +10 -10
- package/dist/source-38bULAR8.mjs +6 -0
- package/dist/spawn-BzPhcLJI.mjs +10 -0
- package/dist/{spectrum-BhjCVFZk.mjs → spectrum-BwtOiaDw.mjs} +11 -11
- package/dist/{speed-CPgypY7n.mjs → speed-DmqsZtiJ.mjs} +11 -11
- package/dist/src--KDGqL5N.mjs +109 -0
- package/dist/{ssl-DsMrXyqK.mjs → ssl-DCvfveJB.mjs} +16 -16
- package/dist/startup-profile-BCe9k9sR.mjs +17 -0
- package/dist/startup-profile-WrwRyMwH.mjs +2 -0
- package/dist/{state-BxCejn42.mjs → state-BPwdiNO_.mjs} +1 -1
- package/dist/state-a1tTOGjm.mjs +2 -0
- package/dist/{stream-L2NmGPby.mjs → stream-aroClJeD.mjs} +56 -56
- package/dist/{submit-KN0Ul5fV.mjs → submit-BBKhoKT8.mjs} +2 -2
- package/dist/{tags-CZMFKGdP.mjs → tags-Djw0e-4j.mjs} +2 -2
- package/dist/telemetry-DoBQOGRk.mjs +2 -0
- package/dist/telemetry-DrFNujdx.mjs +2 -0
- package/dist/{tenant-custom-nameservers-Nx59Buv0.mjs → tenant-custom-nameservers-XCbXryBZ.mjs} +1 -1
- package/dist/tenant-tc1wb_ym.mjs +10 -0
- package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
- package/dist/tools-CB4NleeJ.mjs +2 -0
- package/dist/{tunnels-C-mMZy4v.mjs → tunnels-C2FTswb6.mjs} +15 -15
- package/dist/{turnstile-39JL9tMt.mjs → turnstile-BV4Mdd-j.mjs} +8 -8
- package/dist/ui-D1hhIDIs.mjs +5 -0
- package/dist/update-check-CFt6cMOi.mjs +2 -0
- package/dist/update-check-Dtj9fzNe.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-7ikewAnp.mjs → url-info-CeegsDK7.mjs} +2 -2
- package/dist/{url-normalization-B0D7Fhf3.mjs → url-normalization-Dbypc9wz.mjs} +4 -4
- package/dist/{url-scanner-DpKIqkin.mjs → url-scanner-BFXMrpJF.mjs} +8 -8
- package/dist/{user-BFq8UM1s.mjs → user-3uwLMH78.mjs} +1 -1
- package/dist/{values-DnBYV1ZD.mjs → values-BTncDc3U.mjs} +2 -2
- package/dist/{vectorize-BpZ4UsUj.mjs → vectorize-CtMAtx8r.mjs} +17 -17
- package/dist/version-oN1bmOgM.mjs +2 -0
- package/dist/{waiting-rooms-DJfqehy9.mjs → waiting-rooms-1xDvjF13.mjs} +25 -25
- package/dist/{web-assets-CCSSW_JH.mjs → web-assets-BfEprX1S.mjs} +29 -29
- package/dist/{web3-bbT1REPc.mjs → web3-DNbp5sZw.mjs} +13 -13
- package/dist/workers-DK_JgS4Y.mjs +38 -0
- package/dist/{workers-builds-TRF3K416.mjs → workers-builds-CdhwmmsQ.mjs} +7 -7
- package/dist/workers-for-platforms-CP6IqxrK.mjs +42 -0
- package/dist/{workers-vpc-kgryQ48l.mjs → workers-vpc-LVfayM2-.mjs} +6 -6
- package/dist/{workflows-CKdPlIkK.mjs → workflows-CA5K8FFb.mjs} +23 -23
- package/dist/wrangler-migration-B0mKHqGd.mjs +2 -0
- package/dist/{zaraz-BXFlEWSx.mjs → zaraz-BY60ZUQ4.mjs} +11 -11
- package/dist/{zero-trust-M08mBsYd.mjs → zero-trust-CQNohO7_.mjs} +460 -434
- package/dist/{zone-DHmrotGW.mjs → zone-BVDW2UGd.mjs} +2 -2
- package/dist/{zones-C0eKBTqG.mjs → zones-CcZL0YQp.mjs} +44 -44
- package/package.json +23 -15
- package/dist/abuse-reports-Dd6kJM7r.mjs +0 -26
- package/dist/access-C_2rEi0H.mjs +0 -27
- package/dist/account-CZ9SPVdz.mjs +0 -12
- package/dist/ai-ARwLeQ1O.mjs +0 -31
- package/dist/ai-gateway-DNY4FPF2.mjs +0 -147
- package/dist/auth-DJhSjNNL.mjs +0 -8
- package/dist/auth-sAorfdWU.mjs +0 -2
- package/dist/browser-extension-C48pKh3t.mjs +0 -15
- package/dist/build-1a8CiNIT.mjs +0 -2
- package/dist/build-Ca_drQY2.mjs +0 -2
- package/dist/cache-XxusQxXe.mjs +0 -45
- package/dist/cf-oadujOtC.mjs +0 -18
- package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
- package/dist/chunk-DL5FNmn1.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
- package/dist/client-certificates-CgaIc3zN.mjs +0 -13
- package/dist/command-CF0giIIc.mjs +0 -3
- package/dist/command-CsZFRm3P.mjs +0 -2
- package/dist/command-DBz8QiFk.mjs +0 -2
- package/dist/command-RiZ_LYcm.mjs +0 -2
- package/dist/config-B4vIa0zp.mjs +0 -2
- package/dist/d1-C1GK7DsW.mjs +0 -45
- package/dist/data-security-DDhPnX8Z.mjs +0 -71
- package/dist/dev-CVD3BVUG.mjs +0 -4
- package/dist/dialog--iw0F2s-.mjs +0 -2
- package/dist/dist-CUUGKvjh.mjs +0 -48
- package/dist/dist-dc4E1u01.mjs +0 -272
- package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
- package/dist/dry-run-CLX6Pbtq.mjs +0 -2
- package/dist/durable-objects-8U8DpF9q.mjs +0 -8
- package/dist/email-security-keTqF0nJ.mjs +0 -160
- package/dist/error-sanitization-Cbd_oegl.mjs +0 -2
- package/dist/error-sanitization-DwOlM3R7.mjs +0 -2
- package/dist/firewall-67qoXiqD.mjs +0 -56
- package/dist/flagship-CjC3dF7L.mjs +0 -28
- package/dist/hyperdrive-DPWyiXpj.mjs +0 -37
- package/dist/interactive-B6woOLo-.mjs +0 -32
- package/dist/interactive-DnUvQHjc.mjs +0 -2
- package/dist/keyless-certificates-Dvib4jhw.mjs +0 -13
- package/dist/kv-CA4J7cCq.mjs +0 -21
- package/dist/local-BrfySqnx.mjs +0 -2
- package/dist/login-CLW108XX.mjs +0 -5
- package/dist/login-xgRjiyJa.mjs +0 -2
- package/dist/logs-CiDyrqEu.mjs +0 -48
- package/dist/mtls-certificates-LXlgdkf1.mjs +0 -13
- package/dist/oauth-Dzk6Gy-6.mjs +0 -14
- package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
- package/dist/output-Bia1u2k5.mjs +0 -2
- package/dist/pages-pah6dZBJ.mjs +0 -60
- package/dist/precursor-DTTYLDEa.mjs +0 -4
- package/dist/previews-B89cUmpr.mjs +0 -4
- package/dist/progress-D_mL-Kcy.mjs +0 -2
- package/dist/prompt-sL_yMZbI.mjs +0 -3
- package/dist/r2-Chn_JQUM.mjs +0 -127
- package/dist/r2-data-catalog-Bfn3AWzn.mjs +0 -44
- package/dist/raw-fetch-lSVttVJF.mjs +0 -2
- package/dist/request-headers-POBKmu93.mjs +0 -2
- package/dist/resolve-BXemCSyA.mjs +0 -2
- package/dist/run-DtN51G2A.mjs +0 -2
- package/dist/run-oACgYK8I.mjs +0 -2
- package/dist/schema-DZSSJaY0.mjs +0 -2
- package/dist/sdk-CsWOex96.mjs +0 -3
- package/dist/security-center-DP4GC1cG.mjs +0 -30
- package/dist/shared-W9uoX1-W.mjs +0 -2
- package/dist/source-BR4_k2ad.mjs +0 -6
- package/dist/spawn-BWEuIO-w.mjs +0 -523
- package/dist/src-Hw-TlVAO.mjs +0 -108
- package/dist/startup-profile-CYEokTVe.mjs +0 -2
- package/dist/startup-profile-CgWHy4rE.mjs +0 -17
- package/dist/state-DSzkxXML.mjs +0 -2
- package/dist/telemetry-CSj_ezpk.mjs +0 -2
- package/dist/telemetry-DAf9gLyH.mjs +0 -2
- package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
- package/dist/tenant-Cu4P-foo.mjs +0 -12
- package/dist/tools-BMKpYraQ.mjs +0 -2
- package/dist/ui-DH95w1Qk.mjs +0 -5
- package/dist/undici-DTSBJHNS.mjs +0 -96
- package/dist/update-check-BKQBD4MQ.mjs +0 -2
- package/dist/update-check-CE9XB6gf.mjs +0 -2
- package/dist/version-Bh3b9vTa.mjs +0 -2
- package/dist/workers-CXuyjZB8.mjs +0 -36
- package/dist/workers-for-platforms-B57iKiSN.mjs +0 -25
- /package/dist/{Page-C-JHZnIy.mjs → Page-DAgOEX17.mjs} +0 -0
- /package/dist/{alerts-CstOk8n0.mjs → alerts-D3iKtzoN.mjs} +0 -0
- /package/dist/{autorag-PRTwXGgn.mjs → autorag-pvRfDwne.mjs} +0 -0
- /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-NjzJZMOV.mjs} +0 -0
- /package/dist/{brands-BHRXlWDm.mjs → brands-DP5Ndir1.mjs} +0 -0
- /package/dist/{clear-UvKESVx3.mjs → clear-qLKPlJqb.mjs} +0 -0
- /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-_Kmwfpnp.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-_aCmWeZx.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-CffEplpV.mjs} +0 -0
- /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-BQh9XapD.mjs} +0 -0
- /package/dist/{health-CwPzzrV6.mjs → health--10IShMi.mjs} +0 -0
- /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-0CeePPHp.mjs} +0 -0
- /package/dist/{internal-WLHfxX64.mjs → internal-BUs583vv.mjs} +0 -0
- /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-Cyc3fmyN.mjs} +0 -0
- /package/dist/{live-D_k7eHdv.mjs → live-VCSxA0N9.mjs} +0 -0
- /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
- /package/dist/{project-settings-DSXevRvj.mjs → project-settings-Bf6rReo1.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-D3q0mGv2.mjs} +0 -0
- /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-BIxlBuMn.mjs} +0 -0
- /package/dist/{ready-CvwvbdTX.mjs → ready-CAgelFmC.mjs} +0 -0
- /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-B3TOjNmk.mjs} +0 -0
- /package/dist/{refute-CIAFMj00.mjs → refute-BZNkFpBB.mjs} +0 -0
- /package/dist/{resolve-CUDKxUrW.mjs → resolve-CGKqk7q8.mjs} +0 -0
- /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-StecHiaf.mjs} +0 -0
- /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-B4adr-vD.mjs} +0 -0
- /package/dist/{search-12jA1b4l.mjs → search-Devngw4M.mjs} +0 -0
- /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-ChR5eXXd.mjs} +0 -0
- /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-BGb81HZN.mjs} +0 -0
- /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-_wa6KxEl.mjs} +0 -0
- /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-BesKGqfI.mjs} +0 -0
- /package/dist/{verify-CZW5Fo1q.mjs → verify-CYM5GlPu.mjs} +0 -0
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-rYpzEQb-.mjs";import{i as t,n}from"./auth-Br-t8vL_.mjs";import{a as r,i,t as a}from"./context-CquYYyS3.mjs";import{t as o}from"./output-ClYel9WX.mjs";import{t as s}from"./dry-run-p9Q7nMZ5.mjs";import{t as c}from"./progress-TLUEIYE6.mjs";import{t as l}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as u,r as d,t as f}from"./body-parser-NjzJZMOV.mjs";import{n as p,t as m}from"./input-validation-0CeePPHp.mjs";import{a as h,i as g,n as _}from"./prompt-Ck_1PCHm.mjs";import{t as ee}from"./cli-types-_Kmwfpnp.mjs";import{n as te,t as v}from"./raw-fetch-DNxNCoeP.mjs";function y(e){return e.usage(`$0 images create
|
|
3
3
|
|
|
4
|
-
Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const b={command:`create`,describe:`Upload an image`,builder:y,handler:async
|
|
4
|
+
Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const b={command:`create`,describe:`Upload an image`,builder:y,handler:async i=>l({command:`images create`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){s({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:i.body,file:i.file,creator:i.creator,id:i.id,metadata:i.metadata,"require-signed-urls":i[`require-signed-urls`],url:i.url}});return}let l=await n(i),u=i.local?e:await a();if(i.accountId=u,i.file!==void 0||i.body!==void 0||i.creator!==void 0||i.id!==void 0||i.metadata!==void 0||i[`require-signed-urls`]!==void 0||i.url!==void 0){let e=new FormData;if(i.file){let t=m(i.file);e.append(`file`,new Blob([t]),i.file.split(/[\\/]/).filter(Boolean).pop())}else i.body!==void 0&&e.append(`file`,i.body);if(i.creator!==void 0&&e.append(`creator`,String(p(i.creator,`creator`,`text`)??``)),i.id!==void 0&&e.append(`id`,String(p(i.id,`id`,`text`)??``)),i.metadata!==void 0){let t=typeof i.metadata==`string`?p(i.metadata,`metadata`,`text`):i.metadata;e.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}i[`require-signed-urls`]!==void 0&&e.append(`requireSignedURLs`,String(i[`require-signed-urls`])),i.url!==void 0&&e.append(`url`,String(p(i.url,`url`,`text`)??``)),o(await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v1`,{body:e})),{successLabel:`Created`});return}if(i.body){let e=p(i.body,`body`,`binary`);o(await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v1`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}o(await c(`Creating`,async()=>l.images.create({account_id:u})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 images delete <image-id>
|
|
5
5
|
|
|
6
|
-
Delete an image on Cloudflare Images. On success, all copies of the image are deleted and purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <image-id>`,describe:`Delete image`,builder:x,handler:async t=>l({command:`images delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}let i=await
|
|
6
|
+
Delete an image on Cloudflare Images. On success, all copies of the image are deleted and purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <image-id>`,describe:`Delete image`,builder:x,handler:async t=>l({command:`images delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this image.`})){process.stderr.write(`Aborted.
|
|
7
7
|
`);return}o(await c(`Deleting`,async()=>i.images.delete({account_id:l,image_id:t[`image-id`]})),{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 images direct-upload
|
|
8
8
|
|
|
9
|
-
Direct uploads allow users to upload images without API keys. A common use case are web apps, client-side applications, or mobile devices where users upload content directly to Cloudflare Images. This method creates a draft record for a future image. It returns an upload URL and an image identifier. To verify if the image itself has been uploaded, send an image details request (accounts/:account_identifier/images/v1/:identifier), and check that the \`draft: true\` property is not present.`).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`expiry`,{type:`string`,description:`The date after which the upload will not be accepted. Minimum: Now + 2 minutes. Maximum: Now + 6 hours.`}).option(`id`,{type:`string`,description:`Optional Image Custom ID. Up to 1024 chars. Can include any number of subpaths, and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a UUID.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can be used for keeping references to another system of record, for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token to be accessed.`})}const w={command:`direct-upload`,describe:`Create authenticated direct upload URL V2`,builder:C,handler:async
|
|
9
|
+
Direct uploads allow users to upload images without API keys. A common use case are web apps, client-side applications, or mobile devices where users upload content directly to Cloudflare Images. This method creates a draft record for a future image. It returns an upload URL and an image identifier. To verify if the image itself has been uploaded, send an image details request (accounts/:account_identifier/images/v1/:identifier), and check that the \`draft: true\` property is not present.`).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`expiry`,{type:`string`,description:`The date after which the upload will not be accepted. Minimum: Now + 2 minutes. Maximum: Now + 6 hours.`}).option(`id`,{type:`string`,description:`Optional Image Custom ID. Up to 1024 chars. Can include any number of subpaths, and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a UUID.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can be used for keeping references to another system of record, for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token to be accessed.`})}const w={command:`direct-upload`,describe:`Create authenticated direct upload URL V2`,builder:C,handler:async i=>l({command:`images direct-upload`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){s({command:`cf images direct-upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/direct_upload`,pathParams:{},bodyKind:`multipart`,body:{body:i.body,file:i.file,creator:i.creator,expiry:i.expiry,id:i.id,metadata:i.metadata,"require-signed-urls":i[`require-signed-urls`]}});return}let l=await n(i),u=i.local?e:await a();if(i.accountId=u,i.file!==void 0||i.body!==void 0||i.creator!==void 0||i.expiry!==void 0||i.id!==void 0||i.metadata!==void 0||i[`require-signed-urls`]!==void 0){let e=new FormData;if(i.file){let t=m(i.file);e.append(`file`,new Blob([t]),i.file.split(/[\\/]/).filter(Boolean).pop())}else i.body!==void 0&&e.append(`file`,i.body);if(i.creator!==void 0&&e.append(`creator`,String(p(i.creator,`creator`,`text`)??``)),i.expiry!==void 0&&e.append(`expiry`,String(p(i.expiry,`expiry`,`text`)??``)),i.id!==void 0&&e.append(`id`,String(p(i.id,`id`,`text`)??``)),i.metadata!==void 0){let t=typeof i.metadata==`string`?p(i.metadata,`metadata`,`text`):i.metadata;e.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}i[`require-signed-urls`]!==void 0&&e.append(`requireSignedURLs`,String(i[`require-signed-urls`])),o(await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:e})),{successLabel:`Created`});return}if(i.body){let e=p(i.body,`body`,`binary`);o(await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}o(await c(`Creating`,async()=>l.images.directUpload({account_id:u})),{successLabel:`Created`})})};function T(e){return e.usage(`$0 images edit <image-id>
|
|
10
10
|
|
|
11
|
-
Update a CF Images image's metadata, creator, or access control. On access control change, all copies of the image are purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the image can be accessed using only its UID. If set to `true`, a signed token needs to be generated with a signing key to view the image. Returns a new UID on a change. No change if not specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`edit <image-id>`,describe:`Update image`,builder:T,handler:async t=>l({command:`images edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({creator:p(t.creator,`creator`,`text`),requireSignedURLs:t[`require-signed-urls`]}):u(t.body)});return}let i=await
|
|
11
|
+
Update a CF Images image's metadata, creator, or access control. On access control change, all copies of the image are purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the image can be accessed using only its UID. If set to `true`, a signed token needs to be generated with a signing key to view the image. Returns a new UID on a change. No change if not specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`edit <image-id>`,describe:`Update image`,builder:T,handler:async t=>l({command:`images edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({creator:p(t.creator,`creator`,`text`),requireSignedURLs:t[`require-signed-urls`]}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.images.edit({...e,account_id:l,image_id:t[`image-id`]})),{successLabel:`Updated`});return}let d=f({creator:p(t.creator,`creator`,`text`),requireSignedURLs:t[`require-signed-urls`]});o(await c(`Updating`,async()=>i.images.edit({...d,account_id:l,image_id:t[`image-id`]})),{successLabel:`Updated`})})};function D(e){return e.usage(`$0 images flows get
|
|
12
12
|
|
|
13
|
-
Get the current transformation flows configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get transformation flows`,builder:D,handler:async e=>l({command:`images flows get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf images flows get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let
|
|
13
|
+
Get the current transformation flows configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get transformation flows`,builder:D,handler:async e=>l({command:`images flows get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf images flows get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>t.images.flows.get({zone_id:r})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 images flows update
|
|
14
14
|
|
|
15
|
-
Replace the entire transformation flows configuration for a zone.`).option(`etag`,{type:`string`,description:`The etag field`}).option(`flows`,{type:`string`,description:`The flows field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`config-version`,{type:`number`,description:`The version 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 A={command:`update`,describe:`Update transformation flows`,builder:k,handler:async e=>l({command:`images flows update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf images flows update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({etag:p(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]}):u(e.body)});return}let
|
|
15
|
+
Replace the entire transformation flows configuration for a zone.`).option(`etag`,{type:`string`,description:`The etag field`}).option(`flows`,{type:`string`,description:`The flows field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`config-version`,{type:`number`,description:`The version 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 A={command:`update`,describe:`Update transformation flows`,builder:k,handler:async e=>l({command:`images flows update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf images flows update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({etag:p(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body);o(await c(`Updating`,async()=>t.images.flows.update({...n,zone_id:r})),{successLabel:`Updated`});return}if(e.flows===void 0)throw Error(`--flows is required (or pass --body with this field set).`);if(e[`config-version`]===void 0)throw Error(`--config-version is required (or pass --body with this field set).`);let a=f({etag:p(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]});o(await c(`Updating`,async()=>t.images.flows.update({...a,zone_id:r})),{successLabel:`Updated`})})},j={command:`flows`,describe:`Zone-level transformation flows that control how images are resized and optimized on delivery`,builder:e=>e.command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 images get-blob <image-id>
|
|
16
16
|
|
|
17
|
-
Download an image from CF Images. For most images this will be the originally uploaded file. For larger images it can be a near-lossless version of the original.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,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 N={command:`get-blob <image-id>`,describe:`Download image`,builder:M,handler:async t=>l({command:`images get-blob`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t.dryRun){s({command:`cf images get-blob`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}/blob`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}await
|
|
17
|
+
Download an image from CF Images. For most images this will be the originally uploaded file. For larger images it can be a near-lossless version of the original.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,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 N={command:`get-blob <image-id>`,describe:`Download image`,builder:M,handler:async t=>l({command:`images get-blob`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t.dryRun){s({command:`cf images get-blob`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}/blob`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}await n(t);let i=t.local?e:await a();t.accountId=i;let o=await c(`Loading`,async()=>v(`/accounts/${i}/images/v1/${encodeURIComponent(String(t[`image-id`]))}/blob`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));te(t.text===!0?o.toString(`utf-8`):o)})};function P(e){return e.usage(`$0 images get <image-id>
|
|
18
18
|
|
|
19
|
-
Fetch details for a CF Images image.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <image-id>`,describe:`Image details`,builder:P,handler:async t=>l({command:`images get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}let i=await
|
|
19
|
+
Fetch details for a CF Images image.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <image-id>`,describe:`Image details`,builder:P,handler:async t=>l({command:`images get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Loading`,async()=>i.images.get({account_id:l,image_id:t[`image-id`]})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 images import abort <migration-id>
|
|
20
20
|
|
|
21
|
-
Abort a running CF Images import. Already imported images will remain.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`abort <migration-id>`,describe:`Abort a migration`,builder:I,handler:async t=>l({command:`images import abort`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import abort`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle/abort`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await
|
|
21
|
+
Abort a running CF Images import. Already imported images will remain.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`abort <migration-id>`,describe:`Abort a migration`,builder:I,handler:async t=>l({command:`images import abort`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import abort`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle/abort`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Updating`,async()=>i.images.import.abort({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Updated`})})};function R(e){return e.usage(`$0 images import create
|
|
22
22
|
|
|
23
|
-
Create a pending CF Images import from a configured source.`).option(`conflict-behaviour`,{type:`string`,description:`How to handle objects that already exist at the destination.`,choices:[`skip`,`overwrite`],default:`skip`}).option(`excluded-content-types`,{type:`string`,array:!0,description:`Content types to skip during migration.`}).option(`path-prefix`,{type:`string`,description:`Prefix to prepend to image custom IDs.`}).option(`root-directory`,{type:`string`,description:`Only import objects under this prefix in the source bucket.`}).option(`source-id`,{type:`string`,description:`The identifier of the source to migrate from.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`create`,describe:`Create a sourcing kit migration`,builder:R,handler:async t=>l({command:`images import create`,classification:{safeFlags:[`conflict-behaviour`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({conflictBehaviour:p(t[`conflict-behaviour`],`conflict-behaviour`,`text`),excludedContentTypes:t[`excluded-content-types`],pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),rootDirectory:p(t[`root-directory`],`root-directory`,`text`),sourceId:p(t[`source-id`],`source-id`,`text`)}):u(t.body)});return}let i=await
|
|
23
|
+
Create a pending CF Images import from a configured source.`).option(`conflict-behaviour`,{type:`string`,description:`How to handle objects that already exist at the destination.`,choices:[`skip`,`overwrite`],default:`skip`}).option(`excluded-content-types`,{type:`string`,array:!0,description:`Content types to skip during migration.`}).option(`path-prefix`,{type:`string`,description:`Prefix to prepend to image custom IDs.`}).option(`root-directory`,{type:`string`,description:`Only import objects under this prefix in the source bucket.`}).option(`source-id`,{type:`string`,description:`The identifier of the source to migrate from.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`create`,describe:`Create a sourcing kit migration`,builder:R,handler:async t=>l({command:`images import create`,classification:{safeFlags:[`conflict-behaviour`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({conflictBehaviour:p(t[`conflict-behaviour`],`conflict-behaviour`,`text`),excludedContentTypes:t[`excluded-content-types`],pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),rootDirectory:p(t[`root-directory`],`root-directory`,`text`),sourceId:p(t[`source-id`],`source-id`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.images.import.create({...e,account_id:l})),{successLabel:`Created`});return}t[`source-id`]===void 0&&(t[`source-id`]=await h(`source-id`,`The identifier of the source to migrate from.`));let d=f({conflictBehaviour:p(t[`conflict-behaviour`],`conflict-behaviour`,`text`),excludedContentTypes:t[`excluded-content-types`],pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),rootDirectory:p(t[`root-directory`],`root-directory`,`text`),sourceId:p(t[`source-id`],`source-id`,`text`)});o(await c(`Creating`,async()=>i.images.import.create({...d,account_id:l})),{successLabel:`Created`})})};function B(e){return e.usage(`$0 images import delete <migration-id>
|
|
24
24
|
|
|
25
|
-
Delete a completed, failed, or aborted CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <migration-id>`,describe:`Delete a sourcing kit migration`,builder:B,handler:async t=>l({command:`images import delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images import delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await
|
|
25
|
+
Delete a completed, failed, or aborted CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <migration-id>`,describe:`Delete a sourcing kit migration`,builder:B,handler:async t=>l({command:`images import delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images import delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this import migration.`})){process.stderr.write(`Aborted.
|
|
26
26
|
`);return}o(await c(`Deleting`,async()=>i.images.import.delete({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Deleted`})})};function H(e){return e.usage(`$0 images import get <migration-id>
|
|
27
27
|
|
|
28
|
-
Get the configuration and status of a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <migration-id>`,describe:`Get sourcing kit migration`,builder:H,handler:async t=>l({command:`images import get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await
|
|
28
|
+
Get the configuration and status of a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <migration-id>`,describe:`Get sourcing kit migration`,builder:H,handler:async t=>l({command:`images import get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Loading`,async()=>i.images.import.get({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 images import list
|
|
29
29
|
|
|
30
|
-
List CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List sourcing kit migrations`,builder:W,handler:async t=>l({command:`images import list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit};if(t.dryRun){s({command:`cf images import list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await
|
|
30
|
+
List CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List sourcing kit migrations`,builder:W,handler:async t=>l({command:`images import list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit};if(t.dryRun){s({command:`cf images import list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u,o(await c(`Loading`,async()=>l.images.import.list({account_id:u,...i})),{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 images import logs <migration-id>
|
|
31
31
|
|
|
32
|
-
List log entries for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`logs <migration-id>`,describe:`List migration logs`,builder:K,handler:async t=>l({command:`images import logs`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit};if(t.dryRun){s({command:`cf images import logs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/logs`,pathParams:{"migration-id":String(t[`migration-id`]??``)},query:i,bodyKind:`none`});return}let l=await
|
|
32
|
+
List log entries for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`logs <migration-id>`,describe:`List migration logs`,builder:K,handler:async t=>l({command:`images import logs`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit};if(t.dryRun){s({command:`cf images import logs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/logs`,pathParams:{"migration-id":String(t[`migration-id`]??``)},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u,o(await c(`Loading`,async()=>l.images.import.logs({account_id:u,migration_id:t[`migration-id`],...i})),{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 images import progress <migration-id>
|
|
33
33
|
|
|
34
|
-
Get progress and object counts for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`progress <migration-id>`,describe:`Get migration progress`,builder:J,handler:async t=>l({command:`images import progress`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await
|
|
34
|
+
Get progress and object counts for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`progress <migration-id>`,describe:`Get migration progress`,builder:J,handler:async t=>l({command:`images import progress`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Loading`,async()=>i.images.import.progress({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 images import sources check <source-id>
|
|
35
35
|
|
|
36
|
-
Check whether a source can still access its S3 bucket.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`check <source-id>`,describe:`Get source connectivity status`,builder:X,handler:async t=>l({command:`images import sources check`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}/connectivity`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await
|
|
36
|
+
Check whether a source can still access its S3 bucket.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`check <source-id>`,describe:`Get source connectivity status`,builder:X,handler:async t=>l({command:`images import sources check`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}/connectivity`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Loading`,async()=>i.images.import.sources.check({account_id:l,source_id:t[`source-id`]})),{successLabel:`Loaded`})})};function Q(e){return e.usage(`$0 images import sources create
|
|
37
37
|
|
|
38
|
-
Configure an S3 source for CF Images imports.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`name`,{type:`string`,description:`A human-readable name for the source.`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).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 ne={command:`create`,describe:`Create a sourcing kit source`,builder:Q,handler:async t=>l({command:`images import sources create`,classification:{safeFlags:[`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),name:p(t.name,`name`,`text`),vendor:p(t.vendor,`vendor`,`text`)}):u(t.body)});return}let i=await
|
|
38
|
+
Configure an S3 source for CF Images imports.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`name`,{type:`string`,description:`A human-readable name for the source.`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).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 ne={command:`create`,describe:`Create a sourcing kit source`,builder:Q,handler:async t=>l({command:`images import sources create`,classification:{safeFlags:[`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),name:p(t.name,`name`,`text`),vendor:p(t.vendor,`vendor`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.images.import.sources.create({...e,account_id:l})),{successLabel:`Created`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The name of the storage bucket.`)),t.name===void 0&&(t.name=await h(`name`,`A human-readable name for the source.`)),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let d=f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),name:p(t.name,`name`,`text`),vendor:p(t.vendor,`vendor`,`text`)});o(await c(`Creating`,async()=>i.images.import.sources.create({...d,account_id:l})),{successLabel:`Created`})})};function re(e){return e.usage(`$0 images import sources delete <source-id>
|
|
39
39
|
|
|
40
|
-
Delete a source configured for CF Images imports. Sources used by active imports cannot be deleted.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`delete <source-id>`,describe:`Delete a sourcing kit source`,builder:re,handler:async t=>l({command:`images import sources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images import sources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await
|
|
40
|
+
Delete a source configured for CF Images imports. Sources used by active imports cannot be deleted.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`delete <source-id>`,describe:`Delete a sourcing kit source`,builder:re,handler:async t=>l({command:`images import sources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images import sources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this import source.`})){process.stderr.write(`Aborted.
|
|
41
41
|
`);return}o(await c(`Deleting`,async()=>i.images.import.sources.delete({account_id:l,source_id:t[`source-id`]})),{successLabel:`Deleted`})})};function ae(e){return e.usage(`$0 images import sources get <source-id>
|
|
42
42
|
|
|
43
|
-
Get details of a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <source-id>`,describe:`Get sourcing kit source`,builder:ae,handler:async t=>l({command:`images import sources get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await
|
|
43
|
+
Get details of a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <source-id>`,describe:`Get sourcing kit source`,builder:ae,handler:async t=>l({command:`images import sources get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Loading`,async()=>i.images.import.sources.get({account_id:l,source_id:t[`source-id`]})),{successLabel:`Loaded`})})};function se(e){return e.usage(`$0 images import sources list
|
|
44
44
|
|
|
45
|
-
List sources configured for CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`name`,{type:`string`,description:`Filter sources by name (partial match).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List sourcing kit sources`,builder:se,handler:async t=>l({command:`images import sources list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit,name:t.name};if(t.dryRun){s({command:`cf images import sources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},query:i,bodyKind:`none`});return}let l=await
|
|
45
|
+
List sources configured for CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`name`,{type:`string`,description:`Filter sources by name (partial match).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List sourcing kit sources`,builder:se,handler:async t=>l({command:`images import sources list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit,name:t.name};if(t.dryRun){s({command:`cf images import sources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u,o(await c(`Loading`,async()=>l.images.import.sources.list({account_id:u,...i})),{successLabel:`Loaded`})})};function le(e){return e.usage(`$0 images import sources pre-check
|
|
46
46
|
|
|
47
|
-
Check S3 credentials without saving a source.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`region`,{type:`string`,description:`The region hint for the bucket (S3 only).`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`pre-check`,describe:`Precheck source connectivity`,builder:le,handler:async t=>l({command:`images import sources pre-check`,classification:{safeFlags:[`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources pre-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),region:p(t.region,`region`,`text`),vendor:p(t.vendor,`vendor`,`text`)}):u(t.body)});return}let i=await
|
|
47
|
+
Check S3 credentials without saving a source.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`region`,{type:`string`,description:`The region hint for the bucket (S3 only).`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`pre-check`,describe:`Precheck source connectivity`,builder:le,handler:async t=>l({command:`images import sources pre-check`,classification:{safeFlags:[`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources pre-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),region:p(t.region,`region`,`text`),vendor:p(t.vendor,`vendor`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.images.import.sources.preCheck({...e,account_id:l})),{successLabel:`Created`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The name of the storage bucket.`)),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let d=f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),region:p(t.region,`region`,`text`),vendor:p(t.vendor,`vendor`,`text`)});o(await c(`Creating`,async()=>i.images.import.sources.preCheck({...d,account_id:l})),{successLabel:`Created`})})};function de(e){return e.usage(`$0 images import sources update <source-id>
|
|
48
48
|
|
|
49
|
-
Rename a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`Updated name for the source.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fe={command:`update <source-id>`,describe:`Update a sourcing kit source`,builder:de,handler:async t=>l({command:`images import sources update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await
|
|
49
|
+
Rename a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`Updated name for the source.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fe={command:`update <source-id>`,describe:`Update a sourcing kit source`,builder:de,handler:async t=>l({command:`images import sources update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import sources update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.images.import.sources.update({...e,account_id:l,source_id:t[`source-id`]})),{successLabel:`Updated`});return}t.name===void 0&&(t.name=await h(`name`,`Updated name for the source.`));let d=f({name:p(t.name,`name`,`text`)});o(await c(`Updating`,async()=>i.images.import.sources.update({...d,account_id:l,source_id:t[`source-id`]})),{successLabel:`Updated`})})},pe={command:`sources`,describe:`Operations for import.sources`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).command(ce).command(ue).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.usage(`$0 images import start <migration-id>
|
|
50
50
|
|
|
51
|
-
Start a pending CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`start <migration-id>`,describe:`Start a migration`,builder:me,handler:async t=>l({command:`images import start`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import start`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle/start`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await
|
|
51
|
+
Start a pending CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`start <migration-id>`,describe:`Start a migration`,builder:me,handler:async t=>l({command:`images import start`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images import start`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle/start`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Updating`,async()=>i.images.import.start({account_id:l,migration_id:t[`migration-id`]})),{successLabel:`Updated`})})},ge={command:`import`,describe:`Import images from S3`,builder:e=>e.command(L).command(z).command(V).command(U).command(G).command(q).command(Y).command(he).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(e){return e.usage(`$0 images keys create <signing-key-name>
|
|
52
52
|
|
|
53
|
-
Create a new CF Images signing key with specified name. Returns all keys available.`).positional(`signing-key-name`,{type:`string`,description:`Signing key name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`create <signing-key-name>`,describe:`Create a new Signing Key`,builder:_e,handler:async t=>l({command:`images keys create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images keys create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/keys/${t[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(t[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(t[`signing-key-name`]??``)},bodyKind:`none`});return}let i=await
|
|
53
|
+
Create a new CF Images signing key with specified name. Returns all keys available.`).positional(`signing-key-name`,{type:`string`,description:`Signing key name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`create <signing-key-name>`,describe:`Create a new Signing Key`,builder:_e,handler:async t=>l({command:`images keys create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images keys create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/keys/${t[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(t[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(t[`signing-key-name`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Updating`,async()=>i.images.keys.create({account_id:l,signing_key_name:t[`signing-key-name`]})),{successLabel:`Updated`})})};function ye(e){return e.usage(`$0 images keys delete <signing-key-name>
|
|
54
54
|
|
|
55
|
-
Delete a CF Images signing key with specified name. Returns all keys available. When the last key is removed, a new default signing key will be generated.`).positional(`signing-key-name`,{type:`string`,description:`Signing key 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 be={command:`delete <signing-key-name>`,describe:`Delete Signing Key`,builder:ye,handler:async t=>l({command:`images keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/keys/${t[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(t[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(t[`signing-key-name`]??``)},bodyKind:`none`});return}let i=await
|
|
55
|
+
Delete a CF Images signing key with specified name. Returns all keys available. When the last key is removed, a new default signing key will be generated.`).positional(`signing-key-name`,{type:`string`,description:`Signing key 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 be={command:`delete <signing-key-name>`,describe:`Delete Signing Key`,builder:ye,handler:async t=>l({command:`images keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/keys/${t[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(t[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(t[`signing-key-name`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this signing key. This will invalidate any URLs that are signed with this key.`})){process.stderr.write(`Aborted.
|
|
56
56
|
`);return}o(await c(`Deleting`,async()=>i.images.keys.delete({account_id:l,signing_key_name:t[`signing-key-name`]})),{successLabel:`Deleted`})})};function xe(e){return e.usage(`$0 images keys list
|
|
57
57
|
|
|
58
|
-
List your CF Images signing keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`list`,describe:`List Signing Keys`,builder:xe,handler:async t=>l({command:`images keys list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/keys`,pathParams:{},bodyKind:`none`});return}let i=await
|
|
58
|
+
List your CF Images signing keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`list`,describe:`List Signing Keys`,builder:xe,handler:async t=>l({command:`images keys list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/keys`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Loading`,async()=>i.images.keys.list({account_id:l})),{successLabel:`Loaded`})})},Ce={command:`keys`,describe:`Manage signing keys for generating private image URLs`,builder:e=>e.command(ve).command(be).command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function we(e){return e.usage("$0 images list\n\nList up to 10000 images from CF Images, with up to 1000 results per page. Use the optional parameters below to get a specific range of images. Pagination is supported via continuation_token. **Metadata Filtering (Optional):** You can optionally filter images by custom metadata fields using the `meta.<field>[<operator>]=<value>` syntax. **Supported Operators:** - `eq` / `eq:string` / `eq:number` / `eq:boolean` - Exact match - `gt` / `gt:number` - Greater than (number only) - `gte` / `gte:number` - Greater than or equal (number only) - `lt` / `lt:number` - Less than (number only) - `lte` / `lte:number` - Less than or equal (number only) - `in` / `in:string` / `in:number` - Match any value in list (pipe-separated) **Metadata Filter Constraints:** - Maximum 5 metadata filters per request - Maximum 5 levels of nesting (e.g., `meta.first.second.third.fourth.fifth`) - Maximum 10 elements for list operators (`in`) - Supports string, number, and boolean value types - Range operators (`gt`, `gte`, `lt`, `lte`) only accept numeric values **Filter Consistency:** Filters are combined with AND logic. The system does not validate whether filter combinations are logically consistent. For example, `meta.priority[eq:number]=5&meta.priority[lte:number]=3` will return zero results because no value can satisfy both conditions simultaneously. It is the caller's responsibility to ensure filter combinations make sense. **Examples:** ``` # List all images /images/v2 # Filter by metadata [eq] /images/v2?meta.status[eq:string]=active # Filter by metadata [in] /images/v2?meta.status[in]=pending|deleted|flagged # Filter by metadata [in:number] /images/v2?meta.ratings[in:number]=4|5 # Filter by metadata range [gte:number] /images/v2?meta.priority[gte:number]=1 # Filter by bounded range /images/v2?meta.priority[gte:number]=1&meta.priority[lte:number]=5 # Filter by nested metadata /images/v2?meta.region.name[eq]=eu-west # Combine metadata filters with creator /images/v2?meta.status[eq]=active&creator=user123 # Multiple metadata filters (AND logic) /images/v2?meta.status[eq]=active&meta.priority[eq:number]=5 ```").option(`continuation-token`,{type:`string`,description:`Continuation token to fetch next page. Passed as a query param when requesting List V2 api endpoint.`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`sort-order`,{type:`string`,description:`Sorting order by upload time`,choices:[`asc`,`desc`]}).option(`creator`,{type:`string`,description:`Internal user ID set within the creator field. Setting to empty string "" will return images where creator field is not set`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`List images V2`,builder:ee(we),handler:async t=>l({command:`images list`,classification:{safeFlags:[`sort-order`,`dry-run`]}},t,async()=>{let i={continuation_token:t[`continuation-token`],per_page:t[`per-page`],sort_order:t[`sort-order`],creator:t.creator};if(t.dryRun){s({command:`cf images list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v2`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u,o(await c(`Loading`,async()=>l.images.list({account_id:u,...i})),{successLabel:`Loaded`})})};function Ee(e){return e.usage(`$0 images stats
|
|
59
59
|
|
|
60
|
-
Fetch image statistics details for Cloudflare Images. The returned statistics detail storage usage, including the current image count vs this account's allowance.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`stats`,describe:`Images usage statistics`,builder:Ee,handler:async t=>l({command:`images stats`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/stats`,pathParams:{},bodyKind:`none`});return}let i=await
|
|
60
|
+
Fetch image statistics details for Cloudflare Images. The returned statistics detail storage usage, including the current image count vs this account's allowance.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`stats`,describe:`Images usage statistics`,builder:Ee,handler:async t=>l({command:`images stats`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/stats`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Loading`,async()=>i.images.stats({account_id:l})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 images variants create
|
|
61
61
|
|
|
62
|
-
Create a CF Images variant that allows you to resize images for different use cases.`).option(`id`,{type:`string`,description:`The id field`}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`,default:!1}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).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 Oe={command:`create`,describe:`Create a variant`,builder:$,handler:async t=>l({command:`images variants create`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({id:p(t.id,`id`,`text`),neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}}):u(t.body)});return}let i=await
|
|
62
|
+
Create a CF Images variant that allows you to resize images for different use cases.`).option(`id`,{type:`string`,description:`The id field`}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`,default:!1}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).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 Oe={command:`create`,describe:`Create a variant`,builder:$,handler:async t=>l({command:`images variants create`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({id:p(t.id,`id`,`text`),neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.images.variants.create({body:e,account_id:l})),{successLabel:`Created`});return}if(t.id===void 0&&(t.id=await h(`id`,`The id field`)),t[`options-fit`]===void 0&&(t[`options-fit`]=await g(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),t[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(t[`options-metadata`]===void 0&&(t[`options-metadata`]=await g(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),t[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let d=f({id:p(t.id,`id`,`text`),neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}});o(await c(`Creating`,async()=>i.images.variants.create({body:d,account_id:l})),{successLabel:`Created`})})};function ke(e){return e.usage(`$0 images variants delete <variant-id>
|
|
63
63
|
|
|
64
|
-
Delete a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ae={command:`delete <variant-id>`,describe:`Delete a variant`,builder:ke,handler:async t=>l({command:`images variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`none`});return}let i=await
|
|
64
|
+
Delete a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ae={command:`delete <variant-id>`,describe:`Delete a variant`,builder:ke,handler:async t=>l({command:`images variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf images variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this variant.`})){process.stderr.write(`Aborted.
|
|
65
65
|
`);return}o(await c(`Deleting`,async()=>i.images.variants.delete({account_id:l,variant_id:t[`variant-id`]})),{successLabel:`Deleted`})})};function je(e){return e.usage(`$0 images variants edit <variant-id>
|
|
66
66
|
|
|
67
|
-
Update a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).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 Me={command:`edit <variant-id>`,describe:`Update a variant`,builder:je,handler:async t=>l({command:`images variants edit`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}}):u(t.body)});return}let i=await
|
|
67
|
+
Update a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).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 Me={command:`edit <variant-id>`,describe:`Update a variant`,builder:je,handler:async t=>l({command:`images variants edit`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.images.variants.edit({...e,account_id:l,variant_id:t[`variant-id`]})),{successLabel:`Updated`});return}if(t[`options-fit`]===void 0&&(t[`options-fit`]=await g(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),t[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(t[`options-metadata`]===void 0&&(t[`options-metadata`]=await g(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),t[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let d=f({neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:p(t[`options-fit`],`options-fit`,`text`),height:t[`options-height`],metadata:p(t[`options-metadata`],`options-metadata`,`text`),width:t[`options-width`]}});o(await c(`Updating`,async()=>i.images.variants.edit({...d,account_id:l,variant_id:t[`variant-id`]})),{successLabel:`Updated`})})};function Ne(e){return e.usage(`$0 images variants get <variant-id>
|
|
68
68
|
|
|
69
|
-
Fetch details for a CF Images variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`get <variant-id>`,describe:`Variant details`,builder:Ne,handler:async t=>l({command:`images variants get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`none`});return}let i=await
|
|
69
|
+
Fetch details for a CF Images variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`get <variant-id>`,describe:`Variant details`,builder:Ne,handler:async t=>l({command:`images variants get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Loading`,async()=>i.images.variants.get({account_id:l,variant_id:t[`variant-id`]})),{successLabel:`Loaded`})})};function Fe(e){return e.usage(`$0 images variants list
|
|
70
70
|
|
|
71
|
-
List existing CF Images variants.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`list`,describe:`List variants`,builder:Fe,handler:async t=>l({command:`images variants list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`none`});return}let i=await
|
|
71
|
+
List existing CF Images variants.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`list`,describe:`List variants`,builder:Fe,handler:async t=>l({command:`images variants list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images variants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l,o(await c(`Loading`,async()=>i.images.variants.list({account_id:l})),{successLabel:`Loaded`})})},Le={command:`variants`,describe:`Manage named resize variants for transforming images on delivery`,builder:e=>e.command(Oe).command(Ae).command(Me).command(Pe).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Re={command:`images`,describe:`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,builder:e=>e.command(b).command(S).command(w).command(E).command(F).command(N).command(Te).command(De).command(j).command(ge).command(Ce).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Re as default};
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{n as e,r as t,t as n}from"./src--KDGqL5N.mjs";import{t as r}from"./cli-exit-Dqoo6Jgb.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./src--KDGqL5N.mjs";import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{R as n,n as r}from"./dist-D1iG7guo.mjs";import{n as i}from"./version-oN1bmOgM.mjs";import{n as a}from"./delegate-CCGgla7X.mjs";import"./ui-D1hhIDIs.mjs";import{t as o}from"./project-settings-Bf6rReo1.mjs";import{n as s}from"./dist-Cpb7_h4N.mjs";import{t as c}from"./progress-TLUEIYE6.mjs";import{n as l}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as u,r as d}from"./dialog-Dpi-UVbz.mjs";import{i as f,n as p,t as m}from"./autoconfig-D-copdZG.mjs";import{basename as h,dirname as g,isAbsolute as _,join as v,relative as y,resolve as b}from"node:path";import{mkdir as x,readdir as S,stat as C,writeFile as w}from"node:fs/promises";const T={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function ee(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function E(e){return/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(e)?`^${e}`:`latest`}function D(e){return`import { bindings, defineConfig } from "cf/config";
|
|
3
|
+
import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
worker: {
|
|
7
|
+
name: ${JSON.stringify(e.name)},
|
|
8
|
+
compatibilityDate: ${JSON.stringify(e.compatibilityDate)},
|
|
9
|
+
entrypoint,
|
|
10
|
+
env: {
|
|
11
|
+
WORLD: bindings.text("World"),
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
`}function O(){return`import { cloudflare } from "@cloudflare/vite-plugin";
|
|
16
|
+
import { defineConfig } from "vite";
|
|
17
|
+
|
|
18
|
+
export default defineConfig({
|
|
19
|
+
plugins: [cloudflare()],
|
|
20
|
+
});
|
|
21
|
+
`}function k(){return`import { env } from "cloudflare:workers";
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
fetch() {
|
|
25
|
+
return new Response(\`Hello \${env.WORLD}!\`);
|
|
26
|
+
},
|
|
27
|
+
} satisfies ExportedHandler;
|
|
28
|
+
`}function A(e){let t={name:e.name,private:!0,type:`module`,scripts:{dev:`cf dev`,build:`cf build`,deploy:`cf deploy`,typecheck:`cf workers types && tsc`},devDependencies:{"@cloudflare/vite-plugin":T[`@cloudflare/vite-plugin`],cf:E(e.cfVersion),typescript:T.typescript,vite:T.vite}};return`${JSON.stringify(t,null,` `)}\n`}function j(){return`${JSON.stringify({compilerOptions:{target:`es2024`,lib:[`es2024`],module:`preserve`,moduleResolution:`bundler`,types:[],strict:!0,noEmit:!0,allowImportingTsExtensions:!0,isolatedModules:!0,verbatimModuleSyntax:!0,skipLibCheck:!0},include:[`src`,`cloudflare.config.ts`,`.cloudflare/types`]},null,` `)}\n`}function M(){return`node_modules/
|
|
29
|
+
dist/
|
|
30
|
+
.cloudflare/
|
|
31
|
+
.wrangler/
|
|
32
|
+
.dev.vars*
|
|
33
|
+
!.dev.vars.example
|
|
34
|
+
.env*
|
|
35
|
+
!.env.example
|
|
36
|
+
*.log
|
|
37
|
+
.DS_Store
|
|
38
|
+
`}const N=[`npm`,`pnpm`,`yarn`,`bun`],P=[`install`,`package-manager`],F=new Set([`.git`]);function I(e){return e.positional(`directory`,{type:`string`,describe:`Directory to initialize; created when missing (prompts when omitted; use . for the current directory)`}).option(`install`,{type:`boolean`,default:!0,describe:`Install dependencies after creating a new project (use --no-install to skip)`}).option(`package-manager`,{type:`string`,choices:N,describe:`Package manager for a new project (prompts when interactive)`})}async function L(e){let t=b(e.directory??await R());if(await H(t)===`not-empty`){await K(t,e);return}await U(t,e)}async function R(){return(await u(`Which directory do you want to initialize?`,{defaultValue:`.`,placeholder:`. (the current directory)`,fallbackError:`Pass the directory to initialize, for example ${e.code(`cf init my-worker`)}, or ${e.code(`cf init .`)} for the current directory.`})).trim()||`.`}function z(e){return{directory:e.directory,install:e.install??!0,packageManager:V(e.packageManager),mode:e.mode}}function B(e=process.env.npm_config_user_agent){return V(e?.split(`/`,1)[0])}function V(e){return N.find(t=>t===e)}async function H(e){let t;try{t=(await C(e)).isDirectory()}catch(e){if(te(e)&&e.code===`ENOENT`)return`missing`;throw e}if(!t)throw Error(`Cannot initialize ${Z(e)} because it is not a directory.`);return(await S(e)).every(e=>F.has(e))?`empty`:`not-empty`}async function U(a,o){s.info(`Creating a new Worker in ${e.bold(a)}`,{spacing:0});let c=await G(o),l=n(h(a).toLowerCase().replace(/\s+/g,`-`)).replace(/-+$/,``),u=ee({name:l,compatibilityDate:r,cfVersion:i});for(let[e,t]of Object.entries(u)){let n=v(a,e);await x(g(n),{recursive:!0}),await w(n,t,{flag:`wx`})}if(s.success(`Created the ${e.bold(l)} Worker in ${Z(a)}`,{spacing:0}),o.install){let n=`${c} install`,r=await f(n,a);if(r.exitCode!==0||r.signal)throw s.error(`Dependency installation failed. Run ${e.code(n)} in ${Z(a)} to try again.`,{spacing:0}),new t(r.exitCode,{signal:r.signal});await W(a,o.mode)}Y(a,[...o.install?[]:[{command:`${c} install`,description:`Install dependencies`}],...J()])}async function W(t,n){try{let{generateWorkerTypes:e}=await import(`./generate-9P8Q_RiO.mjs`),r=await c(`Generating types`,()=>e({configPath:v(t,o),mode:n,includeRuntime:!0}));s.success(`Generated types in ${Z(r)}`,{spacing:0})}catch(n){let r=n instanceof Error?n.message:String(n);s.warn(`Could not generate types: ${r}\nRun ${e.code(`${q()} workers types`)} in ${Z(t)} to try again.`,{spacing:0})}}async function G(e){if(e.packageManager)return e.packageManager;let t=B()??`npm`;return e.install?d(`Which package manager do you want to use?`,{choices:N.map(e=>({title:e,value:e})),defaultOption:N.indexOf(t)}):t}async function K(t,n){let r=Z(t);s.info(`Setting up the existing project in ${e.bold(t)}`,{spacing:0}),(!n.install||n.packageManager)&&s.warn(`${e.code(`--no-install`)} and ${e.code(`--package-manager`)} only apply when creating a new project. Setting up an existing project uses its own package manager.`,{spacing:0});let i=process.cwd();process.chdir(t);let a=!1;try{let n=await m(t);if(!n)throw Error(`cf could not detect a project to set up in ${r}, and the directory is not empty.\nRun ${e.code(`cf init`)} in an empty directory, or pass a new directory name (for example, ${e.code(`cf init my-worker`)}).`);a=n.configured,a||await p(n)}finally{process.chdir(i)}a?s.info(`Found an existing Cloudflare configuration in ${r}.`,{spacing:0}):s.success(`Set up ${r} for Cloudflare.`,{spacing:0}),Y(t,J())}function q(){return a()?`npx cf`:`cf`}function J(){let e=q();return[{command:`${e} dev`,description:`Start a local development server`},{command:`${e} deploy`,description:`Deploy to Cloudflare`}]}function Y(t,n){let r=[...X(t).map(e=>({command:e})),...n],i=Math.max(...r.filter(e=>e.description).map(e=>e.command.length)),a=r.map(({command:t,description:n})=>n?` ${e.code(t)}${` `.repeat(i-t.length+2)}${e.muted(n)}`:` ${e.code(t)}`);s.message([e.bold(`Next steps`),...a].join(`
|
|
39
|
+
`),{symbol:e.muted(`├`)})}function X(e){let t=y(process.cwd(),e);if(t===``)return[];let n=Q(t)?e:t;return[`cd ${/\s/.test(n)?JSON.stringify(n):n}`]}function Z(e){let t=y(process.cwd(),e);return t===``?`the current directory`:Q(t)?e:t}function Q(e){return e.startsWith(`..`)||_(e)}function te(e){return e instanceof Error&&`code`in e}const $={command:`workers [directory]`,describe:`Create a new Workers project or set up an existing one`,builder:I,handler:async e=>{await L(z(e))}},ne={command:`init [directory]`,describe:`Create a new Cloudflare project or set up an existing one`,builder:e=>I(e).command(l({...$,describe:`${$.describe} [default]`},{command:`init workers`,classification:{safeFlags:P}})).epilogue(`Running cf init without a subcommand runs cf init workers. An empty directory, or one containing only .git, receives a new hello-world Worker. A directory with other files is set up with autoconfig instead. When no directory is given, cf asks for one; non-interactive runs must pass it. Use ./workers to initialize a directory named workers.`),handler:async e=>{await L(z(e))}};export{ne as default};
|