cf 1.0.0-beta.28 → 1.0.0-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/_meta/commands.json +2240 -3181
- package/dist/_meta/hand-written-commands.json +38 -8
- package/dist/_meta/schemas.json +1683 -2505
- package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
- package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
- package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
- package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
- package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
- package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
- package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
- package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
- package/dist/ai-gateway-D2s0isU-.mjs +76 -0
- package/dist/ai-search-a0uqr9yJ.mjs +74 -0
- package/dist/{ai-security-DvU2iYkY.mjs → ai-security-H_RqjRoL.mjs} +4 -4
- package/dist/alerting-Bgp9rE4I.mjs +52 -0
- package/dist/analytics-CFYM82FD.mjs +17 -0
- package/dist/{analytics-engine-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
- package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
- package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
- package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
- package/dist/{audit-logs-B8cGL4B9.mjs → audit-logs-kG97iEnI.mjs} +2 -2
- package/dist/auth-Czr8ChBB.mjs +2 -0
- package/dist/auth-DA1PHaHi.mjs +2 -0
- package/dist/auth-Dwfa4S3h.mjs +7 -0
- package/dist/{auth-token-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
- package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
- package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
- package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
- package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
- package/dist/body-parser-HN91kAf0.mjs +2 -0
- package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
- package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
- package/dist/{botnet-feed-UyK7Rfp6.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
- package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
- package/dist/browser-run-BvjfMK3f.mjs +40 -0
- package/dist/build-CCwo_ydV.mjs +2 -0
- package/dist/{build-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
- package/dist/builds-tMa3sbQU.mjs +62 -0
- package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
- package/dist/cf-DmvZ2L51.mjs +18 -0
- package/dist/{chunk-DSGVRFIS-BaNZNW-M.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
- package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
- package/dist/cli-Cc7ujzAy.mjs +4 -0
- package/dist/{client-side-security-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
- package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
- package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
- package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
- package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
- package/dist/command-BVct0Dvr.mjs +2 -0
- package/dist/{command-DeutqL1n.mjs → command-C4_lMRkw.mjs} +1 -1
- package/dist/command-CJ3ldWrA.mjs +2 -0
- package/dist/command-CyOdBNur.mjs +2 -0
- package/dist/command-D2XkyO1e.mjs +2 -0
- package/dist/command-DHODgfFZ.mjs +2 -0
- package/dist/command-DIIaZx_f.mjs +2 -0
- package/dist/command-DONwHpqZ.mjs +2 -0
- package/dist/command-DdYnSf-8.mjs +2 -0
- package/dist/command-DqOU7Ql2.mjs +2 -0
- package/dist/{command-CbxXc5IW.mjs → command-HW7k43qu.mjs} +1 -1
- package/dist/command-NqM0lo4a.mjs +2 -0
- package/dist/command-bwVDyMv4.mjs +2 -0
- package/dist/command-yzqs4m83.mjs +2 -0
- package/dist/{completions-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
- package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
- package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
- package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
- package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
- package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
- package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
- package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
- package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
- package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
- package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
- package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
- package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
- package/dist/d1-N81q-FAr.mjs +50 -0
- package/dist/{delegate-CcL6RoGw.mjs → delegate-livNdiwK.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-Ok4ncy06.mjs +2 -0
- package/dist/deploy-context-B_lLfxt7.mjs +55 -0
- package/dist/deploy-input-JZlEJwKB.mjs +2 -0
- package/dist/dev-DxbkJkzc.mjs +4 -0
- package/dist/{diagnostics-C3nqxsAO.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
- package/dist/dialog-CD94-Kzw.mjs +2 -0
- package/dist/discover-D9FNaCDK.mjs +2 -0
- package/dist/discover-DGsMj9ZN.mjs +2 -0
- package/dist/{dist-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
- package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
- package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
- package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
- package/dist/docs-BFVK88kB.mjs +3 -0
- package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
- package/dist/{durable-objects-DHK9w-vO.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
- package/dist/email-auth--2KCzZNA.mjs +6 -0
- package/dist/email-routing-DzaExfVf.mjs +44 -0
- package/dist/{email-security-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
- package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
- package/dist/errors-C_bGcR0X.mjs +11 -0
- package/dist/field-extractors-MVOizTlB.mjs +8 -0
- package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
- package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
- package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
- package/dist/generate-BzOnRBij.mjs +2 -0
- package/dist/generate-DfxZtpn9.mjs +2 -0
- package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
- package/dist/{google-tag-gateway-C5WYsSXv.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
- package/dist/gt-BV-jij5q.mjs +4 -0
- package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
- package/dist/{hyperdrive-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
- package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
- package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-BgCF9K8h.mjs +43 -0
- package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
- package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
- package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
- package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
- package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
- package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
- package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
- package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
- package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
- package/dist/load-balancers-C2hg52WA.mjs +84 -0
- package/dist/{local-DIJ7SIKC.mjs → local-B3zt9PXR.mjs} +1 -1
- package/dist/local-DRxctCh9.mjs +2 -0
- package/dist/local-runtime-BOnDiMDc.mjs +2 -0
- package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
- package/dist/log-DBAHla_W.mjs +2 -0
- package/dist/login-CK3nn9a5.mjs +2 -0
- package/dist/{login-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
- package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
- package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
- package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
- package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
- package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
- package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
- package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
- package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
- package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
- package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
- package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
- package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
- package/dist/o11y-eYYs59X9.mjs +88 -0
- package/dist/oauth-BgDZMd72.mjs +5 -0
- package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
- package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
- package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
- package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
- package/dist/output-hFMAotFl.mjs +2 -0
- package/dist/package-oNVeacC9.mjs +2 -0
- package/dist/page-rules-BVmi-ZFW.mjs +35 -0
- package/dist/pages-5spcBpX1.mjs +48 -0
- package/dist/{pay-per-crawl-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
- package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
- package/dist/pipelines-CbtmLRxt.mjs +40 -0
- package/dist/{precursor-Dx8lN4UJ.mjs → precursor-Dk8YOKf_.mjs} +2 -2
- package/dist/previews-Bv1HMMtO.mjs +6 -0
- package/dist/progress-DE_G09u2.mjs +2 -0
- package/dist/project-settings-D_S-UC8I.mjs +3 -0
- package/dist/prompt-D274Im1O.mjs +4 -0
- package/dist/{queues-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
- package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
- package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
- package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
- package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
- package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
- package/dist/registrar-Cl1snz8z.mjs +43 -0
- package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
- package/dist/{reporting-WX8P3Y0k.mjs → reporting-D9FC-Z-3.mjs} +7 -7
- package/dist/request-headers-Bopp5lH_.mjs +2 -0
- package/dist/request-tracers-CSSB9_aW.mjs +4 -0
- package/dist/{resource-sharing-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
- package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
- package/dist/rulesets-DsTGcgbc.mjs +42 -0
- package/dist/{rum-BZ_24qZU.mjs → rum-DrJLI93T.mjs} +14 -14
- package/dist/run-C5yPsiO2.mjs +2 -0
- package/dist/run-CXWkMU3x.mjs +2 -0
- package/dist/schema-CfZOW8Zw.mjs +2 -0
- package/dist/{schema-cache-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
- package/dist/schema-flags-DO3kLYBu.mjs +4 -0
- package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
- package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
- package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
- package/dist/{security-txt-CIt0494b.mjs → security-txt-SKtgW4n-.mjs} +4 -4
- package/dist/session-COdP8BXD.mjs +2 -0
- package/dist/shared-D_2KLpP3.mjs +2 -0
- package/dist/{signed-url-gNangfwc.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
- package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
- package/dist/snippets-DrrdpLnS.mjs +18 -0
- package/dist/spawn-DNf-Ge8d.mjs +5 -0
- package/dist/{spectrum-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
- package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
- package/dist/sql-BCuLxGSf.mjs +4 -0
- package/dist/src-ByCoEqOw.mjs +133 -0
- package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
- package/dist/startup-profile-CyQk_f_L.mjs +2 -0
- package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
- package/dist/state-B6r-b_-d.mjs +2 -0
- package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
- package/dist/static-assets-DGDoaJf1.mjs +386 -0
- package/dist/stream-CzlqY8hq.mjs +89 -0
- package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
- package/dist/telemetry-COlodX5Z.mjs +2 -0
- package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
- package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
- package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
- package/dist/tunnels-nLfIWPYT.mjs +27 -0
- package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
- package/dist/ui-dWsVmFCG.mjs +2 -0
- package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
- package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-K7gkmPvG.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
- package/dist/url-scanner-9XW3zLaU.mjs +16 -0
- package/dist/user-Bk1BIqZ5.mjs +103 -0
- package/dist/{vectorize-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
- package/dist/version-CcuBNjqg.mjs +2 -0
- package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
- package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
- package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
- package/dist/workers-BZMvamn0.mjs +39 -0
- package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
- package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
- package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
- package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
- package/dist/zaraz-BFK0p28R.mjs +22 -0
- package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
- package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
- package/package.json +19 -19
- package/dist/ai-gateway-Lj4On37s.mjs +0 -74
- package/dist/ai-search-BxyhS3X7.mjs +0 -74
- package/dist/alerting-r0G2X9y9.mjs +0 -52
- package/dist/analytics-C6bfqm-W.mjs +0 -17
- package/dist/auth-B-h0BHg7.mjs +0 -2
- package/dist/auth-B6tswVxH.mjs +0 -2
- package/dist/auth-clmqFEWU.mjs +0 -7
- package/dist/body-parser-DoewLePl.mjs +0 -2
- package/dist/brand-protection-kv1ba80i.mjs +0 -14
- package/dist/browser-run-D-vRoZmf.mjs +0 -40
- package/dist/build-BzJGqb2o.mjs +0 -2
- package/dist/builds-BbxINHRP.mjs +0 -64
- package/dist/cf-BQ_LRiut.mjs +0 -18
- package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
- package/dist/cli-B7vslRfu.mjs +0 -4
- package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
- package/dist/command-AVwd7XjE.mjs +0 -2
- package/dist/command-B87T_f2f.mjs +0 -2
- package/dist/command-CEHhi3t0.mjs +0 -2
- package/dist/command-CYmQE79n.mjs +0 -2
- package/dist/command-Ce8CVLth.mjs +0 -2
- package/dist/command-CqDudQZs.mjs +0 -2
- package/dist/command-D4YcwpVp.mjs +0 -2
- package/dist/command-D9Qyi1B0.mjs +0 -2
- package/dist/command-Dl9ICrRK.mjs +0 -2
- package/dist/command-DtCSe8Hy.mjs +0 -2
- package/dist/command-DwzVtmb3.mjs +0 -2
- package/dist/command-wtBubtZ4.mjs +0 -2
- package/dist/containers-B06OGOEB.mjs +0 -380
- package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
- package/dist/d1-nJCOJZb8.mjs +0 -50
- package/dist/deploy-DJMnWFNk.mjs +0 -2
- package/dist/deploy-context-YCW3eqP1.mjs +0 -56
- package/dist/deploy-input-CQLBXFEB.mjs +0 -2
- package/dist/dev-GsYHvMah.mjs +0 -4
- package/dist/dialog-D5lus4M4.mjs +0 -2
- package/dist/discover-6kAmVMPp.mjs +0 -2
- package/dist/discover-C06Syc2B.mjs +0 -2
- package/dist/docs-CRc_WOXh.mjs +0 -3
- package/dist/email-auth-ptdqNSTZ.mjs +0 -6
- package/dist/email-domains-uL22-zRY.mjs +0 -14
- package/dist/email-routing-CV43rMJC.mjs +0 -44
- package/dist/errors-VG1mgwJl.mjs +0 -11
- package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
- package/dist/generate-CeeWW3eX.mjs +0 -3
- package/dist/generate-D6V4Q58z.mjs +0 -2
- package/dist/gt-BQkaDQDq.mjs +0 -3
- package/dist/healthchecks-BA1fmzTm.mjs +0 -20
- package/dist/init-EVsjBrOz.mjs +0 -43
- package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
- package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
- package/dist/local-D5Vq6ooZ.mjs +0 -2
- package/dist/local-runtime-BZjgkacr.mjs +0 -2
- package/dist/log-DZfik9Jk.mjs +0 -2
- package/dist/login-DRJugxya.mjs +0 -2
- package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
- package/dist/o11y-ySxrnP1Z.mjs +0 -88
- package/dist/oauth-CFVUl-Wv.mjs +0 -4
- package/dist/output-BZQEl3mK.mjs +0 -2
- package/dist/package-B7RgwuFR.mjs +0 -2
- package/dist/page-rules-DRw763O1.mjs +0 -38
- package/dist/pages-DfQnxiTk.mjs +0 -48
- package/dist/pipelines-DbyrI6F4.mjs +0 -40
- package/dist/previews-DEVNSip2.mjs +0 -6
- package/dist/progress-yvPscjYg.mjs +0 -2
- package/dist/project-settings-nBMEx1f-.mjs +0 -3
- package/dist/prompt-CEpZ-lQZ.mjs +0 -4
- package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
- package/dist/registrar-D23gfKBi.mjs +0 -43
- package/dist/request-headers-C0FpeBhz.mjs +0 -2
- package/dist/request-tracers-qd7XOAka.mjs +0 -4
- package/dist/rulesets-DmqwixUC.mjs +0 -42
- package/dist/run-BOKI1uWa.mjs +0 -2
- package/dist/run-DBqOjD1P.mjs +0 -2
- package/dist/schema-Dj9STsWI.mjs +0 -2
- package/dist/schema-flags-CXm9iIv6.mjs +0 -4
- package/dist/session-vzNfUhPl.mjs +0 -2
- package/dist/shared-MK-_lkbn.mjs +0 -2
- package/dist/smart-shield-Boy_qbqd.mjs +0 -22
- package/dist/snippets-DdoDYXW-.mjs +0 -18
- package/dist/spawn-B5F4OIHG.mjs +0 -5
- package/dist/sql-Bb56llsb.mjs +0 -4
- package/dist/src-BoSDeQ9m.mjs +0 -133
- package/dist/startup-profile-DQVkZZpb.mjs +0 -2
- package/dist/state-DW3QZtfh.mjs +0 -2
- package/dist/stream-BuZYDbNR.mjs +0 -89
- package/dist/telemetry-DkDUr4KK.mjs +0 -2
- package/dist/tunnels-D90ztENM.mjs +0 -27
- package/dist/ui-xjCox-gU.mjs +0 -2
- package/dist/url-scanner-BRdWwka4.mjs +0 -16
- package/dist/user-Cmb1_Wu5.mjs +0 -103
- package/dist/version-6Bpy6Bgt.mjs +0 -2
- package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
- package/dist/workers-BnLiOjZf.mjs +0 -39
- package/dist/workers-builds-sKpITeRk.mjs +0 -14
- package/dist/zaraz-BBKki5WS.mjs +0 -22
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,i as a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-hFMAotFl.mjs";import{t as l}from"./progress-DE_G09u2.mjs";import{t as u}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-D274Im1O.mjs";var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/enabled-domains`,query:[`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function b(e){return e.usage(`$0 pay-per-use enabled-domains list
|
|
3
3
|
|
|
4
|
-
Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`list`,describe:`List enabled Pay Per Use domains`,builder:b,handler:async e=>u({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let
|
|
4
|
+
Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`list`,describe:`List enabled Pay Per Use domains`,builder:b,handler:async e=>u({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let e=await i();r({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:t,bodyKind:`none`});return}let a=await n(e),u=e.local?s:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(y,{account_id:u,...t}));c(d,{successLabel:`Loaded`})})},te={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ne={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/operator/configuration`,errors:{403:`ForbiddenError`,404:`NotFoundError`}};function x(e){return e.usage(`$0 pay-per-use operator get-configuration
|
|
5
5
|
|
|
6
|
-
Gets the pay-per-use operator configuration for an account, including its read-only non-billable classification timestamp.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get-configuration`,describe:`Get pay-per-use operator configuration`,builder:x,handler:async e=>u({command:`pay-per-use operator get-configuration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();
|
|
6
|
+
Gets the pay-per-use operator configuration for an account, including its read-only non-billable classification timestamp.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get-configuration`,describe:`Get pay-per-use operator configuration`,builder:x,handler:async e=>u({command:`pay-per-use operator get-configuration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({command:`cf pay-per-use operator get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`none`});return}let t=await n(e),a=e.local?s:await o();e.accountId=a;let u=await l(`Loading`,async()=>t.send(ne,{account_id:a}));c(u,{successLabel:`Loaded`})})};var C={method:`PUT`,path:t=>e`/accounts/${t.account_id}/pay-per-use/operator/configuration`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`}};function w(e){return e.usage(`$0 pay-per-use operator set-configuration
|
|
7
7
|
|
|
8
|
-
Creates or updates the pay-per-use operator configuration for an account. Creating an enabled configuration or re-enabling a disabled billable operator requires completed Stripe onboarding, while non-billable operators do not; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration`})}const T={command:`set-configuration`,describe:`Set pay-per-use operator configuration`,builder:w,handler:async e=>u({command:`pay-per-use operator set-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();
|
|
8
|
+
Creates or updates the pay-per-use operator configuration for an account. Creating an enabled configuration or re-enabling a disabled billable operator requires completed Stripe onboarding, while non-billable operators do not; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration`})}const T={command:`set-configuration`,describe:`Set pay-per-use operator configuration`,builder:w,handler:async e=>u({command:`pay-per-use operator set-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf pay-per-use operator set-configuration`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({default_price_usd_microcents:e[`default-price-usd-microcents`],enabled:e.enabled,name:m(e.name,`name`,`text`)}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),a=await n(e),u=e.local?s:await o();if(e.accountId=u,e.body!==void 0){let e=t,n=await l(`Updating`,async()=>a.send(C,{body:e,account_id:u}));c(n,{successLabel:`Updated`});return}if(e[`default-price-usd-microcents`]===void 0)throw Error(`--default-price-usd-microcents is required (or pass --body with this field set).`);if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await g(`name`,`The name field`));let d=p({default_price_usd_microcents:e[`default-price-usd-microcents`],enabled:e.enabled,name:m(e.name,`name`,`text`)}),h=await l(`Updating`,async()=>a.send(C,{body:d,account_id:u}));c(h,{successLabel:`Updated`})})};var E={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/pay-per-use/operator/configuration`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function D(e){return e.usage(`$0 pay-per-use operator update-configuration
|
|
9
9
|
|
|
10
|
-
Updates one or more fields of an existing pay-per-use operator configuration. Re-enabling a disabled billable operator requires completed Stripe onboarding, while non-billable operators do not; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration update`})}const O={command:`update-configuration`,describe:`Update pay-per-use operator configuration`,builder:D,handler:async e=>u({command:`pay-per-use operator update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();
|
|
10
|
+
Updates one or more fields of an existing pay-per-use operator configuration. Re-enabling a disabled billable operator requires completed Stripe onboarding, while non-billable operators do not; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration update`})}const O={command:`update-configuration`,describe:`Update pay-per-use operator configuration`,builder:D,handler:async e=>u({command:`pay-per-use operator update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf pay-per-use operator update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({default_price_usd_microcents:e[`default-price-usd-microcents`],enabled:e.enabled,name:m(e.name,`name`,`text`)}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),a=await n(e),u=e.local?s:await o();if(e.accountId=u,e.body!==void 0){let e=t,n=await l(`Updating`,async()=>a.send(E,{body:e,account_id:u}));c(n,{successLabel:`Updated`});return}let d=p({default_price_usd_microcents:e[`default-price-usd-microcents`],enabled:e.enabled,name:m(e.name,`name`,`text`)}),h=await l(`Updating`,async()=>a.send(E,{body:d,account_id:u}));c(h,{successLabel:`Updated`})})},k={command:`operator`,describe:`Operations for operator`,builder:e=>e.command(S).command(T).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`GET`,path:t=>e`/zones/${t.zone_id}/pay-per-use/operators`,query:[`page`,`per_page`],errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function j(e){return e.usage(`$0 pay-per-use pricing list-operators
|
|
11
11
|
|
|
12
|
-
Lists a paginated set of enabled pay-per-use operators with verified names, matching billing classification, and their prices for a zone.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list-operators`,describe:`List pay-per-use operators`,builder:j,handler:async e=>u({command:`pay-per-use pricing list-operators`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){
|
|
12
|
+
Lists a paginated set of enabled pay-per-use operators with verified names, matching billing classification, and their prices for a zone.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list-operators`,describe:`List pay-per-use operators`,builder:j,handler:async e=>u({command:`pay-per-use pricing list-operators`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){r({command:`cf pay-per-use pricing list-operators`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let i=await n(e),o=await a({zone:e.zone},i,{quiet:e.quiet});e.zoneId=o;let s=await l(`Loading`,async()=>i.send(A,{zone_id:o,...t}));c(s,{successLabel:`Loaded`})})};var N={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/pay-per-use/operators/${t.operator_id}/price`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 pay-per-use pricing opt-out-operator-price <operator-id>
|
|
13
13
|
|
|
14
|
-
Opts a zone out by scheduling the current accepted pay-per-use operator price to expire at the start of the next UTC month. Use the withdraw action for a pending proposal.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator 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 F={command:`opt-out-operator-price <operator-id>`,describe:`Opt out of a pay-per-use operator price`,builder:P,handler:async e=>u({command:`pay-per-use pricing opt-out-operator-price`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){
|
|
14
|
+
Opts a zone out by scheduling the current accepted pay-per-use operator price to expire at the start of the next UTC month. Use the withdraw action for a pending proposal.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator 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 F={command:`opt-out-operator-price <operator-id>`,describe:`Opt out of a pay-per-use operator price`,builder:P,handler:async e=>u({command:`pay-per-use pricing opt-out-operator-price`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf pay-per-use pricing opt-out-operator-price`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=i,!await v({force:!!e.force}))return;let o=await l(`Deleting`,async()=>t.send(N,{zone_id:i,operator_id:e[`operator-id`]}));c(o,{successLabel:`Deleted`})})};var I={method:`POST`,path:t=>e`/zones/${t.zone_id}/pay-per-use/operators/${t.operator_id}/price`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function L(e){return e.usage(`$0 pay-per-use pricing set-operator-price <operator-id>
|
|
15
15
|
|
|
16
|
-
Proposes a required price, withdraws a pending proposal, accepts an operator's default pay-per-use price, or resumes an accepted price before its scheduled expiry. Propose, accept_default, and resume require an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`action`,{type:`string`,description:`The action field`,choices:[`propose`,`withdraw`,`accept_default`,`resume`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use publisher price action`})}const R={command:`set-operator-price <operator-id>`,describe:`Set a pay-per-use operator price`,builder:L,handler:async e=>u({command:`pay-per-use pricing set-operator-price`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
16
|
+
Proposes a required price, withdraws a pending proposal, accepts an operator's default pay-per-use price, or resumes an accepted price before its scheduled expiry. Propose, accept_default, and resume require an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`action`,{type:`string`,description:`The action field`,choices:[`propose`,`withdraw`,`accept_default`,`resume`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use publisher price action`})}const R={command:`set-operator-price <operator-id>`,describe:`Set a pay-per-use operator price`,builder:L,handler:async e=>u({command:`pay-per-use pricing set-operator-price`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf pay-per-use pricing set-operator-price`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({action:e.action,price_usd_microcents:e[`price-usd-microcents`]}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),i=await n(e),o=await a({zone:e.zone},i,{quiet:e.quiet});if(e.zoneId=o,e.body!==void 0){let n=t,r=await l(`Creating`,async()=>i.send(I,{body:n,zone_id:o,operator_id:e[`operator-id`]}));c(r,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await _(`action`,`The action field`,[`propose`,`withdraw`,`accept_default`,`resume`])),e.action===`propose`&&e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let s=p({action:e.action,price_usd_microcents:e[`price-usd-microcents`]}),u=await l(`Creating`,async()=>i.send(I,{body:s,zone_id:o,operator_id:e[`operator-id`]}));c(u,{successLabel:`Created`})})},z={command:`pricing`,describe:`Operations for pricing`,builder:e=>e.command(M).command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-use/proposals`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function re(e){return e.usage(`$0 pay-per-use proposals decide
|
|
17
17
|
|
|
18
|
-
Accepts or rejects the pending pay-per-use price proposal identified by price_id in the request body. Acceptance requires an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications; rejection remains available for cleanup.`).option(`action`,{type:`string`,description:`The action field`,choices:[`accept`,`reject`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`price-id`,{type:`number`,description:`Pending pay-per-use price id returned in the operator proposal queue.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator proposal decision`})}const V={command:`decide`,describe:`Decide a pay-per-use price proposal`,builder:re,handler:async e=>u({command:`pay-per-use proposals decide`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();
|
|
18
|
+
Accepts or rejects the pending pay-per-use price proposal identified by price_id in the request body. Acceptance requires an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications; rejection remains available for cleanup.`).option(`action`,{type:`string`,description:`The action field`,choices:[`accept`,`reject`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`price-id`,{type:`number`,description:`Pending pay-per-use price id returned in the operator proposal queue.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator proposal decision`})}const V={command:`decide`,describe:`Decide a pay-per-use price proposal`,builder:re,handler:async e=>u({command:`pay-per-use proposals decide`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf pay-per-use proposals decide`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-use/proposals`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({action:e.action,price_id:e[`price-id`]}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),a=await n(e),u=e.local?s:await o();if(e.accountId=u,e.body!==void 0){let e=t,n=await l(`Creating`,async()=>a.send(B,{body:e,account_id:u}));c(n,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await _(`action`,`The action field`,[`accept`,`reject`])),e[`price-id`]===void 0)throw Error(`--price-id is required (or pass --body with this field set).`);let d=p({action:e.action,price_id:e[`price-id`]}),m=await l(`Creating`,async()=>a.send(B,{body:d,account_id:u}));c(m,{successLabel:`Created`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/proposals`,query:[`page`,`per_page`],errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function U(e){return e.usage(`$0 pay-per-use proposals list
|
|
19
19
|
|
|
20
|
-
Lists a paginated set of outstanding pay-per-use publisher price proposals for an operator. Listing remains available while the operator is disabled or its name is unverified so proposals can be rejected.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List pay-per-use price proposals`,builder:U,handler:async e=>u({command:`pay-per-use proposals list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let
|
|
20
|
+
Lists a paginated set of outstanding pay-per-use publisher price proposals for an operator. Listing remains available while the operator is disabled or its name is unverified so proposals can be rejected.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List pay-per-use price proposals`,builder:U,handler:async e=>u({command:`pay-per-use proposals list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();r({command:`cf pay-per-use proposals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/proposals`,pathParams:{},query:t,bodyKind:`none`});return}let a=await n(e),u=e.local?s:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(H,{account_id:u,...t}));c(d,{successLabel:`Loaded`})})},G={command:`proposals`,describe:`Operations for proposals`,builder:e=>e.command(V).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 pay-per-use usage-reports submit
|
|
21
21
|
|
|
22
|
-
Validates and submits a usage report for an active Pay Per Use participant. The complete report is rejected if any item is invalid.`).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`})}const q={command:`submit`,describe:`Submit a participant usage report`,builder:K,handler:async e=>u({command:`pay-per-use usage-reports submit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();
|
|
22
|
+
Validates and submits a usage report for an active Pay Per Use participant. The complete report is rejected if any item is invalid.`).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`})}const q={command:`submit`,describe:`Submit a participant usage report`,builder:K,handler:async e=>u({command:`pay-per-use usage-reports submit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf pay-per-use usage-reports submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-use/usage-reports`,pathParams:{},bodyKind:`octet-stream`,body:e.file===void 0?e.body:{file:e.file}});return}if(e.body===void 0&&e.file===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let a=e.file===void 0?m(e.body,`body`,`binary`):void 0,u=await n(e),d=e.local?s:await o();if(e.accountId=d,e.file!==void 0){let n=h(e.file),r=await l(`Creating`,async()=>t(u,`POST`,`/accounts/${d}/pay-per-use/usage-reports`,{body:n,headers:{"Content-Type":`application/jsonl`}}));c(r,{successLabel:`Created`})}else if(e.body!==void 0){let e=a,n=await l(`Creating`,async()=>t(u,`POST`,`/accounts/${d}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}}));c(n,{successLabel:`Created`})}})},J={command:`usage-reports`,describe:`Operations for usage-reports`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/pay-per-use/usage-stats`,query:[`since`,`until`,`page`,`per_page`],errors:{400:`BadRequestError`,403:`ForbiddenError`,500:`InternalServerError`}};function X(e){return e.usage(`$0 pay-per-use usage-stats get-account
|
|
23
23
|
|
|
24
24
|
Returns reported usage and the full gross value across all Pay Per Use zones in a publisher account or zone over an explicit UTC range of at most 31 days. Usage from every domain and snapshotted price is summed by buyer. Ranges up to and including 7 days use hourly data points; longer ranges use daily data points. Because source data is aggregated hourly, both requested bounds are rounded down to the selected UTC interval and the resolved bounds are returned in the response. The resolved range must contain at least one complete interval. Empty periods are omitted. Buyers and their data points are paginated, while totals cover every buyer in the range. Values are raw usage counts and USD microcents; total_price_usd_microcents is the full value before the publisher revenue share.
|
|
25
25
|
|
|
26
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`since`,{type:`string`,description:`Requested inclusive beginning of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval.`,demandOption:!0}).option(`until`,{type:`string`,description:`Requested exclusive end of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval. The requested duration from since cannot exceed 31 days.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get-account`,describe:`Get pay-per-use usage statistics`,builder:X,handler:async e=>u({command:`pay-per-use usage-stats get-account`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let
|
|
26
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`since`,{type:`string`,description:`Requested inclusive beginning of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval.`,demandOption:!0}).option(`until`,{type:`string`,description:`Requested exclusive end of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval. The requested duration from since cannot exceed 31 days.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get-account`,describe:`Get pay-per-use usage statistics`,builder:X,handler:async e=>u({command:`pay-per-use usage-stats get-account`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=e.zone===void 0?await i():void 0,a=e.zone===void 0?`accounts`:`zones`,o=e.zone??n??`<account-id>`;r({command:`cf pay-per-use usage-stats get-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${a}/${o}/pay-per-use/usage-stats`,pathParams:{"account-or-zone":String(a),"account-or-zone-id":String(o)},query:t,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?s:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(Y,{account_or_zone:d,account_or_zone_id:f,...t}));c(p,{successLabel:`Loaded`})})},ae={command:`usage-stats`,describe:`Operations for usage-stats`,builder:e=>e.command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`GET`,path:t=>e`/zones/${t.zone_id}/pay-per-use/can_be_enabled`,errors:{403:`ForbiddenError`}};function se(e){return e.usage(`$0 pay-per-use zones get-can-be-enabled
|
|
27
27
|
|
|
28
|
-
Gets whether pay-per-use can be enabled for a zone and the current zone-level grace period.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get-can-be-enabled`,describe:`Get pay-per-use zone eligibility`,builder:se,handler:async e=>u({command:`pay-per-use zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
28
|
+
Gets whether pay-per-use can be enabled for a zone and the current zone-level grace period.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get-can-be-enabled`,describe:`Get pay-per-use zone eligibility`,builder:se,handler:async e=>u({command:`pay-per-use zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf pay-per-use zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let o=await l(`Loading`,async()=>t.send(oe,{zone_id:i}));c(o,{successLabel:`Loaded`})})};var Z={method:`GET`,path:t=>e`/zones/${t.zone_id}/pay-per-use/configuration`,errors:{403:`ForbiddenError`}};function le(e){return e.usage(`$0 pay-per-use zones get-configuration
|
|
29
29
|
|
|
30
|
-
Gets the pay-per-use configuration, zone-level grace period, and read-only non-billable classification timestamp for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get-configuration`,describe:`Get pay-per-use zone configuration`,builder:le,handler:async e=>u({command:`pay-per-use zones get-configuration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
30
|
+
Gets the pay-per-use configuration, zone-level grace period, and read-only non-billable classification timestamp for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get-configuration`,describe:`Get pay-per-use zone configuration`,builder:le,handler:async e=>u({command:`pay-per-use zones get-configuration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf pay-per-use zones get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let o=await l(`Loading`,async()=>t.send(Z,{zone_id:i}));c(o,{successLabel:`Loaded`})})};var Q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/pay-per-use/zones_can_be_enabled`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`}};function de(e){return e.usage(`$0 pay-per-use zones set-can-be-enabled
|
|
31
31
|
|
|
32
|
-
Sets pay-per-use eligibility for a list of account zones. An omitted can_be_enabled value leaves that zone unchanged. Revoking eligibility disables the zone immediately while existing accepted licenses remain active until the start of the next UTC month.`).option(`zones`,{type:`string`,description:`The zones field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone eligibility updates`})}const fe={command:`set-can-be-enabled`,describe:`Set pay-per-use zone eligibility`,builder:de,handler:async e=>u({command:`pay-per-use zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();
|
|
32
|
+
Sets pay-per-use eligibility for a list of account zones. An omitted can_be_enabled value leaves that zone unchanged. Revoking eligibility disables the zone immediately while existing accepted licenses remain active until the start of the next UTC month.`).option(`zones`,{type:`string`,description:`The zones field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id": string, "can_be_enabled"?: boolean}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone eligibility updates`})}const fe={command:`set-can-be-enabled`,describe:`Set pay-per-use zone eligibility`,builder:de,handler:async e=>u({command:`pay-per-use zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf pay-per-use zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pay-per-use/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({zones:d(e.zones,`zones`)}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),a=await n(e),u=e.local?s:await o();if(e.accountId=u,e.body!==void 0){let e=t,n=await l(`Updating`,async()=>a.send(Q,{body:e,account_id:u}));c(n,{successLabel:`Updated`});return}if(e.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let m=p({zones:d(e.zones,`zones`)}),h=await l(`Updating`,async()=>a.send(Q,{body:m,account_id:u}));c(h,{successLabel:`Updated`})})};var $={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/pay-per-use/configuration`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function pe(e){return e.usage(`$0 pay-per-use zones update-configuration
|
|
33
33
|
|
|
34
|
-
Enables or disables an existing pay-per-use zone configuration. Omitting enabled leaves the zone unchanged. Enabling a disabled billable zone requires completed publisher Stripe onboarding, while non-billable zones do not; an already-enabled zone is not affected by later Stripe status changes. Disabling starts a disabled period immediately while existing accepted licenses remain active until the start of the next UTC month; re-enabling before expiry clears the schedule and restores those licenses.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone configuration update`})}const me={command:`update-configuration`,describe:`Update pay-per-use zone configuration`,builder:pe,handler:async e=>u({command:`pay-per-use zones update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
34
|
+
Enables or disables an existing pay-per-use zone configuration. Omitting enabled leaves the zone unchanged. Enabling a disabled billable zone requires completed publisher Stripe onboarding, while non-billable zones do not; an already-enabled zone is not affected by later Stripe status changes. Disabling starts a disabled period immediately while existing accepted licenses remain active until the start of the next UTC month; re-enabling before expiry clears the schedule and restores those licenses.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone configuration update`})}const me={command:`update-configuration`,describe:`Update pay-per-use zone configuration`,builder:pe,handler:async e=>u({command:`pay-per-use zones update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf pay-per-use zones update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({enabled:e.enabled}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),i=await n(e),o=await a({zone:e.zone},i,{quiet:e.quiet});if(e.zoneId=o,e.body!==void 0){let e=t,n=await l(`Updating`,async()=>i.send($,{body:e,zone_id:o}));c(n,{successLabel:`Updated`});return}let s=p({enabled:e.enabled}),u=await l(`Updating`,async()=>i.send($,{body:s,zone_id:o}));c(u,{successLabel:`Updated`})})},he={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(ce).command(ue).command(fe).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`pay-per-use`,describe:`pay-per-use`,builder:e=>e.command(te).command(k).command(z).command(G).command(J).command(ae).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ge as default};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./dry-run-qsnRlRk6.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./run-CXWkMU3x.mjs";import{t as d}from"./output-hFMAotFl.mjs";import{t as f}from"./progress-DE_G09u2.mjs";import{a as p,i as m,n as h}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,body:`json`};function _(e){return e.usage(`$0 pipelines create
|
|
3
|
+
|
|
4
|
+
Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create Pipeline`,builder:_,handler:async e=>u({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({name:c(e.name,`name`,`text`),sql:c(e.sql,`sql`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),u=await t(e),m=e.local?l:await o();if(e.accountId=m,e.body!==void 0){let e=n,t=await f(`Creating`,async()=>u.send(g,{body:e,account_id:m}));d(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Pipeline.`)),e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL for the Pipeline processing flow.`));let h=i({name:c(e.name,`name`,`text`),sql:c(e.sql,`sql`,`text`)}),_=await f(`Creating`,async()=>u.send(g,{body:h,account_id:m}));d(_,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function y(e){return e.usage(`$0 pipelines delete <pipeline-id>
|
|
5
|
+
|
|
6
|
+
Delete Pipeline in Account.`).positional(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <pipeline-id>`,describe:`Delete Pipeline`,builder:y,handler:async e=>u({command:`pipelines delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines/${e[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(e[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(e[`pipeline-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();if(e.accountId=r,!await h({force:!!e.force}))return;let i=await f(`Deleting`,async()=>n.send(ee,{account_id:r,pipeline_id:e[`pipeline-id`]}));d(i,{successLabel:`Deleted`})})};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function ne(e){return e.usage(`$0 pipelines get <pipeline-id>
|
|
7
|
+
|
|
8
|
+
Get Pipeline details.`).positional(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <pipeline-id>`,describe:`Get Pipeline Details`,builder:ne,handler:async e=>u({command:`pipelines get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines/${e[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(e[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(e[`pipeline-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Loading`,async()=>n.send(te,{account_id:r,pipeline_id:e[`pipeline-id`]}));d(i,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines`,body:`json`};function S(e){return e.usage(`$0 pipelines legacy-create
|
|
9
|
+
|
|
10
|
+
[DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`,default:1e8}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`,default:300}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`,default:1e7}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`],default:`gzip`}).coerce(`destination-compression-type`,e=>c(e,`destination-compression-type`,`text`)).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).coerce(`destination-format`,e=>c(e,`destination-format`,`text`)).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filename`,{type:`string`,description:`Specifies the name pattern to for individual data files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).coerce(`destination-type`,e=>c(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"format": "json", "type": string, "authentication"?: boolean, "cors"?: {...}} | {"format": "json", "type": string})]. ? marks optional keys.`}).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 C={command:`legacy-create`,describe:`[DEPRECATED] Create Pipeline`,builder:S,handler:async e=>u({command:`pipelines legacy-create`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines legacy-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:c(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:c(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:c(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:c(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:c(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:c(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:c(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:c(e.name,`name`,`text`),source:n(e.source,`source`)}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),h=await t(e),g=e.local?l:await o();if(e.accountId=g,e.body!==void 0){let e=u,t=await f(`Creating`,async()=>h.send(x,{body:e,account_id:g}));d(t,{successLabel:`Created`});return}if(e[`destination-credentials-access-key-id`]===void 0&&(e[`destination-credentials-access-key-id`]=await p(`destination-credentials-access-key-id`,`Specifies the R2 Bucket Access Key Id.`)),e[`destination-credentials-endpoint`]===void 0&&(e[`destination-credentials-endpoint`]=await p(`destination-credentials-endpoint`,`Specifies the R2 Endpoint.`)),e[`destination-credentials-secret-access-key`]===void 0&&(e[`destination-credentials-secret-access-key`]=await p(`destination-credentials-secret-access-key`,`Specifies the R2 Bucket Secret Access Key.`)),e[`destination-format`]===void 0&&(e[`destination-format`]=await m(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),e[`destination-path-bucket`]===void 0&&(e[`destination-path-bucket`]=await p(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),e[`destination-type`]===void 0&&(e[`destination-type`]=await m(`destination-type`,`Specifies the type of destination.`,[`r2`])),e.name===void 0&&(e.name=await p(`name`,`Defines the name of the pipeline.`)),e.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let _=i({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:c(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:c(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:c(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:c(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:c(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:c(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:c(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:c(e.name,`name`,`text`),source:n(e.source,`source`)}),v=await f(`Creating`,async()=>h.send(x,{body:_,account_id:g}));d(v,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,response:!1};function T(e){return e.usage(`$0 pipelines legacy-delete <pipeline-name>
|
|
11
|
+
|
|
12
|
+
[DEPRECATED] Delete a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,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 E={command:`legacy-delete <pipeline-name>`,describe:`[DEPRECATED] Delete Pipeline`,builder:T,handler:async e=>u({command:`pipelines legacy-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines legacy-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();if(e.accountId=r,!await h({force:!!e.force}))return;let i=await f(`Deleting`,async()=>n.send(w,{account_id:r,pipeline_name:e[`pipeline-name`]}));d(i,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,errors:{404:`NotFoundError`}};function O(e){return e.usage(`$0 pipelines legacy-get <pipeline-name>
|
|
13
|
+
|
|
14
|
+
[DEPRECATED] Get configuration of a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`legacy-get <pipeline-name>`,describe:`[DEPRECATED] Get Pipeline`,builder:O,handler:async e=>u({command:`pipelines legacy-get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines legacy-get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Loading`,async()=>n.send(D,{account_id:r,pipeline_name:e[`pipeline-name`]}));d(i,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines`,query:[`search`,`page`,`per_page`]};function j(e){return e.usage(`$0 pipelines legacy-list
|
|
15
|
+
|
|
16
|
+
[DEPRECATED] List, filter, and paginate pipelines in an account. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`search`,{type:`string`,description:`Specifies the prefix of pipeline name to search.`}).option(`page`,{type:`string`,description:`Specifies which page to retrieve.`}).option(`per-page`,{type:`string`,description:`Specifies the number of pipelines per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`legacy-list`,describe:`[DEPRECATED] List Pipelines`,builder:j,handler:async e=>u({command:`pipelines legacy-list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={search:e.search,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await a();s({command:`cf pipelines legacy-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await o();e.accountId=i;let c=await f(`Loading`,async()=>r.send(A,{account_id:i,...n}));d(c,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,body:`json`};function P(e){return e.usage(`$0 pipelines legacy-update <pipeline-name>
|
|
17
|
+
|
|
18
|
+
[DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`]}).coerce(`destination-compression-type`,e=>c(e,`destination-compression-type`,`text`)).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).coerce(`destination-format`,e=>c(e,`destination-format`,`text`)).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filename`,{type:`string`,description:`Specifies the name pattern to for individual data files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).coerce(`destination-type`,e=>c(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"format": "json", "type": string, "authentication"?: boolean, "cors"?: {...}} | {"format": "json", "type": string})]. ? marks optional keys.`}).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=>{let t=[`destination-credentials-access-key-id`,`destination-credentials-endpoint`,`destination-credentials-secret-access-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`destination-credentials-access-key-id`,`destination-credentials-endpoint`,`destination-credentials-secret-access-key`].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 --destination-credentials-* flag is set`)}return!0})}const F={command:`legacy-update <pipeline-name>`,describe:`[DEPRECATED] Update Pipeline`,builder:P,handler:async e=>u({command:`pipelines legacy-update`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines legacy-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`json`,body:e.body===void 0?i({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:c(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:c(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:c(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:c(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:c(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:c(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:c(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:c(e.name,`name`,`text`),source:n(e.source,`source`)}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),h=await t(e),g=e.local?l:await o();if(e.accountId=g,e.body!==void 0){let t=u,n=await f(`Updating`,async()=>h.send(N,{body:t,account_id:g,pipeline_name:e[`pipeline-name`]}));d(n,{successLabel:`Updated`});return}if(e[`destination-format`]===void 0&&(e[`destination-format`]=await m(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),e[`destination-path-bucket`]===void 0&&(e[`destination-path-bucket`]=await p(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),e[`destination-type`]===void 0&&(e[`destination-type`]=await m(`destination-type`,`Specifies the type of destination.`,[`r2`])),e.name===void 0&&(e.name=await p(`name`,`Defines the name of the pipeline.`)),e.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let _=i({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:c(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:c(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:c(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:c(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:c(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:c(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:c(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:c(e.name,`name`,`text`),source:n(e.source,`source`)}),v=await f(`Updating`,async()=>h.send(N,{body:_,account_id:g,pipeline_name:e[`pipeline-name`]}));d(v,{successLabel:`Updated`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,query:[`page`,`per_page`,`name`]};function L(e){return e.usage(`$0 pipelines list
|
|
19
|
+
|
|
20
|
+
List/Filter Pipelines in Account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`name`,{type:`string`,description:`Filters pipelines by name (case-insensitive substring).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`List Pipelines`,builder:L,handler:async e=>u({command:`pipelines list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],name:e.name};if(e.dryRun){let e=await a();s({command:`cf pipelines list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await o();e.accountId=i;let c=await f(`Loading`,async()=>r.send(I,{account_id:i,...n}));d(c,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks`,body:`json`};function B(e){return e.usage(`$0 pipelines sinks create
|
|
21
|
+
|
|
22
|
+
Create a new Sink.`).option(`sink-config-account-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-bucket`,{type:`string`,description:`R2 Bucket to write to`}).option(`sink-config-credentials-access-key-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-credentials-secret-access-key`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-file-naming-prefix`,{type:`string`,description:`The prefix to use in file name. i.e prefix-<uuid>.parquet`}).option(`sink-config-file-naming-strategy`,{type:`string`,description:`Filename generation strategy.`,choices:[`serial`,`uuid`,`uuid_v7`,`ulid`]}).coerce(`sink-config-file-naming-strategy`,e=>c(e,`sink-config-file-naming-strategy`,`text`)).option(`sink-config-file-naming-suffix`,{type:`string`,description:`This will overwrite the default file suffix. i.e .parquet, use with caution`}).option(`sink-config-jurisdiction`,{type:`string`,description:`Jurisdiction this bucket is hosted in`}).option(`sink-config-partitioning-time-pattern`,{type:`string`,description:`The pattern of the date string`}).option(`sink-config-path`,{type:`string`,description:`Subpath within the bucket to write to`}).option(`sink-config-rolling-policy-file-size-bytes`,{type:`number`,description:`Files will be rolled after reaching this number of bytes`}).option(`sink-config-rolling-policy-inactivity-seconds`,{type:`number`,description:`Number of seconds of inactivity to wait before rolling over to a new file`}).option(`sink-config-rolling-policy-interval-seconds`,{type:`number`,description:`Number of seconds to wait before rolling over to a new file`}).option(`sink-config-namespace`,{type:`string`,description:`Table namespace`}).option(`sink-config-table-name`,{type:`string`,description:`Table name`}).option(`sink-config-token`,{type:`string`,description:`Authentication token`}).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>c(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>c(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-compression`,{type:`string`,description:`Specifies the compression applied to JSON sink output.`,choices:[`uncompressed`,`gzip`,`snappy`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>c(e,`format-compression`,`text`)).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>c(e,`format-type`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`name`,{type:`string`,description:`Defines the name of the Sink.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json. Shape: [(({"type": "int32"} | {"type": "int64"} | {"type": "float32"} | ...more) & {"name": string, "metadata_key"?: (string | null), "required"?: boolean, "sql_name"?: string})]. ? marks optional keys.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`type`,{type:`string`,description:`Specifies the type of sink.`,choices:[`r2`,`r2_data_catalog`,`basin_catalog`]}).coerce(`type`,e=>c(e,`type`,`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)`}).conflicts(`sink-config-credentials-access-key-id`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-credentials-access-key-id`,[`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-credentials-secret-access-key`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-credentials-secret-access-key`,[`sink-config-credentials-access-key-id`]).conflicts(`sink-config-file-naming-prefix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-prefix`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-file-naming-strategy`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-strategy`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-file-naming-suffix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-file-naming-suffix`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-jurisdiction`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-jurisdiction`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-partitioning-time-pattern`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-partitioning-time-pattern`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-path`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).implies(`sink-config-path`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`]).conflicts(`sink-config-namespace`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-namespace`,[`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-table-name`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-table-name`,[`sink-config-token`]).conflicts(`sink-config-token`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-token`,[`sink-config-table-name`]).conflicts(`format-decimal-encoding`,[`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-row-group-bytes`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{let t=[`sink-config-account-id`,`sink-config-bucket`,`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`,`sink-config-rolling-policy-file-size-bytes`,`sink-config-rolling-policy-inactivity-seconds`,`sink-config-rolling-policy-interval-seconds`,`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`sink-config-account-id`,`sink-config-bucket`].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 --config-* flag is set`)}return!0}).check(e=>{let t=[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`format-row-group-bytes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`format-type`].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 --format-* flag is set`)}return!0})}const V={command:`create`,describe:`Create Sink`,builder:B,handler:async e=>u({command:`pipelines sinks create`,classification:{safeFlags:[`sink-config-file-naming-strategy`,`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`schema-inferred`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines sinks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({config:{account_id:c(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:c(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:c(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:c(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:c(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:c(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:c(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:c(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:c(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:c(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:c(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:c(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:c(e.name,`name`,`text`),schema:{fields:n(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}):r(e.body),sensitiveBodyPaths:[[`config`,`credentials`,`secret_access_key`],[`config`,`token`]]});return}let u=e.body===void 0?void 0:r(e.body),h=await t(e),g=e.local?l:await o();if(e.accountId=g,e.body!==void 0){let e=u,t=await f(`Creating`,async()=>h.send(z,{body:e,account_id:g}));d(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Defines the name of the Sink.`)),e.type===void 0&&(e.type=await m(`type`,`Specifies the type of sink.`,[`r2`,`r2_data_catalog`,`basin_catalog`]));let _=i({config:{account_id:c(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:c(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:c(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:c(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:c(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:c(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:c(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:c(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:c(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:c(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:c(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:c(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:c(e.name,`name`,`text`),schema:{fields:n(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}),v=await f(`Creating`,async()=>h.send(z,{body:_,account_id:g}));d(v,{successLabel:`Created`})})};var H={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function U(e){return e.usage(`$0 pipelines sinks delete <sink-id>
|
|
23
|
+
|
|
24
|
+
Delete Sink in Account.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,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 W={command:`delete <sink-id>`,describe:`Delete Sink`,builder:U,handler:async e=>u({command:`pipelines sinks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines sinks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();if(e.accountId=r,!await h({force:!!e.force}))return;let i=await f(`Deleting`,async()=>n.send(H,{account_id:r,sink_id:e[`sink-id`]}));d(i,{successLabel:`Deleted`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function ie(e){return e.usage(`$0 pipelines sinks get <sink-id>
|
|
25
|
+
|
|
26
|
+
Get Sink Details.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <sink-id>`,describe:`Get Sink Details`,builder:ie,handler:async e=>u({command:`pipelines sinks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines sinks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Loading`,async()=>n.send(G,{account_id:r,sink_id:e[`sink-id`]}));d(i,{successLabel:`Loaded`})})};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks`,query:[`pipeline_id`,`name`,`order_by`,`direction`,`page`,`per_page`]};function J(e){return e.usage(`$0 pipelines sinks list
|
|
27
|
+
|
|
28
|
+
List/Filter Sinks in Account.`).option(`pipeline-id`,{type:`string`,description:`Pipeline ID`}).option(`name`,{type:`string`,description:`Filters sinks by name (case-insensitive substring).`}).option(`order-by`,{type:`string`,description:"Sorts sinks by this field. Defaults to `created_at`.",choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).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 Y={command:`list`,describe:`List Sinks`,builder:J,handler:async e=>u({command:`pipelines sinks list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let n={pipeline_id:e[`pipeline-id`],name:e.name,order_by:e[`order-by`],direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await a();s({command:`cf pipelines sinks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await o();e.accountId=i;let c=await f(`Loading`,async()=>r.send(q,{account_id:i,...n}));d(c,{successLabel:`Loaded`})})},ae={command:`sinks`,describe:`Destinations where pipeline data is written — R2 buckets, HTTP endpoints, or other storage`,builder:e=>e.command(V).command(W).command(K).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams`,body:`json`};function oe(e){return e.usage(`$0 pipelines streams create
|
|
29
|
+
|
|
30
|
+
Create a new Stream.`).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>c(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>c(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>c(e,`format-type`,`text`)).option(`format-compression`,{type:`string`,description:`The format.compression field`,choices:[`uncompressed`,`snappy`,`gzip`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>c(e,`format-compression`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`name`,{type:`string`,description:`Specifies the name of the Stream.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json. Shape: [(({"type": "int32"} | {"type": "int64"} | {"type": "float32"} | ...more) & {"name": string, "metadata_key"?: (string | null), "required"?: boolean, "sql_name"?: string})]. ? marks optional keys.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`format-decimal-encoding`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-compression`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{let t=[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`format-row-group-bytes`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`format-type`].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 --format-* flag is set`)}return!0}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-authentication`,`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})}const se={command:`create`,describe:`Create Stream`,builder:oe,handler:async e=>u({command:`pipelines streams create`,classification:{safeFlags:[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`http-authentication`,`http-enabled`,`schema-inferred`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:c(e.name,`name`,`text`),schema:{fields:n(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),m=await t(e),h=e.local?l:await o();if(e.accountId=h,e.body!==void 0){let e=u,t=await f(`Creating`,async()=>m.send(X,{body:e,account_id:h}));d(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Stream.`));let g=i({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:c(e.name,`name`,`text`),schema:{fields:n(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}),_=await f(`Creating`,async()=>m.send(X,{body:g,account_id:h}));d(_,{successLabel:`Created`})})};var ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function le(e){return e.usage(`$0 pipelines streams delete <stream-id>
|
|
31
|
+
|
|
32
|
+
Delete Stream in Account.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the 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 ue={command:`delete <stream-id>`,describe:`Delete Stream`,builder:le,handler:async e=>u({command:`pipelines streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();if(e.accountId=r,!await h({force:!!e.force}))return;let i=await f(`Deleting`,async()=>n.send(ce,{account_id:r,stream_id:e[`stream-id`]}));d(i,{successLabel:`Deleted`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function fe(e){return e.usage(`$0 pipelines streams get <stream-id>
|
|
33
|
+
|
|
34
|
+
Get Stream Details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <stream-id>`,describe:`Get Stream Details`,builder:fe,handler:async e=>u({command:`pipelines streams get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Loading`,async()=>n.send(de,{account_id:r,stream_id:e[`stream-id`]}));d(i,{successLabel:`Loaded`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams`,query:[`pipeline_id`,`name`,`order_by`,`direction`,`page`,`per_page`]};function he(e){return e.usage(`$0 pipelines streams list
|
|
35
|
+
|
|
36
|
+
List/Filter Streams in Account.`).option(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`}).option(`name`,{type:`string`,description:`Filters streams by name (case-insensitive substring).`}).option(`order-by`,{type:`string`,description:"Sorts streams by this field. Defaults to `created_at`.",choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).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 Z={command:`list`,describe:`List Streams`,builder:he,handler:async e=>u({command:`pipelines streams list`,classification:{safeFlags:[`order-by`,`direction`,`dry-run`]}},e,async()=>{let n={pipeline_id:e[`pipeline-id`],name:e.name,order_by:e[`order-by`],direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await a();s({command:`cf pipelines streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await o();e.accountId=i;let c=await f(`Loading`,async()=>r.send(me,{account_id:i,...n}));d(c,{successLabel:`Loaded`})})};var Q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`,body:`json`};function ge(e){return e.usage(`$0 pipelines streams update <stream-id>
|
|
37
|
+
|
|
38
|
+
Update a Stream.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-authentication`,`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})}const _e={command:`update <stream-id>`,describe:`Update Stream`,builder:ge,handler:async e=>u({command:`pipelines streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/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?i({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),c=await t(e),u=e.local?l:await o();if(e.accountId=u,e.body!==void 0){let t=n,r=await f(`Updating`,async()=>c.send(Q,{body:t,account_id:u,stream_id:e[`stream-id`]}));d(r,{successLabel:`Updated`});return}let p=i({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}),m=await f(`Updating`,async()=>c.send(Q,{body:p,account_id:u,stream_id:e[`stream-id`]}));d(m,{successLabel:`Updated`})})},ve={command:`streams`,describe:`Inbound data streams that feed events into a pipeline for processing`,builder:e=>e.command(se).command(ue).command(pe).command(Z).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/validate_sql`,body:`json`,errors:{422:`UnprocessableEntityError`}};function ye(e){return e.usage(`$0 pipelines validate-sql
|
|
39
|
+
|
|
40
|
+
Validates that the Pipelines SQL is correct.`).option(`sql`,{type:`string`,description:`Specifies SQL to validate.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const be={command:`validate-sql`,describe:`Validate SQL`,builder:ye,handler:async e=>u({command:`pipelines validate-sql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf pipelines validate-sql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/validate_sql`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({sql:c(e.sql,`sql`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),u=await t(e),m=e.local?l:await o();if(e.accountId=m,e.body!==void 0){let e=n,t=await f(`Creating`,async()=>u.send($,{body:e,account_id:m}));d(t,{successLabel:`Created`});return}e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL to validate.`));let h=i({sql:c(e.sql,`sql`,`text`)}),g=await f(`Creating`,async()=>u.send($,{body:h,account_id:m}));d(g,{successLabel:`Created`})})},xe={command:`pipelines`,describe:`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,builder:e=>e.command(v).command(b).command(re).command(C).command(E).command(k).command(M).command(F).command(R).command(be).command(ae).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xe as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,n as t}from"./auth-
|
|
2
|
+
import{i as e,n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{c as s,o as c,r as l,t as u}from"./body-parser-HN91kAf0.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";function f(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the detection `mode`, whether to `show_interstitial`, and the ordered list of `rules`.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Zone Precursor Config`,builder:f,handler:async s=>o({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},s,async()=>{let o={};if(s[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(s[`cloudflare-version`])),s.dryRun){r({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`none`});return}let c=await t(s);s.zoneId=await n({zone:s.zone},c,{quiet:s.quiet});let l=await a(`Loading`,async()=>e(c,`GET`,`/zones/${s.zoneId}/precursor`,{headers:Object.keys(o).length>0?o:void 0}));i(l,{successLabel:`Loaded`})})};function m(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `mode` controls whether Precursor detection is off, monitoring, or armed. `show_interstitial` controls the zone-level response when armed. `rules` is the ordered list of overrides for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all rules. - At least one of `mode`, `show_interstitial`, or `rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `show_interstitial` is required and controls the response for requests that match that rule. - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`detection-mode`,{type:`string`,description:"Controls Precursor detection for the zone. `off` disables detection,\n`monitor` records detections without affecting bot scores, and `arm`\nallows detections to affect bot scores.",choices:[`off`,`monitor`,`arm`]}).coerce(`detection-mode`,e=>d(e,`detection-mode`,`text`)).option(`rules`,{type:`string`,description:`The ordered list of Precursor rules for the zone. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"expression": string, "show_interstitial": boolean, "description"?: string, "enabled"?: boolean}]. ? marks optional keys.`}).option(`show-interstitial`,{type:`boolean`,description:`Whether Precursor shows an interstitial when it takes action on a
|
|
3
3
|
request.
|
|
4
|
-
`}).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 h={command:`update`,describe:`Update Zone Precursor Config`,builder:m,handler:async d=>o({command:`precursor update`,classification:{safeFlags:[`detection-mode`,`show-interstitial`,`dry-run`]}},d,async()=>{let o={};if(d[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(d[`cloudflare-version`])),d.dryRun){
|
|
4
|
+
`}).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 h={command:`update`,describe:`Update Zone Precursor Config`,builder:m,handler:async d=>o({command:`precursor update`,classification:{safeFlags:[`detection-mode`,`show-interstitial`,`dry-run`]}},d,async()=>{let o={};if(d[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(d[`cloudflare-version`])),d.dryRun){r({command:`cf precursor update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({mode:d[`detection-mode`],rules:c(d.rules,`rules`),show_interstitial:d[`show-interstitial`]}):l(d.body)});return}let f=d.body===void 0?void 0:l(d.body),p=await t(d);if(d.zoneId=await n({zone:d.zone},p,{quiet:d.quiet}),d.body!==void 0){let t=f,n=await a(`Updating`,async()=>e(p,`PUT`,`/zones/${d.zoneId}/precursor`,{body:t,headers:Object.keys(o).length>0?o:void 0}));i(n,{successLabel:`Updated`});return}let m={};d[`detection-mode`]!==void 0&&s(m,[`mode`],d[`detection-mode`]),d.rules!==void 0&&s(m,[`rules`],c(d.rules,`rules`)),d[`show-interstitial`]!==void 0&&s(m,[`show_interstitial`],d[`show-interstitial`]);let h=await a(`Updating`,async()=>e(p,`PUT`,`/zones/${d.zoneId}/precursor`,{body:m,headers:Object.keys(o).length>0?o:void 0}));i(h,{successLabel:`Updated`})})},g={command:`precursor`,describe:`Precursor settings for a zone`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{i as e,n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{t as r}from"./local-B3zt9PXR.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{n as o}from"./prompt-D274Im1O.mjs";import{a as s,t as c}from"./context-BGm5_wTT.mjs";import"./telemetry-COlodX5Z.mjs";import{C as l,_ as u,d,f,l as p,r as m,t as h,x as g,y as _}from"./deploy-context-B_lLfxt7.mjs";import{a as v,c as y,f as b,i as x,l as S,n as C,o as w,r as T,t as E}from"./static-assets-DGDoaJf1.mjs";import{B as D,J as O,X as k,at as A}from"./dist-BxhwE-W1.mjs";import{a as j,c as M,i as N,n as P,o as F,r as I,s as ee}from"./build-yQOzZg6Z.mjs";import{n as L,t as R}from"./run-CXWkMU3x.mjs";import{t as z}from"./deploy-input-JZlEJwKB.mjs";import{r as B}from"./dotenv-DKRemNCH.mjs";import{d as V,s as H}from"./interactive-JBA3qOUa.mjs";import{t as U}from"./hand-written-dry-run-B82fRl2N.mjs";import{readBuildOutput as W}from"@cloudflare/build-output-utils";function G(e){return e.usage(`$0 previews delete <name>
|
|
3
|
+
|
|
4
|
+
Delete a Preview.`).positional(`name`,{type:`string`,description:`Identifier for the Preview, which can be ID, slug, or URL-encoded name.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the Preview even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted Preview are deleted even if other Workers reference them.`}).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 K={command:`delete <name>`,describe:`Delete Preview`,builder:G,handler:async l=>R({command:`previews delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let u={force:l[`delete-with-references`]};if(l.dryRun){let e=await s();n({command:`cf previews delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/workers/${l.worker==null?`<worker>`:encodeURIComponent(String(l.worker))}/previews/${l.name==null?`<name>`:encodeURIComponent(String(l.name))}`,pathParams:{worker:String(l.worker??``),name:String(l.name??``)},query:u,bodyKind:`none`});return}let d=await t(l),f=l.local?r:await c();if(l.accountId=f,!await o({force:!!l.force,message:`This operation permanently deletes the Preview.`}))return;let p=await a(`Deleting`,async()=>e(d,`DELETE`,`/accounts/${f}/workers/workers/${encodeURIComponent(String(l.worker))}/previews/${encodeURIComponent(String(l.name))}`,{query:u}));i(p,{successLabel:`Deleted`})})};function q(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(t,n,r,i,a)=>J(a.quiet,async()=>{let o=/* @__PURE__ */ new Map;for(let e of Object.values(r.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&o.set(e.class_name,e.namespace_id);let s;for(let c of n){let n=o.get(c.class_name);if(n||=(s??=await _(t,i),s.find(e=>e.class===c.class_name&&e.preview?.id===r.preview_id)?.id),!n)throw Error(`Could not find a Preview Durable Object namespace for Container class "${c.class_name}".`);let l=await Y(c,e,r.id,i,t,a.localImageReferences?.get(c.class_name));await p({imageRef:l,durable_object_namespace_id:n,configFileName:`cloudflare.config.ts`,observabilityTargetPercentageField:`targetInstancePercentage`,observabilityTargetCountField:`targetInstanceCount`},c,t,i)}await d(e.standard.builtImages.filter(({container:e})=>!a.localImageReferences?.has(e.class_name)),A())})}}async function J(e,t){if(!e)return t();let n=H();V(`error`);try{return await t()}finally{V(n)}}async function Y(e,t,n,r,i,a){if(a!==void 0)return l({pathToDocker:A(),sourceTag:a,targetTag:a,accountId:r,complianceConfig:i,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let o=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(o)return g(o,n,A(),r,i);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function X(e){return e.positional(`directory`,C).option(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1}).option(`worker`,I)}function Z(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function Q(e){let t=e[`preview-name`],n=t??y();if(!n||!t&&n===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
|
|
5
|
+
|
|
6
|
+
cf previews deploy --preview-name PREVIEW_NAME`);let r=await E(e,{isPreview:!0});return!e.prebuilt&&!r&&await P(e.mode,{output:e.quiet?`silent`:`stderr`,worker:e.worker},{isPreview:!0}),B(e,()=>$(e,n))}async function $(e,t){let n=await W(process.cwd());w(n.rootConfig),ee(e.mode,n.rootConfig.buildContext.mode),F(n.rootConfig.accountId,e[`temporary-account`]);let r=j(n.workers,e.worker),{wranglerConfig:i,builtConfig:a}=N(r,n.rootConfig),o=k(i),{authToken:s,accountId:c}=await v({accountId:n.rootConfig.accountId,complianceRegion:o,isPreview:!0}),l=h(s);b({...l,logger:{...l.logger,log:()=>{},info:()=>{}}}),u({logger:{...l.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:l.fetchResult,fetchPagedListResult:l.fetchPagedListResult});let d=new Set(Object.values(a.exports??{}).filter(x).map(({container:e})=>e)),p=n.containers?.filter(({config:e})=>d.has(e.name))??[],g=T(p,i,{accountId:c}),_=g.source;if(_?.some(e=>e.scheduling_policy===`durable_object`))throw new M(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);_&&_.length>0&&f(c,s,O(i));let y=await S(c,{name:t,json:!0},{workerConfig:a,rootConfig:n.rootConfig,containers:p.filter(({config:e})=>_?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:r.bundleDir?z(r,a):void 0,assets:r.assetsDir?{directory:r.assetsDir}:void 0},{deployCommand:`cf deploy`,previewCommand:`cf previews deploy`,...q(g),verifyContainersScope:async()=>{await m.listApplications()}});return D({...Z(y),worker_name:a.name??null}),y}var te=L({command:`deploy [directory]`,describe:`Deploy a Worker Preview`,builder:X,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf previews deploy.`);let t=await Q(e);i(Z(t),{quiet:e.quiet})}},{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}});const ne={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(K).command(U(te,`preview`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ne as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{s as e}from"./log-Brx-wjJW.mjs";import{n as t}from"./version-CcuBNjqg.mjs";import{n}from"./interactive-wQM7Blhm.mjs";import{t as r}from"./args-BAOHroBC.mjs";import{t as i}from"./session-COdP8BXD.mjs";import{t as a}from"./theme-BGHWSKCw.mjs";const o={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},s=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||r()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(o.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${o.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},c=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function l(){return!(!a(process.env,process.stderr.isTTY===!0)||n()||process.env.CF_QUIET===`1`)}async function u(n,r){if(!l())return r();i(t);let a=e({frames:[...c],indicator:`timer`,delay:80,output:process.stderr});s.setIndeterminate(),a.start(n);let o=e=>process.exit(e===`SIGTERM`?143:130),u=e=>{e===0&&(process.exitCode=130)};process.on(`SIGINT`,o),process.on(`SIGTERM`,o),process.on(`exit`,u);try{let e=await r();return s.clear(),a.stop(n),e}catch(e){throw s.clear(),a.error(n),e}finally{process.off(`SIGINT`,o),process.off(`SIGTERM`,o),process.off(`exit`,u)}}export{u as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{statSync as e}from"node:fs";import{dirname as t,join as n,resolve as r}from"node:path";const i=`cloudflare.config.ts`;function a(e){return e.map(e=>{let t=e.path.filter(e=>typeof e!=`symbol`).join(`.`);return` - ${t?`${t}: `:``}${e.message}`}).join(`
|
|
3
|
+
`)}let o,s;function c(e){s=e,o=void 0}function l(a=process.cwd()){let o=r(a);for(;;){let r=n(o,i);try{if(e(r).isFile())return r}catch{}let a=t(o);if(a===o)return null;o=a}}async function u(e=process.cwd(),t={}){let n=r(e),c=t.isPreview??!1;o=void 0;let u=l(n);if(!u)return o={startDir:n,isPreview:c,result:null},null;let{loadAndParseConfigSettings:d}=await import(`@cloudflare/config`),f=await d(u,{isPreview:c,mode:s});if(!f.result.success)throw Error(`Invalid ${i}:\n${a(f.result.error.issues)}`);let p={path:u,settings:f.result.data};return o={startDir:n,isPreview:c,result:p},p}function d(e=process.cwd(),t={}){let n=r(e),i=t.isPreview??!1;return o?.startDir===n&&o.isPreview===i?o.result:void 0}export{u as a,d as i,l as n,c as o,a as r,i as t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as e,c as t,l as n,n as r,o as i,r as a}from"./log-Brx-wjJW.mjs";import{n as o}from"./version-CcuBNjqg.mjs";import{t as s}from"./cli-exit-CstFZ1eJ.mjs";import{i as c}from"./dialog-CD94-Kzw.mjs";import{n as l}from"./interactive-wQM7Blhm.mjs";import{t as u}from"./session-COdP8BXD.mjs";import{r as d}from"./theme-BGHWSKCw.mjs";function f(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function p(){u(o)}async function m(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
|
|
3
|
+
`)?t.slice(0,-1):t}async function h(r,i,a){let o=a?.kind??`text`;if(l()){if(o===`secret`){let e=await m();if(e.length>0)return e;throw Error(`--${r} is required. Pipe the value via stdin, pass --${r} <value>, or run interactively.`)}throw Error(`--${r} is required. Pass --${r} <value> or run interactively.`)}let u=`Enter value for --${r}`,d=c(i||a?.question||u),f=e=>e&&e.length>0?a?.validate?.(e):`Value cannot be empty`;p();let h=o===`secret`?await e({message:d,mask:`•`,validate:f,output:process.stderr}):await t({message:d,validate:f,output:process.stderr});if(n(h)||typeof h!=`string`)throw new s(130,{cancelled:!0});return h}async function g(e,t,r,a={}){let o=f(e),c=r.map(f);if(l())throw Error(`--${o} is required (one of: ${c.join(`, `)}). Pass --${o} <value> or run interactively.`);let u=`Select value for --${o}`,d=f(t||u);p();let m=await i({message:d,output:process.stderr,options:r.map(e=>({value:e,label:f((Object.hasOwn(a,e)?a[e]:void 0)??e)}))});if(n(m)||typeof m!=`string`)throw new s(130,{cancelled:!0});return m}async function _(e,t){if(l())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);p();let r=await a({message:t||`Confirm --${e}`,initialValue:!1,output:process.stderr});if(n(r))throw new s(130,{cancelled:!0});return r===!0}async function v(e,{defaultValue:t=!0,fallbackValue:r=!0}={}){if(l())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;p();let i=await a({message:e,initialValue:t,output:process.stderr});if(n(i))throw new s(130,{cancelled:!0});return i===!0}async function y(e={}){if(e.force===!0)return!0;let t=e.message?`${e.message} Continue?`:`This permanently deletes the resource. Continue?`;if(l())throw process.stderr.write(`${d.warning(`?`)} ${t}\n ${d.muted(`(non-interactive; pass --force to confirm)`)}\nAborted.
|
|
4
|
+
`),new s(1);p();let i=await a({message:t,initialValue:!1,output:process.stderr});if(n(i))throw new s(130,{cancelled:!0});return i===!0||(r(`Aborted.`,{output:process.stderr}),!1)}export{h as a,g as i,y as n,f as o,_ as r,v as t};
|