cf 1.0.0-beta.11 → 1.0.0-beta.13
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/bin/cf +1 -1
- package/dist/_meta/commands.json +3119 -2067
- package/dist/_meta/hand-written-commands.json +14 -1
- package/dist/_meta/schemas.json +1856 -1132
- package/dist/abuse-reports-BjU1s8cf.mjs +24 -0
- package/dist/{access-DuHs0Mii.mjs → access-C_G2MZnA.mjs} +1 -1
- package/dist/account-tags-CaXDDeZ4.mjs +15 -0
- package/dist/accounts-BALwxDQY.mjs +131 -0
- package/dist/{acm-BgSr3Ig4.mjs → acm-CP9EaXQN.mjs} +7 -7
- package/dist/addressing-DRlaxqrI.mjs +93 -0
- package/dist/agent-context-DFEgYjEQ.mjs +2 -0
- package/dist/agent-memory-vGhlfZBx.mjs +34 -0
- package/dist/ai-CJtbWfB9.mjs +31 -0
- package/dist/{ai-audit-Bn_BfMFS.mjs → ai-audit-C0BJNqZZ.mjs} +3 -3
- package/dist/ai-gateway-BQtv3U3x.mjs +80 -0
- package/dist/ai-search-DGU1Y5By.mjs +79 -0
- package/dist/ai-security-CFTaYk_X.mjs +10 -0
- package/dist/alerting-1hun27JC.mjs +56 -0
- package/dist/analytics-DXUSjvzT.mjs +17 -0
- package/dist/analytics_engine-CQsnL09C.mjs +4 -0
- package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
- package/dist/{api-security-gB1FHrHq.mjs → api-security-BXhrfR6-.mjs} +57 -57
- package/dist/argo-LPUCTnee.mjs +14 -0
- package/dist/artifacts-Dt6easua.mjs +43 -0
- package/dist/{audit-logs-CpPUjMUP.mjs → audit-logs-CVznAM2Z.mjs} +2 -2
- package/dist/auth-CGLsxbc6.mjs +2 -0
- package/dist/auth-CrmVwfpJ.mjs +2 -0
- package/dist/{auth-7Fk7PVIC.mjs → auth-eQr-kQCH.mjs} +1 -1
- package/dist/{auth-token-DeG33BMQ.mjs → auth-token-pNQrX_9O.mjs} +1 -1
- package/dist/autoconfig-sD7Frryg.mjs +532 -0
- package/dist/{banner-Xk4xBN8U.mjs → banner-D03JEqRs.mjs} +1 -1
- package/dist/basin-catalog-ZQICw-zF.mjs +46 -0
- package/dist/billing-Dy1-dV_B.mjs +23 -0
- package/dist/bot-management-DTgPwL7O.mjs +9 -0
- package/dist/botnet-feed-xb98Cj3Y.mjs +11 -0
- package/dist/brand-protection-Ck3okE2k.mjs +27 -0
- package/dist/browser-run-DJGJSzFX.mjs +42 -0
- package/dist/build-B1L6xrgC.mjs +2 -0
- package/dist/build-HmSXqjGn.mjs +2 -0
- package/dist/builds-CYxcZtkG.mjs +71 -0
- package/dist/cache-D9tSfovH.mjs +45 -0
- package/dist/{certificate-authorities-NUQzCDK8.mjs → certificate-authorities-CpiveTFC.mjs} +3 -3
- package/dist/cf-BxsXrVeh.mjs +18 -0
- package/dist/chunk-DSGVRFIS-C1_SEtRK.mjs +2 -0
- package/dist/chunk-NDZDTP46-Bjx_wtJe.mjs +361 -0
- package/dist/chunk-TAK63GWY-DdMktrgc.mjs +319 -0
- package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
- package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
- package/dist/{cli-aChy8ou_.mjs → cli-DeJc9U8z.mjs} +1 -1
- package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
- package/dist/{client-certificates-qgLpBn8t.mjs → client-certificates-CF6YZyvP.mjs} +6 -6
- package/dist/{client-side-security-DZO6Xw14.mjs → client-side-security-BLoe9kS5.mjs} +14 -14
- package/dist/{cloud-connector-C7vGDCzX.mjs → cloud-connector-DXRUHsjt.mjs} +3 -3
- package/dist/cloudflared--1Ws1RJy.mjs +2 -0
- package/dist/cloudforce-one-CBLxXi6v.mjs +447 -0
- package/dist/{command-07vhr56i.mjs → command-83uVfXh9.mjs} +1 -1
- package/dist/{command-Cdx___59.mjs → command-BDe67N_n.mjs} +1 -1
- package/dist/command-BlIb6RR2.mjs +2 -0
- package/dist/{command-dAYWrB5y.mjs → command-Bpzp8Mz2.mjs} +1 -1
- package/dist/{command-eM48o0J6.mjs → command-BvfKhMl7.mjs} +1 -1
- package/dist/command-CG6RvZs0.mjs +2 -0
- package/dist/{command-D0MKPucK.mjs → command-CcuLC6CJ.mjs} +1 -1
- package/dist/{command-Ds5OVat3.mjs → command-Cu7dcaHT.mjs} +1 -1
- package/dist/{command-BsmF3J_l.mjs → command-D3fyhdy-.mjs} +1 -1
- package/dist/{command-Dv6YavZa.mjs → command-DUhX8Dcr.mjs} +1 -1
- package/dist/{command-maDJWJgu.mjs → command-Dh7RmjFu.mjs} +1 -1
- package/dist/{command-C2pNxAeL.mjs → command-DwXiDOeH.mjs} +1 -1
- package/dist/{command-CrtDkZNs.mjs → command-UiHLJ8Ji.mjs} +1 -1
- package/dist/command-_rqD0hXF.mjs +2 -0
- package/dist/{command-B6TpINoN.mjs → command-oNVwyjGB.mjs} +1 -1
- package/dist/{completions-D0280hul.mjs → completions-D06AO7A8.mjs} +12 -12
- package/dist/connector-interrupts-DelTmNyw.mjs +6 -0
- package/dist/connector-telemetry-events-BwxR3G8d.mjs +6 -0
- package/dist/connector-telemetry-snapshots-Bqq-hrpJ.mjs +6 -0
- package/dist/connectors-D-m3rEpk.mjs +15 -0
- package/dist/containers-CVNfEjJs.mjs +78 -0
- package/dist/containers-DeoZyeQe.mjs +375 -0
- package/dist/{content-scan-BCtWBCqd.mjs → content-scan-W0BNzbQp.mjs} +7 -7
- package/dist/{context-CquYYyS3.mjs → context-q7UaYK69.mjs} +2 -2
- package/dist/{cps-C8BbnbuD.mjs → cps-BZ6hqRb5.mjs} +3 -3
- package/dist/{csamScanner-CsJ9H2fA.mjs → csamScanner-Bo1t3CLh.mjs} +3 -3
- package/dist/ct-alerting-E03faC7p.mjs +5 -0
- package/dist/{custom-certificates-CA8HqolM.mjs → custom-certificates-CUySSPzi.mjs} +7 -7
- package/dist/{custom-csrs-D0P2vWJE.mjs → custom-csrs-gNpWkJPQ.mjs} +5 -5
- package/dist/{custom-hostnames-CzYMChbh.mjs → custom-hostnames-abGBAbx7.mjs} +12 -12
- package/dist/{custom-nameservers-Cet3oF56.mjs → custom-nameservers-BgNXol1P.mjs} +5 -5
- package/dist/{custom-pages-DUkHIaTP.mjs → custom-pages-DMKX3aoD.mjs} +10 -10
- package/dist/d1-CE08YqYk.mjs +93 -0
- package/dist/{dcv-delegation-BkdRVEAH.mjs → dcv-delegation-B5YUEWu0.mjs} +2 -2
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-CWNm1-5v.mjs +2 -0
- package/dist/deploy-context-Dr6bxNcB.mjs +56 -0
- package/dist/deploy-input-Cc0_2QlW.mjs +2 -0
- package/dist/{dev-BHkVwAea.mjs → dev-ZA8itQE7.mjs} +2 -2
- package/dist/diagnostics-UMbG6m4n.mjs +15 -0
- package/dist/dialog-D4Y9ocuF.mjs +2 -0
- package/dist/discover-DIDEGKo3.mjs +2 -0
- package/dist/discover-P20XeGBF.mjs +2 -0
- package/dist/dist-BHEmAAHr.mjs +487 -0
- package/dist/dist-uRuGmkMB.mjs +60 -0
- package/dist/dls-DIl16mLp.mjs +17 -0
- package/dist/{dns-BLNa0GrP.mjs → dns-QUpgljRG.mjs} +63 -63
- package/dist/{dns-firewall-ChCvC5rT.mjs → dns-firewall-BZwJXHLj.mjs} +9 -9
- package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
- package/dist/dotenv-DpXaxfho.mjs +4 -0
- package/dist/dry-run-DRj2_uV3.mjs +2 -0
- package/dist/durable-objects-BCj4ykpU.mjs +6 -0
- package/dist/{email-auth-C28s03aI.mjs → email-auth-DlHIYhCk.mjs} +3 -3
- package/dist/{email-routing-Ci-xjXIN.mjs → email-routing-UKVS4DYy.mjs} +22 -22
- package/dist/email-security-CZjfRIg0.mjs +158 -0
- package/dist/{email-sending-kTVAlVKO.mjs → email-sending-Dquc880C.mjs} +22 -22
- package/dist/error-sanitization-DE_zSrXw.mjs +2 -0
- package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
- package/dist/fieldExtractors-BbwDRquU.mjs +9 -0
- package/dist/{firewall-BND3qSY2.mjs → firewall--mTfDnCJ.mjs} +17 -17
- package/dist/flagship-cfoSwwM9.mjs +28 -0
- package/dist/{fraud-DgyYv_CC.mjs → fraud-Dcsq3EYK.mjs} +3 -3
- package/dist/{generate-VxmGG8BF.mjs → generate-CeeWW3eX.mjs} +1 -1
- package/dist/generate-D80-1GnZ.mjs +2 -0
- package/dist/{google-tag-gateway-v3p7murv.mjs → google-tag-gateway-DPKSkZQi.mjs} +3 -3
- package/dist/gt-3bcLGJ7V.mjs +3 -0
- package/dist/{healthchecks-CByb4qYA.mjs → healthchecks-D78hIIBC.mjs} +10 -10
- package/dist/{hostnames-3CqeMF5g.mjs → hostnames-sF999-6H.mjs} +5 -5
- package/dist/{hyperdrive-CmyYTE-K.mjs → hyperdrive-qWACKfA4.mjs} +10 -10
- package/dist/iam-Bvg_PayW.mjs +52 -0
- package/dist/images-DI_lEZ4L.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/init-1w_mcgk3.mjs +43 -0
- package/dist/intel-BxElBUMP.mjs +76 -0
- package/dist/interactive-BW9T1D1q.mjs +48 -0
- package/dist/interactive-DGUWZ2Gk.mjs +2 -0
- package/dist/{ips-WWvPwSBc.mjs → ips-DWoaKxi7.mjs} +2 -2
- package/dist/k2-tFjaftl-.mjs +11 -0
- package/dist/{keyless-certificates-DqILy3t9.mjs → keyless-certificates-BrvxHU4J.mjs} +6 -6
- package/dist/keys-DcwTYKRf.mjs +4 -0
- package/dist/kv-htXS-7uP.mjs +15 -0
- package/dist/{lazy-command--5YpWUVY.mjs → lazy-command-BDiIwpss.mjs} +1 -1
- package/dist/{leaked-credential-checks-C0U1oYM5.mjs → leaked-credential-checks-bvGrLOmQ.mjs} +8 -8
- package/dist/lifecycle-oud60haK.mjs +2 -0
- package/dist/{load-balancers-BJKI9lm7.mjs → load-balancers-BNTUt4yG.mjs} +40 -40
- package/dist/local-DlDumOSC.mjs +2 -0
- package/dist/{local-rYpzEQb-.mjs → local-DlT72Xpn.mjs} +1 -1
- package/dist/{local-runtime-DZTTIe6x.mjs → local-runtime-CokO6qaX.mjs} +1 -1
- package/dist/{login-bnylLTit.mjs → login-BGF_I_LT.mjs} +1 -1
- package/dist/login-Ccw-mYwT.mjs +2 -0
- package/dist/logo-matches-tE8LTKgg.mjs +6 -0
- package/dist/logos-Bj845Mcw.mjs +7 -0
- package/dist/logpush-Cs8JdvKi.mjs +46 -0
- package/dist/{logs-c3b3USyS.mjs → logs-C92XZvNu.mjs} +11 -11
- package/dist/magic-cloud-networking-hNp5MMw-.mjs +71 -0
- package/dist/magic-network-monitoring-68GuWAnv.mjs +36 -0
- package/dist/magic-transit-DNd7gu4j.mjs +383 -0
- package/dist/managed-defense-B_wCAuFD.mjs +18 -0
- package/dist/{managed-transforms-DcYAvqTe.mjs → managed-transforms-DZdxHPOh.mjs} +4 -4
- package/dist/{matches-hnU16rSJ.mjs → matches-B65CkflD.mjs} +3 -3
- package/dist/mcp-DrJW5ayK.mjs +32 -0
- package/dist/mesh-DfVzYTn1.mjs +26 -0
- package/dist/metadata-Df5kCWJv.mjs +2 -0
- package/dist/{migrate-BNvUWrjy.mjs → migrate-CZNq63Uj.mjs} +1 -1
- package/dist/{monetization-Dsqj9DCA.mjs → monetization-BGaI8CMO.mjs} +9 -9
- package/dist/mtls-certificates-BsU2emDD.mjs +13 -0
- package/dist/network-BEMD8P0U.mjs +50 -0
- package/dist/network-interconnects-DMu_fcbo.mjs +68 -0
- package/dist/o11y-C1a4gDGF.mjs +93 -0
- package/dist/{oauth-CeZ3d_dB.mjs → oauth-Bj5Ne1o8.mjs} +1 -1
- package/dist/oauth-clients-p4Etdqy_.mjs +16 -0
- package/dist/{oauth-w0fWmrwU.mjs → oauth-mspHHU5U.mjs} +1 -1
- package/dist/{oauth-scopes-CxpRD6d7.mjs → oauth-scopes-B2IabFza.mjs} +2 -2
- package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
- package/dist/{organization-DNieJ1xJ.mjs → organization-CdXt7AVZ.mjs} +16 -16
- package/dist/{organizations-BIXPmTy5.mjs → organizations-5S6xEp7T.mjs} +2 -2
- package/dist/{origin-ca-certificates-dVJvSIH8.mjs → origin-ca-certificates-_VJAoK1D.mjs} +5 -5
- package/dist/{origin-post-quantum-encryption-CO6tDW1t.mjs → origin-post-quantum-encryption-GcldDsT2.mjs} +3 -3
- package/dist/{origin-tls-client-auth-DeTY8aN2.mjs → origin-tls-client-auth-DZHld9fA.mjs} +14 -14
- package/dist/output-BOe-3AQG.mjs +2 -0
- package/dist/{page-rules-DA552Ra4.mjs → page-rules-o1tAMMsD.mjs} +7 -7
- package/dist/pages-CmiOhjSl.mjs +54 -0
- package/dist/pay-per-crawl-BsnOxGYU.mjs +38 -0
- package/dist/pay-per-use-BXWMCSyE.mjs +33 -0
- package/dist/pipelines-DWLQC0F6.mjs +44 -0
- package/dist/precursor-B6DjBib6.mjs +4 -0
- package/dist/previews-dUKEBGSM.mjs +4 -0
- package/dist/process-2wmDCy17.mjs +2 -0
- package/dist/{progress-TLUEIYE6.mjs → progress-BtkTVcHI.mjs} +1 -1
- package/dist/prompt-RlgRrmbm.mjs +3 -0
- package/dist/queries-yLwoJRHV.mjs +9 -0
- package/dist/queues-CnJRaE1o.mjs +57 -0
- package/dist/r2-CuC6-zQX.mjs +128 -0
- package/dist/{radar-Bez6k9Dw.mjs → radar-DrQLcbkq.mjs} +150 -150
- package/dist/{raw-fetch-DNxNCoeP.mjs → raw-fetch-B4NvWuZD.mjs} +1 -1
- package/dist/realtime-CjsnzHxD.mjs +172 -0
- package/dist/registrar-BgOsxTnX.mjs +43 -0
- package/dist/registrar-sandbox-3ikBD9fB.mjs +56 -0
- package/dist/{registry-CsSLAAOE.mjs → registry-CHowrQsZ.mjs} +1 -1
- package/dist/reporting-hE127s5r.mjs +14 -0
- package/dist/request-headers-DiJeDAn1.mjs +2 -0
- package/dist/request-tracers-BCwLxmPN.mjs +4 -0
- package/dist/resolve-CaTBV-c6.mjs +2 -0
- package/dist/resolve-DCGSzUDQ.mjs +2 -0
- package/dist/resource-sharing-2qvWUuMa.mjs +40 -0
- package/dist/resource-tagging-Dwx7iL3v.mjs +4 -0
- package/dist/rules-DxVQ6jIg.mjs +18 -0
- package/dist/rulesets-Cdh8YjI9.mjs +37 -0
- package/dist/rum-a4CMq4Qu.mjs +30 -0
- package/dist/run-BvHwWWUX.mjs +2 -0
- package/dist/run-CkbrPJPx.mjs +2 -0
- package/dist/schema-elj12WOx.mjs +2 -0
- package/dist/schema-flags-BzoBGPWk.mjs +5 -0
- package/dist/scim-B8XlXl8v.mjs +18 -0
- package/dist/secrets-store-Cqhedh_i.mjs +24 -0
- package/dist/{security-insights-DVAqroY5.mjs → security-insights-le2-DteL.mjs} +20 -20
- package/dist/{security-txt-rfrrdiZV.mjs → security-txt-cCArWXur.mjs} +4 -4
- package/dist/{session-B6mFkaVZ.mjs → session-C1BhT1ZJ.mjs} +1 -1
- package/dist/shared-BPjcpXuA.mjs +2 -0
- package/dist/{smart-shield-_HA814Im.mjs → smart-shield-Csyh8hwB.mjs} +11 -11
- package/dist/{snippets-mRelEw0p.mjs → snippets-DUWx25q6.mjs} +8 -8
- package/dist/source-mXUcrTVw.mjs +6 -0
- package/dist/spawn-IysxuTNW.mjs +10 -0
- package/dist/{spectrum-BwtOiaDw.mjs → spectrum-Da3UYSOR.mjs} +11 -11
- package/dist/{speed-DmqsZtiJ.mjs → speed-NxlMnB2e.mjs} +11 -11
- package/dist/sql-CNdHAlQ8.mjs +4 -0
- package/dist/src-JfLDUxFr.mjs +125 -0
- package/dist/{ssl-DCvfveJB.mjs → ssl-BtaX2WEJ.mjs} +16 -16
- package/dist/startup-profile-B2l0ChVu.mjs +2 -0
- package/dist/startup-profile-CdJWgNjd.mjs +29 -0
- package/dist/{state-BPwdiNO_.mjs → state-BDSvdSdP.mjs} +1 -1
- package/dist/state-JB4_BU1o.mjs +2 -0
- package/dist/stream-C1Ijjzn4.mjs +102 -0
- package/dist/submit-MdkuU_Pt.mjs +4 -0
- package/dist/{tags-Djw0e-4j.mjs → tags-CA1xMM96.mjs} +2 -2
- package/dist/telemetry-BsYO3nxG.mjs +2 -0
- package/dist/{telemetry-DrFNujdx.mjs → telemetry-Cm39QJ-M.mjs} +1 -1
- package/dist/{tenant-tc1wb_ym.mjs → tenant-BB6Oszcl.mjs} +5 -5
- package/dist/{tenant-custom-nameservers-XCbXryBZ.mjs → tenant-custom-nameservers-BsbgYAEo.mjs} +4 -4
- package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
- package/dist/{tools-CB4NleeJ.mjs → tools-CSc5DmFi.mjs} +1 -1
- package/dist/tunnels-CRFtyHWz.mjs +29 -0
- package/dist/turnstile-DBXWo_Xe.mjs +33 -0
- package/dist/{ui-D1hhIDIs.mjs → ui-YmjF66Ct.mjs} +1 -1
- package/dist/update-check-C2oVEbXx.mjs +2 -0
- package/dist/update-check-CMXSdres.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-t-XAs0Mk.mjs +4 -0
- package/dist/{url-normalization-Dbypc9wz.mjs → url-normalization-Cs4F8e0a.mjs} +4 -4
- package/dist/url-scanner-CBIoDbTx.mjs +16 -0
- package/dist/{user-3uwLMH78.mjs → user-CevdOMoa.mjs} +52 -52
- package/dist/values-CjNlkbIh.mjs +4 -0
- package/dist/vectorize-9d9tPmg5.mjs +32 -0
- package/dist/version-BdVUXLnK.mjs +2 -0
- package/dist/waiting-rooms--5WmrWb3.mjs +53 -0
- package/dist/{web-assets-BfEprX1S.mjs → web-assets-BHot_MU8.mjs} +30 -30
- package/dist/{web3-DNbp5sZw.mjs → web3-CYfWAF6b.mjs} +13 -13
- package/dist/workers-S17M0n3h.mjs +40 -0
- package/dist/workers-builds-Dw7ho3So.mjs +14 -0
- package/dist/workers-for-platforms-A3yjyLh3.mjs +40 -0
- package/dist/{workers-vpc-LVfayM2-.mjs → workers-vpc-BZ2xXtC3.mjs} +7 -7
- package/dist/workflows-BgGrVpSR.mjs +43 -0
- package/dist/{wrangler-migration-B0mKHqGd.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
- package/dist/{zaraz-BY60ZUQ4.mjs → zaraz-BsD2dMI3.mjs} +11 -11
- package/dist/zero-trust-CA3iGQbG.mjs +837 -0
- package/dist/{zone-BVDW2UGd.mjs → zone-D2M4EZD0.mjs} +2 -2
- package/dist/{zones-CcZL0YQp.mjs → zones-BoOC_JzC.mjs} +43 -43
- package/package.json +33 -35
- package/dist/abuse-reports-DX5xgeka.mjs +0 -24
- package/dist/account-tags-CiKwgOWd.mjs +0 -15
- package/dist/accounts-DfXSHrkF.mjs +0 -138
- package/dist/addressing-B70NFnrX.mjs +0 -93
- package/dist/agent-context-GRiQ4zRU.mjs +0 -2
- package/dist/agent-memory-DJRquHeq.mjs +0 -34
- package/dist/ai-CP2oIS-I.mjs +0 -29
- package/dist/ai-gateway-CrrEtzUP.mjs +0 -82
- package/dist/ai-search-C4YWVTCa.mjs +0 -79
- package/dist/ai-security-Bt_fG65f.mjs +0 -10
- package/dist/alerting-CRr88fVR.mjs +0 -56
- package/dist/analytics-XqS9OP5B.mjs +0 -20
- package/dist/analytics_engine-CzmYem4f.mjs +0 -4
- package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
- package/dist/argo-wFCAsYx7.mjs +0 -10
- package/dist/artifacts-qFjlNRqb.mjs +0 -43
- package/dist/auth-BmJ946bE.mjs +0 -2
- package/dist/auth-Br-t8vL_.mjs +0 -2
- package/dist/autoconfig-D-copdZG.mjs +0 -511
- package/dist/basin-catalog-CshcpsAH.mjs +0 -46
- package/dist/billing-B-xNxxiP.mjs +0 -23
- package/dist/bot-management-DhafeA2J.mjs +0 -9
- package/dist/botnet-feed-D6uCLE_D.mjs +0 -11
- package/dist/brand-protection-c3WiHbYn.mjs +0 -27
- package/dist/browser-run-D9_cwaSD.mjs +0 -46
- package/dist/build-9ihDp-Gy.mjs +0 -2
- package/dist/build-DrG6TqMw.mjs +0 -2
- package/dist/builds-Dl8if-2k.mjs +0 -71
- package/dist/cache-CIZokBjd.mjs +0 -45
- package/dist/cf-DfQfIu3q.mjs +0 -18
- package/dist/chunk-FT2NMTJB-BFqlGcem.mjs +0 -97
- package/dist/chunk-KKDV4JPS-B_t8sDTz.mjs +0 -2
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
- package/dist/chunk-WMOON6TZ-B8xCqjB1.mjs +0 -2
- package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
- package/dist/cloudflared-CEfZhSQH.mjs +0 -2
- package/dist/cloudforce-one-CE7y5UkF.mjs +0 -447
- package/dist/command-BWC9CbE7.mjs +0 -2
- package/dist/command-C65Ed0o9.mjs +0 -2
- package/dist/command-DHdWKtqx.mjs +0 -2
- package/dist/connector-interrupts-CVjFhU-C.mjs +0 -6
- package/dist/connector-telemetry-events-Bu3LKP6T.mjs +0 -6
- package/dist/connector-telemetry-snapshots-BbDTIc06.mjs +0 -6
- package/dist/connectors-DGtx-rPI.mjs +0 -15
- package/dist/containers-CzNbBrYE.mjs +0 -239
- package/dist/containers-DEFrbNgO.mjs +0 -78
- package/dist/ct-alerting-CYsQZO2H.mjs +0 -5
- package/dist/d1-B2duXfH2.mjs +0 -41
- package/dist/deploy-BdWBEbLj.mjs +0 -2
- package/dist/deploy-input-LmLfj6kI.mjs +0 -2
- package/dist/diagnostics-9Wj5UWBL.mjs +0 -15
- package/dist/dialog-Dpi-UVbz.mjs +0 -2
- package/dist/discover-BYkHr5Ja.mjs +0 -2
- package/dist/discover-t6E9lpf3.mjs +0 -2
- package/dist/dist-Cpb7_h4N.mjs +0 -57
- package/dist/dist-D1iG7guo.mjs +0 -366
- package/dist/dist-zep5OXGt.mjs +0 -48
- package/dist/dls-Caya7FZc.mjs +0 -17
- package/dist/dot-prop-IITUZ2XW-BsZYdILY.mjs +0 -2
- package/dist/dotenv-CcQjGlV0.mjs +0 -4
- package/dist/dry-run-p9Q7nMZ5.mjs +0 -2
- package/dist/durable-objects-DuRbdp7N.mjs +0 -6
- package/dist/email-security-DPU6xvI9.mjs +0 -158
- package/dist/error-sanitization-BbEw--0B.mjs +0 -2
- package/dist/error-sanitization-p5rmb53x.mjs +0 -2
- package/dist/fieldExtractors-ceaXu4zD.mjs +0 -9
- package/dist/flagship-DfxbNzgx.mjs +0 -28
- package/dist/generate-9P8Q_RiO.mjs +0 -2
- package/dist/gt-KlYHH-UC.mjs +0 -2
- package/dist/iam-CV_M681j.mjs +0 -52
- package/dist/images-DaLPjskW.mjs +0 -71
- package/dist/init-CBKifk5L.mjs +0 -39
- package/dist/intel-MpftjuPB.mjs +0 -76
- package/dist/interactive-D80kbTap.mjs +0 -32
- package/dist/interactive-mJQ_IrGd.mjs +0 -2
- package/dist/k2-D0QYUFqT.mjs +0 -13
- package/dist/keys-DhX4AcqF.mjs +0 -4
- package/dist/kv-DLUfUL0_.mjs +0 -15
- package/dist/lifecycle-Cyc3fmyN.mjs +0 -2
- package/dist/local-DkYQiSQQ.mjs +0 -2
- package/dist/login-CnE2Ii_F.mjs +0 -2
- package/dist/logo-matches-DFZybI0C.mjs +0 -6
- package/dist/logos-Da2YtqSN.mjs +0 -7
- package/dist/logpush-Q7WIEHS1.mjs +0 -46
- package/dist/magic-cloud-networking-BoyDmFq3.mjs +0 -71
- package/dist/magic-network-monitoring-BkUbpMUp.mjs +0 -36
- package/dist/magic-transit-4-THD45G.mjs +0 -383
- package/dist/managed-defense-CTMqSp6z.mjs +0 -18
- package/dist/mcp-kZX4irfN.mjs +0 -32
- package/dist/mesh-Dxzvvso6.mjs +0 -26
- package/dist/metadata-C33s4rc-.mjs +0 -2
- package/dist/mtls-certificates-BSbMwIna.mjs +0 -13
- package/dist/network-interconnects-osO_vAPu.mjs +0 -73
- package/dist/network-mEnXTEiG.mjs +0 -50
- package/dist/oauth-clients-CWPHi-Yn.mjs +0 -16
- package/dist/observability-BxL2RqWZ.mjs +0 -80
- package/dist/open-PCXX3ZDZ-C7gpxSsl.mjs +0 -4
- package/dist/output-ClYel9WX.mjs +0 -2
- package/dist/pages-B0x7tidm.mjs +0 -54
- package/dist/pay-per-crawl-DoTg9VP7.mjs +0 -65
- package/dist/pay-per-use-yRO2QBfe.mjs +0 -6
- package/dist/pipelines-CQxrm9ao.mjs +0 -44
- package/dist/precursor-FiGYDRV9.mjs +0 -4
- package/dist/previews-BthBa50j.mjs +0 -4
- package/dist/prompt-Ck_1PCHm.mjs +0 -3
- package/dist/queries-C0RRdol7.mjs +0 -9
- package/dist/queues-sLgvjsRP.mjs +0 -57
- package/dist/r2-C2PllL6i.mjs +0 -125
- package/dist/realtime-D-HSXznX.mjs +0 -172
- package/dist/registrar-DwHrG9QR.mjs +0 -43
- package/dist/registrar-sandbox-jNukmzQP.mjs +0 -56
- package/dist/reporting-DolhAb10.mjs +0 -14
- package/dist/request-headers-Lhj314mk.mjs +0 -2
- package/dist/request-tracers-w72hKc33.mjs +0 -4
- package/dist/resolve-CGKqk7q8.mjs +0 -2
- package/dist/resolve-Djf2xgBx.mjs +0 -2
- package/dist/resource-sharing-DTrSkqI4.mjs +0 -40
- package/dist/resource-tagging-aURR4fIJ.mjs +0 -4
- package/dist/rules-C8a7cV-W.mjs +0 -18
- package/dist/rulesets-RJ6yBefy.mjs +0 -37
- package/dist/rum-Bk1dPW4p.mjs +0 -30
- package/dist/run-BJOAPmsz.mjs +0 -2
- package/dist/run-iFM5TxtQ.mjs +0 -2
- package/dist/schema-flags-PagOq-G2.mjs +0 -5
- package/dist/schema-v7mOxMdx.mjs +0 -2
- package/dist/scim-C0FmjkkV.mjs +0 -18
- package/dist/secrets-store-cG_5RMzK.mjs +0 -24
- package/dist/shared-BqsWoApw.mjs +0 -2
- package/dist/source-38bULAR8.mjs +0 -6
- package/dist/spawn-BzPhcLJI.mjs +0 -10
- package/dist/src--KDGqL5N.mjs +0 -109
- package/dist/startup-profile-BCe9k9sR.mjs +0 -17
- package/dist/startup-profile-WrwRyMwH.mjs +0 -2
- package/dist/state-a1tTOGjm.mjs +0 -2
- package/dist/stream-aroClJeD.mjs +0 -102
- package/dist/submit-BBKhoKT8.mjs +0 -4
- package/dist/telemetry-DoBQOGRk.mjs +0 -2
- package/dist/tunnels-C2FTswb6.mjs +0 -29
- package/dist/turnstile-BV4Mdd-j.mjs +0 -33
- package/dist/update-check-CFt6cMOi.mjs +0 -2
- package/dist/update-check-Dtj9fzNe.mjs +0 -2
- package/dist/url-info-CeegsDK7.mjs +0 -4
- package/dist/url-scanner-BFXMrpJF.mjs +0 -16
- package/dist/values-BTncDc3U.mjs +0 -4
- package/dist/vectorize-CtMAtx8r.mjs +0 -32
- package/dist/version-oN1bmOgM.mjs +0 -2
- package/dist/waiting-rooms-1xDvjF13.mjs +0 -53
- package/dist/workers-DK_JgS4Y.mjs +0 -38
- package/dist/workers-builds-CdhwmmsQ.mjs +0 -14
- package/dist/workers-for-platforms-CP6IqxrK.mjs +0 -42
- package/dist/workflows-CA5K8FFb.mjs +0 -43
- package/dist/zero-trust-CQNohO7_.mjs +0 -821
- /package/dist/{Page-DAgOEX17.mjs → Page-BShsqCXr.mjs} +0 -0
- /package/dist/{alerts-D3iKtzoN.mjs → alerts-BSON-vFh.mjs} +0 -0
- /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
- /package/dist/{autorag-pvRfDwne.mjs → autorag-kNrLiqDX.mjs} +0 -0
- /package/dist/{body-parser-NjzJZMOV.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
- /package/dist/{brands-DP5Ndir1.mjs → brands-bBJgbbOH.mjs} +0 -0
- /package/dist/{browser-extension-Dee2Y1qn.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
- /package/dist/{clear-qLKPlJqb.mjs → clear-BW9vLgI3.mjs} +0 -0
- /package/dist/{cli-types-_Kmwfpnp.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-_aCmWeZx.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-CffEplpV.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
- /package/dist/{delegate-CCGgla7X.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
- /package/dist/{domain-info-BQh9XapD.mjs → domain-info-BkcBcyfF.mjs} +0 -0
- /package/dist/{errors-cuuW88wR.mjs → errors-_sob7Ihu.mjs} +0 -0
- /package/dist/{health--10IShMi.mjs → health-CTaCeVyC.mjs} +0 -0
- /package/dist/{input-validation-0CeePPHp.mjs → input-validation-D7z60HJH.mjs} +0 -0
- /package/dist/{internal-BUs583vv.mjs → internal-BYS7hO8c.mjs} +0 -0
- /package/dist/{live-VCSxA0N9.mjs → live-BJE_YWE1.mjs} +0 -0
- /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-nBMEx1f-.mjs} +0 -0
- /package/dist/{r2-data-catalog-Bg7zq1IB.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
- /package/dist/{rate-limit-analytics-D3q0mGv2.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
- /package/dist/{rate-limits-BIxlBuMn.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
- /package/dist/{ready-CAgelFmC.mjs → ready-B3pLxnjc.mjs} +0 -0
- /package/dist/{recent-submissions-B3TOjNmk.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
- /package/dist/{refute-BZNkFpBB.mjs → refute-Dp3VodMn.mjs} +0 -0
- /package/dist/{scan-logo-StecHiaf.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
- /package/dist/{scan-page-B4adr-vD.mjs → scan-page-CxeudOzj.mjs} +0 -0
- /package/dist/{search-Devngw4M.mjs → search-B_P5ZTQj.mjs} +0 -0
- /package/dist/{signed-url-ChR5eXXd.mjs → signed-url-D5RwvrQq.mjs} +0 -0
- /package/dist/{submission-info-BGb81HZN.mjs → submission-info-_t78q2OE.mjs} +0 -0
- /package/dist/{total-queries-_wa6KxEl.mjs → total-queries-CPrKEciQ.mjs} +0 -0
- /package/dist/{tracked-domains-BesKGqfI.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
- /package/dist/{verify-CYM5GlPu.mjs → verify-5KcvRk-q.mjs} +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./lazy-command-BDiIwpss.mjs";import{t}from"./local-DlT72Xpn.mjs";import{i as n,n as r}from"./auth-CGLsxbc6.mjs";import{a as i,t as a}from"./context-q7UaYK69.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-BtkTVcHI.mjs";import{t as l}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-RlgRrmbm.mjs";import{t as ee}from"./cli-types-9oYmRTHJ.mjs";function _(e){return e.usage(`$0 pages build-cache purge <project-name>
|
|
3
|
+
|
|
4
|
+
Remove cached build artifacts so subsequent builds run without the project's existing build cache.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const v={command:`purge <project-name>`,describe:`Purge the Pages build cache`,builder:_,handler:async e=>l({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages build-cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/purge_build_cache`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation purges the build cache for a Pages project.`})){process.stderr.write(`Aborted.
|
|
5
|
+
`);return}let u=await c(`Deleting`,async()=>n.pages.buildCache.purge({account_id:l,project_name:e[`project-name`]}));o(u,{successLabel:`Deleted`})})},y={command:`build-cache`,describe:`Operations for build-cache`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 pages create
|
|
6
|
+
|
|
7
|
+
Create a Cloudflare Pages project for configuring and deploying a site or application.`).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
|
|
8
|
+
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
9
|
+
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].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 --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-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 --source-* flag is set`)}return!0})}const x={command:`create`,describe:`Create a Cloudflare Pages project`,builder:b,handler:async e=>l({command:`pages create`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({build_config:{build_caching:e[`build-config-build-caching`],build_command:f(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:f(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(e.name,`name`,`text`),production_branch:f(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e[`source-type`],`source-type`,`text`)}}):u(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.pages.create({...t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`)),e[`production-branch`]===void 0&&(e[`production-branch`]=await m(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let p=d({build_config:{build_caching:e[`build-config-build-caching`],build_command:f(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:f(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(e.name,`name`,`text`),production_branch:f(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e[`source-type`],`source-type`,`text`)}}),h=await c(`Creating`,async()=>n.pages.create({...p,account_id:l}));o(h,{successLabel:`Created`})})};function S(e){return e.usage(`$0 pages delete <project-name>
|
|
10
|
+
|
|
11
|
+
Permanently delete a Cloudflare Pages project and its deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 C={command:`delete <project-name>`,describe:`Delete a Cloudflare Pages project`,builder:S,handler:async e=>l({command:`pages delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
12
|
+
`);return}let u=await c(`Deleting`,async()=>n.pages.delete({account_id:l,project_name:e[`project-name`]}));o(u,{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 pages deployments create <project-name>
|
|
13
|
+
|
|
14
|
+
Create a Cloudflare Pages deployment from a Git branch or Direct Upload manifest. Git repositories must already be authorized in Cloudflare Pages.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`branch`,{type:`string`,description:"Git branch to deploy. Uses the branch's `HEAD`; defaults to the project's production branch."}).option(`commit-dirty`,{type:`string`,description:"Whether the associated Git working tree has uncommitted changes. Provide `true` or `false`."}).option(`commit-hash`,{type:`string`,description:`Git commit SHA associated with the deployment.`}).option(`commit-message`,{type:`string`,description:`Git commit message associated with the deployment.`}).option(`manifest`,{type:`string`,description:`JSON-encoded object mapping deployment file paths to their uploaded content hashes. Required for Direct Upload deployments. Maximum 20,000 entries. `}).option(`pages-build-output-dir`,{type:`string`,description:`The build output directory path.`}).option(`wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration file used for this deployment.`})}const T={command:`create <project-name>`,describe:`Create a Pages deployment`,builder:w,handler:async e=>l({command:`pages deployments create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,branch:e.branch,"commit-dirty":e[`commit-dirty`],"commit-hash":e[`commit-hash`],"commit-message":e[`commit-message`],manifest:e.manifest,"pages-build-output-dir":e[`pages-build-output-dir`],"wrangler-config-hash":e[`wrangler-config-hash`]}});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.branch!==void 0||e[`commit-dirty`]!==void 0||e[`commit-hash`]!==void 0||e[`commit-message`]!==void 0||e.manifest!==void 0||e[`pages-build-output-dir`]!==void 0||e[`wrangler-config-hash`]!==void 0){let t=new FormData;if(e.file){let n=p(e.file);t.append(`_headers`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`_headers`,e.body);e.branch!==void 0&&t.append(`branch`,String(f(e.branch,`branch`,`text`)??``)),e[`commit-dirty`]!==void 0&&t.append(`commit_dirty`,String(f(e[`commit-dirty`],`commit-dirty`,`text`)??``)),e[`commit-hash`]!==void 0&&t.append(`commit_hash`,String(f(e[`commit-hash`],`commit-hash`,`text`)??``)),e[`commit-message`]!==void 0&&t.append(`commit_message`,String(f(e[`commit-message`],`commit-message`,`text`)??``)),e.manifest!==void 0&&t.append(`manifest`,String(f(e.manifest,`manifest`,`text`)??``)),e[`pages-build-output-dir`]!==void 0&&t.append(`pages_build_output_dir`,String(f(e[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),e[`wrangler-config-hash`]!==void 0&&t.append(`wrangler_config_hash`,String(f(e[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``));let r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:t}));o(r,{successLabel:`Created`});return}if(e.body){let t=f(e.body,`body`,`binary`),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));o(r,{successLabel:`Created`});return}let d=await c(`Creating`,async()=>l.pages.deployments.create({account_id:u,project_name:e[`project-name`]}));o(d,{successLabel:`Created`})})};function E(e){return e.usage(`$0 pages deployments delete <deployment-id>
|
|
15
|
+
|
|
16
|
+
Remove a deployment from a Cloudflare Pages project.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`allow-aliased`,{type:`boolean`,description:`Allow deletion when a non-production deployment has an active alias.`}).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 D={command:`delete <deployment-id>`,describe:`Delete a Pages deployment`,builder:E,handler:async e=>l({command:`pages deployments delete`,classification:{safeFlags:[`allow-aliased`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={force:e[`allow-aliased`]};if(e.dryRun){let t=await i();s({command:`cf pages deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
17
|
+
`);return}let d=await c(`Deleting`,async()=>l.pages.deployments.delete({account_id:u,project_name:e[`project-name`],deployment_id:e[`deployment-id`],...n}));o(d,{successLabel:`Deleted`})})};function O(e){return e.usage(`$0 pages deployments get <deployment-id>
|
|
18
|
+
|
|
19
|
+
Retrieve the status and details of a Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <deployment-id>`,describe:`Get a Pages deployment`,builder:O,handler:async e=>l({command:`pages deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages deployments get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.pages.deployments.get({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));o(u,{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 pages deployments history logs get <deployment-id>
|
|
20
|
+
|
|
21
|
+
Retrieve the build logs for a Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <deployment-id>`,describe:`Get Pages deployment logs`,builder:A,handler:async e=>l({command:`pages deployments history logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages deployments history logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/history/logs`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.pages.deployments.history.logs.get({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));o(u,{successLabel:`Loaded`})})},M={command:`logs`,describe:`Operations for deployments.history.logs`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},N={command:`history`,describe:`Operations for deployments.history`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 pages deployments list
|
|
22
|
+
|
|
23
|
+
List the production or preview deployments for a Cloudflare Pages project.`).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`env`,{type:`string`,description:"Deployment environment to return. Valid values are `production` and `preview`.",choices:[`production`,`preview`]}).option(`page`,{type:`number`,description:`Page number of results to return.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`list`,describe:`List Pages deployments`,builder:ee(P),handler:async e=>l({command:`pages deployments list`,classification:{safeFlags:[`env`,`dry-run`]}},e,async()=>{let n={env:e.env,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();s({command:`cf pages deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments`,pathParams:{"project-name":String(e[`project-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.pages.deployments.list({account_id:u,project_name:e[`project-name`],...n}));o(d,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 pages deployments retry <deployment-id>
|
|
24
|
+
|
|
25
|
+
Retry a previous Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`retry <deployment-id>`,describe:`Retry a Pages deployment`,builder:I,handler:async e=>l({command:`pages deployments retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages deployments retry`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/retry`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.pages.deployments.retry({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));o(u,{successLabel:`Created`})})};function R(e){return e.usage(`$0 pages deployments rollback <deployment-id>
|
|
26
|
+
|
|
27
|
+
Roll back production to a previous successful Cloudflare Pages deployment.`).positional(`deployment-id`,{type:`string`,description:`UUID of the Pages deployment, as returned by deployment list or create operations.`,demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 z={command:`rollback <deployment-id>`,describe:`Roll back a Pages deployment`,builder:R,handler:async e=>l({command:`pages deployments rollback`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages deployments rollback`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}/rollback`,pathParams:{"deployment-id":String(e[`deployment-id`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation rolls back the production deployment to an earlier deployment.`})){process.stderr.write(`Aborted.
|
|
28
|
+
`);return}let u=await c(`Deleting`,async()=>n.pages.deployments.rollback({account_id:l,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));o(u,{successLabel:`Deleted`})})},B={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(T).command(D).command(k).command(F).command(L).command(z).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.usage(`$0 pages domains create <project-name>
|
|
29
|
+
|
|
30
|
+
Attach a custom domain to a Cloudflare Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`."}).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 <project-name>`,describe:`Add a Pages custom domain`,builder:te,handler:async e=>l({command:`pages domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.pages.domains.create({...t,account_id:l,project_name:e[`project-name`]}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,"Fully qualified domain name for the Pages project, such as `example.com`."));let p=d({name:f(e.name,`name`,`text`)}),h=await c(`Creating`,async()=>n.pages.domains.create({...p,account_id:l,project_name:e[`project-name`]}));o(h,{successLabel:`Created`})})};function H(e){return e.usage(`$0 pages domains delete <domain-name>
|
|
31
|
+
|
|
32
|
+
Remove a custom domain from a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 U={command:`delete <domain-name>`,describe:`Delete a Pages custom domain`,builder:H,handler:async e=>l({command:`pages domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
33
|
+
`);return}let u=await c(`Deleting`,async()=>n.pages.domains.delete({account_id:l,project_name:e[`project-name`],domain_name:e[`domain-name`]}));o(u,{successLabel:`Deleted`})})};function W(e){return e.usage(`$0 pages domains get <domain-name>
|
|
34
|
+
|
|
35
|
+
Retrieve the configuration and validation status of a custom domain attached to a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <domain-name>`,describe:`Get a Pages custom domain`,builder:W,handler:async e=>l({command:`pages domains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.pages.domains.get({account_id:l,project_name:e[`project-name`],domain_name:e[`domain-name`]}));o(u,{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 pages domains list
|
|
36
|
+
|
|
37
|
+
List the custom domains associated with a Cloudflare Pages project.`).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`list`,describe:`List Pages custom domains`,builder:K,handler:async e=>l({command:`pages domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.pages.domains.list({account_id:l,project_name:e[`project-name`]}));o(u,{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 pages domains validation retry <domain-name>
|
|
38
|
+
|
|
39
|
+
Retry validation for a custom domain attached to a Cloudflare Pages project.`).positional(`domain-name`,{type:`string`,description:"Fully qualified domain name for the Pages project, such as `example.com`.",demandOption:!0}).option(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`retry <domain-name>`,describe:`Retry custom domain validation`,builder:J,handler:async e=>l({command:`pages domains validation retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages domains validation retry`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/domains/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``),"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Updating`,async()=>n.pages.domains.validation.retry({account_id:l,project_name:e[`project-name`],domain_name:e[`domain-name`]}));o(u,{successLabel:`Updated`})})},X={command:`validation`,describe:`Operations for domains.validation`,builder:e=>e.command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Z={command:`domains`,describe:`Operations for domains`,builder:e=>e.command(V).command(U).command(G).command(q).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 pages edit <project-name>
|
|
40
|
+
|
|
41
|
+
Update the build, deployment, source, or environment settings for a Cloudflare Pages project. To delete an environment variable, set its key to \`null\`.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`build-config-build-caching`,{type:`boolean`,description:`Enable build caching for the project.`}).option(`build-config-build-command`,{type:`string`,description:`Command used to build project.`}).option(`build-config-destination-dir`,{type:`string`,description:`Output directory of the build.`}).option(`build-config-root-dir`,{type:`string`,description:`Directory to run the command.`}).option(`build-config-web-analytics-tag`,{type:`string`,description:`The classifying tag for analytics.`}).option(`build-config-web-analytics-token`,{type:`string`,description:`The auth token for analytics.`}).option(`deployment-configs-preview-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-preview-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-preview-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-always-use-latest-compatibility-date`,{type:`boolean`,description:`Whether to always use the latest compatibility date for Pages Functions.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions.`}).option(`deployment-configs-production-compatibility-date`,{type:`string`,description:`Compatibility date used for Pages Functions.`}).option(`deployment-configs-production-compatibility-flags`,{type:`string`,array:!0,description:`Compatibility flags used for Pages Functions.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).option(`deployment-configs-production-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`name`,{type:`string`,description:`Name for the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`}).option(`production-branch`,{type:`string`,description:`Production branch of the project. Used to identify production deployments.`}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
|
|
42
|
+
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
43
|
+
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`source-type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-build-image-major-version`,`deployment-configs-preview-compatibility-date`,`deployment-configs-preview-compatibility-flags`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-preview-usage-model`,`deployment-configs-preview-wrangler-config-hash`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-build-image-major-version`,`deployment-configs-production-compatibility-date`,`deployment-configs-production-compatibility-flags`,`deployment-configs-production-fail-open`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`,`deployment-configs-production-usage-model`,`deployment-configs-production-wrangler-config-hash`].some(t=>e[t]!==void 0)){let t=[`deployment-configs-preview-limits-cpu-ms`,`deployment-configs-preview-placement-mode`,`deployment-configs-production-limits-cpu-ms`,`deployment-configs-production-placement-mode`].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 --deployment_configs-* flag is set`)}return!0}).check(e=>{if([`source-config-deployments-enabled`,`source-config-owner`,`source-config-owner-id`,`source-config-path-excludes`,`source-config-path-includes`,`source-config-pr-comments-enabled`,`source-config-preview-branch-excludes`,`source-config-preview-branch-includes`,`source-config-preview-deployment-setting`,`source-config-production-branch`,`source-config-production-deployments-enabled`,`source-config-repo-id`,`source-config-repo-name`,`source-type`].some(t=>e[t]!==void 0)){let t=[`source-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 --source-* flag is set`)}return!0})}const ne={command:`edit <project-name>`,describe:`Update a Cloudflare Pages project`,builder:Q,handler:async e=>l({command:`pages edit`,classification:{safeFlags:[`build-config-build-caching`,`deployment-configs-preview-always-use-latest-compatibility-date`,`deployment-configs-preview-fail-open`,`deployment-configs-preview-usage-model`,`deployment-configs-production-always-use-latest-compatibility-date`,`deployment-configs-production-fail-open`,`deployment-configs-production-usage-model`,`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({build_config:{build_caching:e[`build-config-build-caching`],build_command:f(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:f(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(e.name,`name`,`text`),production_branch:f(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e[`source-type`],`source-type`,`text`)}}):u(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.pages.edit({...t,account_id:l,project_name:e[`project-name`]}));o(r,{successLabel:`Updated`});return}let p=d({build_config:{build_caching:e[`build-config-build-caching`],build_command:f(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:f(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:f(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:f(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:f(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:f(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],fail_open:e[`deployment-configs-preview-fail-open`],limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},placement:{mode:f(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-preview-usage-model`],`deployment-configs-preview-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:f(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],fail_open:e[`deployment-configs-production-fail-open`],limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},placement:{mode:f(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},usage_model:f(e[`deployment-configs-production-usage-model`],`deployment-configs-production-usage-model`,`text`),wrangler_config_hash:f(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:f(e.name,`name`,`text`),production_branch:f(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e[`source-type`],`source-type`,`text`)}}),m=await c(`Updating`,async()=>n.pages.edit({...p,account_id:l,project_name:e[`project-name`]}));o(m,{successLabel:`Updated`})})};function re(e){return e.usage(`$0 pages get <project-name>
|
|
44
|
+
|
|
45
|
+
Retrieve the configuration and deployment settings for a Cloudflare Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <project-name>`,describe:`Get a Cloudflare Pages project`,builder:re,handler:async e=>l({command:`pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.pages.get({account_id:l,project_name:e[`project-name`]}));o(u,{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 pages list
|
|
46
|
+
|
|
47
|
+
List the Cloudflare Pages projects in an account.`).option(`page`,{type:`number`,description:`Page number of results to return.`}).option(`per-page`,{type:`number`,description:`Number of results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`List Cloudflare Pages projects`,builder:ae,handler:async e=>l({command:`pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();s({command:`cf pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pages/projects`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.pages.list({account_id:u,...n}));o(d,{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 pages source connect <project-name>
|
|
48
|
+
|
|
49
|
+
Connect a GitHub or GitLab repository to a Cloudflare Pages project to enable Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,demandOption:!0}).option(`source-config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
|
|
50
|
+
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
51
|
+
`}).option(`source-config-owner`,{type:`string`,description:`The owner of the repository.`}).option(`source-config-owner-id`,{type:`string`,description:`The owner ID of the repository.`}).option(`source-config-path-excludes`,{type:`string`,array:!0,description:"A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-path-includes`,{type:`string`,array:!0,description:"A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported."}).option(`source-config-pr-comments-enabled`,{type:`boolean`,description:`Whether to enable PR comments.`}).option(`source-config-preview-branch-excludes`,{type:`string`,array:!0,description:"A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-branch-includes`,{type:`string`,array:!0,description:"A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`."}).option(`source-config-preview-deployment-setting`,{type:`string`,description:`Controls whether commits to preview branches trigger a preview deployment.`,choices:[`all`,`none`,`custom`]}).option(`source-config-production-branch`,{type:`string`,description:`The production branch of the repository.`}).option(`source-config-production-deployments-enabled`,{type:`boolean`,description:`Whether to trigger a production deployment on commits to the production branch.`}).option(`source-config-repo-id`,{type:`string`,description:`The ID of the repository.`}).option(`source-config-repo-name`,{type:`string`,description:`The name of the repository.`}).option(`type`,{type:`string`,description:`The source control management provider.`,choices:[`github`,`gitlab`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Repository and deployment settings for connecting a Git repository to a Pages project.`})}const se={command:`connect <project-name>`,describe:`Connect a Git repository`,builder:$,handler:async e=>l({command:`pages source connect`,classification:{safeFlags:[`source-config-deployments-enabled`,`source-config-pr-comments-enabled`,`source-config-preview-deployment-setting`,`source-config-production-deployments-enabled`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages source connect`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e.type,`type`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.pages.source.connect({...t,account_id:l,project_name:e[`project-name`]}));o(r,{successLabel:`Created`});return}if(e[`source-config-deployments-enabled`]===void 0)throw Error(`--source-config-deployments-enabled is required (or pass --body with this field set).`);if(e[`source-config-owner`]===void 0&&(e[`source-config-owner`]=await m(`source-config-owner`,`The owner of the repository.`)),e[`source-config-owner-id`]===void 0&&(e[`source-config-owner-id`]=await m(`source-config-owner-id`,`The owner ID of the repository.`)),e[`source-config-path-excludes`]===void 0)throw Error(`--source-config-path-excludes is required (or pass --body with this field set).`);if(e[`source-config-path-includes`]===void 0)throw Error(`--source-config-path-includes is required (or pass --body with this field set).`);if(e[`source-config-pr-comments-enabled`]===void 0)throw Error(`--source-config-pr-comments-enabled is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-excludes`]===void 0)throw Error(`--source-config-preview-branch-excludes is required (or pass --body with this field set).`);if(e[`source-config-preview-branch-includes`]===void 0)throw Error(`--source-config-preview-branch-includes is required (or pass --body with this field set).`);if(e[`source-config-preview-deployment-setting`]===void 0&&(e[`source-config-preview-deployment-setting`]=await h(`source-config-preview-deployment-setting`,`Controls whether commits to preview branches trigger a preview deployment.`,[`all`,`none`,`custom`])),e[`source-config-production-branch`]===void 0&&(e[`source-config-production-branch`]=await m(`source-config-production-branch`,`The production branch of the repository.`)),e[`source-config-production-deployments-enabled`]===void 0)throw Error(`--source-config-production-deployments-enabled is required (or pass --body with this field set).`);e[`source-config-repo-id`]===void 0&&(e[`source-config-repo-id`]=await m(`source-config-repo-id`,`The ID of the repository.`)),e[`source-config-repo-name`]===void 0&&(e[`source-config-repo-name`]=await m(`source-config-repo-name`,`The name of the repository.`)),e.type===void 0&&(e.type=await h(`type`,`The source control management provider.`,[`github`,`gitlab`]));let p=d({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:f(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:f(e[`source-config-owner-id`],`source-config-owner-id`,`text`),path_excludes:e[`source-config-path-excludes`],path_includes:e[`source-config-path-includes`],pr_comments_enabled:e[`source-config-pr-comments-enabled`],preview_branch_excludes:e[`source-config-preview-branch-excludes`],preview_branch_includes:e[`source-config-preview-branch-includes`],preview_deployment_setting:f(e[`source-config-preview-deployment-setting`],`source-config-preview-deployment-setting`,`text`),production_branch:f(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:f(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:f(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:f(e.type,`type`,`text`)}),g=await c(`Creating`,async()=>n.pages.source.connect({...p,account_id:l,project_name:e[`project-name`]}));o(g,{successLabel:`Created`})})};function ce(e){return e.usage(`$0 pages source disconnect <project-name>
|
|
52
|
+
|
|
53
|
+
Disconnect the Git repository from a Cloudflare Pages project to stop Git-based deployments.`).positional(`project-name`,{type:`string`,description:`Name of the Pages project. Must begin with a lowercase letter or digit and contain only lowercase letters, digits, and hyphens.`,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 le={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:ce,handler:async e=>l({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf pages source disconnect`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pages/projects/${e[`project-name`]==null?`<project-name>`:encodeURIComponent(String(e[`project-name`]))}/source`,pathParams:{"project-name":String(e[`project-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
54
|
+
`);return}let u=await c(`Deleting`,async()=>n.pages.source.disconnect({account_id:l,project_name:e[`project-name`]}));o(u,{successLabel:`Deleted`})})},ue={command:`source`,describe:`Operations for source`,builder:e=>e.command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var de=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-BlIb6RR2.mjs`),{command:`pages deploy`,recordArgs:!1});const fe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(x).command(C).command(de).command(ne).command(ie).command(oe).command(y).command(B).command(Z).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{fe as default};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,i as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./prompt-RlgRrmbm.mjs";import{t as p}from"./cli-types-9oYmRTHJ.mjs";function m(e){return e.usage(`$0 pay-per-crawl config create
|
|
3
|
+
|
|
4
|
+
Creates the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const h={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:m,handler:async e=>c({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.payPerCrawl.config.create({...t,zone_id:i}));a(r,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),u=await s(`Creating`,async()=>n.payPerCrawl.config.create({...c,zone_id:i}));a(u,{successLabel:`Created`})})};function g(e){return e.usage(`$0 pay-per-crawl config edit
|
|
5
|
+
|
|
6
|
+
Changes the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for setting flag on zones`})}const _={command:`edit`,describe:`Changes pay-per-crawl config for a zone`,builder:g,handler:async e=>c({command:`pay-per-crawl config edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:t,zone_id:i}));a(r,{successLabel:`Updated`});return}let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),u=await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:c,zone_id:i}));a(u,{successLabel:`Updated`})})};function v(e){return e.usage(`$0 pay-per-crawl config get
|
|
7
|
+
|
|
8
|
+
Gets the pay-per-crawl config for a zone including the bot configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Get the pay-per-crawl config`,builder:v,handler:async e=>c({command:`pay-per-crawl config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.config.get({zone_id:i}));a(c,{successLabel:`Loaded`})})},b={command:`config`,describe:`Operations for config`,builder:e=>e.command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 pay-per-crawl crawler stripe create
|
|
9
|
+
|
|
10
|
+
Creates the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`create`,describe:`Creates the stripe config for a crawler`,builder:x,handler:async r=>c({command:`pay-per-crawl crawler stripe create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawler stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Creating`,async()=>c.payPerCrawl.crawler.stripe.create({account_id:l}));a(u,{successLabel:`Created`})})};function C(e){return e.usage(`$0 pay-per-crawl crawler stripe delete
|
|
11
|
+
|
|
12
|
+
Deletes the stripe config for a crawler.`).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`,describe:`Deletes the stripe config for a crawler`,builder:C,handler:async r=>c({command:`pay-per-crawl crawler stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawler stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await f({force:!!r.force})){process.stderr.write(`Aborted.
|
|
13
|
+
`);return}let u=await s(`Deleting`,async()=>c.payPerCrawl.crawler.stripe.delete({account_id:l}));a(u,{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 pay-per-crawl crawler stripe get
|
|
14
|
+
|
|
15
|
+
Gets the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get`,describe:`Gets the stripe config for a crawler`,builder:T,handler:async r=>c({command:`pay-per-crawl crawler stripe get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawler stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.crawler.stripe.get({account_id:l}));a(u,{successLabel:`Loaded`})})},D={command:`stripe`,describe:`Operations for crawler.stripe`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`crawler`,describe:`Operations for crawler`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 pay-per-crawl crawlers list
|
|
16
|
+
|
|
17
|
+
Lists the crawlers known to pay-per-crawl.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List pay-per-crawl crawlers`,builder:k,handler:async r=>c({command:`pay-per-crawl crawlers list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawlers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawlers`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.crawlers.list({account_id:l}));a(u,{successLabel:`Loaded`})})},j={command:`crawlers`,describe:`Operations for crawlers`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 pay-per-crawl publisher stripe create
|
|
18
|
+
|
|
19
|
+
Creates the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`create`,describe:`Creates the stripe config for a publisher`,builder:M,handler:async r=>c({command:`pay-per-crawl publisher stripe create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl publisher stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Creating`,async()=>c.payPerCrawl.publisher.stripe.create({account_id:l}));a(u,{successLabel:`Created`})})};function P(e){return e.usage(`$0 pay-per-crawl publisher stripe delete
|
|
20
|
+
|
|
21
|
+
Deletes the stripe config for a publisher.`).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:`delete`,describe:`Deletes the stripe config for a publisher`,builder:P,handler:async r=>c({command:`pay-per-crawl publisher stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl publisher stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await f({force:!!r.force})){process.stderr.write(`Aborted.
|
|
22
|
+
`);return}let u=await s(`Deleting`,async()=>c.payPerCrawl.publisher.stripe.delete({account_id:l}));a(u,{successLabel:`Deleted`})})};function ee(e){return e.usage(`$0 pay-per-crawl publisher stripe get
|
|
23
|
+
|
|
24
|
+
Gets the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Gets the stripe config for a publisher`,builder:ee,handler:async r=>c({command:`pay-per-crawl publisher stripe get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl publisher stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.publisher.stripe.get({account_id:l}));a(u,{successLabel:`Loaded`})})},L={command:`stripe`,describe:`Operations for publisher.stripe`,builder:e=>e.command(N).command(F).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`publisher`,describe:`Operations for publisher`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 pay-per-crawl terms get-signature-link
|
|
25
|
+
|
|
26
|
+
Gets a download link for the account's signed pay-per-crawl terms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get-signature-link`,describe:`Get signed pay-per-crawl terms link`,builder:z,handler:async r=>c({command:`pay-per-crawl terms get-signature-link`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms get-signature-link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/signature_link`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.terms.getSignatureLink({account_id:l}));a(u,{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 pay-per-crawl terms get-signature
|
|
27
|
+
|
|
28
|
+
Gets the account's pay-per-crawl terms signature status.`).option(`remote`,{type:`boolean`,description:`Refresh the signature status from Ironclad.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get-signature`,describe:`Get pay-per-crawl terms signature status`,builder:V,handler:async r=>c({command:`pay-per-crawl terms get-signature`,classification:{safeFlags:[`remote`,`dry-run`]}},r,async()=>{let c={remote:r.remote};if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms get-signature`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Loading`,async()=>l.payPerCrawl.terms.getSignature({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 pay-per-crawl terms get
|
|
29
|
+
|
|
30
|
+
Gets the pay-per-crawl terms and conditions contract.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get`,describe:`Get pay-per-crawl terms`,builder:U,handler:async r=>c({command:`pay-per-crawl terms get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.terms.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 pay-per-crawl terms send-signature-event
|
|
31
|
+
|
|
32
|
+
Records that an account displayed or agreed to the pay-per-crawl terms.`).option(`event-type`,{type:`string`,description:`The terms activity to record.`,choices:[`agreed`,`displayed`],demandOption:!0}).option(`vid`,{type:`string`,description:`Ironclad contract version ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`send-signature-event`,describe:`Record pay-per-crawl terms activity`,builder:p(G),handler:async r=>c({command:`pay-per-crawl terms send-signature-event`,classification:{safeFlags:[`event-type`,`dry-run`]}},r,async()=>{let c={event_type:r[`event-type`],vid:r.vid};if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms send-signature-event`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Creating`,async()=>l.payPerCrawl.terms.sendSignatureEvent({account_id:u,...c}));a(d,{successLabel:`Created`})})},q={command:`terms`,describe:`Operations for terms`,builder:e=>e.command(W).command(H).command(B).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.usage(`$0 pay-per-crawl zones get-can-be-enabled
|
|
33
|
+
|
|
34
|
+
Gets whether pay-per-crawl can be enabled for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get-can-be-enabled`,describe:`Get pay-per-crawl zone eligibility`,builder:J,handler:async e=>c({command:`pay-per-crawl zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.zones.getCanBeEnabled({zone_id:i}));a(c,{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 pay-per-crawl zones query-can-be-enabled
|
|
35
|
+
|
|
36
|
+
Provided a list of pay-per-crawl configured zones this method will return whether they can enable PPC or not.`).option(`zones`,{type:`string`,array:!0,description:`The zones field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Zone IDs to check for pay-per-crawl eligibility`})}const Z={command:`query-can-be-enabled`,describe:`Gets the can_be_enabled zone setting`,builder:X,handler:async r=>c({command:`pay-per-crawl zones query-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl zones query-can-be-enabled`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/zones_can_be_enabled/query`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({zones:r.zones}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...e,account_id:u}));a(t,{successLabel:`Created`});return}let f=d({zones:r.zones}),p=await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...f,account_id:u}));a(p,{successLabel:`Created`})})};function Q(e){return e.usage(`$0 pay-per-crawl zones set-can-be-enabled
|
|
37
|
+
|
|
38
|
+
Allows an account admin to set the can_be_enabled setting on a list of zones. An omitted can_be_enabled value leaves that zone unchanged.`).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:`Data for setting flag on zones`})}const $={command:`set-can-be-enabled`,describe:`Set can_be_enabled setting on zones`,builder:Q,handler:async r=>c({command:`pay-per-crawl zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({zones:u(r.zones,`zones`)}):l(r.body)});return}let c=await t(r),f=r.local?e:await i();if(r.accountId=f,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...e,account_id:f}));a(t,{successLabel:`Updated`});return}if(r.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=d({zones:u(r.zones,`zones`)}),m=await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...p,account_id:f}));a(m,{successLabel:`Updated`})})},te={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(Y).command(Z).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ne={command:`pay-per-crawl`,describe:`pay-per-crawl`,builder:e=>e.command(b).command(O).command(j).command(R).command(q).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ne as default};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,i,t as a}from"./context-q7UaYK69.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-BtkTVcHI.mjs";import{t as l}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-RlgRrmbm.mjs";function v(e){return e.usage(`$0 pay-per-use enabled-domains list
|
|
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 y={command:`list`,describe:`List enabled Pay Per Use domains`,builder:v,handler:async t=>l({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={cursor:t.cursor,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({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:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.payPerUse.enabledDomains.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},b={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 pay-per-use operator get-configuration
|
|
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 t=>l({command:`pay-per-use operator get-configuration`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({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 i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.payPerUse.operator.getConfiguration({account_id:l}));o(u,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 pay-per-use operator set-configuration
|
|
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 w={command:`set-configuration`,describe:`Set pay-per-use operator configuration`,builder:C,handler:async t=>l({command:`pay-per-use operator set-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use operator set-configuration`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.payPerUse.operator.setConfiguration({body:e,account_id:l}));o(n,{successLabel:`Updated`});return}if(t[`default-price-usd-microcents`]===void 0)throw Error(`--default-price-usd-microcents is required (or pass --body with this field set).`);if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await h(`name`,`The name field`));let d=f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}),m=await c(`Updating`,async()=>i.payPerUse.operator.setConfiguration({body:d,account_id:l}));o(m,{successLabel:`Updated`})})};function T(e){return e.usage(`$0 pay-per-use operator update-configuration
|
|
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 E={command:`update-configuration`,describe:`Update pay-per-use operator configuration`,builder:T,handler:async t=>l({command:`pay-per-use operator update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use operator update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.payPerUse.operator.updateConfiguration({...e,account_id:l}));o(n,{successLabel:`Updated`});return}let d=f({default_price_usd_microcents:t[`default-price-usd-microcents`],enabled:t.enabled,name:p(t.name,`name`,`text`)}),m=await c(`Updating`,async()=>i.payPerUse.operator.updateConfiguration({...d,account_id:l}));o(m,{successLabel:`Updated`})})},D={command:`operator`,describe:`Operations for operator`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 pay-per-use pricing list-operators
|
|
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 k={command:`list-operators`,describe:`List pay-per-use operators`,builder:O,handler:async e=>l({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){s({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 r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.payPerUse.pricing.listOperators({zone_id:a,...t}));o(l,{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 pay-per-use pricing opt-out-operator-price <operator-id>
|
|
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 j={command:`opt-out-operator-price <operator-id>`,describe:`Opt out of a pay-per-use operator price`,builder:A,handler:async e=>l({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){s({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),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
15
|
+
`);return}let a=await c(`Deleting`,async()=>t.payPerUse.pricing.optOutOperatorPrice({zone_id:r,operator_id:e[`operator-id`]}));o(a,{successLabel:`Deleted`})})};function M(e){return e.usage(`$0 pay-per-use pricing set-operator-price <operator-id>
|
|
16
|
+
|
|
17
|
+
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`]}).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 ee={command:`set-operator-price <operator-id>`,describe:`Set a pay-per-use operator price`,builder:M,handler:async e=>l({command:`pay-per-use pricing set-operator-price`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){s({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?f({action:p(e.action,`action`,`text`),price_usd_microcents:e[`price-usd-microcents`]}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Creating`,async()=>t.payPerUse.pricing.setOperatorPrice({body:n,zone_id:r,operator_id:e[`operator-id`]}));o(i,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await g(`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 a=f({action:p(e.action,`action`,`text`),price_usd_microcents:e[`price-usd-microcents`]}),l=await c(`Creating`,async()=>t.payPerUse.pricing.setOperatorPrice({body:a,zone_id:r,operator_id:e[`operator-id`]}));o(l,{successLabel:`Created`})})},N={command:`pricing`,describe:`Operations for pricing`,builder:e=>e.command(k).command(j).command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 pay-per-use proposals decide
|
|
18
|
+
|
|
19
|
+
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`]}).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 F={command:`decide`,describe:`Decide a pay-per-use price proposal`,builder:P,handler:async t=>l({command:`pay-per-use proposals decide`,classification:{safeFlags:[`action`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use proposals decide`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/proposals`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({action:p(t.action,`action`,`text`),price_id:t[`price-id`]}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.payPerUse.proposals.decide({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t.action===void 0&&(t.action=await g(`action`,`The action field`,[`accept`,`reject`])),t[`price-id`]===void 0)throw Error(`--price-id is required (or pass --body with this field set).`);let d=f({action:p(t.action,`action`,`text`),price_id:t[`price-id`]}),m=await c(`Creating`,async()=>i.payPerUse.proposals.decide({...d,account_id:l}));o(m,{successLabel:`Created`})})};function I(e){return e.usage(`$0 pay-per-use proposals list
|
|
20
|
+
|
|
21
|
+
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 L={command:`list`,describe:`List pay-per-use price proposals`,builder:I,handler:async t=>l({command:`pay-per-use proposals list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({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:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.payPerUse.proposals.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},R={command:`proposals`,describe:`Operations for proposals`,builder:e=>e.command(F).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 pay-per-use usage-reports submit
|
|
22
|
+
|
|
23
|
+
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 B={command:`submit`,describe:`Submit a participant usage report`,builder:z,handler:async i=>l({command:`pay-per-use usage-reports submit`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf pay-per-use usage-reports submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/usage-reports`,pathParams:{},bodyKind:`octet-stream`,body:i.body});return}let l=await n(i),u=i.local?e:await a();if(i.accountId=u,i.file){let e=m(i.file),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}}));o(n,{successLabel:`Created`});return}if(i.body){let e=p(i.body,`body`,`binary`),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}}));o(n,{successLabel:`Created`});return}if(i.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},V={command:`usage-reports`,describe:`Operations for usage-reports`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 pay-per-use usage-stats get-account
|
|
24
|
+
|
|
25
|
+
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.`).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 U={command:`get-account`,describe:`Get pay-per-use usage statistics`,builder:H,handler:async t=>l({command:`pay-per-use usage-stats get-account`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let l={since:t.since,until:t.until,page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf pay-per-use usage-stats get-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/pay-per-use/usage-stats`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(t),d=t.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:t.zone},u,{quiet:t.quiet}):t.local?e:await a();d===`zones`?t.zoneId=f:t.accountId=f;let p=await c(`Loading`,async()=>u.payPerUse.usageStats.getAccount({account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},W={command:`usage-stats`,describe:`Operations for usage-stats`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 pay-per-use zones get-can-be-enabled
|
|
26
|
+
|
|
27
|
+
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 K={command:`get-can-be-enabled`,describe:`Get pay-per-use zone eligibility`,builder:G,handler:async e=>l({command:`pay-per-use zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({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),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.payPerUse.zones.getCanBeEnabled({zone_id:r}));o(a,{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 pay-per-use zones get-configuration
|
|
28
|
+
|
|
29
|
+
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 J={command:`get-configuration`,describe:`Get pay-per-use zone configuration`,builder:q,handler:async e=>l({command:`pay-per-use zones get-configuration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({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),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.payPerUse.zones.getConfiguration({zone_id:r}));o(a,{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 pay-per-use zones set-can-be-enabled
|
|
30
|
+
|
|
31
|
+
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 X={command:`set-can-be-enabled`,describe:`Set pay-per-use zone eligibility`,builder:Y,handler:async t=>l({command:`pay-per-use zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf pay-per-use zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({zones:d(t.zones,`zones`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.payPerUse.zones.setCanBeEnabled({...e,account_id:l}));o(n,{successLabel:`Updated`});return}if(t.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=f({zones:d(t.zones,`zones`)}),m=await c(`Updating`,async()=>i.payPerUse.zones.setCanBeEnabled({...p,account_id:l}));o(m,{successLabel:`Updated`})})};function Z(e){return e.usage(`$0 pay-per-use zones update-configuration
|
|
32
|
+
|
|
33
|
+
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 Q={command:`update-configuration`,describe:`Update pay-per-use zone configuration`,builder:Z,handler:async e=>l({command:`pay-per-use zones update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({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?f({enabled:e.enabled}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.payPerUse.zones.updateConfiguration({...n,zone_id:r}));o(i,{successLabel:`Updated`});return}let a=f({enabled:e.enabled}),l=await c(`Updating`,async()=>t.payPerUse.zones.updateConfiguration({...a,zone_id:r}));o(l,{successLabel:`Updated`})})},$={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(K).command(J).command(X).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},te={command:`pay-per-use`,describe:`pay-per-use`,builder:e=>e.command(b).command(D).command(N).command(R).command(V).command(W).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{te as default};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-RlgRrmbm.mjs";function h(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 g={command:`create`,describe:`Create Pipeline`,builder:h,handler:async l=>s({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.pipelines.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Specifies the name of the Pipeline.`)),l.sql===void 0&&(l.sql=await f(`sql`,`Specifies SQL for the Pipeline processing flow.`));let m=u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)}),h=await o(`Creating`,async()=>s.pipelines.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function _(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 v={command:`delete <pipeline-id>`,describe:`Delete Pipeline`,builder:_,handler:async c=>s({command:`pipelines delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines/${c[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(c[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(c[`pipeline-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let u=await o(`Deleting`,async()=>s.pipelines.delete({account_id:l,pipeline_id:c[`pipeline-id`]}));i(u,{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 pipelines get <pipeline-id>
|
|
8
|
+
|
|
9
|
+
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 b={command:`get <pipeline-id>`,describe:`Get Pipeline Details`,builder:y,handler:async c=>s({command:`pipelines get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines/${c[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(c[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(c[`pipeline-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.pipelines.get({account_id:l,pipeline_id:c[`pipeline-id`]}));i(u,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 pipelines legacy-create
|
|
10
|
+
|
|
11
|
+
[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`}).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`]}).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store 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`]}).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.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`legacy-create`,describe:`[DEPRECATED] Create Pipeline`,builder:x,handler:async m=>s({command:`pipelines legacy-create`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},m,async()=>{if(m.dryRun){let e=await n();a({command:`cf pipelines legacy-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines`,pathParams:{},bodyKind:`json`,body:m.body===void 0?u({destination:{batch:{max_bytes:m[`destination-batch-max-bytes`],max_duration_s:m[`destination-batch-max-duration-s`],max_rows:m[`destination-batch-max-rows`]},compression:{type:d(m[`destination-compression-type`],`destination-compression-type`,`text`)},credentials:{access_key_id:d(m[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:d(m[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:d(m[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:d(m[`destination-format`],`destination-format`,`text`),path:{bucket:d(m[`destination-path-bucket`],`destination-path-bucket`,`text`),filepath:d(m[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:d(m[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:d(m[`destination-type`],`destination-type`,`text`)},name:d(m.name,`name`,`text`),source:l(m.source,`source`)}):c(m.body)});return}let s=await t(m),h=m.local?e:await r();if(m.accountId=h,m.body){let e=c(m.body),t=await o(`Creating`,async()=>s.pipelines.legacyCreate({...e,account_id:h}));i(t,{successLabel:`Created`});return}if(m[`destination-credentials-access-key-id`]===void 0&&(m[`destination-credentials-access-key-id`]=await f(`destination-credentials-access-key-id`,`Specifies the R2 Bucket Access Key Id.`)),m[`destination-credentials-endpoint`]===void 0&&(m[`destination-credentials-endpoint`]=await f(`destination-credentials-endpoint`,`Specifies the R2 Endpoint.`)),m[`destination-credentials-secret-access-key`]===void 0&&(m[`destination-credentials-secret-access-key`]=await f(`destination-credentials-secret-access-key`,`Specifies the R2 Bucket Secret Access Key.`)),m[`destination-format`]===void 0&&(m[`destination-format`]=await p(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),m[`destination-path-bucket`]===void 0&&(m[`destination-path-bucket`]=await f(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),m[`destination-type`]===void 0&&(m[`destination-type`]=await p(`destination-type`,`Specifies the type of destination.`,[`r2`])),m.name===void 0&&(m.name=await f(`name`,`Defines the name of the pipeline.`)),m.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let g=u({destination:{batch:{max_bytes:m[`destination-batch-max-bytes`],max_duration_s:m[`destination-batch-max-duration-s`],max_rows:m[`destination-batch-max-rows`]},compression:{type:d(m[`destination-compression-type`],`destination-compression-type`,`text`)},credentials:{access_key_id:d(m[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:d(m[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:d(m[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:d(m[`destination-format`],`destination-format`,`text`),path:{bucket:d(m[`destination-path-bucket`],`destination-path-bucket`,`text`),filepath:d(m[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:d(m[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:d(m[`destination-type`],`destination-type`,`text`)},name:d(m.name,`name`,`text`),source:l(m.source,`source`)}),_=await o(`Creating`,async()=>s.pipelines.legacyCreate({...g,account_id:h}));i(_,{successLabel:`Created`})})};function C(e){return e.usage(`$0 pipelines legacy-delete <pipeline-name>
|
|
12
|
+
|
|
13
|
+
[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 w={command:`legacy-delete <pipeline-name>`,describe:`[DEPRECATED] Delete Pipeline`,builder:C,handler:async c=>s({command:`pipelines legacy-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines legacy-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/${c[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(c[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(c[`pipeline-name`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
14
|
+
`);return}let u=await o(`Deleting`,async()=>s.pipelines.legacyDelete({account_id:l,pipeline_name:c[`pipeline-name`]}));i(u,{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 pipelines legacy-get <pipeline-name>
|
|
15
|
+
|
|
16
|
+
[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 E={command:`legacy-get <pipeline-name>`,describe:`[DEPRECATED] Get Pipeline`,builder:T,handler:async c=>s({command:`pipelines legacy-get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines legacy-get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/${c[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(c[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(c[`pipeline-name`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.pipelines.legacyGet({account_id:l,pipeline_name:c[`pipeline-name`]}));i(u,{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 pipelines legacy-list
|
|
17
|
+
|
|
18
|
+
[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 O={command:`legacy-list`,describe:`[DEPRECATED] List Pipelines`,builder:D,handler:async c=>s({command:`pipelines legacy-list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={search:c.search,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf pipelines legacy-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.pipelines.legacyList({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 pipelines legacy-update <pipeline-name>
|
|
19
|
+
|
|
20
|
+
[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`]}).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`]}).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store 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`]}).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.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`legacy-update <pipeline-name>`,describe:`[DEPRECATED] Update Pipeline`,builder:k,handler:async m=>s({command:`pipelines legacy-update`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},m,async()=>{if(m.dryRun){let e=await n();a({command:`cf pipelines legacy-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/${m[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(m[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(m[`pipeline-name`]??``)},bodyKind:`json`,body:m.body===void 0?u({destination:{batch:{max_bytes:m[`destination-batch-max-bytes`],max_duration_s:m[`destination-batch-max-duration-s`],max_rows:m[`destination-batch-max-rows`]},compression:{type:d(m[`destination-compression-type`],`destination-compression-type`,`text`)},credentials:{access_key_id:d(m[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:d(m[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:d(m[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:d(m[`destination-format`],`destination-format`,`text`),path:{bucket:d(m[`destination-path-bucket`],`destination-path-bucket`,`text`),filepath:d(m[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:d(m[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:d(m[`destination-type`],`destination-type`,`text`)},name:d(m.name,`name`,`text`),source:l(m.source,`source`)}):c(m.body)});return}let s=await t(m),h=m.local?e:await r();if(m.accountId=h,m.body){let e=c(m.body),t=await o(`Updating`,async()=>s.pipelines.legacyUpdate({...e,account_id:h,pipeline_name:m[`pipeline-name`]}));i(t,{successLabel:`Updated`});return}if(m[`destination-credentials-access-key-id`]===void 0&&(m[`destination-credentials-access-key-id`]=await f(`destination-credentials-access-key-id`,`Specifies the R2 Bucket Access Key Id.`)),m[`destination-credentials-endpoint`]===void 0&&(m[`destination-credentials-endpoint`]=await f(`destination-credentials-endpoint`,`Specifies the R2 Endpoint.`)),m[`destination-credentials-secret-access-key`]===void 0&&(m[`destination-credentials-secret-access-key`]=await f(`destination-credentials-secret-access-key`,`Specifies the R2 Bucket Secret Access Key.`)),m[`destination-format`]===void 0&&(m[`destination-format`]=await p(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),m[`destination-path-bucket`]===void 0&&(m[`destination-path-bucket`]=await f(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),m[`destination-type`]===void 0&&(m[`destination-type`]=await p(`destination-type`,`Specifies the type of destination.`,[`r2`])),m.name===void 0&&(m.name=await f(`name`,`Defines the name of the pipeline.`)),m.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let g=u({destination:{batch:{max_bytes:m[`destination-batch-max-bytes`],max_duration_s:m[`destination-batch-max-duration-s`],max_rows:m[`destination-batch-max-rows`]},compression:{type:d(m[`destination-compression-type`],`destination-compression-type`,`text`)},credentials:{access_key_id:d(m[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:d(m[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:d(m[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:d(m[`destination-format`],`destination-format`,`text`),path:{bucket:d(m[`destination-path-bucket`],`destination-path-bucket`,`text`),filepath:d(m[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:d(m[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:d(m[`destination-type`],`destination-type`,`text`)},name:d(m.name,`name`,`text`),source:l(m.source,`source`)}),_=await o(`Updating`,async()=>s.pipelines.legacyUpdate({...g,account_id:h,pipeline_name:m[`pipeline-name`]}));i(_,{successLabel:`Updated`})})};function j(e){return e.usage(`$0 pipelines list
|
|
21
|
+
|
|
22
|
+
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 M={command:`list`,describe:`List Pipelines`,builder:j,handler:async c=>s({command:`pipelines list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],name:c.name};if(c.dryRun){let e=await n();a({command:`cf pipelines list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.pipelines.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 pipelines sinks create
|
|
23
|
+
|
|
24
|
+
Create a new Sink.`).option(`config-account-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`config-bucket`,{type:`string`,description:`R2 Bucket to write to`}).option(`config-credentials-access-key-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`config-credentials-secret-access-key`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`config-file-naming-prefix`,{type:`string`,description:`The prefix to use in file name. i.e prefix-<uuid>.parquet`}).option(`config-file-naming-strategy`,{type:`string`,description:`Filename generation strategy.`,choices:[`serial`,`uuid`,`uuid_v7`,`ulid`]}).option(`config-file-naming-suffix`,{type:`string`,description:`This will overwrite the default file suffix. i.e .parquet, use with caution`}).option(`config-jurisdiction`,{type:`string`,description:`Jurisdiction this bucket is hosted in`}).option(`config-partitioning-time-pattern`,{type:`string`,description:`The pattern of the date string`}).option(`config-path`,{type:`string`,description:`Subpath within the bucket to write to`}).option(`config-rolling-policy-file-size-bytes`,{type:`number`,description:`Files will be rolled after reaching this number of bytes`}).option(`config-rolling-policy-inactivity-seconds`,{type:`number`,description:`Number of seconds of inactivity to wait before rolling over to a new file`}).option(`config-rolling-policy-interval-seconds`,{type:`number`,description:`Number of seconds to wait before rolling over to a new file`}).option(`config-namespace`,{type:`string`,description:`Table namespace`}).option(`config-table-name`,{type:`string`,description:`Table name`}).option(`config-token`,{type:`string`,description:`Authentication token`}).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).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`]}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).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-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`]}).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(`config-credentials-access-key-id`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-credentials-secret-access-key`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-file-naming-prefix`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-file-naming-strategy`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-file-naming-suffix`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-jurisdiction`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-partitioning-time-pattern`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-path`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-namespace`,[`config-credentials-access-key-id`,`config-credentials-secret-access-key`,`config-file-naming-prefix`,`config-file-naming-strategy`,`config-file-naming-suffix`,`config-jurisdiction`,`config-partitioning-time-pattern`,`config-path`]).conflicts(`config-table-name`,[`config-credentials-access-key-id`,`config-credentials-secret-access-key`,`config-file-naming-prefix`,`config-file-naming-strategy`,`config-file-naming-suffix`,`config-jurisdiction`,`config-partitioning-time-pattern`,`config-path`]).implies(`config-table-name`,[`config-token`]).conflicts(`config-token`,[`config-credentials-access-key-id`,`config-credentials-secret-access-key`,`config-file-naming-prefix`,`config-file-naming-strategy`,`config-file-naming-suffix`,`config-jurisdiction`,`config-partitioning-time-pattern`,`config-path`]).implies(`config-token`,[`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=>{if([`config-account-id`,`config-bucket`,`config-credentials-access-key-id`,`config-credentials-secret-access-key`,`config-file-naming-prefix`,`config-file-naming-strategy`,`config-file-naming-suffix`,`config-jurisdiction`,`config-partitioning-time-pattern`,`config-path`,`config-rolling-policy-file-size-bytes`,`config-rolling-policy-inactivity-seconds`,`config-rolling-policy-interval-seconds`,`config-namespace`,`config-table-name`,`config-token`].some(t=>e[t]!==void 0)){let t={"config-credentials-access-key-id":[`config-namespace`,`config-table-name`,`config-token`],"config-credentials-secret-access-key":[`config-namespace`,`config-table-name`,`config-token`]},n=[`config-account-id`,`config-bucket`,`config-credentials-access-key-id`,`config-credentials-secret-access-key`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0}).check(e=>{if([`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`format-row-group-bytes`].some(t=>e[t]!==void 0)){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 P={command:`create`,describe:`Create Sink`,builder:N,handler:async l=>s({command:`pipelines sinks create`,classification:{safeFlags:[`config-file-naming-strategy`,`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`schema-inferred`,`type`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines sinks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({config:{account_id:d(l[`config-account-id`],`config-account-id`,`text`),bucket:d(l[`config-bucket`],`config-bucket`,`text`),credentials:{access_key_id:d(l[`config-credentials-access-key-id`],`config-credentials-access-key-id`,`text`),secret_access_key:d(l[`config-credentials-secret-access-key`],`config-credentials-secret-access-key`,`text`)},file_naming:{prefix:d(l[`config-file-naming-prefix`],`config-file-naming-prefix`,`text`),strategy:d(l[`config-file-naming-strategy`],`config-file-naming-strategy`,`text`),suffix:d(l[`config-file-naming-suffix`],`config-file-naming-suffix`,`text`)},jurisdiction:d(l[`config-jurisdiction`],`config-jurisdiction`,`text`),partitioning:{time_pattern:d(l[`config-partitioning-time-pattern`],`config-partitioning-time-pattern`,`text`)},path:d(l[`config-path`],`config-path`,`text`),rolling_policy:{file_size_bytes:l[`config-rolling-policy-file-size-bytes`],inactivity_seconds:l[`config-rolling-policy-inactivity-seconds`],interval_seconds:l[`config-rolling-policy-interval-seconds`]},namespace:d(l[`config-namespace`],`config-namespace`,`text`),table_name:d(l[`config-table-name`],`config-table-name`,`text`),token:d(l[`config-token`],`config-token`,`text`)},format:{decimal_encoding:d(l[`format-decimal-encoding`],`format-decimal-encoding`,`text`),timestamp_format:d(l[`format-timestamp-format`],`format-timestamp-format`,`text`),unstructured:l[`format-unstructured`],compression:d(l[`format-compression`],`format-compression`,`text`),type:d(l[`format-type`],`format-type`,`text`),row_group_bytes:l[`format-row-group-bytes`]},name:d(l.name,`name`,`text`),schema:{inferred:l[`schema-inferred`]},type:d(l.type,`type`,`text`)}):c(l.body),sensitiveBodyPaths:[[`config`,`credentials`,`secret_access_key`],[`config`,`token`]]});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.pipelines.sinks.create({...e,account_id:m}));i(t,{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Defines the name of the Sink.`)),l.type===void 0&&(l.type=await p(`type`,`Specifies the type of sink.`,[`r2`,`r2_data_catalog`,`basin_catalog`]));let h=u({config:{account_id:d(l[`config-account-id`],`config-account-id`,`text`),bucket:d(l[`config-bucket`],`config-bucket`,`text`),credentials:{access_key_id:d(l[`config-credentials-access-key-id`],`config-credentials-access-key-id`,`text`),secret_access_key:d(l[`config-credentials-secret-access-key`],`config-credentials-secret-access-key`,`text`)},file_naming:{prefix:d(l[`config-file-naming-prefix`],`config-file-naming-prefix`,`text`),strategy:d(l[`config-file-naming-strategy`],`config-file-naming-strategy`,`text`),suffix:d(l[`config-file-naming-suffix`],`config-file-naming-suffix`,`text`)},jurisdiction:d(l[`config-jurisdiction`],`config-jurisdiction`,`text`),partitioning:{time_pattern:d(l[`config-partitioning-time-pattern`],`config-partitioning-time-pattern`,`text`)},path:d(l[`config-path`],`config-path`,`text`),rolling_policy:{file_size_bytes:l[`config-rolling-policy-file-size-bytes`],inactivity_seconds:l[`config-rolling-policy-inactivity-seconds`],interval_seconds:l[`config-rolling-policy-interval-seconds`]},namespace:d(l[`config-namespace`],`config-namespace`,`text`),table_name:d(l[`config-table-name`],`config-table-name`,`text`),token:d(l[`config-token`],`config-token`,`text`)},format:{decimal_encoding:d(l[`format-decimal-encoding`],`format-decimal-encoding`,`text`),timestamp_format:d(l[`format-timestamp-format`],`format-timestamp-format`,`text`),unstructured:l[`format-unstructured`],compression:d(l[`format-compression`],`format-compression`,`text`),type:d(l[`format-type`],`format-type`,`text`),row_group_bytes:l[`format-row-group-bytes`]},name:d(l.name,`name`,`text`),schema:{inferred:l[`schema-inferred`]},type:d(l.type,`type`,`text`)}),g=await o(`Creating`,async()=>s.pipelines.sinks.create({...h,account_id:m}));i(g,{successLabel:`Created`})})};function ee(e){return e.usage(`$0 pipelines sinks delete <sink-id>
|
|
25
|
+
|
|
26
|
+
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 F={command:`delete <sink-id>`,describe:`Delete Sink`,builder:ee,handler:async c=>s({command:`pipelines sinks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines sinks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks/${c[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(c[`sink-id`]))}`,pathParams:{"sink-id":String(c[`sink-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
27
|
+
`);return}let u=await o(`Deleting`,async()=>s.pipelines.sinks.delete({account_id:l,sink_id:c[`sink-id`]}));i(u,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 pipelines sinks get <sink-id>
|
|
28
|
+
|
|
29
|
+
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 L={command:`get <sink-id>`,describe:`Get Sink Details`,builder:I,handler:async c=>s({command:`pipelines sinks get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines sinks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks/${c[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(c[`sink-id`]))}`,pathParams:{"sink-id":String(c[`sink-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.pipelines.sinks.get({account_id:l,sink_id:c[`sink-id`]}));i(u,{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 pipelines sinks list
|
|
30
|
+
|
|
31
|
+
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(`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 Sinks`,builder:R,handler:async c=>s({command:`pipelines sinks list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={pipeline_id:c[`pipeline-id`],name:c.name,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf pipelines sinks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.pipelines.sinks.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},B={command:`sinks`,describe:`Destinations where pipeline data is written — R2 buckets, HTTP endpoints, or other storage`,builder:e=>e.command(P).command(F).command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 pipelines streams create
|
|
32
|
+
|
|
33
|
+
Create a new Stream.`).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).option(`format-compression`,{type:`string`,description:`The format.compression field`,choices:[`uncompressed`,`snappy`,`gzip`,`zstd`,`lz4`]}).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-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=>{if([`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`format-row-group-bytes`].some(t=>e[t]!==void 0)){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=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){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}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const H={command:`create`,describe:`Create Stream`,builder:V,handler:async l=>s({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`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({format:{decimal_encoding:d(l[`format-decimal-encoding`],`format-decimal-encoding`,`text`),timestamp_format:d(l[`format-timestamp-format`],`format-timestamp-format`,`text`),unstructured:l[`format-unstructured`],type:d(l[`format-type`],`format-type`,`text`),compression:d(l[`format-compression`],`format-compression`,`text`),row_group_bytes:l[`format-row-group-bytes`]},http:{authentication:l[`http-authentication`],cors:{origins:l[`http-cors-origins`]},enabled:l[`http-enabled`]},name:d(l.name,`name`,`text`),schema:{inferred:l[`schema-inferred`]},worker_binding:{enabled:l[`worker-binding-enabled`]}}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.pipelines.streams.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Specifies the name of the Stream.`));let m=u({format:{decimal_encoding:d(l[`format-decimal-encoding`],`format-decimal-encoding`,`text`),timestamp_format:d(l[`format-timestamp-format`],`format-timestamp-format`,`text`),unstructured:l[`format-unstructured`],type:d(l[`format-type`],`format-type`,`text`),compression:d(l[`format-compression`],`format-compression`,`text`),row_group_bytes:l[`format-row-group-bytes`]},http:{authentication:l[`http-authentication`],cors:{origins:l[`http-cors-origins`]},enabled:l[`http-enabled`]},name:d(l.name,`name`,`text`),schema:{inferred:l[`schema-inferred`]},worker_binding:{enabled:l[`worker-binding-enabled`]}}),h=await o(`Creating`,async()=>s.pipelines.streams.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function U(e){return e.usage(`$0 pipelines streams delete <stream-id>
|
|
34
|
+
|
|
35
|
+
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 W={command:`delete <stream-id>`,describe:`Delete Stream`,builder:U,handler:async c=>s({command:`pipelines streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
36
|
+
`);return}let u=await o(`Deleting`,async()=>s.pipelines.streams.delete({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Deleted`})})};function G(e){return e.usage(`$0 pipelines streams get <stream-id>
|
|
37
|
+
|
|
38
|
+
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 K={command:`get <stream-id>`,describe:`Get Stream Details`,builder:G,handler:async c=>s({command:`pipelines streams get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.pipelines.streams.get({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 pipelines streams list
|
|
39
|
+
|
|
40
|
+
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(`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 J={command:`list`,describe:`List Streams`,builder:q,handler:async c=>s({command:`pipelines streams list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={pipeline_id:c[`pipeline-id`],name:c.name,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf pipelines streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.pipelines.streams.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 pipelines streams update <stream-id>
|
|
41
|
+
|
|
42
|
+
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=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){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}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const X={command:`update <stream-id>`,describe:`Update Stream`,builder:Y,handler:async l=>s({command:`pipelines streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams/${l[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(l[`stream-id`]))}`,pathParams:{"stream-id":String(l[`stream-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({http:{authentication:l[`http-authentication`],cors:{origins:l[`http-cors-origins`]},enabled:l[`http-enabled`]},worker_binding:{enabled:l[`worker-binding-enabled`]}}):c(l.body)});return}let s=await t(l),d=l.local?e:await r();if(l.accountId=d,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.pipelines.streams.update({...e,account_id:d,stream_id:l[`stream-id`]}));i(t,{successLabel:`Updated`});return}let f=u({http:{authentication:l[`http-authentication`],cors:{origins:l[`http-cors-origins`]},enabled:l[`http-enabled`]},worker_binding:{enabled:l[`worker-binding-enabled`]}}),p=await o(`Updating`,async()=>s.pipelines.streams.update({...f,account_id:d,stream_id:l[`stream-id`]}));i(p,{successLabel:`Updated`})})},Z={command:`streams`,describe:`Inbound data streams that feed events into a pipeline for processing`,builder:e=>e.command(H).command(W).command(K).command(J).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 pipelines validate-sql
|
|
43
|
+
|
|
44
|
+
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 $={command:`validate-sql`,describe:`Validate SQL`,builder:Q,handler:async l=>s({command:`pipelines validate-sql`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines validate-sql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/validate_sql`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({sql:d(l.sql,`sql`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.pipelines.validateSql({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.sql===void 0&&(l.sql=await f(`sql`,`Specifies SQL to validate.`));let m=u({sql:d(l.sql,`sql`,`text`)}),h=await o(`Creating`,async()=>s.pipelines.validateSql({...m,account_id:p}));i(h,{successLabel:`Created`})})},te={command:`pipelines`,describe:`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,builder:e=>e.command(g).command(v).command(b).command(S).command(w).command(E).command(O).command(A).command(M).command($).command(B).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{te as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";function u(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the zone-level `default_mode` and the ordered list of `enforcement_rules`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Zone Precursor Config`,builder:u,handler:async o=>a({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.precursor.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function f(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `default_mode` sets the zone-level enforcement mode. `enforcement_rules` is the ordered list of rules that override enforcement for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all enforcement rules. - At least one of `default_mode` or `enforcement_rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `mode` must be `min-friction` or `max-security` (`off` is not a valid rule mode; use `default_mode` to disable enforcement). - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`default-mode`,{type:`string`,description:`The zone-level Precursor enforcement mode applied to requests that do
|
|
3
|
+
not match a more specific enforcement rule.
|
|
4
|
+
`,choices:[`off`,`min-friction`,`max-security`]}).option(`enforcement-rules`,{type:`string`,description:`The ordered list of enforcement rules for the zone. 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:`Raw JSON request body (bypasses individual flags)`})}const p={command:`update`,describe:`Update Zone Precursor Config`,builder:f,handler:async u=>a({command:`precursor update`,classification:{safeFlags:[`default-mode`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf precursor update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({default_mode:l(u[`default-mode`],`default-mode`,`text`),enforcement_rules:s(u[`enforcement-rules`],`enforcement-rules`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.precursor.update({body:e,zone_id:d}));n(t,{successLabel:`Updated`});return}let f=c({default_mode:l(u[`default-mode`],`default-mode`,`text`),enforcement_rules:s(u[`enforcement-rules`],`enforcement-rules`)}),p=await i(`Updating`,async()=>a.precursor.update({body:f,zone_id:d}));n(p,{successLabel:`Updated`})})},m={command:`precursor`,describe:`Precursor settings for a zone`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./dotenv-DpXaxfho.mjs";import{G as t,nt as n,q as r}from"./dist-BHEmAAHr.mjs";import{l as i,p as a}from"./interactive-BW9T1D1q.mjs";import{t as o}from"./context-q7UaYK69.mjs";import{C as s,_ as c,d as l,f as u,l as d,r as f,t as p,x as m,y as h}from"./deploy-context-Dr6bxNcB.mjs";import{t as g}from"./auth-token-pNQrX_9O.mjs";import{t as _}from"./output-BOe-3AQG.mjs";import{n as v}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{a as y,l as b,n as x,o as S,r as C,t as w}from"./containers-DeoZyeQe.mjs";import{a as T,i as E,n as D,o as O,r as k,s as A}from"./build-HmSXqjGn.mjs";import{t as j}from"./deploy-input-Cc0_2QlW.mjs";import{readBuildOutput as M}from"@cloudflare/build-output-utils";function N(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,r,i,a,o)=>P(o.quiet,async()=>{let s=/* @__PURE__ */ new Map;for(let e of Object.values(i.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&s.set(e.class_name,e.namespace_id);let c;for(let n of r){let r=s.get(n.class_name);if(r||=(c??=await h(t,a),c.find(e=>e.class===n.class_name&&e.preview?.id===i.preview_id)?.id),!r)throw Error(`Could not find a Preview Durable Object namespace for Container class "${n.class_name}".`);let l=await F(n,e,i.id,a,t,o.localImageReferences?.get(n.class_name));await d({imageRef:l,durable_object_namespace_id:r},n,t,a)}await l(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),n())})}}async function P(e,t){if(!e)return t();let n=i();a(`error`);try{return await t()}finally{a(n)}}async function F(e,t,r,i,a,o){if(o!==void 0)return s({pathToDocker:n(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let c=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(c)return m(c,r,n(),i,a);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function I(e){return e.positional(`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`,k)}function L(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 R(t){let n=t[`preview-name`],r=n??y();if(!r||!n&&r===`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:
|
|
3
|
+
|
|
4
|
+
cf previews deploy PREVIEW_NAME`);return t.prebuilt||await D(t.mode,{output:t.quiet?`silent`:`stderr`,worker:t.worker},{isPreview:!0}),e(t,()=>z(t,r))}async function z(e,n){let i=await M(process.cwd());C(i.rootConfig),O(e.mode,i.rootConfig.buildContext.mode);let a=T(i.workers,e.worker),{wranglerConfig:s,builtConfig:l}=E(a,i.rootConfig),d=await g(),m=i.rootConfig.accountId??await o({isPreview:!0,skipProjectSettings:!0,complianceRegion:r(s)}),h=p(d);b({...h,logger:{...h.logger,log:()=>{},info:()=>{}}}),c({logger:{...h.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:h.fetchResult,fetchPagedListResult:h.fetchPagedListResult});let _=new Set(Object.values(l.exports??{}).filter(x).map(({container:e})=>e)),v=i.containers?.filter(({config:e})=>_.has(e.name))??[],y=w(v,s,{accountId:m}),D=y.source;if(D?.some(e=>e.scheduling_policy===`durable_object`))throw new A(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);return D&&D.length>0&&u(m,d,t(s)),S(m,{name:n,json:!0},{workerConfig:l,rootConfig:i.rootConfig,containers:v.filter(({config:e})=>D?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:a.bundleDir?j(a,l):void 0,assets:a.assetsDir?{directory:a.assetsDir}:void 0},{...N(y),verifyContainersScope:async()=>{await f.listApplications()}})}const B={command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:I,handler:async e=>{let t=await R(e);_(L(t),{quiet:e.quiet})}},V={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(v(B,{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
function e(e,t={}){let n=!1,r,i=t.forceKillAfterMs===void 0?5e3:t.forceKillAfterMs,a=(t=`SIGTERM`)=>{e.exitCode!==null||e.signalCode!==null||n||(n=!0,e.kill(t),t!==`SIGKILL`&&i!==null&&(r=setTimeout(()=>{e.exitCode===null&&e.signalCode===null&&e.kill(`SIGKILL`)},i),r.unref()))},o=t=>{if(process.platform!==`win32`||t!==`SIGINT`){if(n){e.kill(`SIGKILL`);return}a(t)}},s=()=>o(`SIGINT`),c=()=>o(`SIGTERM`),l=()=>{r&&clearTimeout(r),process.removeListener(`SIGINT`,s),process.removeListener(`SIGTERM`,c),e.removeListener(`error`,p),e.removeListener(`exit`,m)},u,d,f=new Promise((e,t)=>{u=e,d=t}),p=e=>{l(),d(e)},m=(e,t)=>{l(),u({code:e,signal:t})};return e.exitCode!==null||e.signalCode!==null?u({code:e.exitCode,signal:e.signalCode}):(e.once(`error`,p),e.once(`exit`,m),t.forwardSignals&&(process.on(`SIGINT`,s),process.on(`SIGTERM`,c))),f.catch(()=>{}),{exited:f,get terminationRequested(){return n},terminate:a}}export{e as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./theme-
|
|
2
|
+
import{t as e}from"./theme-CQ_TYifs.mjs";import{t}from"./args-CfbYkeXd.mjs";import{n}from"./version-BdVUXLnK.mjs";import{t as r}from"./session-C1BhT1ZJ.mjs";import{a as i}from"./dist-uRuGmkMB.mjs";const a={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},o=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}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(a.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${a.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`)}},s=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function c(){return!(!e()||!process.stdout.isTTY||process.env.CF_QUIET===`1`)}async function l(e,t){if(!c())return t();r(n);let a=i({frames:[...s],indicator:`timer`,delay:80});o.setIndeterminate(),a.start(e);try{let n=await t();return o.clear(),a.stop(e),n}catch(t){throw o.clear(),a.error(e),t}}export{l as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-CQ_TYifs.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n}from"./version-BdVUXLnK.mjs";import{t as r}from"./session-C1BhT1ZJ.mjs";import{i,o as a,r as o,s,t as c}from"./dist-uRuGmkMB.mjs";import{n as l}from"./interactive-BW9T1D1q.mjs";function u(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function d(){r(n)}async function f(){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 p(e,n,r){let i=r?.kind??`text`;if(l()){if(i===`secret`){let t=await f();if(t.length>0)return t;throw Error(`--${e} is required. Pipe the value via stdin, pass --${e} <value>, or run interactively.`)}throw Error(`--${e} is required. Pass --${e} <value> or run interactively.`)}let c=`Enter value for --${e}`,u=n||r?.question||c,p=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;d();let m=i===`secret`?await o({message:u,mask:`•`,validate:p}):await a({message:u,validate:p});if(s(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function m(e,n,r,a={}){let o=u(e),c=r.map(u);if(l())throw Error(`--${o} is required (one of: ${c.join(`, `)}). Pass --${o} <value> or run interactively.`);let f=`Select value for --${o}`,p=u(n||f);d();let m=await i({message:p,options:r.map(e=>({value:e,label:u((Object.hasOwn(a,e)?a[e]:void 0)??e)}))});if(s(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function h(e,n){if(l())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);d();let r=await c({message:n||`Confirm --${e}`,initialValue:!1});if(s(r))throw new t(130,{cancelled:!0});return r===!0}async function g(e,{defaultValue:n=!0,fallbackValue:r=!0}={}){if(l())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;d();let i=await c({message:e,initialValue:n});if(s(i))throw new t(130,{cancelled:!0});return i===!0}async function _(n={}){if(n.force===!0)return!0;let r=n.message?`${n.message} Continue?`:`This permanently deletes the resource. Continue?`;if(l())return process.stderr.write(`${e.warning(`?`)} ${r}\n ${e.muted(`(non-interactive; pass --force to confirm)`)}\n`),!1;d();let i=await c({message:r,initialValue:!1});if(s(i))throw new t(130,{cancelled:!0});return i===!0}export{p as a,m as i,_ as n,u as o,h as r,g as t};
|