cf 1.0.0-beta.17 → 1.0.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +6117 -4540
- package/dist/_meta/schemas.json +5016 -3257
- package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
- package/dist/{access-DnWW2AAT.mjs → access-BtsMwesh.mjs} +1 -1
- package/dist/{accounts-8UcHNm3S.mjs → accounts-X5QVzEUW.mjs} +27 -21
- package/dist/{acm-qRM3iy4Z.mjs → acm-C_NepMi6.mjs} +1 -1
- package/dist/{addressing-CAb8z2Dq.mjs → addressing-BkQY1hoA.mjs} +18 -18
- package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
- package/dist/{ai-DnhytGdc.mjs → ai-Bb0_Zknm.mjs} +1 -1
- package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-DuEjVdML.mjs} +1 -1
- package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
- package/dist/ai-search-DDRpxyOM.mjs +79 -0
- package/dist/{ai-security-KUs94UW-.mjs → ai-security-A2STvE1b.mjs} +5 -5
- package/dist/{alerting-CCmyEPzN.mjs → alerting-CIwSk-Ks.mjs} +1 -1
- package/dist/{analytics-BAvBj6qx.mjs → analytics-H--uM3DA.mjs} +7 -7
- package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
- package/dist/{api-security-BItVQymb.mjs → api-security-D-pcnhUL.mjs} +26 -26
- package/dist/{argo-DsJCvfml.mjs → argo-Lvmcx3am.mjs} +1 -1
- package/dist/{artifacts-DzHXeah6.mjs → artifacts-xT5S-mVa.mjs} +1 -1
- package/dist/{audit-logs-D9XxsVZm.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
- package/dist/{auth-C530fHKQ.mjs → auth-B73lQS2h.mjs} +1 -1
- package/dist/auth-DMzEmOhG.mjs +2 -0
- package/dist/{auth-MNz2D-PD.mjs → auth-Db1KT0vm.mjs} +1 -1
- package/dist/{auth-token-Cw4c0y89.mjs → auth-token-D9XIPlwf.mjs} +1 -1
- package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
- package/dist/{billing-COgAWTYh.mjs → billing-Bm2JNSGa.mjs} +6 -6
- package/dist/body-parser-DnBfDdx3.mjs +2 -0
- package/dist/{bot-management-Dx3lh9Fi.mjs → bot-management-CSr38g-O.mjs} +4 -4
- package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
- package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
- package/dist/browser-run-BcWxzhAn.mjs +42 -0
- package/dist/{builds-DmEFTQTa.mjs → builds-BMwDzi7G.mjs} +39 -39
- package/dist/{cache-BUh85NRr.mjs → cache-_VaTLC5T.mjs} +1 -1
- package/dist/{cli-DJhpXf38.mjs → cli-P3q5DG3W.mjs} +1 -1
- package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
- package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
- package/dist/{cloudforce-one-DN5N3C3w.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
- package/dist/{command-B694oLDo.mjs → command-BXiA79DP.mjs} +1 -1
- package/dist/{command-rx0Kb5pn.mjs → command-BbsPxJBT.mjs} +1 -1
- package/dist/{command-RC9WM5jq.mjs → command-Bkc04OyY.mjs} +1 -1
- package/dist/{command-Bmee6uwe.mjs → command-BtTc28ql.mjs} +1 -1
- package/dist/{command-CAs3SxlI.mjs → command-CBZhxmKD.mjs} +1 -1
- package/dist/{command-CCq-Z2Ua.mjs → command-CL7LLXM7.mjs} +1 -1
- package/dist/{command-DerHAjQL.mjs → command-CYyfigfC.mjs} +1 -1
- package/dist/{command-D1JR8Fb7.mjs → command-CxWLFv5Y.mjs} +1 -1
- package/dist/{command-CiApsRql.mjs → command-DDcBC4px.mjs} +1 -1
- package/dist/{command-CbQFbfps.mjs → command-NoxvOARP.mjs} +1 -1
- package/dist/{completions-11latun5.mjs → completions-CrDmwKnK.mjs} +1 -1
- package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
- package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
- package/dist/{connectors-DXIUG4Zi.mjs → connectors-DvVlxGDx.mjs} +1 -1
- package/dist/{containers-DCH6MFjY.mjs → containers-Bt2zFsFd.mjs} +8 -8
- package/dist/{containers-WMWKhLkp.mjs → containers-BtcOgwm5.mjs} +2 -2
- package/dist/{content-scan-CRDmR7rD.mjs → content-scan-DldLmTjy.mjs} +1 -1
- package/dist/{context-q-6bMSL-.mjs → context-C_a8oSY9.mjs} +1 -1
- package/dist/cps-REo1OWP1.mjs +6 -0
- package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
- package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
- package/dist/{custom-hostnames-DI_dFaof.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
- package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
- package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
- package/dist/{d1-Dbs8HItA.mjs → d1-DvCiQibO.mjs} +8 -8
- package/dist/{deploy-5utIiOMN.mjs → deploy-K664XPOb.mjs} +1 -1
- package/dist/{deploy-context-C0iVbWRG.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
- package/dist/{diagnostics-C9B07eJY.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
- package/dist/{dls-lbM3i4x-.mjs → dls-DoqfqutH.mjs} +1 -1
- package/dist/{dns-QTMPGYMa.mjs → dns-DC6WcO3m.mjs} +21 -21
- package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
- package/dist/{docs-bV3hPwQL.mjs → docs-CqNRBHab.mjs} +1 -1
- package/dist/{durable-objects-0JvGTV27.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
- package/dist/{email-auth-PzRqG0ex.mjs → email-auth--NHg1TjG.mjs} +1 -1
- package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-COjENK55.mjs} +13 -13
- package/dist/{email-security-CSTKIecn.mjs → email-security-rdjH95T2.mjs} +38 -38
- package/dist/{email-sending-BSwuAir8.mjs → email-sending-26VJhR6Q.mjs} +18 -18
- package/dist/{field-extractors-B_lFnwaL.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
- package/dist/{firewall-BsZxVitA.mjs → firewall-D8K93ffF.mjs} +20 -20
- package/dist/{flagship-qBohOZaM.mjs → flagship-CHdmCmvQ.mjs} +11 -11
- package/dist/{fraud-vGNdrSm-.mjs → fraud-CY4TV5Vc.mjs} +1 -1
- package/dist/{google-tag-gateway-BHdOg4VW.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
- package/dist/healthchecks-B52Mf3uL.mjs +22 -0
- package/dist/{hostnames-CLlaMqHu.mjs → hostnames-BMITIM8P.mjs} +1 -1
- package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
- package/dist/{iam-Dl_n_Lqq.mjs → iam-o1n9eUXf.mjs} +9 -9
- package/dist/{images-vMtXk2Rf.mjs → images-CJHAGxX6.mjs} +37 -37
- package/dist/index.mjs +1 -1
- package/dist/{init-_7djeBVw.mjs → init-CqQDL6i3.mjs} +1 -1
- package/dist/{intel-Bq4GGXv-.mjs → intel-B3S1gxUg.mjs} +1 -1
- package/dist/{ips-BcvZS46g.mjs → ips-q_UJMiy8.mjs} +1 -1
- package/dist/{k2-DL4hrVTj.mjs → k2-BNqVZnDN.mjs} +2 -2
- package/dist/{kv-BLo9wMgb.mjs → kv-B0nXSOcW.mjs} +1 -1
- package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
- package/dist/load-balancers-DJtMztJ0.mjs +76 -0
- package/dist/{login-Du_W6b9o.mjs → login-D-1FiBNv.mjs} +1 -1
- package/dist/{login-DT6Q1UJw.mjs → login-chQP8825.mjs} +1 -1
- package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
- package/dist/{logos-BuhvSu_H.mjs → logos-tnIahhcu.mjs} +1 -1
- package/dist/{logpush-DgZtF9vG.mjs → logpush-D4s3pJRw.mjs} +24 -24
- package/dist/{logs-CaKOk-1v.mjs → logs-cw7UL5V2.mjs} +3 -3
- package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
- package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
- package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-BFopRdPs.mjs} +170 -170
- package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
- package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
- package/dist/{matches-DkLSWb5X.mjs → matches-ClJ_24EY.mjs} +1 -1
- package/dist/{mcp-BcV1XqE8.mjs → mcp-50os3IRG.mjs} +10 -10
- package/dist/{mesh-CSSlZ-0F.mjs → mesh-jxtQP8sS.mjs} +2 -2
- package/dist/{monetization-B-nJ0SyI.mjs → monetization-D6cCDi-h.mjs} +4 -4
- package/dist/{network-ZzxQ_Dcz.mjs → network-dnWHB2uY.mjs} +27 -25
- package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
- package/dist/{o11y-LG6Y9LUZ.mjs → o11y-oMSg1pG4.mjs} +49 -49
- package/dist/{oauth-CP82E1_0.mjs → oauth-BfBdHhPS.mjs} +1 -1
- package/dist/{oauth-Bx693Af5.mjs → oauth-DDOiiH7h.mjs} +1 -1
- package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
- package/dist/{oauth-scopes-hseWES1v.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
- package/dist/organization-94lHeeOs.mjs +75 -0
- package/dist/{organizations-CcgZPmFl.mjs → organizations-BJf3UTFi.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
- package/dist/{page-rules-DFfqfllI.mjs → page-rules-BUI-50oz.mjs} +4 -4
- package/dist/pages-CcdpCzHs.mjs +54 -0
- package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
- package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-t066I5wm.mjs} +7 -7
- package/dist/{pipelines-DUMIVwof.mjs → pipelines-Co6S044l.mjs} +8 -8
- package/dist/precursor-BftyvS86.mjs +4 -0
- package/dist/previews-BLhnhElx.mjs +7 -0
- package/dist/{progress-DaQ4MzBI.mjs → progress-Q5w9PNTT.mjs} +1 -1
- package/dist/{prompt-KWYZvJWM.mjs → prompt-C0hKSr-R.mjs} +1 -1
- package/dist/{queries-DoyhspQf.mjs → queries-4MubO6Sz.mjs} +3 -3
- package/dist/{queues-BPxTU2rU.mjs → queues-CteS5M92.mjs} +17 -17
- package/dist/{r2-CQt4S7o7.mjs → r2-2QpT_Gso.mjs} +24 -24
- package/dist/{radar-CALpR1vq.mjs → radar-ODKaK4FJ.mjs} +1 -1
- package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
- package/dist/{realtime-BiHKBoI4.mjs → realtime-DkfU8uEX.mjs} +84 -84
- package/dist/registrar-DM6JTVPS.mjs +43 -0
- package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
- package/dist/{reporting-8aRJD5HX.mjs → reporting-5yFNXbJg.mjs} +1 -1
- package/dist/{request-headers-CqfJOkpO.mjs → request-headers-DXvswze2.mjs} +1 -1
- package/dist/request-tracers-BarLZY95.mjs +4 -0
- package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
- package/dist/{rules-CFOuN3t2.mjs → rules-_C31X4Jz.mjs} +6 -6
- package/dist/{rulesets-DkhV2Hny.mjs → rulesets-8RwxoFhG.mjs} +6 -6
- package/dist/{rum-BnMW0Tlb.mjs → rum-CAUcpXpM.mjs} +6 -6
- package/dist/{run-Clc3P2u7.mjs → run-DtFLvOHB.mjs} +1 -1
- package/dist/run-LcOb9rhI.mjs +2 -0
- package/dist/{schema-flags-b096XMpt.mjs → schema-flags-DibfxEF6.mjs} +1 -1
- package/dist/{scim-tvZm6A-r.mjs → scim-DX5XrQ4w.mjs} +1 -1
- package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-DSqqrr25.mjs} +1 -1
- package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-FSktO04S.mjs} +1 -1
- package/dist/{security-txt-D4pRk7-w.mjs → security-txt-D2g3lQdg.mjs} +1 -1
- package/dist/{shared-zePemxHi.mjs → shared-eefMO8R4.mjs} +1 -1
- package/dist/smart-shield-IVb2sR0C.mjs +24 -0
- package/dist/{snippets-BIcZ6vSW.mjs → snippets-cWwWficN.mjs} +2 -2
- package/dist/{spectrum-DjDX0geK.mjs → spectrum-DYiIBYRB.mjs} +1 -1
- package/dist/{speed-DiPoFJMm.mjs → speed-C7uiW2Wf.mjs} +1 -1
- package/dist/{sql-DLjCt_R3.mjs → sql-TGV8qQMj.mjs} +1 -1
- package/dist/{src-CutrsNl4.mjs → src-BUH-P_zd.mjs} +5 -5
- package/dist/ssl-xQP_HbWN.mjs +139 -0
- package/dist/{stream-uhn_Zsni.mjs → stream-CfWgj8Cr.mjs} +55 -55
- package/dist/{submit-C3suIDBX.mjs → submit-DxGr1T40.mjs} +1 -1
- package/dist/tags-LEJ2VYhQ.mjs +23 -0
- package/dist/{telemetry-DYjsavEr.mjs → telemetry-BHne10Yy.mjs} +1 -1
- package/dist/telemetry-BavSU4ku.mjs +2 -0
- package/dist/{tenant-DK88yQM4.mjs → tenant-7d5vwc6K.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BZ1JD1Yf.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
- package/dist/{tunnels-DjbomhCa.mjs → tunnels-DlGODvwT.mjs} +4 -4
- package/dist/{turnstile-DXrbEy2A.mjs → turnstile-DhLkdhij.mjs} +5 -5
- package/dist/update-check-nLfkSfdz.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{update-check-BhhtSXVZ.mjs → update-check-wvjOsnGK.mjs} +1 -1
- package/dist/{url-info-a0mY4UsC.mjs → url-info-CeoV5dBc.mjs} +1 -1
- package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
- package/dist/{url-scanner-D0egjBe5.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
- package/dist/{user-DDH9lxf5.mjs → user-D33B3alX.mjs} +59 -59
- package/dist/{vectorize-DaT3amFV.mjs → vectorize-Wp9De13y.mjs} +17 -17
- package/dist/version-B2RUUqGT.mjs +2 -0
- package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
- package/dist/{web-assets-NqNglLSI.mjs → web-assets-ew0iaP7c.mjs} +35 -35
- package/dist/{web3-UnCUuIfB.mjs → web3-BUyXBaqq.mjs} +6 -6
- package/dist/{workers-builds-Cy6fdtm5.mjs → workers-builds-DzU9NGno.mjs} +7 -7
- package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
- package/dist/{workers-DfA9ugmb.mjs → workers-pP5tsDbD.mjs} +25 -22
- package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
- package/dist/{workflows-Dq-k81hU.mjs → workflows-DXYGKtqq.mjs} +1 -1
- package/dist/zaraz-DoH4QD0u.mjs +22 -0
- package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-DKt20rzE.mjs} +461 -458
- package/dist/{zone-DcZIUTWt.mjs → zone-BXM3p0JR.mjs} +1 -1
- package/dist/{zones-BVdvYUCv.mjs → zones-CJdtqEBx.mjs} +21 -21
- package/package.json +9 -9
- package/dist/account-tags-zvHRQZxb.mjs +0 -15
- package/dist/ai-search-CtfW5fzl.mjs +0 -79
- package/dist/auth-Ccm5viK_.mjs +0 -2
- package/dist/body-parser-DkHKPkJ7.mjs +0 -2
- package/dist/browser-run-ChXohmNG.mjs +0 -42
- package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
- package/dist/client-certificates-B3UxH_Au.mjs +0 -13
- package/dist/cps-Due0P5IW.mjs +0 -6
- package/dist/csam-scanner-DvLrPw45.mjs +0 -10
- package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
- package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
- package/dist/custom-pages-ubava9Qm.mjs +0 -21
- package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
- package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
- package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
- package/dist/keys-BSV5IXdU.mjs +0 -4
- package/dist/load-balancers-CCCWoQXv.mjs +0 -76
- package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
- package/dist/organization-DMr_z6n4.mjs +0 -71
- package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
- package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
- package/dist/pages-BkcL5rC4.mjs +0 -54
- package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
- package/dist/precursor-DsGbA_YJ.mjs +0 -4
- package/dist/previews-Cma3-M7K.mjs +0 -7
- package/dist/registrar-gERQ3b85.mjs +0 -43
- package/dist/request-tracers-DcnwQg3K.mjs +0 -4
- package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
- package/dist/run-CHNyLZLG.mjs +0 -2
- package/dist/smart-shield-2egm1Vaw.mjs +0 -24
- package/dist/ssl-vNzK0c9S.mjs +0 -45
- package/dist/tags-Dy2jG-Dt.mjs +0 -4
- package/dist/telemetry-Bdv5LZZs.mjs +0 -2
- package/dist/update-check-Dld7rbLd.mjs +0 -2
- package/dist/values-Bfr5-bL6.mjs +0 -4
- package/dist/version-CAuKDZAG.mjs +0 -2
- package/dist/zaraz-Dpr1pLDx.mjs +0 -22
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,i as a,t as o}from"./context-C_a8oSY9.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-Q5w9PNTT.mjs";import{t as u}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as d,n as f,r as p,t as m}from"./body-parser-DnBfDdx3.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-C0hKSr-R.mjs";import{n as b,t as x}from"./raw-fetch-CEOuoKl9.mjs";var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(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 te={command:`create`,describe:`Upload an image`,builder:ee,handler:async e=>u({command:`images create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`],url:e.url}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0||e.url!==void 0){let t=new FormData;if(e.file){let n=
|
|
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 te={command:`create`,describe:`Upload an image`,builder:ee,handler:async e=>u({command:`images create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`],url:e.url}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0||e.url!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(h(e.creator,`creator`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(h(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?h(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`])),e.url!==void 0&&t.append(`url`,String(h(e.url,`url`,`text`)??``));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=h(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v1`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(S,{account_id:u}));s(d,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function re(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 ie={command:`delete <image-id>`,describe:`Delete image`,builder:re,handler:async e=>u({command:`images delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!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 ie={command:`delete <image-id>`,describe:`Delete image`,builder:re,handler:async e=>u({command:`images delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.force,message:`This operation will delete this image.`})){process.stderr.write(`Aborted.
|
|
7
7
|
`);return}let u=await l(`Deleting`,async()=>n.send(ne,{account_id:a,image_id:e[`image-id`]}));s(u,{successLabel:`Deleted`})})};var ae={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/direct_upload`,pathParams:[`account_id`],body:`form`};function oe(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
|
|
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 C={command:`direct-upload`,describe:`Create authenticated direct upload URL V2`,builder:oe,handler:async e=>u({command:`images direct-upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images direct-upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/direct_upload`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,expiry:e.expiry,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`]}});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.expiry!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.creator!==void 0&&t.append(`creator`,String(h(e.creator,`creator`,`text`)??``)),e.expiry!==void 0&&t.append(`expiry`,String(h(e.expiry,`expiry`,`text`)??``)),e.id!==void 0&&t.append(`id`,String(h(e.id,`id`,`text`)??``)),e.metadata!==void 0){let n=typeof e.metadata==`string`?h(e.metadata,`metadata`,`text`):e.metadata;t.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}e[`require-signed-urls`]!==void 0&&t.append(`requireSignedURLs`,String(e[`require-signed-urls`]));let r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:t}));s(r,{successLabel:`Created`});return}if(e.body){let t=h(e.body,`body`,`binary`),r=await l(`Creating`,async()=>n(a,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));s(r,{successLabel:`Created`});return}let d=await l(`Creating`,async()=>a.send(ae,{account_id:u}));s(d,{successLabel:`Created`})})};var w={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`,body:`json`};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
|
|
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(`metadata`,{type:`string`,description:`User modifiable key-value store. Can be used for keeping references to another system of record for managing images. No change if not specified. Provide as a JSON object or @path/to/file.json.`}).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 e=>u({command:`images edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({creator:h(e.creator,`creator`,`text`),metadata:p(e.metadata,`metadata`),requireSignedURLs:e[`require-signed-urls`]},[[`metadata`]]):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(w,{body:t,account_id:a,image_id:e[`image-id`]}));s(r,{successLabel:`Updated`});return}let u=m({creator:h(e.creator,`creator`,`text`),metadata:p(e.metadata,`metadata`),requireSignedURLs:e[`require-signed-urls`]},[[`metadata`]]),d=await l(`Updating`,async()=>n.send(w,{body:u,account_id:a,image_id:e[`image-id`]}));s(d,{successLabel:`Updated`})})};var D={method:`GET`,path:t=>e`/zones/${t.zone_id}/images/v1/flows`};function O(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
|
|
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 k={command:`get`,describe:`Get transformation flows`,builder:O,handler:async e=>u({command:`images flows get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({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 r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(D,{zone_id:n}));s(i,{successLabel:`Loaded`})})};var A={method:`PUT`,path:t=>e`/zones/${t.zone_id}/images/v1/flows`,body:`json`};function j(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
|
|
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 M={command:`update`,describe:`Update transformation flows`,builder:j,handler:async e=>u({command:`images flows update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({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?m({etag:h(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]}):f(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=f(e.body),i=await l(`Updating`,async()=>t.send(A,{body:r,zone_id:n}));s(i,{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 i=m({etag:h(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]}),o=await l(`Updating`,async()=>t.send(A,{body:i,zone_id:n}));s(o,{successLabel:`Updated`})})},N={command:`flows`,describe:`Zone-level transformation flows that control how images are resized and optimized on delivery`,builder:e=>e.command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(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
|
|
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 F={command:`get-blob <image-id>`,describe:`Download image`,builder:P,handler:async e=>u({command:`images get-blob`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images get-blob`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}/blob`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await o();e.accountId=n;let a=await l(`Loading`,async()=>x(`/accounts/${n}/images/v1/${encodeURIComponent(String(e[`image-id`]))}/blob`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));b(e.text===!0?a.toString(`utf-8`):a)})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function L(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
|
|
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 R={command:`get <image-id>`,describe:`Image details`,builder:L,handler:async e=>u({command:`images get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/${e[`image-id`]==null?`<image-id>`:encodeURIComponent(String(e[`image-id`]))}`,pathParams:{"image-id":String(e[`image-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(I,{account_id:a,image_id:e[`image-id`]}));s(u,{successLabel:`Loaded`})})};var z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle/abort`};function B(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
|
|
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 V={command:`abort <migration-id>`,describe:`Abort a migration`,builder:B,handler:async e=>u({command:`images import abort`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import abort`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle/abort`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(z,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Updated`})})};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations`,body:`json`};function U(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`}).coerce(`conflict-behaviour`,e=>
|
|
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`}).coerce(`conflict-behaviour`,e=>h(e,`conflict-behaviour`,`text`)).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 W={command:`create`,describe:`Create a sourcing kit migration`,builder:U,handler:async e=>u({command:`images import create`,classification:{safeFlags:[`conflict-behaviour`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({conflictBehaviour:e[`conflict-behaviour`],excludedContentTypes:e[`excluded-content-types`],pathPrefix:h(e[`path-prefix`],`path-prefix`,`text`),rootDirectory:h(e[`root-directory`],`root-directory`,`text`),sourceId:h(e[`source-id`],`source-id`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(H,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`source-id`]===void 0&&(e[`source-id`]=await _(`source-id`,`The identifier of the source to migrate from.`));let u=m({conflictBehaviour:e[`conflict-behaviour`],excludedContentTypes:e[`excluded-content-types`],pathPrefix:h(e[`path-prefix`],`path-prefix`,`text`),rootDirectory:h(e[`root-directory`],`root-directory`,`text`),sourceId:h(e[`source-id`],`source-id`,`text`)}),d=await l(`Creating`,async()=>n.send(H,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var G={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}`};function K(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
|
|
26
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(
|
|
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 q={command:`delete <migration-id>`,describe:`Delete a sourcing kit migration`,builder:K,handler:async e=>u({command:`images import delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.force,message:`This operation will delete this import migration.`})){process.stderr.write(`Aborted.
|
|
26
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(G,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Deleted`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}`};function ce(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
|
|
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 le={command:`get <migration-id>`,describe:`Get sourcing kit migration`,builder:ce,handler:async e=>u({command:`images import get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(se,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Loaded`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations`,query:[`offset`,`limit`]};function de(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
|
|
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 fe={command:`list`,describe:`List sourcing kit migrations`,builder:de,handler:async e=>u({command:`images import list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit};if(e.dryRun){let e=await i();c({command:`cf images import list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(ue,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/logs`,query:[`offset`,`limit`]};function me(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
|
|
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 he={command:`logs <migration-id>`,describe:`List migration logs`,builder:me,handler:async e=>u({command:`images import logs`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit};if(e.dryRun){let t=await i();c({command:`cf images import logs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/logs`,pathParams:{"migration-id":String(e[`migration-id`]??``)},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(pe,{account_id:u,migration_id:e[`migration-id`],...n}));s(d,{successLabel:`Loaded`})})};var ge={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle`};function _e(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
|
|
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 ve={command:`progress <migration-id>`,describe:`Get migration progress`,builder:_e,handler:async e=>u({command:`images import progress`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ge,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Loaded`})})};var ye={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}/connectivity`};function be(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
|
|
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 xe={command:`check <source-id>`,describe:`Get source connectivity status`,builder:be,handler:async e=>u({command:`images import sources check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}/connectivity`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ye,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources`,body:`json`};function Se(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`]}).coerce(`vendor`,e=>
|
|
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(`secret`,{type:`string`,description:`Storage credentials for accessing the bucket. Shape depends on vendor. Provide as a JSON object or @path/to/file.json.`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).coerce(`vendor`,e=>h(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ce={command:`create`,describe:`Create a sourcing kit source`,builder:Se,handler:async e=>u({command:`images import sources create`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({account:h(e.account,`account`,`text`),bucket:h(e.bucket,`bucket`,`text`),name:h(e.name,`name`,`text`),secret:p(e.secret,`secret`,!0),vendor:e.vendor},[[`secret`]]):f(e.body,[{path:[`secret`],flag:`secret`}])});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body,[{path:[`secret`],flag:`secret`}]),r=await l(`Creating`,async()=>n.send(J,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.bucket===void 0&&(e.bucket=await _(`bucket`,`The name of the storage bucket.`)),e.name===void 0&&(e.name=await _(`name`,`A human-readable name for the source.`)),e.secret===void 0)throw Error(`--secret is required (or pass --body with this field set).`);e.vendor===void 0&&(e.vendor=await v(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let u=m({account:h(e.account,`account`,`text`),bucket:h(e.bucket,`bucket`,`text`),name:h(e.name,`name`,`text`),secret:p(e.secret,`secret`,!0),vendor:e.vendor},[[`secret`]]),d=await l(`Creating`,async()=>n.send(J,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`};function Te(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
|
|
41
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(
|
|
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 Ee={command:`delete <source-id>`,describe:`Delete a sourcing kit source`,builder:Te,handler:async e=>u({command:`images import sources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.force,message:`This operation will delete this import source.`})){process.stderr.write(`Aborted.
|
|
41
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(we,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Deleted`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`};function Oe(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
|
|
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 ke={command:`get <source-id>`,describe:`Get sourcing kit source`,builder:Oe,handler:async e=>u({command:`images import sources get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(De,{account_id:a,source_id:e[`source-id`]}));s(u,{successLabel:`Loaded`})})};var Ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources`,query:[`offset`,`limit`,`name`]};function je(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
|
|
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 Me={command:`list`,describe:`List sourcing kit sources`,builder:je,handler:async e=>u({command:`images import sources list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={offset:e.offset,limit:e.limit,name:e.name};if(e.dryRun){let e=await i();c({command:`cf images import sources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ae,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/connectivity-precheck`,body:`json`};function Ne(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`]}).coerce(`vendor`,e=>
|
|
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(`secret`,{type:`string`,description:`Storage credentials for accessing the bucket. Provide as a JSON object or @path/to/file.json.`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).coerce(`vendor`,e=>h(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pe={command:`pre-check`,describe:`Precheck source connectivity`,builder:Ne,handler:async e=>u({command:`images import sources pre-check`,classification:{safeFlags:[`vendor`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources pre-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({account:h(e.account,`account`,`text`),bucket:h(e.bucket,`bucket`,`text`),region:h(e.region,`region`,`text`),secret:p(e.secret,`secret`,!0),vendor:e.vendor},[[`secret`]]):f(e.body,[{path:[`secret`],flag:`secret`}])});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body,[{path:[`secret`],flag:`secret`}]),r=await l(`Creating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.bucket===void 0&&(e.bucket=await _(`bucket`,`The name of the storage bucket.`)),e.secret===void 0)throw Error(`--secret is required (or pass --body with this field set).`);e.vendor===void 0&&(e.vendor=await v(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let u=m({account:h(e.account,`account`,`text`),bucket:h(e.bucket,`bucket`,`text`),region:h(e.region,`region`,`text`),secret:p(e.secret,`secret`,!0),vendor:e.vendor},[[`secret`]]),d=await l(`Creating`,async()=>n.send(Y,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/sources/${t.source_id}`,body:`json`};function Fe(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
|
|
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 Ie={command:`update <source-id>`,describe:`Update a sourcing kit source`,builder:Fe,handler:async e=>u({command:`images import sources update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import sources update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/sources/${e[`source-id`]==null?`<source-id>`:encodeURIComponent(String(e[`source-id`]))}`,pathParams:{"source-id":String(e[`source-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(X,{body:t,account_id:a,source_id:e[`source-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await _(`name`,`Updated name for the source.`));let u=m({name:h(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(X,{body:u,account_id:a,source_id:e[`source-id`]}));s(d,{successLabel:`Updated`})})},Le={command:`sources`,describe:`Operations for import.sources`,builder:e=>e.command(xe).command(Ce).command(Ee).command(ke).command(Me).command(Pe).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Re={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v2/sourcingkit/migrations/${t.migration_id}/lifecycle/start`};function ze(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
|
|
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 Be={command:`start <migration-id>`,describe:`Start a migration`,builder:ze,handler:async e=>u({command:`images import start`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images import start`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v2/sourcingkit/migrations/${e[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(e[`migration-id`]))}/lifecycle/start`,pathParams:{"migration-id":String(e[`migration-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(Re,{account_id:a,migration_id:e[`migration-id`]}));s(u,{successLabel:`Updated`})})},Ve={command:`import`,describe:`Import images from S3`,builder:e=>e.command(V).command(W).command(q).command(le).command(fe).command(he).command(ve).command(Be).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var He={method:`PUT`,path:t=>e`/accounts/${t.account_id}/images/v1/keys/${t.signing_key_name}`};function Ue(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
|
|
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 We={command:`create <signing-key-name>`,describe:`Create a new Signing Key`,builder:Ue,handler:async e=>u({command:`images keys create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images keys create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/keys/${e[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(e[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(e[`signing-key-name`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Updating`,async()=>n.send(He,{account_id:a,signing_key_name:e[`signing-key-name`]}));s(u,{successLabel:`Updated`})})};var Ge={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/keys/${t.signing_key_name}`};function Ke(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
|
|
56
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(
|
|
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 qe={command:`delete <signing-key-name>`,describe:`Delete Signing Key`,builder:Ke,handler:async e=>u({command:`images keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/keys/${e[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(e[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(e[`signing-key-name`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.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
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(Ge,{account_id:a,signing_key_name:e[`signing-key-name`]}));s(u,{successLabel:`Deleted`})})};var Je={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/keys`};function Ye(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
|
|
58
|
+
List your CF Images signing keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xe={command:`list`,describe:`List Signing Keys`,builder:Ye,handler:async e=>u({command:`images keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/keys`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Je,{account_id:a}));s(u,{successLabel:`Loaded`})})},Ze={command:`keys`,describe:`Manage signing keys for generating private image URLs`,builder:e=>e.command(We).command(qe).command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v2`,query:[`continuation_token`,`per_page`,`sort_order`,`creator`,`meta.<field>[<operator>]`],errors:{400:`BadRequestError`}};function $e(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 et={command:`list`,describe:`List images V2`,builder:$e,handler:async e=>u({command:`images list`,classification:{safeFlags:[`sort-order`,`dry-run`]}},e,async()=>{let n={continuation_token:e[`continuation-token`],per_page:e[`per-page`],sort_order:e[`sort-order`],creator:e.creator};if(e.dryRun){let e=await i();c({command:`cf images list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Qe,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var tt={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/stats`};function nt(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
|
|
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 rt={command:`stats`,describe:`Images usage statistics`,builder:nt,handler:async e=>u({command:`images stats`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/stats`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(tt,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1/variants`,body:`json`};function it(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`]}).coerce(`options-fit`,e=>
|
|
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`]}).coerce(`options-fit`,e=>h(e,`options-fit`,`text`)).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`]}).coerce(`options-metadata`,e=>h(e,`options-metadata`,`text`)).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 at={command:`create`,describe:`Create a variant`,builder:it,handler:async e=>u({command:`images variants create`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({id:h(e.id,`id`,`text`),neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(Z,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.id===void 0&&(e.id=await _(`id`,`The id field`)),e[`options-fit`]===void 0&&(e[`options-fit`]=await v(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),e[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(e[`options-metadata`]===void 0&&(e[`options-metadata`]=await v(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),e[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let u=m({id:h(e.id,`id`,`text`),neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}),d=await l(`Creating`,async()=>n.send(Z,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Q={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`};function ot(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
|
|
65
|
-
`);return}let u=await l(`Deleting`,async()=>n.send(
|
|
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 st={command:`delete <variant-id>`,describe:`Delete a variant`,builder:ot,handler:async e=>u({command:`images variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await y({force:!!e.force,message:`This operation will delete this variant.`})){process.stderr.write(`Aborted.
|
|
65
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(Q,{account_id:a,variant_id:e[`variant-id`]}));s(u,{successLabel:`Deleted`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`,body:`json`};function ct(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`]}).coerce(`options-fit`,e=>
|
|
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`]}).coerce(`options-fit`,e=>h(e,`options-fit`,`text`)).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`]}).coerce(`options-metadata`,e=>h(e,`options-metadata`,`text`)).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 lt={command:`edit <variant-id>`,describe:`Update a variant`,builder:ct,handler:async e=>u({command:`images variants edit`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send($,{body:t,account_id:a,variant_id:e[`variant-id`]}));s(r,{successLabel:`Updated`});return}if(e[`options-fit`]===void 0&&(e[`options-fit`]=await v(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),e[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(e[`options-metadata`]===void 0&&(e[`options-metadata`]=await v(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),e[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let u=m({neverRequireSignedURLs:e[`never-require-signed-urls`],options:{fit:e[`options-fit`],height:e[`options-height`],metadata:e[`options-metadata`],width:e[`options-width`]}}),d=await l(`Updating`,async()=>n.send($,{body:u,account_id:a,variant_id:e[`variant-id`]}));s(d,{successLabel:`Updated`})})};var ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/variants/${t.variant_id}`};function dt(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
|
|
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 ft={command:`get <variant-id>`,describe:`Variant details`,builder:dt,handler:async e=>u({command:`images variants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf images variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1/variants/${e[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(e[`variant-id`]))}`,pathParams:{"variant-id":String(e[`variant-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ut,{account_id:a,variant_id:e[`variant-id`]}));s(u,{successLabel:`Loaded`})})};var pt={method:`GET`,path:t=>e`/accounts/${t.account_id}/images/v1/variants`};function mt(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
|
|
71
|
+
List existing CF Images variants.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ht={command:`list`,describe:`List variants`,builder:mt,handler:async e=>u({command:`images variants list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf images variants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(pt,{account_id:a}));s(u,{successLabel:`Loaded`})})},gt={command:`variants`,describe:`Manage named resize variants for transforming images on delivery`,builder:e=>e.command(at).command(st).command(lt).command(ft).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_t={command:`images`,describe:`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,builder:e=>e.command(te).command(ie).command(C).command(E).command(R).command(F).command(et).command(rt).command(N).command(Ve).command(Ze).command(gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_t as default};
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./src-
|
|
2
|
+
import{n as e,r as t,t as n}from"./src-BUH-P_zd.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./src-
|
|
2
|
+
import"./src-BUH-P_zd.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n,z as r}from"./dist-DZRTPMMA.mjs";import{i,n as a,t as o}from"./autoconfig-9po_tqsS.mjs";import{n as s}from"./version-B2RUUqGT.mjs";import{n as c}from"./delegate-Tgfxa-MZ.mjs";import{t as l}from"./project-settings-nBMEx1f-.mjs";import"./ui-BtIBQeaG.mjs";import{n as u}from"./dist-uRuGmkMB.mjs";import{t as d}from"./progress-Q5w9PNTT.mjs";import{n as f}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as p,r as m}from"./dialog-D4Y9ocuF.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),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":te()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function te(){return`# Approve build scripts needed by the generated Worker's dependencies.
|
|
3
3
|
allowBuilds:
|
|
4
4
|
esbuild: true
|
|
5
5
|
workerd: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,i as a,t as o}from"./context-C_a8oSY9.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-Q5w9PNTT.mjs";import{t as u}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as d,t as f}from"./body-parser-DnBfDdx3.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-C0hKSr-R.mjs";import{n as _,t as ee}from"./raw-fetch-CEOuoKl9.mjs";var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function ne(e){return e.usage(`$0 intel asn get <asn>
|
|
3
3
|
|
|
4
4
|
Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <asn>`,describe:`Get ASN Overview.`,builder:ne,handler:async e=>u({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(te,{account_id:a,asn:e.asn}));s(u,{successLabel:`Loaded`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}/subnets`};function ae(e){return e.usage(`$0 intel asn subnets get <asn>
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-Db1KT0vm.mjs";import{t}from"./output-Co4xdFf6.mjs";import{t as n}from"./dry-run-C2KjGX10.mjs";import{t as r}from"./progress-Q5w9PNTT.mjs";import{t as i}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(e){return e.usage(`$0 ips list
|
|
3
3
|
|
|
4
4
|
Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:o,handler:async o=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let i={networks:o.networks};if(o.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let s=await e(o),c=await r(`Loading`,async()=>s.send(a,i));t(c,{successLabel:`Loaded`})})},c={command:`ips`,describe:`ips`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,t as i}from"./context-C_a8oSY9.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-Q5w9PNTT.mjs";import{t as c}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as l,t as u}from"./body-parser-DnBfDdx3.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-C0hKSr-R.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/k2/streams`,body:`json`};function h(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`name`,{type:`string`,description:`Specifies the name of the K2 stream.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`,default:604800}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).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)`}).check(e=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const g={command:`create`,describe:`Create K2 stream`,builder:h,handler:async e=>c({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`Specifies the name of the K2 stream.`));let h=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function v(e){return e.usage(`$0 k2 streams delete <stream-id>
|
|
3
3
|
|
|
4
4
|
Delete a K2 stream in an account. Deleting a stream that does not exist also succeeds.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,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 y={command:`delete <stream-id>`,describe:`Delete K2 stream`,builder:v,handler:async e=>c({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function x(e){return e.usage(`$0 k2 streams get <stream-id>
|
|
@@ -8,4 +8,4 @@ Get K2 stream details.`).positional(`stream-id`,{type:`string`,description:`Spec
|
|
|
8
8
|
|
|
9
9
|
List or filter K2 streams in an account.`).option(`name`,{type:`string`,description:`Filters K2 streams by name using a case-insensitive substring.`}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List K2 streams`,builder:w,handler:async e=>c({command:`k2 streams list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf k2 streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(C,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}/subscriptions`};function D(e){return e.usage(`$0 k2 streams subscriptions list
|
|
10
10
|
|
|
11
|
-
Lists every subscription on one stream, oldest first. Lag uses committed positions, not reserved read positions. A failed tail observation preserves subscription metadata and returns unavailable lag.`).option(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List
|
|
11
|
+
Lists every subscription on one stream, oldest first. Lag uses committed positions, not reserved read positions. A failed tail observation preserves subscription metadata and returns unavailable lag.`).option(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List subscriptions with consumer lag`,builder:D,handler:async e=>c({command:`k2 streams subscriptions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}/subscriptions`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(E,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})},k={command:`subscriptions`,describe:`Subscriptions that consume a K2 stream, with committed-position lag`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`,body:`json`};function j(e){return e.usage("$0 k2 streams update <stream-id>\n\nUpdate a K2 stream. Omitted `http` settings, such as `authentication` and `cors`, keep their current values. Disabling HTTP keeps them, so enabling HTTP again restores them. At least one input must remain enabled.").positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).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)`}).check(e=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const M={command:`update <stream-id>`,describe:`Update K2 stream`,builder:j,handler:async e=>c({command:`k2 streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):l(e.body)});return}let c=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:d,stream_id:e[`stream-id`]}));a(n,{successLabel:`Updated`});return}let f=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),p=await s(`Updating`,async()=>c.send(A,{body:f,account_id:d,stream_id:e[`stream-id`]}));a(p,{successLabel:`Updated`})})},N={command:`streams`,describe:`K2 streams, their retention, and the HTTP and Workers binding inputs used to produce records`,builder:e=>e.command(g).command(y).command(S).command(T).command(M).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`k2`,describe:`Durable, ordered event streams that you produce records to and consume from with subscriptions`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as u,t as d}from"./body-parser-DnBfDdx3.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-C0hKSr-R.mjs";import{n as g,t as _}from"./raw-fetch-CEOuoKl9.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
|
|
3
3
|
|
|
4
4
|
Deletes up to 10,000 key-value pairs from the specified Workers KV namespace. Send a JSON array of the key names to delete. The result reports the number of successful deletions and any keys that failed and should be retried.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:v,handler:async e=>l({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,!await h({force:!!e.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}if(e.body){let t=u(e.body);if(Array.isArray(t)&&t.length>1e4){let r=Math.ceil(t.length/1e4),i=null;for(let a=0;a<t.length;a+=1e4){let o=t.slice(a,a+1e4),s=Math.floor(a/1e4)+1;i=await c(`Deleting: batch ${s}/${r}`,async()=>n(l,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,{body:o}))}o(i,{successLabel:`Deleted`});return}let r=await c(`Deleting`,async()=>n(l,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,{body:t}));o(r,{successLabel:`Deleted`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/get`,body:`json`};function x(e){return e.usage("$0 kv bulk get <namespace-id>\n\nRetrieves the text-based values of up to 100 keys from the specified Workers KV namespace. The result maps each requested key to its value. Set `type` to `json` to parse JSON values instead of returning strings, and set `withMetadata` to `true` to include metadata with each value. Binary values are not supported by this operation.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:"Return values as strings with `text`, or parse stored JSON values with `json`.",choices:[`text`,`json`],default:`text`}).coerce(`type`,e=>f(e,`type`,`text`)).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:x,handler:async e=>l({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(b,{body:t,account_id:l,namespace_id:e[`namespace-id`]}));o(r,{successLabel:`Created`});return}if(e.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let f=d({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}),p=await c(`Creating`,async()=>n.send(b,{body:f,account_id:l,namespace_id:e[`namespace-id`]}));o(p,{successLabel:`Created`})})};function C(e){return e.usage("$0 kv bulk put <namespace-id>\n\nWrites up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:C,handler:async e=>l({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body){let t=u(e.body);if(Array.isArray(t)&&t.length>1e4){let r=Math.ceil(t.length/1e4),i=null;for(let a=0;a<t.length;a+=1e4){let o=t.slice(a,a+1e4),s=Math.floor(a/1e4)+1;i=await c(`Updating: batch ${s}/${r}`,async()=>n(l,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk`,{body:o}))}o(i,{successLabel:`Updated`});return}let r=await c(`Updating`,async()=>n(l,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk`,{body:t}));o(r,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},T={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(y).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/values/${t.key_name}`};function D(e){return e.usage("$0 kv keys delete <key-name>\n\nDeletes the specified key and its value from the Workers KV namespace. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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 O={command:`delete <key-name>`,describe:`Delete a key-value pair`,builder:D,handler:async e=>l({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`})){process.stderr.write(`Aborted.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-
|
|
2
|
+
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-LcOb9rhI.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
|
package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-BXwIjlTs.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s,t as c}from"./body-parser-DnBfDdx3.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-C0hKSr-R.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(e){return e.usage(`$0 leaked-credential-checks detections create
|
|
3
3
|
|
|
4
4
|
Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`id`,{type:`string`,description:`Defines the unique ID for this custom detection.`}).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const p={command:`create`,describe:`Create a custom detection location for a zone.`,builder:f,handler:async e=>o({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(d,{body:t,zone_id:u}));r(n,{successLabel:`Created`});return}let f=c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}),p=await a(`Creating`,async()=>o.send(d,{body:f,zone_id:u}));r(p,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function h(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
|
|
5
5
|
|