cf 1.0.0-beta.20 → 1.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_meta/commands.json +911 -751
- package/dist/_meta/schemas.json +401 -382
- package/dist/{abuse-reports-mKv00yPh.mjs → abuse-reports-CbUAnJxd.mjs} +1 -1
- package/dist/{access-CyRjTbhh.mjs → access-C-78DlxL.mjs} +1 -1
- package/dist/{accounts-BmF_YKvG.mjs → accounts-DEqQPxCz.mjs} +8 -15
- package/dist/{acm-BcIFiAb8.mjs → acm-jmhCq3Yh.mjs} +2 -3
- package/dist/{addressing-D6xVD7MM.mjs → addressing-BeYFpQvC.mjs} +12 -23
- package/dist/{agent-memory-Blldunhv.mjs → agent-memory-Chlovb7j.mjs} +5 -9
- package/dist/{ai-CU8tdTfC.mjs → ai-BndH3HYN.mjs} +2 -3
- package/dist/{ai-audit-Id3hq5pV.mjs → ai-audit-BUJ-70O_.mjs} +1 -1
- package/dist/{ai-gateway-BKeZ28CQ.mjs → ai-gateway-CCk7VKhL.mjs} +9 -15
- package/dist/{ai-search-DOiZEmn7.mjs → ai-search-BexET_wp.mjs} +6 -11
- package/dist/{ai-security-CioADDZi.mjs → ai-security-D4MxRlxX.mjs} +3 -5
- package/dist/{alerting-BzN1N3Se.mjs → alerting-rw8Oi3x7.mjs} +5 -9
- package/dist/{analytics-engine-CugCQfDe.mjs → analytics-engine-Bk7dQLcm.mjs} +1 -1
- package/dist/{analytics-Cte-DrzH.mjs → analytics-q-guNEOK.mjs} +1 -1
- package/dist/{api-security-CCs0g510.mjs → api-security-BDc6gkf1.mjs} +9 -17
- package/dist/{argo-BHBFZnmO.mjs → argo-CnLIqm0i.mjs} +1 -1
- package/dist/args-BAOHroBC.mjs +2 -0
- package/dist/{artifacts-BzAwvrCD.mjs → artifacts-Cil33dzV.mjs} +4 -7
- package/dist/{audit-logs-jWivEKCy.mjs → audit-logs--E2Eclb7.mjs} +1 -1
- package/dist/auth-B0lEsD_1.mjs +2 -0
- package/dist/{auth-BUQscD5b.mjs → auth-BcNLQji1.mjs} +1 -1
- package/dist/auth-BtZmY6sE.mjs +2 -0
- package/dist/{auth-token-T0aqYgl9.mjs → auth-token-aF5AVLlH.mjs} +1 -1
- package/dist/{autoconfig-CBdcYYf4.mjs → autoconfig-Dbp6J25P.mjs} +88 -88
- package/dist/{basin-catalog-_8w_4599.mjs → basin-catalog-dnVyzopm.mjs} +3 -5
- package/dist/{billing-Ce0WN0yw.mjs → billing-Fqp3jB2V.mjs} +2 -3
- package/dist/{blocks-CFAm0Ma3.mjs → blocks-BOQH-Won.mjs} +1 -1
- package/dist/{bot-management-DskcSr4B.mjs → bot-management-SEDgo1Xg.mjs} +1 -1
- package/dist/{botnet-feed-CmBm13-D.mjs → botnet-feed-DPqR4M0Y.mjs} +2 -3
- package/dist/{brand-protection-DTuFrsN0.mjs → brand-protection-B8vwKfM9.mjs} +2 -3
- package/dist/{browser-run-CXdzSOHa.mjs → browser-run-BybYDq3I.mjs} +3 -5
- package/dist/build-BqGmiORA.mjs +2 -0
- package/dist/build-CWlpWVBf.mjs +2 -0
- package/dist/{builds-_1u5Nx6f.mjs → builds-CvtOG-Gk.mjs} +8 -15
- package/dist/cache-Bme_d2Wx.mjs +36 -0
- package/dist/cf-fIBhEAxU.mjs +18 -0
- package/dist/chunk-DSGVRFIS-DHC6NOIj.mjs +2 -0
- package/dist/{chunk-2K52M2W5-iYNzknM1.mjs → chunk-XVBBSNW2-DfMyGS-l.mjs} +8 -8
- package/dist/{cli-DyhOdzMo.mjs → cli-CIKDqm-u.mjs} +3 -3
- package/dist/{client-side-security-DnnYaRsd.mjs → client-side-security-ZQeRoo1t.mjs} +2 -3
- package/dist/{cloud-connector-Ct6b6pz8.mjs → cloud-connector-BeunZlNV.mjs} +1 -1
- package/dist/{cloudflared-CHLpWU35.mjs → cloudflared-DbzoIouQ.mjs} +1 -1
- package/dist/{cloudforce-one-Rl6nCCm0.mjs → cloudforce-one-D20t9ojD.mjs} +26 -51
- package/dist/{command-BwgvUpNx.mjs → command-B3uWlw57.mjs} +1 -1
- package/dist/{command-DuLxEkGq.mjs → command-BGRucANI.mjs} +1 -1
- package/dist/{command-BONLLcyz.mjs → command-C6kE7BU0.mjs} +1 -1
- package/dist/{command-DOpykk8X.mjs → command-C9CNvZi_.mjs} +1 -1
- package/dist/{command-BRpBIju7.mjs → command-CQ5qHE7n.mjs} +1 -1
- package/dist/{command-CHGc-KZ7.mjs → command-CkZkTjIj.mjs} +1 -1
- package/dist/{command-BRXOUAGD.mjs → command-CqKRlHGv.mjs} +1 -1
- package/dist/{command-BwlIi3Bv.mjs → command-CtlD6MEi.mjs} +1 -1
- package/dist/{command-CXzje7qc.mjs → command-CzWWQv8j.mjs} +1 -1
- package/dist/{command-BMYi_gS-.mjs → command-DWWuXQV8.mjs} +1 -1
- package/dist/{command-CPDQPdss.mjs → command-DkwmylF2.mjs} +1 -1
- package/dist/{command-CMa807gY.mjs → command-MxFFWqMg.mjs} +1 -1
- package/dist/{command-BVO9UOuU.mjs → command-orlUsdgf.mjs} +1 -1
- package/dist/{command-CVoDyQnL.mjs → command-prWMAJbg.mjs} +1 -1
- package/dist/{command-0WS5I_JW.mjs → command-rUCxlpQI.mjs} +1 -1
- package/dist/command-resolution-DAQ4PWUt.mjs +2 -0
- package/dist/{completions-DMwrvK_S.mjs → completions-2Otv0HMd.mjs} +1 -1
- package/dist/{connector-interrupts-DyWilINb.mjs → connector-interrupts-Dfhxupmg.mjs} +1 -1
- package/dist/{connector-telemetry-events-BUW9qTOs.mjs → connector-telemetry-events-CLVpDTIa.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-Djs5QssR.mjs → connector-telemetry-snapshots-E_1tmNmQ.mjs} +1 -1
- package/dist/{connectors-e_cpzDEm.mjs → connectors-ChJpQFSl.mjs} +2 -3
- package/dist/{containers-CEH15JUu.mjs → containers-Cj5-9nUg.mjs} +6 -9
- package/dist/containers-CzAZfmnj.mjs +380 -0
- package/dist/{content-scan-B6Ahw9JA.mjs → content-scan-CIA_9PV8.mjs} +3 -5
- package/dist/{context-Sgba0fZP.mjs → context-DVh8Wyfs.mjs} +2 -2
- package/dist/{cps-uDD0SSJ-.mjs → cps-hJkqdsHx.mjs} +1 -1
- package/dist/{csam-scanner-BSUl7jGn.mjs → csam-scanner-cCVO3lNF.mjs} +1 -1
- package/dist/{custom-csrs-BDcXggph.mjs → custom-csrs-BrTWUZ0c.mjs} +2 -3
- package/dist/{custom-hostnames-UmIlwkwt.mjs → custom-hostnames-C4ft77oC.mjs} +4 -7
- package/dist/{custom-nameservers-D7kU6d--.mjs → custom-nameservers-BWfrZhD1.mjs} +2 -3
- package/dist/{custom-pages-CkhIQCfM.mjs → custom-pages-DqTMKtRc.mjs} +2 -3
- package/dist/{d1-myRLEAGs.mjs → d1-B58AA9PA.mjs} +3 -6
- package/dist/delegate-D7yYckA4.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BJqCpycz.mjs → deploy-CEROLAdh.mjs} +1 -1
- package/dist/deploy-context-Do89WayB.mjs +56 -0
- package/dist/{deploy-input-v2DryyLP.mjs → deploy-input-DyMuMsi5.mjs} +1 -1
- package/dist/{dev-S1PJi83q.mjs → dev-BaFS7kOM.mjs} +2 -2
- package/dist/{diagnostics-q65rcNIk.mjs → diagnostics-4gfYj7Pf.mjs} +2 -3
- package/dist/dialog-D5lus4M4.mjs +2 -0
- package/dist/discover-6kAmVMPp.mjs +2 -0
- package/dist/discover-C06Syc2B.mjs +2 -0
- package/dist/dist-BtzWfAjU.mjs +453 -0
- package/dist/dls-ClWVxTBg.mjs +16 -0
- package/dist/{dns-DhARjFQs.mjs → dns-CML-wxIt.mjs} +68 -68
- package/dist/{dns-firewall-BP6r9QG6.mjs → dns-firewall-CL0b3dJ1.mjs} +2 -3
- package/dist/{docs-CReGWDrw.mjs → docs-BeYBHwUN.mjs} +1 -1
- package/dist/{dotenv-Ck-6V1hm.mjs → dotenv-CmPRiXmU.mjs} +1 -1
- package/dist/{dry-run-BBjUQUhR.mjs → dry-run-gy0Hl9xo.mjs} +1 -1
- package/dist/{durable-objects-tOJy-5te.mjs → durable-objects-uZECeq_f.mjs} +1 -1
- package/dist/{email-auth-Bq9sq_2j.mjs → email-auth-CCNW798I.mjs} +1 -1
- package/dist/email-domains-1rD1d84O.mjs +12 -0
- package/dist/{email-routing-CYo4dp50.mjs → email-routing-CYv-LrbV.mjs} +4 -7
- package/dist/{email-security-CNtWET2d.mjs → email-security-CWEUYPYo.mjs} +16 -31
- package/dist/{email-sending-BvagNLRr.mjs → email-sending-DHSzCfJx.mjs} +3 -5
- package/dist/{errors-DpbAQQv8.mjs → errors-ol9sMqSe.mjs} +8 -8
- package/dist/{field-extractors-C9R3Qivh.mjs → field-extractors-CuBM_uO4.mjs} +2 -3
- package/dist/{firewall-DsgUY-Qv.mjs → firewall-SMIUSypF.mjs} +4 -7
- package/dist/flagship-D3v6iDdw.mjs +24 -0
- package/dist/{fraud-24l8dKyk.mjs → fraud-B2f7O15X.mjs} +1 -1
- package/dist/{google-tag-gateway-CAkudP5W.mjs → google-tag-gateway-BwOc62Gy.mjs} +1 -1
- package/dist/{gt-D6YemCLh.mjs → gt-BQkaDQDq.mjs} +1 -1
- package/dist/{healthchecks-CEGMe3lO.mjs → healthchecks-BQXHnihB.mjs} +3 -5
- package/dist/{hyperdrive-DLDaOU2O.mjs → hyperdrive-Bd6Yfje3.mjs} +2 -3
- package/dist/{iam-ChldOMSL.mjs → iam-qJPI1_aZ.mjs} +5 -9
- package/dist/{images-Ba9tS5wT.mjs → images-goHZJOxy.mjs} +6 -11
- package/dist/index.mjs +1 -1
- package/dist/init-CVx0Ya1E.mjs +43 -0
- package/dist/{intel-DbLRah4Y.mjs → intel-CwiqwJI9.mjs} +18 -21
- package/dist/interactive-CHcvofEp.mjs +2 -0
- package/dist/{interactive-d_lFnSev.mjs → interactive-D4E8PdaW.mjs} +31 -31
- package/dist/interactive-wQM7Blhm.mjs +2 -0
- package/dist/internal-5cnlw9mH.mjs +4 -0
- package/dist/{ips-BGyzyQLL.mjs → ips-KBxmXhvO.mjs} +1 -1
- package/dist/{k2-BVQ3MqEl.mjs → k2-KhIP5NFT.mjs} +2 -3
- package/dist/kv-CCem2sEY.mjs +12 -0
- package/dist/{lazy-command-D0I6itZs.mjs → lazy-command-BMhD5ffF.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dga83Qy3.mjs → leaked-credential-checks-BkPZiwE2.mjs} +3 -5
- package/dist/live-BhHzxFna.mjs +4 -0
- package/dist/{load-balancers-D9cB6of8.mjs → load-balancers-17GBXdju.mjs} +5 -9
- package/dist/local-CAs8RWYW.mjs +2 -0
- package/dist/{local-B7ZJ78al.mjs → local-CSH3UMpD.mjs} +1 -1
- package/dist/{local-runtime-DB545Gqq.mjs → local-runtime-KOFLRZeZ.mjs} +1 -1
- package/dist/log-BWdaOGOW.mjs +66 -0
- package/dist/log-DZfik9Jk.mjs +2 -0
- package/dist/login-BTiflOun.mjs +2 -0
- package/dist/login-Buhvx6Fi.mjs +5 -0
- package/dist/{logpush-Ccmr0Y_I.mjs → logpush-BCCUxa4J.mjs} +3 -5
- package/dist/{logs-CZBMuuBC.mjs → logs-4CwupKRG.mjs} +2 -3
- package/dist/{magic-cloud-networking-BwOxZVql.mjs → magic-cloud-networking-Xy6SC-V-.mjs} +4 -7
- package/dist/{magic-network-monitoring-Cx5kKdbk.mjs → magic-network-monitoring-B8pRZp2g.mjs} +3 -5
- package/dist/{magic-transit-BJwg3sVK.mjs → magic-transit-CwfO3OOX.mjs} +36 -67
- package/dist/managed-defense-CtFLuvuB.mjs +18 -0
- package/dist/{managed-transforms-C-HMtesC.mjs → managed-transforms-Hto8OCBS.mjs} +2 -3
- package/dist/{mcp-bGKgzz6F.mjs → mcp-SQ0MAVUJ.mjs} +3 -5
- package/dist/{mesh-DeQIll19.mjs → mesh-C8A6tVqA.mjs} +3 -5
- package/dist/{migrate-B6HsPeFh.mjs → migrate-Dufxsb_F.mjs} +1 -1
- package/dist/{monetization-B-TIrpA5.mjs → monetization-CYVaCAe9.mjs} +3 -5
- package/dist/{network-BrjykU-I.mjs → network-CJBTdEM3.mjs} +5 -9
- package/dist/{network-interconnects-I06kbxIl.mjs → network-interconnects-CKlNFj3i.mjs} +3 -5
- package/dist/{o11y-Ba0Fa98_.mjs → o11y-5x2Q8CWm.mjs} +8 -15
- package/dist/{oauth-BH-uQd3C.mjs → oauth-BN6_FpYp.mjs} +1 -1
- package/dist/oauth-D_A8AcIS.mjs +4 -0
- package/dist/{oauth-clients-Dd5gvDqf.mjs → oauth-clients-qKXg8ZH3.mjs} +3 -5
- package/dist/{oauth-scopes-CXpH3Syj.mjs → oauth-scopes-Ct1jDyC5.mjs} +1 -1
- package/dist/{organization-DKPqwe3j.mjs → organization-lBQSeqS1.mjs} +3 -5
- package/dist/{organizations-Cq4iy-Yr.mjs → organizations-DEX8Er3g.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DSB1sbYV.mjs → origin-post-quantum-encryption-DUsxVGCs.mjs} +1 -1
- package/dist/output-BJEgbI0G.mjs +2 -0
- package/dist/package-BqSbnt6u.mjs +2 -0
- package/dist/{page-rules-CDWTYaf7.mjs → page-rules-BMt6nt03.mjs} +2 -3
- package/dist/{pages-Dgtm51Uj.mjs → pages-Jxa92ECz.mjs} +7 -13
- package/dist/{pay-per-crawl-CHenxdhv.mjs → pay-per-crawl-Cv0044CZ.mjs} +3 -5
- package/dist/{pay-per-use-Bd5l0hBi.mjs → pay-per-use-DGEeG-dC.mjs} +2 -3
- package/dist/{pipelines-GsyD6nUM.mjs → pipelines-CEC78A3w.mjs} +5 -9
- package/dist/{precursor-mO-Zua09.mjs → precursor-Ba0Ejhzt.mjs} +1 -1
- package/dist/previews-DnZbUTym.mjs +6 -0
- package/dist/progress-CtGsPOpV.mjs +2 -0
- package/dist/prompt-YrI7ltMa.mjs +4 -0
- package/dist/{queues-D8cAr2lB.mjs → queues-Chq997uj.mjs} +6 -11
- package/dist/{r2-CJiJbG6b.mjs → r2-BFgZDs-F.mjs} +17 -33
- package/dist/{radar-PUZ_PCZ8.mjs → radar-DJdDzLJw.mjs} +1 -1
- package/dist/{raw-fetch-DSdFjojI.mjs → raw-fetch-BE3QgdTE.mjs} +1 -1
- package/dist/ready-Cok0aqke.mjs +4 -0
- package/dist/{realtime-X6uQsldp.mjs → realtime-BHWWCiKp.mjs} +10 -19
- package/dist/{registrar-BqZdUTss.mjs → registrar-9Y-1IQ0n.mjs} +1 -1
- package/dist/{registrar-sandbox-CmM3e1QN.mjs → registrar-sandbox-DTS1kRnb.mjs} +1 -1
- package/dist/{registry-D0tMkLv6.mjs → registry-Bm-GgDC3.mjs} +1 -1
- package/dist/{reporting-DFVz98Xg.mjs → reporting-D5RbKQJf.mjs} +1 -1
- package/dist/request-headers-KhW_hy36.mjs +2 -0
- package/dist/{request-tracers-BC1u2WDU.mjs → request-tracers-wxWCjmHo.mjs} +1 -1
- package/dist/{resource-sharing-CdEn5Iex.mjs → resource-sharing-BGoaVvJa.mjs} +5 -9
- package/dist/rolldown-runtime-BNtqjh-B.mjs +2 -0
- package/dist/{rules-B663VetJ.mjs → rules-Cd3EjhdF.mjs} +3 -5
- package/dist/{rulesets-p4EijVr6.mjs → rulesets-Bnz3rSBT.mjs} +4 -7
- package/dist/{rum-CHHXe4KK.mjs → rum-CK9HEe3O.mjs} +3 -5
- package/dist/run-Be6Js7D6.mjs +2 -0
- package/dist/run-DnZGQbq_.mjs +2 -0
- package/dist/sanitization-DkVWMHkc.mjs +2 -0
- package/dist/{schema-B38ojvsS.mjs → schema-DuLIZRhA.mjs} +1 -1
- package/dist/{schema-flags-z7yn0JZ_.mjs → schema-flags-BrDlFwLv.mjs} +1 -1
- package/dist/{scim-BMnUa4Oz.mjs → scim-UdqaWnOu.mjs} +3 -5
- package/dist/{secrets-store-EYrhEzVG.mjs → secrets-store-Bf5v96LC.mjs} +3 -5
- package/dist/{security-insights-C-AwDwXb.mjs → security-insights-BAGySlGu.mjs} +1 -1
- package/dist/{security-txt-CQMe8TD3.mjs → security-txt-D0fMmjHs.mjs} +2 -3
- package/dist/session-6xqrJWXy.mjs +2 -0
- package/dist/shared-DYRRG9A-.mjs +2 -0
- package/dist/signed-url-Ce0muRem.mjs +4 -0
- package/dist/{smart-shield-CHSuitaH.mjs → smart-shield-CCy7_M3j.mjs} +3 -5
- package/dist/{snippets-DGSBz4lg.mjs → snippets-Bc8m3HSV.mjs} +3 -5
- package/dist/spawn-BAEdy9kS.mjs +5 -0
- package/dist/{spectrum-59LhYG1t.mjs → spectrum-DtNX8WBX.mjs} +2 -3
- package/dist/{speed-CMCfoG3s.mjs → speed-TbkeWV_x.mjs} +3 -5
- package/dist/{sql-MxWaTDdj.mjs → sql-DI319y25.mjs} +1 -1
- package/dist/src-COwxoocl.mjs +2 -0
- package/dist/{src-J3Yss3VM.mjs → src-Dc6ojwUW.mjs} +5 -5
- package/dist/{ssl-DTTFZR9x.mjs → ssl-D0MIzFl2.mjs} +9 -17
- package/dist/startup-profile-CZYtQziF.mjs +2 -0
- package/dist/{startup-profile-bp348qmf.mjs → startup-profile-DlWrt4Fm.mjs} +5 -5
- package/dist/state-B3Uy1jPX.mjs +2 -0
- package/dist/{state-CqAtTENS.mjs → state-DazGSbRx.mjs} +1 -1
- package/dist/{stream-gVG_7si-.mjs → stream-4Mrb8HEo.mjs} +14 -27
- package/dist/tags-BP25qydR.mjs +22 -0
- package/dist/telemetry-CvZean4s.mjs +2 -0
- package/dist/telemetry-DKSJSLtq.mjs +2 -0
- package/dist/{tenant-custom-nameservers-DBmmUcxn.mjs → tenant-custom-nameservers-BzVP85Tq.mjs} +2 -3
- package/dist/{tenant-Qv_PC8gW.mjs → tenant-jmfZqEZ4.mjs} +1 -1
- package/dist/{tools-B1ajcUAF.mjs → tools-C-vmgYSv.mjs} +1 -1
- package/dist/{tunnels-CHNKPYRV.mjs → tunnels-BNswR1Dj.mjs} +4 -6
- package/dist/{turnstile-C60RxPo2.mjs → turnstile-BgsTP2fz.mjs} +2 -3
- package/dist/ui-Bo6DCvbS.mjs +2 -0
- package/dist/{update-check-BHarE3V9.mjs → update-check-BOF1hn_I.mjs} +1 -1
- package/dist/update-check-C7mfEeQ7.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-3t6Xpafi.mjs → url-normalization-Bqrs4-2F.mjs} +2 -3
- package/dist/{url-scanner-DNG__DiK.mjs → url-scanner-Dm4Fps5T.mjs} +1 -1
- package/dist/{user-B4i7OIFK.mjs → user-u_LxzLM4.mjs} +8 -15
- package/dist/{vectorize-y3PCQDDf.mjs → vectorize-DLGiOyd4.mjs} +3 -5
- package/dist/version-DmTuWNZ5.mjs +2 -0
- package/dist/{waiting-rooms-xkZLvPkT.mjs → waiting-rooms-DmgJgJXb.mjs} +4 -7
- package/dist/{web-assets-BlqHZywy.mjs → web-assets-rNhZWP-6.mjs} +7 -13
- package/dist/{web3-DGAJMcLv.mjs → web3-BVBdFt8E.mjs} +3 -5
- package/dist/{workers-cCNBx0Bc.mjs → workers-CjUKJvH8.mjs} +18 -22
- package/dist/{workers-builds-COKp3NfU.mjs → workers-builds-D3Q97l7X.mjs} +1 -1
- package/dist/{workers-for-platforms-CAtiWI_G.mjs → workers-for-platforms-C_fcw30y.mjs} +5 -9
- package/dist/{workers-vpc-ChBfXwPy.mjs → workers-vpc-CnRO3Stc.mjs} +2 -3
- package/dist/{workflows-BYhgJvyR.mjs → workflows-cpHFe5v6.mjs} +5 -9
- package/dist/{wrangler-migration-B12OR2bu.mjs → wrangler-migration-DQehjmoh.mjs} +74 -74
- package/dist/{zaraz-BW0kvRCK.mjs → zaraz-BRj0J7vK.mjs} +1 -1
- package/dist/{zero-trust-DSeWXkNV.mjs → zero-trust-CVZKDLCB.mjs} +75 -149
- package/dist/{zone-B-YJG2UA.mjs → zone-N6ccK70C.mjs} +1 -1
- package/dist/{zones-B8pqPHu8.mjs → zones-C4S_kpGz.mjs} +49 -52
- package/package.json +12 -12
- package/dist/auth-CdEGiJ5Y.mjs +0 -2
- package/dist/auth-DF_ml7rE.mjs +0 -2
- package/dist/build-BJHRK6qE.mjs +0 -2
- package/dist/build-D7s3a8zW.mjs +0 -2
- package/dist/cache-CDPUUv_O.mjs +0 -45
- package/dist/cf-3vj8dGYz.mjs +0 -18
- package/dist/chunk-DSGVRFIS-RUG6Dtqz.mjs +0 -2
- package/dist/containers-CcZHRM9g.mjs +0 -376
- package/dist/delegate-Tgfxa-MZ.mjs +0 -2
- package/dist/deploy-context-DIAl408H.mjs +0 -56
- package/dist/dialog-BnIgdgWi.mjs +0 -2
- package/dist/discover-DEjUARkU.mjs +0 -2
- package/dist/discover-P20XeGBF.mjs +0 -2
- package/dist/dist-CX6dDtzj.mjs +0 -449
- package/dist/dist-DAeCUX-u.mjs +0 -60
- package/dist/dls-CMTrCDjZ.mjs +0 -17
- package/dist/flagship-geGDHp9H.mjs +0 -28
- package/dist/init-C08hBFYn.mjs +0 -43
- package/dist/interactive-pjVqirHx.mjs +0 -2
- package/dist/kv-Cd8vbPWK.mjs +0 -15
- package/dist/local-CFZtOOxg.mjs +0 -2
- package/dist/log-CRbgNbDp.mjs +0 -3
- package/dist/login-C3Bahro9.mjs +0 -5
- package/dist/login-DvsRxI3E.mjs +0 -2
- package/dist/logo-matches-jeNkUxAq.mjs +0 -6
- package/dist/logos-pxN5aumY.mjs +0 -7
- package/dist/managed-defense-C_KLy4oB.mjs +0 -18
- package/dist/matches-DnjBnG-Y.mjs +0 -6
- package/dist/oauth-Cf3-g-kk.mjs +0 -4
- package/dist/output-CpiIVa7Q.mjs +0 -2
- package/dist/previews-oHUiD54J.mjs +0 -7
- package/dist/progress-B1dpmxCT.mjs +0 -2
- package/dist/prompt-Y5OBwDVE.mjs +0 -4
- package/dist/queries-CS0sYfte.mjs +0 -9
- package/dist/request-headers-Bg8_Idw3.mjs +0 -2
- package/dist/run-0EozpORq.mjs +0 -2
- package/dist/run-DKg70Sqf.mjs +0 -2
- package/dist/session-3DgztoAI.mjs +0 -2
- package/dist/shared-o8saqcSK.mjs +0 -2
- package/dist/source-AlTrHNem.mjs +0 -6
- package/dist/spawn-BZd__5sj.mjs +0 -10
- package/dist/startup-profile-DJsOtbVN.mjs +0 -2
- package/dist/state-Dvzl3aSj.mjs +0 -2
- package/dist/submit-wJYcQB8d.mjs +0 -4
- package/dist/tags-BwFKjaOr.mjs +0 -23
- package/dist/telemetry-BczXOpQn.mjs +0 -2
- package/dist/telemetry-CE15pfOU.mjs +0 -2
- package/dist/ui-CBhKUPys.mjs +0 -2
- package/dist/update-check-C3RhhXja.mjs +0 -2
- package/dist/url-info-By6VD20A.mjs +0 -4
- package/dist/version-izjB0Yrl.mjs +0 -2
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./lazy-command-
|
|
2
|
+
import{t as e}from"./lazy-command-BMhD5ffF.mjs";import"./api-eMuS5GI1.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-CSH3UMpD.mjs";import{i,n as a}from"./auth-BcNLQji1.mjs";import{a as o,t as s}from"./context-DVh8Wyfs.mjs";import{t as c}from"./output-BJEgbI0G.mjs";import{t as l}from"./dry-run-gy0Hl9xo.mjs";import{t as u}from"./progress-CtGsPOpV.mjs";import{t as d}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as f,r as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h,t as ee}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-YrI7ltMa.mjs";var y={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/purge_build_cache`};function te(e){return e.usage(`$0 pages build-cache purge <project-name>
|
|
3
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 ne={command:`purge <project-name>`,describe:`Purge the Pages build cache`,builder:te,handler:async e=>d({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force,message:`This operation purges the build cache for a Pages project.`})){
|
|
5
|
-
`);return}let i=await u(`Deleting`,async()=>t.send(y,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},re={command:`build-cache`,describe:`Operations for build-cache`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects`,body:`json`};function x(e){return e.usage(`$0 pages create
|
|
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 ne={command:`purge <project-name>`,describe:`Purge the Pages build cache`,builder:te,handler:async e=>d({command:`pages build-cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force,message:`This operation purges the build cache for a Pages project.`}))return;let i=await u(`Deleting`,async()=>t.send(y,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},re={command:`build-cache`,describe:`Operations for build-cache`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects`,body:`json`};function x(e){return e.usage(`$0 pages create
|
|
6
5
|
|
|
7
6
|
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-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).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-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).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-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-preview-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-preview-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-preview-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-preview-usage-model`,e=>h(e,`deployment-configs-preview-usage-model`,`text`)).option(`deployment-configs-preview-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-preview-wrangler-config-hash`,{type:`string`,description:`Hash of the Wrangler configuration used for the deployment.`}).option(`deployment-configs-production-ai-bindings`,{type:`string`,description:`Constellation bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).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-analytics-engine-datasets`,{type:`string`,description:`Analytics Engine bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-browsers`,{type:`string`,description:`Browser bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-build-image-major-version`,{type:`number`,description:`The major version of the build image to use for Pages Functions. Version 1 is retired and its projects are moved to version 3. Once a project's builds have been moved, a request that sets version 1 is rejected.`}).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-d1-databases`,{type:`string`,description:`D1 databases used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-durable-object-namespaces`,{type:`string`,description:`Durable Object namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-env-vars`,{type:`string`,description:`Environment variables used for builds and Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-fail-open`,{type:`boolean`,description:`Whether to fail open when the deployment config cannot be applied.`}).option(`deployment-configs-production-hyperdrive-bindings`,{type:`string`,description:`Hyperdrive bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-kv-namespaces`,{type:`string`,description:`KV namespaces used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-limits-cpu-ms`,{type:`number`,description:`CPU time limit in milliseconds.`}).option(`deployment-configs-production-mtls-certificates`,{type:`string`,description:`mTLS bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-placement-mode`,{type:`string`,description:`Placement mode.`}).option(`deployment-configs-production-queue-producers`,{type:`string`,description:`Queue Producer bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-r2-buckets`,{type:`string`,description:`R2 buckets used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-services`,{type:`string`,description:`Services used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).option(`deployment-configs-production-usage-model`,{type:`string`,description:`The usage model for Pages Functions.`,choices:[`standard`,`bundled`,`unbound`]}).coerce(`deployment-configs-production-usage-model`,e=>h(e,`deployment-configs-production-usage-model`,`text`)).option(`deployment-configs-production-vectorize-bindings`,{type:`string`,description:`Vectorize bindings used for Pages Functions. Provide as a JSON object or @path/to/file.json.`}).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
7
|
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
9
8
|
`}).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`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).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`]}).coerce(`source-type`,e=>h(e,`source-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if((/* @__PURE__ */ `deployment-configs-preview-ai-bindings.deployment-configs-preview-always-use-latest-compatibility-date.deployment-configs-preview-analytics-engine-datasets.deployment-configs-preview-browsers.deployment-configs-preview-build-image-major-version.deployment-configs-preview-compatibility-date.deployment-configs-preview-compatibility-flags.deployment-configs-preview-d1-databases.deployment-configs-preview-durable-object-namespaces.deployment-configs-preview-env-vars.deployment-configs-preview-fail-open.deployment-configs-preview-hyperdrive-bindings.deployment-configs-preview-kv-namespaces.deployment-configs-preview-limits-cpu-ms.deployment-configs-preview-mtls-certificates.deployment-configs-preview-placement-mode.deployment-configs-preview-queue-producers.deployment-configs-preview-r2-buckets.deployment-configs-preview-services.deployment-configs-preview-usage-model.deployment-configs-preview-vectorize-bindings.deployment-configs-preview-wrangler-config-hash.deployment-configs-production-ai-bindings.deployment-configs-production-always-use-latest-compatibility-date.deployment-configs-production-analytics-engine-datasets.deployment-configs-production-browsers.deployment-configs-production-build-image-major-version.deployment-configs-production-compatibility-date.deployment-configs-production-compatibility-flags.deployment-configs-production-d1-databases.deployment-configs-production-durable-object-namespaces.deployment-configs-production-env-vars.deployment-configs-production-fail-open.deployment-configs-production-hyperdrive-bindings.deployment-configs-production-kv-namespaces.deployment-configs-production-limits-cpu-ms.deployment-configs-production-mtls-certificates.deployment-configs-production-placement-mode.deployment-configs-production-queue-producers.deployment-configs-production-r2-buckets.deployment-configs-production-services.deployment-configs-production-usage-model.deployment-configs-production-vectorize-bindings.deployment-configs-production-wrangler-config-hash`.split(`.`)).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 S={command:`create`,describe:`Create a Cloudflare Pages project`,builder:x,handler:async e=>d({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 o();l({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?m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(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:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]):f(e.body),sensitiveBodyPaths:[[`build_config`,`web_analytics_token`]]});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(b,{body:r,account_id:n}));c(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`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 g(`production-branch`,`Production branch of the project. Used to identify production deployments.`));let i=m({build_config:{build_caching:e[`build-config-build-caching`],build_command:h(e[`build-config-build-command`],`build-config-build-command`,`text`),destination_dir:h(e[`build-config-destination-dir`],`build-config-destination-dir`,`text`),root_dir:h(e[`build-config-root-dir`],`build-config-root-dir`,`text`),web_analytics_tag:h(e[`build-config-web-analytics-tag`],`build-config-web-analytics-tag`,`text`),web_analytics_token:h(e[`build-config-web-analytics-token`],`build-config-web-analytics-token`,`text`)},deployment_configs:{preview:{ai_bindings:p(e[`deployment-configs-preview-ai-bindings`],`deployment-configs-preview-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-preview-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-preview-analytics-engine-datasets`],`deployment-configs-preview-analytics-engine-datasets`),browsers:p(e[`deployment-configs-preview-browsers`],`deployment-configs-preview-browsers`),build_image_major_version:e[`deployment-configs-preview-build-image-major-version`],compatibility_date:h(e[`deployment-configs-preview-compatibility-date`],`deployment-configs-preview-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-preview-compatibility-flags`],d1_databases:p(e[`deployment-configs-preview-d1-databases`],`deployment-configs-preview-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-preview-durable-object-namespaces`],`deployment-configs-preview-durable-object-namespaces`),env_vars:p(e[`deployment-configs-preview-env-vars`],`deployment-configs-preview-env-vars`),fail_open:e[`deployment-configs-preview-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-preview-hyperdrive-bindings`],`deployment-configs-preview-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-preview-kv-namespaces`],`deployment-configs-preview-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-preview-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-preview-mtls-certificates`],`deployment-configs-preview-mtls-certificates`),placement:{mode:h(e[`deployment-configs-preview-placement-mode`],`deployment-configs-preview-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-preview-queue-producers`],`deployment-configs-preview-queue-producers`),r2_buckets:p(e[`deployment-configs-preview-r2-buckets`],`deployment-configs-preview-r2-buckets`),services:p(e[`deployment-configs-preview-services`],`deployment-configs-preview-services`),usage_model:e[`deployment-configs-preview-usage-model`],vectorize_bindings:p(e[`deployment-configs-preview-vectorize-bindings`],`deployment-configs-preview-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-preview-wrangler-config-hash`],`deployment-configs-preview-wrangler-config-hash`,`text`)},production:{ai_bindings:p(e[`deployment-configs-production-ai-bindings`],`deployment-configs-production-ai-bindings`),always_use_latest_compatibility_date:e[`deployment-configs-production-always-use-latest-compatibility-date`],analytics_engine_datasets:p(e[`deployment-configs-production-analytics-engine-datasets`],`deployment-configs-production-analytics-engine-datasets`),browsers:p(e[`deployment-configs-production-browsers`],`deployment-configs-production-browsers`),build_image_major_version:e[`deployment-configs-production-build-image-major-version`],compatibility_date:h(e[`deployment-configs-production-compatibility-date`],`deployment-configs-production-compatibility-date`,`text`),compatibility_flags:e[`deployment-configs-production-compatibility-flags`],d1_databases:p(e[`deployment-configs-production-d1-databases`],`deployment-configs-production-d1-databases`),durable_object_namespaces:p(e[`deployment-configs-production-durable-object-namespaces`],`deployment-configs-production-durable-object-namespaces`),env_vars:p(e[`deployment-configs-production-env-vars`],`deployment-configs-production-env-vars`),fail_open:e[`deployment-configs-production-fail-open`],hyperdrive_bindings:p(e[`deployment-configs-production-hyperdrive-bindings`],`deployment-configs-production-hyperdrive-bindings`),kv_namespaces:p(e[`deployment-configs-production-kv-namespaces`],`deployment-configs-production-kv-namespaces`),limits:{cpu_ms:e[`deployment-configs-production-limits-cpu-ms`]},mtls_certificates:p(e[`deployment-configs-production-mtls-certificates`],`deployment-configs-production-mtls-certificates`),placement:{mode:h(e[`deployment-configs-production-placement-mode`],`deployment-configs-production-placement-mode`,`text`)},queue_producers:p(e[`deployment-configs-production-queue-producers`],`deployment-configs-production-queue-producers`),r2_buckets:p(e[`deployment-configs-production-r2-buckets`],`deployment-configs-production-r2-buckets`),services:p(e[`deployment-configs-production-services`],`deployment-configs-production-services`),usage_model:e[`deployment-configs-production-usage-model`],vectorize_bindings:p(e[`deployment-configs-production-vectorize-bindings`],`deployment-configs-production-vectorize-bindings`),wrangler_config_hash:h(e[`deployment-configs-production-wrangler-config-hash`],`deployment-configs-production-wrangler-config-hash`,`text`)}},name:h(e.name,`name`,`text`),production_branch:h(e[`production-branch`],`production-branch`,`text`),source:{config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(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:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e[`source-type`]}},[[`deployment_configs`,`preview`,`ai_bindings`],[`deployment_configs`,`preview`,`analytics_engine_datasets`],[`deployment_configs`,`preview`,`browsers`],[`deployment_configs`,`preview`,`d1_databases`],[`deployment_configs`,`preview`,`durable_object_namespaces`],[`deployment_configs`,`preview`,`env_vars`],[`deployment_configs`,`preview`,`hyperdrive_bindings`],[`deployment_configs`,`preview`,`kv_namespaces`],[`deployment_configs`,`preview`,`mtls_certificates`],[`deployment_configs`,`preview`,`queue_producers`],[`deployment_configs`,`preview`,`r2_buckets`],[`deployment_configs`,`preview`,`services`],[`deployment_configs`,`preview`,`vectorize_bindings`],[`deployment_configs`,`production`,`ai_bindings`],[`deployment_configs`,`production`,`analytics_engine_datasets`],[`deployment_configs`,`production`,`browsers`],[`deployment_configs`,`production`,`d1_databases`],[`deployment_configs`,`production`,`durable_object_namespaces`],[`deployment_configs`,`production`,`env_vars`],[`deployment_configs`,`production`,`hyperdrive_bindings`],[`deployment_configs`,`production`,`kv_namespaces`],[`deployment_configs`,`production`,`mtls_certificates`],[`deployment_configs`,`production`,`queue_producers`],[`deployment_configs`,`production`,`r2_buckets`],[`deployment_configs`,`production`,`services`],[`deployment_configs`,`production`,`vectorize_bindings`]]),d=await u(`Creating`,async()=>t.send(b,{body:i,account_id:n}));c(d,{successLabel:`Created`})})};var C={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}`};function w(e){return e.usage(`$0 pages delete <project-name>
|
|
10
9
|
|
|
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 T={command:`delete <project-name>`,describe:`Delete a Cloudflare Pages project`,builder:w,handler:async e=>d({command:`pages delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force})){
|
|
12
|
-
`);return}let i=await u(`Deleting`,async()=>t.send(C,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})};var E={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments`,pathParams:[`account_id`,`project_name`],body:`form`};function D(e){return e.usage(`$0 pages deployments create <project-name>
|
|
10
|
+
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 T={command:`delete <project-name>`,describe:`Delete a Cloudflare Pages project`,builder:w,handler:async e=>d({command:`pages delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(C,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})};var E={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments`,pathParams:[`account_id`,`project_name`],body:`form`};function D(e){return e.usage(`$0 pages deployments create <project-name>
|
|
13
11
|
|
|
14
12
|
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 O={command:`create <project-name>`,describe:`Create a Pages deployment`,builder:D,handler:async e=>d({command:`pages deployments create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,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 r=new FormData;if(e.file){let t=ee(e.file);r.append(`_headers`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&r.append(`_headers`,e.body);e.branch!==void 0&&r.append(`branch`,String(h(e.branch,`branch`,`text`)??``)),e[`commit-dirty`]!==void 0&&r.append(`commit_dirty`,String(h(e[`commit-dirty`],`commit-dirty`,`text`)??``)),e[`commit-hash`]!==void 0&&r.append(`commit_hash`,String(h(e[`commit-hash`],`commit-hash`,`text`)??``)),e[`commit-message`]!==void 0&&r.append(`commit_message`,String(h(e[`commit-message`],`commit-message`,`text`)??``)),e.manifest!==void 0&&r.append(`manifest`,String(h(e.manifest,`manifest`,`text`)??``)),e[`pages-build-output-dir`]!==void 0&&r.append(`pages_build_output_dir`,String(h(e[`pages-build-output-dir`],`pages-build-output-dir`,`text`)??``)),e[`wrangler-config-hash`]!==void 0&&r.append(`wrangler_config_hash`,String(h(e[`wrangler-config-hash`],`wrangler-config-hash`,`text`)??``));let a=await u(`Creating`,async()=>i(t,`POST`,`/accounts/${n}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:r}));c(a,{successLabel:`Created`});return}if(e.body){let r=h(e.body,`body`,`binary`),a=await u(`Creating`,async()=>i(t,`POST`,`/accounts/${n}/pages/projects/${encodeURIComponent(String(e[`project-name`]))}/deployments`,{body:r,headers:{"Content-Type":`multipart/form-data`}}));c(a,{successLabel:`Created`});return}let d=await u(`Creating`,async()=>t.send(E,{account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var k={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}`,query:[`force`]};function A(e){return e.usage(`$0 pages deployments delete <deployment-id>
|
|
15
13
|
|
|
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 j={command:`delete <deployment-id>`,describe:`Delete a Pages deployment`,builder:A,handler:async e=>d({command:`pages deployments delete`,classification:{safeFlags:[`allow-aliased`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`allow-aliased`]};if(e.dryRun){let n=await o();l({command:`cf pages deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();if(e.accountId=i,!await v({force:!!e.force})){
|
|
17
|
-
`);return}let d=await u(`Deleting`,async()=>n.send(k,{account_id:i,project_name:e[`project-name`],deployment_id:e[`deployment-id`],...t}));c(d,{successLabel:`Deleted`})})};var M={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}`};function N(e){return e.usage(`$0 pages deployments get <deployment-id>
|
|
14
|
+
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 j={command:`delete <deployment-id>`,describe:`Delete a Pages deployment`,builder:A,handler:async e=>d({command:`pages deployments delete`,classification:{safeFlags:[`allow-aliased`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`allow-aliased`]};if(e.dryRun){let n=await o();l({command:`cf pages deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=e.local?r:await s();if(e.accountId=i,!await v({force:!!e.force}))return;let d=await u(`Deleting`,async()=>n.send(k,{account_id:i,project_name:e[`project-name`],deployment_id:e[`deployment-id`],...t}));c(d,{successLabel:`Deleted`})})};var M={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}`};function N(e){return e.usage(`$0 pages deployments get <deployment-id>
|
|
18
15
|
|
|
19
16
|
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 P={command:`get <deployment-id>`,describe:`Get a Pages deployment`,builder:N,handler:async e=>d({command:`pages deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(M,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Loaded`})})};var F={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/history/logs`};function I(e){return e.usage(`$0 pages deployments history logs get <deployment-id>
|
|
20
17
|
|
|
@@ -24,13 +21,11 @@ List the production or preview deployments for a Cloudflare Pages project.`).opt
|
|
|
24
21
|
|
|
25
22
|
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 G={command:`retry <deployment-id>`,describe:`Retry a Pages deployment`,builder:W,handler:async e=>d({command:`pages deployments retry`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Creating`,async()=>t.send(U,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Created`})})};var K={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/deployments/${e.deployment_id}/rollback`};function q(e){return e.usage(`$0 pages deployments rollback <deployment-id>
|
|
26
23
|
|
|
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 J={command:`rollback <deployment-id>`,describe:`Roll back a Pages deployment`,builder:q,handler:async e=>d({command:`pages deployments rollback`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force,message:`This operation rolls back the production deployment to an earlier deployment.`})){
|
|
28
|
-
`);return}let i=await u(`Deleting`,async()=>t.send(K,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Deleted`})})},Y={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(O).command(j).command(P).command(H).command(G).command(J).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains`,body:`json`};function ie(e){return e.usage(`$0 pages domains create <project-name>
|
|
24
|
+
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 J={command:`rollback <deployment-id>`,describe:`Roll back a Pages deployment`,builder:q,handler:async e=>d({command:`pages deployments rollback`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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:{"project-name":String(e[`project-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force,message:`This operation rolls back the production deployment to an earlier deployment.`}))return;let i=await u(`Deleting`,async()=>t.send(K,{account_id:n,project_name:e[`project-name`],deployment_id:e[`deployment-id`]}));c(i,{successLabel:`Deleted`})})},Y={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(O).command(j).command(P).command(H).command(G).command(J).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains`,body:`json`};function ie(e){return e.usage(`$0 pages domains create <project-name>
|
|
29
25
|
|
|
30
26
|
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 ae={command:`create <project-name>`,describe:`Add a Pages custom domain`,builder:ie,handler:async e=>d({command:`pages domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({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?m({name:h(e.name,`name`,`text`)}):f(e.body)});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(X,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,"Fully qualified domain name for the Pages project, such as `example.com`."));let i=m({name:h(e.name,`name`,`text`)}),d=await u(`Creating`,async()=>t.send(X,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var oe={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function se(e){return e.usage(`$0 pages domains delete <domain-name>
|
|
31
27
|
|
|
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 ce={command:`delete <domain-name>`,describe:`Delete a Pages custom domain`,builder:se,handler:async e=>d({command:`pages domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force})){
|
|
33
|
-
`);return}let i=await u(`Deleting`,async()=>t.send(oe,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Deleted`})})};var le={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function ue(e){return e.usage(`$0 pages domains get <domain-name>
|
|
28
|
+
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 ce={command:`delete <domain-name>`,describe:`Delete a Pages custom domain`,builder:se,handler:async e=>d({command:`pages domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(oe,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Deleted`})})};var le={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains/${e.domain_name}`};function ue(e){return e.usage(`$0 pages domains get <domain-name>
|
|
34
29
|
|
|
35
30
|
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 de={command:`get <domain-name>`,describe:`Get a Pages custom domain`,builder:ue,handler:async e=>d({command:`pages domains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();l({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:{"project-name":String(e[`project-name`]??``),"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?r:await s();e.accountId=n;let i=await u(`Loading`,async()=>t.send(le,{account_id:n,project_name:e[`project-name`],domain_name:e[`domain-name`]}));c(i,{successLabel:`Loaded`})})};var fe={method:`GET`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/domains`};function pe(e){return e.usage(`$0 pages domains list
|
|
36
31
|
|
|
@@ -50,5 +45,4 @@ Connect a GitHub or GitLab repository to a Cloudflare Pages project to enable Gi
|
|
|
50
45
|
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
51
46
|
`}).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`]}).coerce(`source-config-preview-deployment-setting`,e=>h(e,`source-config-preview-deployment-setting`,`text`)).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`]}).coerce(`type`,e=>h(e,`type`,`text`)).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 Oe={command:`connect <project-name>`,describe:`Connect a Git repository`,builder:$,handler:async e=>d({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 o();l({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?m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(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:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}):f(e.body)});return}let t=await a(e),n=e.local?r:await s();if(e.accountId=n,e.body){let r=f(e.body),i=await u(`Creating`,async()=>t.send(Q,{body:r,account_id:n,project_name:e[`project-name`]}));c(i,{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 g(`source-config-owner`,`The owner of the repository.`)),e[`source-config-owner-id`]===void 0&&(e[`source-config-owner-id`]=await g(`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 _(`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 g(`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 g(`source-config-repo-id`,`The ID of the repository.`)),e[`source-config-repo-name`]===void 0&&(e[`source-config-repo-name`]=await g(`source-config-repo-name`,`The name of the repository.`)),e.type===void 0&&(e.type=await _(`type`,`The source control management provider.`,[`github`,`gitlab`]));let i=m({config:{deployments_enabled:e[`source-config-deployments-enabled`],owner:h(e[`source-config-owner`],`source-config-owner`,`text`),owner_id:h(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:e[`source-config-preview-deployment-setting`],production_branch:h(e[`source-config-production-branch`],`source-config-production-branch`,`text`),production_deployments_enabled:e[`source-config-production-deployments-enabled`],repo_id:h(e[`source-config-repo-id`],`source-config-repo-id`,`text`),repo_name:h(e[`source-config-repo-name`],`source-config-repo-name`,`text`)},type:e.type}),d=await u(`Creating`,async()=>t.send(Q,{body:i,account_id:n,project_name:e[`project-name`]}));c(d,{successLabel:`Created`})})};var ke={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/pages/projects/${e.project_name}/source`};function Ae(e){return e.usage(`$0 pages source disconnect <project-name>
|
|
52
47
|
|
|
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 je={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:Ae,handler:async e=>d({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force})){
|
|
54
|
-
`);return}let i=await u(`Deleting`,async()=>t.send(ke,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},Me={command:`source`,describe:`Operations for source`,builder:e=>e.command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-BRXOUAGD.mjs`),{command:`pages deploy`,recordArgs:!1});const Pe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(S).command(T).command(n(Ne,`preview`)).command(xe).command(we).command(De).command(re).command(Y).command(ye).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
|
|
48
|
+
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 je={command:`disconnect <project-name>`,describe:`Disconnect a Git repository`,builder:Ae,handler:async e=>d({command:`pages source disconnect`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();l({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 t=await a(e),n=e.local?r:await s();if(e.accountId=n,!await v({force:!!e.force}))return;let i=await u(`Deleting`,async()=>t.send(ke,{account_id:n,project_name:e[`project-name`]}));c(i,{successLabel:`Deleted`})})},Me={command:`source`,describe:`Operations for source`,builder:e=>e.command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne=e(`deploy [directory]`,`Deploy a directory of static assets as a Pages deployment`,()=>import(`./command-CqKRlHGv.mjs`),{command:`pages deploy`,recordArgs:!1});const Pe={command:`pages`,describe:`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,builder:e=>e.command(S).command(T).command(n(Ne,`preview`)).command(xe).command(we).command(De).command(re).command(Y).command(ye).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./prompt-YrI7ltMa.mjs";var h={method:`POST`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function ee(e){return e.usage(`$0 pay-per-crawl config create
|
|
3
3
|
|
|
4
4
|
Creates the pay-per-crawl config for a zone.`).option(`bot-overrides`,{type:`string`,description:`The bot_overrides field. Provide as a JSON object or @path/to/file.json.`}).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 g={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:ee,handler:async e=>l({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({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?p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`,!0),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]):d(e.body,[{path:[`bot_overrides`],flag:`bot-overrides`}])});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body,[{path:[`bot_overrides`],flag:`bot-overrides`}]),i=await c(`Creating`,async()=>t.send(h,{body:n,zone_id:r}));o(i,{successLabel:`Created`});return}if(e[`bot-overrides`]===void 0)throw Error(`--bot-overrides is required (or pass --body with this field set).`);if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let a=p({bot_overrides:f(e[`bot-overrides`],`bot-overrides`,!0),enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]},[[`bot_overrides`]]),l=await c(`Creating`,async()=>t.send(h,{body:a,zone_id:r}));o(l,{successLabel:`Created`})})};var _={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/pay-per-crawl/configuration`,body:`json`,errors:{400:`BadRequestError`}};function te(e){return e.usage(`$0 pay-per-crawl config edit
|
|
5
5
|
|
|
@@ -9,8 +9,7 @@ Gets the pay-per-crawl config for a zone including the bot configuration.`).opti
|
|
|
9
9
|
|
|
10
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 w={command:`create`,describe:`Creates the stripe config for a crawler`,builder:C,handler:async e=>l({command:`pay-per-crawl crawler stripe create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({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 i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>i.send(S,{account_id:l}));o(u,{successLabel:`Created`})})};var T={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawler/stripe`,errors:{400:`BadRequestError`}};function E(e){return e.usage(`$0 pay-per-crawl crawler stripe delete
|
|
11
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 D={command:`delete`,describe:`Deletes the stripe config for a crawler`,builder:E,handler:async e=>l({command:`pay-per-crawl crawler stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();s({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 i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await m({force:!!e.force})){
|
|
13
|
-
`);return}let u=await c(`Deleting`,async()=>i.send(T,{account_id:l}));o(u,{successLabel:`Deleted`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawler/stripe`,errors:{400:`BadRequestError`}};function k(e){return e.usage(`$0 pay-per-crawl crawler stripe get
|
|
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 D={command:`delete`,describe:`Deletes the stripe config for a crawler`,builder:E,handler:async e=>l({command:`pay-per-crawl crawler stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();s({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 i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await m({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(T,{account_id:l}));o(u,{successLabel:`Deleted`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawler/stripe`,errors:{400:`BadRequestError`}};function k(e){return e.usage(`$0 pay-per-crawl crawler stripe get
|
|
14
13
|
|
|
15
14
|
Gets the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get`,describe:`Gets the stripe config for a crawler`,builder:k,handler:async e=>l({command:`pay-per-crawl crawler stripe get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({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 i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(O,{account_id:l}));o(u,{successLabel:`Loaded`})})},j={command:`stripe`,describe:`Operations for crawler.stripe`,builder:e=>e.command(w).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`crawler`,describe:`Operations for crawler`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/crawlers`,errors:{400:`BadRequestError`}};function P(e){return e.usage(`$0 pay-per-crawl crawlers list
|
|
16
15
|
|
|
@@ -18,8 +17,7 @@ Lists the crawlers known to pay-per-crawl.`).option(`dry-run`,{type:`boolean`,de
|
|
|
18
17
|
|
|
19
18
|
Creates the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`create`,describe:`Creates the stripe config for a publisher`,builder:R,handler:async e=>l({command:`pay-per-crawl publisher stripe create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({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 i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>i.send(L,{account_id:l}));o(u,{successLabel:`Created`})})};var B={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/publisher/stripe`,errors:{400:`BadRequestError`}};function V(e){return e.usage(`$0 pay-per-crawl publisher stripe delete
|
|
20
19
|
|
|
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 H={command:`delete`,describe:`Deletes the stripe config for a publisher`,builder:V,handler:async e=>l({command:`pay-per-crawl publisher stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();s({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 i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await m({force:!!e.force})){
|
|
22
|
-
`);return}let u=await c(`Deleting`,async()=>i.send(B,{account_id:l}));o(u,{successLabel:`Deleted`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/publisher/stripe`,errors:{400:`BadRequestError`}};function W(e){return e.usage(`$0 pay-per-crawl publisher stripe get
|
|
20
|
+
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 H={command:`delete`,describe:`Deletes the stripe config for a publisher`,builder:V,handler:async e=>l({command:`pay-per-crawl publisher stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await r();s({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 i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await m({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(B,{account_id:l}));o(u,{successLabel:`Deleted`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/publisher/stripe`,errors:{400:`BadRequestError`}};function W(e){return e.usage(`$0 pay-per-crawl publisher stripe get
|
|
23
21
|
|
|
24
22
|
Gets the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get`,describe:`Gets the stripe config for a publisher`,builder:W,handler:async e=>l({command:`pay-per-crawl publisher stripe get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({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 i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(U,{account_id:l}));o(u,{successLabel:`Loaded`})})},K={command:`stripe`,describe:`Operations for publisher.stripe`,builder:e=>e.command(z).command(H).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},q={command:`publisher`,describe:`Operations for publisher`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-crawl/signature_link`,errors:{400:`BadRequestError`}};function Y(e){return e.usage(`$0 pay-per-crawl terms get-signature-link
|
|
25
23
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,i as a,t as o}from"./context-DVh8Wyfs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-CtGsPOpV.mjs";import{t as u}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-YrI7ltMa.mjs";var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/enabled-domains`,query:[`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ee(e){return e.usage(`$0 pay-per-use enabled-domains list
|
|
3
3
|
|
|
4
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 te={command:`list`,describe:`List enabled Pay Per Use domains`,builder:ee,handler:async e=>u({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({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:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(y,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ne={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/pay-per-use/operator/configuration`,errors:{403:`ForbiddenError`,404:`NotFoundError`}};function x(e){return e.usage(`$0 pay-per-use operator get-configuration
|
|
5
5
|
|
|
@@ -11,8 +11,7 @@ Updates one or more fields of an existing pay-per-use operator configuration. Re
|
|
|
11
11
|
|
|
12
12
|
Lists a paginated set of enabled pay-per-use operators with verified names, matching billing classification, and their prices for a zone.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list-operators`,describe:`List pay-per-use operators`,builder:j,handler:async e=>u({command:`pay-per-use pricing list-operators`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){c({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 n=await r(e),i=await a({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let o=await l(`Loading`,async()=>n.send(A,{zone_id:i,...t}));s(o,{successLabel:`Loaded`})})};var N={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/pay-per-use/operators/${t.operator_id}/price`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 pay-per-use pricing opt-out-operator-price <operator-id>
|
|
13
13
|
|
|
14
|
-
Opts a zone out by scheduling the current accepted pay-per-use operator price to expire at the start of the next UTC month. Use the withdraw action for a pending proposal.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`opt-out-operator-price <operator-id>`,describe:`Opt out of a pay-per-use operator price`,builder:P,handler:async e=>u({command:`pay-per-use pricing opt-out-operator-price`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({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 r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await v({force:!!e.force})){
|
|
15
|
-
`);return}let i=await l(`Deleting`,async()=>t.send(N,{zone_id:n,operator_id:e[`operator-id`]}));s(i,{successLabel:`Deleted`})})};var I={method:`POST`,path:t=>e`/zones/${t.zone_id}/pay-per-use/operators/${t.operator_id}/price`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function L(e){return e.usage(`$0 pay-per-use pricing set-operator-price <operator-id>
|
|
14
|
+
Opts a zone out by scheduling the current accepted pay-per-use operator price to expire at the start of the next UTC month. Use the withdraw action for a pending proposal.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`opt-out-operator-price <operator-id>`,describe:`Opt out of a pay-per-use operator price`,builder:P,handler:async e=>u({command:`pay-per-use pricing opt-out-operator-price`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({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 r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await v({force:!!e.force}))return;let i=await l(`Deleting`,async()=>t.send(N,{zone_id:n,operator_id:e[`operator-id`]}));s(i,{successLabel:`Deleted`})})};var I={method:`POST`,path:t=>e`/zones/${t.zone_id}/pay-per-use/operators/${t.operator_id}/price`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function L(e){return e.usage(`$0 pay-per-use pricing set-operator-price <operator-id>
|
|
16
15
|
|
|
17
16
|
Proposes a required price, withdraws a pending proposal, accepts an operator's default pay-per-use price, or resumes an accepted price before its scheduled expiry. Propose, accept_default, and resume require an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`action`,{type:`string`,description:`The action field`,choices:[`propose`,`withdraw`,`accept_default`,`resume`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use publisher price action`})}const R={command:`set-operator-price <operator-id>`,describe:`Set a pay-per-use operator price`,builder:L,handler:async e=>u({command:`pay-per-use pricing set-operator-price`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf pay-per-use pricing set-operator-price`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({action:e.action,price_usd_microcents:e[`price-usd-microcents`]}):f(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=f(e.body),i=await l(`Creating`,async()=>t.send(I,{body:r,zone_id:n,operator_id:e[`operator-id`]}));s(i,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await _(`action`,`The action field`,[`propose`,`withdraw`,`accept_default`,`resume`])),e.action===`propose`&&e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let i=p({action:e.action,price_usd_microcents:e[`price-usd-microcents`]}),o=await l(`Creating`,async()=>t.send(I,{body:i,zone_id:n,operator_id:e[`operator-id`]}));s(o,{successLabel:`Created`})})},z={command:`pricing`,describe:`Operations for pricing`,builder:e=>e.command(M).command(F).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/pay-per-use/proposals`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function V(e){return e.usage(`$0 pay-per-use proposals decide
|
|
18
17
|
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-YrI7ltMa.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines`,body:`json`};function _(e){return e.usage(`$0 pipelines create
|
|
3
3
|
|
|
4
4
|
Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create Pipeline`,builder:_,handler:async e=>c({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(g,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Pipeline.`)),e.sql===void 0&&(e.sql=await p(`sql`,`Specifies SQL for the Pipeline processing flow.`));let m=d({name:f(e.name,`name`,`text`),sql:f(e.sql,`sql`,`text`)}),h=await s(`Creating`,async()=>c.send(g,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function b(e){return e.usage(`$0 pipelines delete <pipeline-id>
|
|
5
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 ee={command:`delete <pipeline-id>`,describe:`Delete Pipeline`,builder:b,handler:async e=>c({command:`pipelines delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines/${e[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(e[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(e[`pipeline-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force})){
|
|
7
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(y,{account_id:l,pipeline_id:e[`pipeline-id`]}));a(u,{successLabel:`Deleted`})})};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function ne(e){return e.usage(`$0 pipelines get <pipeline-id>
|
|
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 ee={command:`delete <pipeline-id>`,describe:`Delete Pipeline`,builder:b,handler:async e=>c({command:`pipelines delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines/${e[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(e[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(e[`pipeline-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(y,{account_id:l,pipeline_id:e[`pipeline-id`]}));a(u,{successLabel:`Deleted`})})};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/pipelines/${t.pipeline_id}`};function ne(e){return e.usage(`$0 pipelines get <pipeline-id>
|
|
8
7
|
|
|
9
8
|
Get Pipeline details.`).positional(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <pipeline-id>`,describe:`Get Pipeline Details`,builder:ne,handler:async e=>c({command:`pipelines get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/pipelines/${e[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(e[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(e[`pipeline-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(te,{account_id:l,pipeline_id:e[`pipeline-id`]}));a(u,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/pipelines`,body:`json`};function S(e){return e.usage(`$0 pipelines legacy-create
|
|
10
9
|
|
|
11
10
|
[DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`,default:1e8}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`,default:300}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`,default:1e7}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`],default:`gzip`}).coerce(`destination-compression-type`,e=>f(e,`destination-compression-type`,`text`)).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).coerce(`destination-format`,e=>f(e,`destination-format`,`text`)).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filename`,{type:`string`,description:`Specifies the name pattern to for individual data files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`legacy-create`,describe:`[DEPRECATED] Create Pipeline`,builder:S,handler:async e=>c({command:`pipelines legacy-create`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}):u(e.body)});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(x,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}if(e[`destination-credentials-access-key-id`]===void 0&&(e[`destination-credentials-access-key-id`]=await p(`destination-credentials-access-key-id`,`Specifies the R2 Bucket Access Key Id.`)),e[`destination-credentials-endpoint`]===void 0&&(e[`destination-credentials-endpoint`]=await p(`destination-credentials-endpoint`,`Specifies the R2 Endpoint.`)),e[`destination-credentials-secret-access-key`]===void 0&&(e[`destination-credentials-secret-access-key`]=await p(`destination-credentials-secret-access-key`,`Specifies the R2 Bucket Secret Access Key.`)),e[`destination-format`]===void 0&&(e[`destination-format`]=await m(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),e[`destination-path-bucket`]===void 0&&(e[`destination-path-bucket`]=await p(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),e[`destination-type`]===void 0&&(e[`destination-type`]=await m(`destination-type`,`Specifies the type of destination.`,[`r2`])),e.name===void 0&&(e.name=await p(`name`,`Defines the name of the pipeline.`)),e.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let g=d({destination:{batch:{max_bytes:e[`destination-batch-max-bytes`],max_duration_s:e[`destination-batch-max-duration-s`],max_rows:e[`destination-batch-max-rows`]},compression:{type:e[`destination-compression-type`]},credentials:{access_key_id:f(e[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:f(e[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:f(e[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:e[`destination-format`],path:{bucket:f(e[`destination-path-bucket`],`destination-path-bucket`,`text`),filename:f(e[`destination-path-filename`],`destination-path-filename`,`text`),filepath:f(e[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:f(e[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:e[`destination-type`]},name:f(e.name,`name`,`text`),source:l(e.source,`source`)}),_=await s(`Creating`,async()=>c.send(x,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,response:!1};function T(e){return e.usage(`$0 pipelines legacy-delete <pipeline-name>
|
|
12
11
|
|
|
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 E={command:`legacy-delete <pipeline-name>`,describe:`[DEPRECATED] Delete Pipeline`,builder:T,handler:async e=>c({command:`pipelines legacy-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force})){
|
|
14
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(w,{account_id:l,pipeline_name:e[`pipeline-name`]}));a(u,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,errors:{404:`NotFoundError`}};function O(e){return e.usage(`$0 pipelines legacy-get <pipeline-name>
|
|
12
|
+
[DEPRECATED] Delete a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`legacy-delete <pipeline-name>`,describe:`[DEPRECATED] Delete Pipeline`,builder:T,handler:async e=>c({command:`pipelines legacy-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(w,{account_id:l,pipeline_name:e[`pipeline-name`]}));a(u,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/${t.pipeline_name}`,errors:{404:`NotFoundError`}};function O(e){return e.usage(`$0 pipelines legacy-get <pipeline-name>
|
|
15
13
|
|
|
16
14
|
[DEPRECATED] Get configuration of a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`legacy-get <pipeline-name>`,describe:`[DEPRECATED] Get Pipeline`,builder:O,handler:async e=>c({command:`pipelines legacy-get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines legacy-get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/${e[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(e[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(e[`pipeline-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l,pipeline_name:e[`pipeline-name`]}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines`,query:[`search`,`page`,`per_page`]};function j(e){return e.usage(`$0 pipelines legacy-list
|
|
17
15
|
|
|
@@ -23,8 +21,7 @@ List/Filter Pipelines in Account.`).option(`page`,{type:`number`,description:`Pa
|
|
|
23
21
|
|
|
24
22
|
Create a new Sink.`).option(`sink-config-account-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-bucket`,{type:`string`,description:`R2 Bucket to write to`}).option(`sink-config-credentials-access-key-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-credentials-secret-access-key`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`sink-config-file-naming-prefix`,{type:`string`,description:`The prefix to use in file name. i.e prefix-<uuid>.parquet`}).option(`sink-config-file-naming-strategy`,{type:`string`,description:`Filename generation strategy.`,choices:[`serial`,`uuid`,`uuid_v7`,`ulid`]}).coerce(`sink-config-file-naming-strategy`,e=>f(e,`sink-config-file-naming-strategy`,`text`)).option(`sink-config-file-naming-suffix`,{type:`string`,description:`This will overwrite the default file suffix. i.e .parquet, use with caution`}).option(`sink-config-jurisdiction`,{type:`string`,description:`Jurisdiction this bucket is hosted in`}).option(`sink-config-partitioning-time-pattern`,{type:`string`,description:`The pattern of the date string`}).option(`sink-config-path`,{type:`string`,description:`Subpath within the bucket to write to`}).option(`sink-config-rolling-policy-file-size-bytes`,{type:`number`,description:`Files will be rolled after reaching this number of bytes`}).option(`sink-config-rolling-policy-inactivity-seconds`,{type:`number`,description:`Number of seconds of inactivity to wait before rolling over to a new file`}).option(`sink-config-rolling-policy-interval-seconds`,{type:`number`,description:`Number of seconds to wait before rolling over to a new file`}).option(`sink-config-namespace`,{type:`string`,description:`Table namespace`}).option(`sink-config-table-name`,{type:`string`,description:`Table name`}).option(`sink-config-token`,{type:`string`,description:`Authentication token`}).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-compression`,{type:`string`,description:`Specifies the compression applied to JSON sink output.`,choices:[`uncompressed`,`gzip`,`snappy`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`name`,{type:`string`,description:`Defines the name of the Sink.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`type`,{type:`string`,description:`Specifies the type of sink.`,choices:[`r2`,`r2_data_catalog`,`basin_catalog`]}).coerce(`type`,e=>f(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`sink-config-credentials-access-key-id`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-credentials-secret-access-key`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-file-naming-prefix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-file-naming-strategy`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-file-naming-suffix`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-jurisdiction`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-partitioning-time-pattern`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-path`,[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]).conflicts(`sink-config-namespace`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).conflicts(`sink-config-table-name`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-table-name`,[`sink-config-token`]).conflicts(`sink-config-token`,[`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`]).implies(`sink-config-token`,[`sink-config-table-name`]).conflicts(`format-decimal-encoding`,[`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-row-group-bytes`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{if([`sink-config-account-id`,`sink-config-bucket`,`sink-config-credentials-access-key-id`,`sink-config-credentials-secret-access-key`,`sink-config-file-naming-prefix`,`sink-config-file-naming-strategy`,`sink-config-file-naming-suffix`,`sink-config-jurisdiction`,`sink-config-partitioning-time-pattern`,`sink-config-path`,`sink-config-rolling-policy-file-size-bytes`,`sink-config-rolling-policy-inactivity-seconds`,`sink-config-rolling-policy-interval-seconds`,`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`].some(t=>e[t]!==void 0)){let t={"sink-config-credentials-access-key-id":[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`],"sink-config-credentials-secret-access-key":[`sink-config-namespace`,`sink-config-table-name`,`sink-config-token`]},n=[`sink-config-account-id`,`sink-config-bucket`,`sink-config-credentials-access-key-id`,`sink-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 V={command:`create`,describe:`Create Sink`,builder:B,handler:async e=>c({command:`pipelines sinks create`,classification:{safeFlags:[`sink-config-file-naming-strategy`,`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`schema-inferred`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}):u(e.body),sensitiveBodyPaths:[[`config`,`credentials`,`secret_access_key`],[`config`,`token`]]});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(z,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Defines the name of the Sink.`)),e.type===void 0&&(e.type=await m(`type`,`Specifies the type of sink.`,[`r2`,`r2_data_catalog`,`basin_catalog`]));let g=d({config:{account_id:f(e[`sink-config-account-id`],`sink-config-account-id`,`text`),bucket:f(e[`sink-config-bucket`],`sink-config-bucket`,`text`),credentials:{access_key_id:f(e[`sink-config-credentials-access-key-id`],`sink-config-credentials-access-key-id`,`text`),secret_access_key:f(e[`sink-config-credentials-secret-access-key`],`sink-config-credentials-secret-access-key`,`text`)},file_naming:{prefix:f(e[`sink-config-file-naming-prefix`],`sink-config-file-naming-prefix`,`text`),strategy:e[`sink-config-file-naming-strategy`],suffix:f(e[`sink-config-file-naming-suffix`],`sink-config-file-naming-suffix`,`text`)},jurisdiction:f(e[`sink-config-jurisdiction`],`sink-config-jurisdiction`,`text`),partitioning:{time_pattern:f(e[`sink-config-partitioning-time-pattern`],`sink-config-partitioning-time-pattern`,`text`)},path:f(e[`sink-config-path`],`sink-config-path`,`text`),rolling_policy:{file_size_bytes:e[`sink-config-rolling-policy-file-size-bytes`],inactivity_seconds:e[`sink-config-rolling-policy-inactivity-seconds`],interval_seconds:e[`sink-config-rolling-policy-interval-seconds`]},namespace:f(e[`sink-config-namespace`],`sink-config-namespace`,`text`),table_name:f(e[`sink-config-table-name`],`sink-config-table-name`,`text`),token:f(e[`sink-config-token`],`sink-config-token`,`text`)},format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],compression:e[`format-compression`],type:e[`format-type`],row_group_bytes:e[`format-row-group-bytes`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},type:e.type}),_=await s(`Creating`,async()=>c.send(z,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var H={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function U(e){return e.usage(`$0 pipelines sinks delete <sink-id>
|
|
25
23
|
|
|
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 W={command:`delete <sink-id>`,describe:`Delete Sink`,builder:U,handler:async e=>c({command:`pipelines sinks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force})){
|
|
27
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(H,{account_id:l,sink_id:e[`sink-id`]}));a(u,{successLabel:`Deleted`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function G(e){return e.usage(`$0 pipelines sinks get <sink-id>
|
|
24
|
+
Delete Sink in Account.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const W={command:`delete <sink-id>`,describe:`Delete Sink`,builder:U,handler:async e=>c({command:`pipelines sinks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(H,{account_id:l,sink_id:e[`sink-id`]}));a(u,{successLabel:`Deleted`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks/${t.sink_id}`};function G(e){return e.usage(`$0 pipelines sinks get <sink-id>
|
|
28
25
|
|
|
29
26
|
Get Sink Details.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <sink-id>`,describe:`Get Sink Details`,builder:G,handler:async e=>c({command:`pipelines sinks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines sinks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/sinks/${e[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(e[`sink-id`]))}`,pathParams:{"sink-id":String(e[`sink-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ie,{account_id:l,sink_id:e[`sink-id`]}));a(u,{successLabel:`Loaded`})})};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/sinks`,query:[`pipeline_id`,`name`,`order_by`,`direction`,`page`,`per_page`]};function J(e){return e.usage(`$0 pipelines sinks list
|
|
30
27
|
|
|
@@ -32,8 +29,7 @@ List/Filter Sinks in Account.`).option(`pipeline-id`,{type:`string`,description:
|
|
|
32
29
|
|
|
33
30
|
Create a new Stream.`).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).coerce(`format-decimal-encoding`,e=>f(e,`format-decimal-encoding`,`text`)).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).coerce(`format-timestamp-format`,e=>f(e,`format-timestamp-format`,`text`)).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).coerce(`format-type`,e=>f(e,`format-type`,`text`)).option(`format-compression`,{type:`string`,description:`The format.compression field`,choices:[`uncompressed`,`snappy`,`gzip`,`zstd`,`lz4`]}).coerce(`format-compression`,e=>f(e,`format-compression`,`text`)).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`name`,{type:`string`,description:`Specifies the name of the Stream.`}).option(`schema-fields`,{type:`string`,description:`The schema.fields field. Provide as a JSON array of objects or @path/to/file.json.`}).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 se={command:`create`,describe:`Create Stream`,builder:oe,handler:async e=>c({command:`pipelines streams create`,classification:{safeFlags:[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`http-authentication`,`http-enabled`,`schema-inferred`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}):u(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(X,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Specifies the name of the Stream.`));let h=d({format:{decimal_encoding:e[`format-decimal-encoding`],timestamp_format:e[`format-timestamp-format`],unstructured:e[`format-unstructured`],type:e[`format-type`],compression:e[`format-compression`],row_group_bytes:e[`format-row-group-bytes`]},http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:f(e.name,`name`,`text`),schema:{fields:l(e[`schema-fields`],`schema-fields`),inferred:e[`schema-inferred`]},worker_binding:{enabled:e[`worker-binding-enabled`]}}),g=await s(`Creating`,async()=>c.send(X,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function le(e){return e.usage(`$0 pipelines streams delete <stream-id>
|
|
34
31
|
|
|
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 ue={command:`delete <stream-id>`,describe:`Delete Stream`,builder:le,handler:async e=>c({command:`pipelines streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force})){
|
|
36
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(ce,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function fe(e){return e.usage(`$0 pipelines streams get <stream-id>
|
|
32
|
+
Delete Stream in Account.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ue={command:`delete <stream-id>`,describe:`Delete Stream`,builder:le,handler:async e=>c({command:`pipelines streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ce,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams/${t.stream_id}`};function fe(e){return e.usage(`$0 pipelines streams get <stream-id>
|
|
37
33
|
|
|
38
34
|
Get Stream Details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <stream-id>`,describe:`Get Stream Details`,builder:fe,handler:async e=>c({command:`pipelines streams get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf pipelines streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pipelines/v1/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(de,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/pipelines/v1/streams`,query:[`pipeline_id`,`name`,`order_by`,`direction`,`page`,`per_page`]};function he(e){return e.usage(`$0 pipelines streams list
|
|
39
35
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,n as t}from"./auth-
|
|
2
|
+
import{i as e,n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as s,n as c,s as l,t as u}from"./body-parser-ChnyBsfm.mjs";function d(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the detection `mode`, whether to `show_interstitial`, and the ordered list of `rules`.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Get Zone Precursor Config`,builder:d,handler:async s=>o({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},s,async()=>{let o={};if(s[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(s[`cloudflare-version`])),s.dryRun){i({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`none`});return}let c=await t(s);s.zoneId=await n({zone:s.zone},c,{quiet:s.quiet});let l=await a(`Loading`,async()=>e(c,`GET`,`/zones/${s.zoneId}/precursor`,{headers:Object.keys(o).length>0?o:void 0}));r(l,{successLabel:`Loaded`})})};function p(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `mode` controls whether Precursor detection is off, monitoring, or armed. `show_interstitial` controls the zone-level response when armed. `rules` is the ordered list of overrides for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all rules. - At least one of `mode`, `show_interstitial`, or `rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `show_interstitial` is required and controls the response for requests that match that rule. - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`cloudflare-version`,{type:`string`,description:`Selects the split Precursor API schema.`,demandOption:!0}).option(`rules`,{type:`string`,description:`The ordered list of Precursor rules for the zone. Provide as a JSON array of objects or @path/to/file.json.`}).option(`show-interstitial`,{type:`boolean`,description:`Whether Precursor shows an interstitial when it takes action on a
|
|
3
3
|
request.
|
|
4
4
|
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`update`,describe:`Update Zone Precursor Config`,builder:p,handler:async d=>o({command:`precursor update`,classification:{safeFlags:[`show-interstitial`,`dry-run`]}},d,async()=>{let o={};if(d[`cloudflare-version`]!==void 0&&(o[`Cloudflare-Version`]=String(d[`cloudflare-version`])),d.dryRun){i({command:`cf precursor update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({rules:s(d.rules,`rules`),show_interstitial:d[`show-interstitial`],cloudflare_version:d[`cloudflare-version`]}):c(d.body)});return}let f=await t(d);if(d.zoneId=await n({zone:d.zone},f,{quiet:d.quiet}),d.body){let t=c(d.body),n=await a(`Updating`,async()=>e(f,`PUT`,`/zones/${d.zoneId}/precursor`,{body:t,headers:Object.keys(o).length>0?o:void 0}));r(n,{successLabel:`Updated`});return}let p={};d.rules!==void 0&&l(p,[`rules`],s(d.rules,`rules`)),d[`show-interstitial`]!==void 0&&l(p,[`show_interstitial`],d[`show-interstitial`]),d[`cloudflare-version`]!==void 0&&(p.cloudflare_version=d[`cloudflare-version`]);let m=await a(`Updating`,async()=>e(f,`PUT`,`/zones/${d.zoneId}/precursor`,{body:p,headers:Object.keys(o).length>0?o:void 0}));r(m,{successLabel:`Updated`})})},h={command:`precursor`,describe:`Precursor settings for a zone`,builder:e=>e.command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./dotenv-CmPRiXmU.mjs";import{J as t,K as n,rt as r,z as i}from"./dist-BtzWfAjU.mjs";import{t as a}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as o}from"./local-CSH3UMpD.mjs";import{i as s,n as c}from"./auth-BcNLQji1.mjs";import{a as l,t as u}from"./context-DVh8Wyfs.mjs";import{d,s as f}from"./interactive-D4E8PdaW.mjs";import{C as p,_ as m,d as h,f as g,l as _,r as v,t as y,x as b,y as x}from"./deploy-context-Do89WayB.mjs";import{t as S}from"./output-BJEgbI0G.mjs";import{t as C}from"./dry-run-gy0Hl9xo.mjs";import{t as w}from"./progress-CtGsPOpV.mjs";import{n as T,t as E}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as D}from"./prompt-YrI7ltMa.mjs";import{i as O,n as k,o as A,r as j,s as M,t as N,u as P}from"./containers-CzAZfmnj.mjs";import{a as F,c as I,i as ee,n as L,o as R,r as z,s as B}from"./build-CWlpWVBf.mjs";import{t as V}from"./deploy-input-DyMuMsi5.mjs";import{readBuildOutput as H}from"@cloudflare/build-output-utils";function U(e){return e.usage(`$0 previews delete <name>
|
|
3
|
+
|
|
4
|
+
Delete a Preview.`).positional(`name`,{type:`string`,description:`Identifier for the Preview, which can be ID, slug, or URL-encoded name.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the Preview even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted Preview are deleted even if other Workers reference them.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const W={command:`delete <name>`,describe:`Delete Preview`,builder:U,handler:async e=>E({command:`previews delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`delete-with-references`]};if(e.dryRun){let n=await l();C({command:`cf previews delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/previews/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{worker:String(e.worker??``),name:String(e.name??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await u();if(e.accountId=r,!await D({force:!!e.force,message:`This operation permanently deletes the Preview.`}))return;let i=await w(`Deleting`,async()=>s(n,`DELETE`,`/accounts/${r}/workers/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.name))}`,{query:t}));S(i,{successLabel:`Deleted`})})};function G(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(t,n,i,a,o)=>K(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 r of n){let n=s.get(r.class_name);if(n||=(c??=await x(t,a),c.find(e=>e.class===r.class_name&&e.preview?.id===i.preview_id)?.id),!n)throw Error(`Could not find a Preview Durable Object namespace for Container class "${r.class_name}".`);let l=await q(r,e,i.id,a,t,o.localImageReferences?.get(r.class_name));await _({imageRef:l,durable_object_namespace_id:n,configFileName:`cloudflare.config.ts`,observabilityTargetPercentageField:`targetInstancePercentage`,observabilityTargetCountField:`targetInstanceCount`},r,t,a)}await h(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),r())})}}async function K(e,t){if(!e)return t();let n=f();d(`error`);try{return await t()}finally{d(n)}}async function q(e,t,n,i,a,o){if(o!==void 0)return p({pathToDocker:r(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return b(s,n,r(),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 J(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`,z)}function Y(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 X(t){let n=t[`preview-name`],r=n??A();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:
|
|
5
|
+
|
|
6
|
+
cf previews deploy PREVIEW_NAME`);return t.prebuilt||await L(t.mode,{output:t.quiet?`silent`:`stderr`,worker:t.worker},{isPreview:!0}),e(t,()=>Z(t,r))}async function Z(e,r){let a=await H(process.cwd());O(a.rootConfig),B(e.mode,a.rootConfig.buildContext.mode),R(a.rootConfig.accountId,e[`temporary-account`]);let o=F(a.workers,e.worker),{wranglerConfig:s,builtConfig:c}=ee(o,a.rootConfig),l=t(s),{authToken:u,accountId:d}=await j({accountId:a.rootConfig.accountId,complianceRegion:l,isPreview:!0}),f=y(u);P({...f,logger:{...f.logger,log:()=>{},info:()=>{}}}),m({logger:{...f.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:f.fetchResult,fetchPagedListResult:f.fetchPagedListResult});let p=new Set(Object.values(c.exports??{}).filter(k).map(({container:e})=>e)),h=a.containers?.filter(({config:e})=>p.has(e.name))??[],_=N(h,s,{accountId:d}),b=_.source;if(b?.some(e=>e.scheduling_policy===`durable_object`))throw new I(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);b&&b.length>0&&g(d,u,n(s));let x=await M(d,{name:r,json:!0},{workerConfig:c,rootConfig:a.rootConfig,containers:h.filter(({config:e})=>b?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:o.bundleDir?V(o,c):void 0,assets:o.assetsDir?{directory:o.assetsDir}:void 0},{deployCommand:`cf deploy`,previewCommand:`cf previews deploy`,...G(_),verifyContainersScope:async()=>{await v.listApplications()}});return i({...Y(x),worker_name:c.name??null}),x}var Q=T({command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:J,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf previews deploy.`);let t=await X(e);S(Y(t),{quiet:e.quiet})}},{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}});const $={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(W).command(a(Q,`preview`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$ as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./theme-BGHWSKCw.mjs";import{t}from"./args-BAOHroBC.mjs";import{n}from"./version-DmTuWNZ5.mjs";import{t as r}from"./session-6xqrJWXy.mjs";import{s as i}from"./log-BWdaOGOW.mjs";import{n as a}from"./interactive-wQM7Blhm.mjs";const o={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},s=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||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(o.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${o.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},c=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function l(){return!(!e(process.env,process.stderr.isTTY===!0)||a()||process.env.CF_QUIET===`1`)}async function u(e,t){if(!l())return t();r(n);let a=i({frames:[...c],indicator:`timer`,delay:80,output:process.stderr});s.setIndeterminate(),a.start(e);let o=e=>process.exit(e===`SIGTERM`?143:130),u=e=>{e===0&&(process.exitCode=130)};process.on(`SIGINT`,o),process.on(`SIGTERM`,o),process.on(`exit`,u);try{let n=await t();return s.clear(),a.stop(e),n}catch(t){throw s.clear(),a.error(e),t}finally{process.off(`SIGINT`,o),process.off(`SIGTERM`,o),process.off(`exit`,u)}}export{u as t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n}from"./version-DmTuWNZ5.mjs";import{t as r}from"./session-6xqrJWXy.mjs";import{a as i,c as a,l as o,n as s,o as c,r as l}from"./log-BWdaOGOW.mjs";import{n as u}from"./interactive-wQM7Blhm.mjs";import{i as d}from"./dialog-D5lus4M4.mjs";function f(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function p(){r(n)}async function m(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
|
|
3
|
+
`)?t.slice(0,-1):t}async function h(e,n,r){let s=r?.kind??`text`;if(u()){if(s===`secret`){let t=await m();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}`,l=d(n||r?.question||c),f=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;p();let h=s===`secret`?await i({message:l,mask:`•`,validate:f,output:process.stderr}):await a({message:l,validate:f,output:process.stderr});if(o(h)||typeof h!=`string`)throw new t(130,{cancelled:!0});return h}async function g(e,n,r,i={}){let a=f(e),s=r.map(f);if(u())throw Error(`--${a} is required (one of: ${s.join(`, `)}). Pass --${a} <value> or run interactively.`);let l=`Select value for --${a}`,d=f(n||l);p();let m=await c({message:d,output:process.stderr,options:r.map(e=>({value:e,label:f((Object.hasOwn(i,e)?i[e]:void 0)??e)}))});if(o(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function _(e,n){if(u())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);p();let r=await l({message:n||`Confirm --${e}`,initialValue:!1,output:process.stderr});if(o(r))throw new t(130,{cancelled:!0});return r===!0}async function v(e,{defaultValue:n=!0,fallbackValue:r=!0}={}){if(u())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;p();let i=await l({message:e,initialValue:n,output:process.stderr});if(o(i))throw new t(130,{cancelled:!0});return i===!0}async function y(n={}){if(n.force===!0)return!0;let r=n.message?`${n.message} Continue?`:`This permanently deletes the resource. Continue?`;if(u())throw process.stderr.write(`${e.warning(`?`)} ${r}\n ${e.muted(`(non-interactive; pass --force to confirm)`)}\nAborted.
|
|
4
|
+
`),new t(1);p();let i=await l({message:r,initialValue:!1,output:process.stderr});if(o(i))throw new t(130,{cancelled:!0});return i===!0||(s(`Aborted.`,{output:process.stderr}),!1)}export{h as a,g as i,y as n,f as o,_ as r,v as t};
|