cf 1.0.0-beta.18 → 1.0.0-beta.19
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 +7 -0
- package/dist/_meta/commands.json +3003 -1544
- package/dist/_meta/hand-written-commands.json +6 -0
- package/dist/_meta/schemas.json +2127 -1070
- package/dist/{abuse-reports-Ce-g5uZP.mjs → abuse-reports-DhgunVFo.mjs} +3 -3
- package/dist/{access-BtsMwesh.mjs → access-BDoDq_WZ.mjs} +1 -1
- package/dist/{accounts-X5QVzEUW.mjs → accounts-DLTCzZJg.mjs} +24 -26
- package/dist/{acm-C_NepMi6.mjs → acm-DS1CosYq.mjs} +1 -1
- package/dist/{addressing-BkQY1hoA.mjs → addressing-DFeYj8TY.mjs} +2 -2
- package/dist/{agent-memory-1OPgC3lK.mjs → agent-memory-DXjQ8N0g.mjs} +1 -1
- package/dist/{ai-Bb0_Zknm.mjs → ai-V5YopMkS.mjs} +4 -4
- package/dist/{ai-audit-DuEjVdML.mjs → ai-audit-yg8D0azz.mjs} +2 -2
- package/dist/{ai-gateway-Cm2vWMSI.mjs → ai-gateway--dkH9qGz.mjs} +13 -13
- package/dist/ai-search-BRtsUaUI.mjs +79 -0
- package/dist/{ai-security-A2STvE1b.mjs → ai-security-DRJCcLpF.mjs} +1 -1
- package/dist/{alerting-CIwSk-Ks.mjs → alerting-8DsyMKGG.mjs} +30 -30
- package/dist/{analytics-H--uM3DA.mjs → analytics-BpYUZTtQ.mjs} +1 -1
- package/dist/{analytics-engine-Alu7cllT.mjs → analytics-engine-CT2E0Dkw.mjs} +1 -1
- package/dist/{api-security-D-pcnhUL.mjs → api-security-CBhWZE8z.mjs} +6 -6
- package/dist/{argo-Lvmcx3am.mjs → argo-B0u2N3Dh.mjs} +1 -1
- package/dist/{artifacts-xT5S-mVa.mjs → artifacts-B6XzjMiM.mjs} +1 -1
- package/dist/{audit-logs-DEoRBLkU.mjs → audit-logs-59fCc1aw.mjs} +1 -1
- package/dist/auth-5cgi8ePZ.mjs +2 -0
- package/dist/auth-BaUNb1Ed.mjs +2 -0
- package/dist/auth-ChYOc_rS.mjs +2 -0
- package/dist/{auth-token-D9XIPlwf.mjs → auth-token-B1pP2jaK.mjs} +1 -1
- package/dist/{autoconfig-9po_tqsS.mjs → autoconfig-Cdm2IFLM.mjs} +20 -20
- package/dist/{basin-catalog-DFHt3cWi.mjs → basin-catalog-CV05WlA4.mjs} +1 -1
- package/dist/{billing-Bm2JNSGa.mjs → billing-Ad-rK-JH.mjs} +3 -3
- package/dist/{blocks-Bat9A8V_.mjs → blocks-CKb_aLWN.mjs} +1 -1
- package/dist/body-parser-ChnyBsfm.mjs +2 -0
- package/dist/{bot-management-CSr38g-O.mjs → bot-management-CGpfjQ4w.mjs} +1 -1
- package/dist/{botnet-feed-ebeWWSJj.mjs → botnet-feed-CMrF6ZGq.mjs} +1 -1
- package/dist/{brand-protection-BCn9Mv-d.mjs → brand-protection-CP73_yX8.mjs} +1 -1
- package/dist/{browser-run-BcWxzhAn.mjs → browser-run-OpUfawh_.mjs} +21 -21
- package/dist/{build-i8l2qGVZ.mjs → build-CMPlf8mh.mjs} +1 -1
- package/dist/build-DQZ2w_dQ.mjs +2 -0
- package/dist/{builds-BMwDzi7G.mjs → builds-DsRNlILV.mjs} +39 -39
- package/dist/{cache-_VaTLC5T.mjs → cache-RppXjxXA.mjs} +3 -3
- package/dist/{cf-Bq4pA4n6.mjs → cf-PISMdEje.mjs} +11 -11
- package/dist/{chunk-2HLTAS5V-D7COzUOd.mjs → chunk-2HLTAS5V-B92NbX1j.mjs} +1 -1
- package/dist/{chunk-2K52M2W5-CYxfQXUq.mjs → chunk-2K52M2W5-c__08AOB.mjs} +7 -7
- package/dist/chunk-DSGVRFIS-DfQO1boa.mjs +2 -0
- package/dist/{cli-P3q5DG3W.mjs → cli-Dd1n2YAJ.mjs} +1 -1
- package/dist/{client-side-security-CjSXrpa9.mjs → client-side-security-BYfwOkUo.mjs} +1 -1
- package/dist/{cloud-connector-BPJBeP06.mjs → cloud-connector-CQZUqAMQ.mjs} +2 -2
- package/dist/{cloudflared-By8BzYXc.mjs → cloudflared-C1SdXpYv.mjs} +1 -1
- package/dist/{cloudforce-one-DXX31GMi.mjs → cloudforce-one-C1xdpspb.mjs} +200 -210
- package/dist/{command-Bkc04OyY.mjs → command-BioiZMm9.mjs} +1 -1
- package/dist/{command-BbsPxJBT.mjs → command-C0nJ2LRd.mjs} +1 -1
- package/dist/{command-DDcBC4px.mjs → command-C5ARgURy.mjs} +1 -1
- package/dist/{command-CL7LLXM7.mjs → command-C7NIRU-u.mjs} +1 -1
- package/dist/{command-BXiA79DP.mjs → command-C8DV-x_C.mjs} +1 -1
- package/dist/{command-BtTc28ql.mjs → command-CFV1cqfR.mjs} +1 -1
- package/dist/{command-NoxvOARP.mjs → command-ChQXv0jP.mjs} +1 -1
- package/dist/{command-DCQgsd2U.mjs → command-D203VrTG.mjs} +1 -1
- package/dist/{command-DZfKHiru.mjs → command-D5BUzDX8.mjs} +1 -1
- package/dist/{command-CBZhxmKD.mjs → command-DWE7YdeC.mjs} +1 -1
- package/dist/{command-C6w1OdoC.mjs → command-DlB10kIb.mjs} +1 -1
- package/dist/{command-CxWLFv5Y.mjs → command-DmPQXNRg.mjs} +1 -1
- package/dist/{command-Bgb-3yPg.mjs → command-F0jlqvKr.mjs} +1 -1
- package/dist/{command-DppVezAB.mjs → command-FOQNhNqP.mjs} +1 -1
- package/dist/{command-CYyfigfC.mjs → command-yAXk5NXh.mjs} +1 -1
- package/dist/{completions-CrDmwKnK.mjs → completions-Bh0Hz-hA.mjs} +3 -3
- package/dist/{connector-interrupts-V4HGULCM.mjs → connector-interrupts-Bd949WX0.mjs} +1 -1
- package/dist/{connector-telemetry-events-D9mTcfbJ.mjs → connector-telemetry-events-Dw8iIg5Q.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-COrPVKol.mjs → connector-telemetry-snapshots-DqEIaz99.mjs} +1 -1
- package/dist/{connectors-DvVlxGDx.mjs → connectors-RUEU1QDB.mjs} +1 -1
- package/dist/containers-xU-0EhLO.mjs +78 -0
- package/dist/{containers-BtcOgwm5.mjs → containers-yUOvm-4V.mjs} +211 -211
- package/dist/{content-scan-DldLmTjy.mjs → content-scan-Cm2-Xhqo.mjs} +2 -2
- package/dist/{context-C_a8oSY9.mjs → context-BQ6KeMgq.mjs} +2 -2
- package/dist/{cps-REo1OWP1.mjs → cps-CgPduy0H.mjs} +1 -1
- package/dist/{csam-scanner-CIbbdoJK.mjs → csam-scanner-B0Ra6fXL.mjs} +1 -1
- package/dist/{custom-csrs-iGNc3rSZ.mjs → custom-csrs-6lfu1-RR.mjs} +1 -1
- package/dist/{custom-hostnames-BNxYbTyu.mjs → custom-hostnames-Dzov_CPw.mjs} +15 -15
- package/dist/{custom-nameservers-BMJoTSlQ.mjs → custom-nameservers-Bfhv_9_k.mjs} +1 -1
- package/dist/{custom-pages-Qdemt1Fm.mjs → custom-pages-DxVD_f10.mjs} +1 -1
- package/dist/{d1-DvCiQibO.mjs → d1-D7p4uJ-e.mjs} +10 -12
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-K664XPOb.mjs → deploy-BjWvVZol.mjs} +1 -1
- package/dist/deploy-context-C-ZdGP0Z.mjs +56 -0
- package/dist/{deploy-input-KK6yyBN_.mjs → deploy-input-B8Nq6Eh6.mjs} +1 -1
- package/dist/{dev-CnoMHxf4.mjs → dev-D20UkcYT.mjs} +1 -1
- package/dist/{diagnostics-Cw0mtcep.mjs → diagnostics-DdhTemYB.mjs} +1 -1
- package/dist/{dialog-D4Y9ocuF.mjs → dialog-BnIgdgWi.mjs} +1 -1
- package/dist/discover-DEjUARkU.mjs +2 -0
- package/dist/{dist-DZRTPMMA.mjs → dist-CnKd5XoR.mjs} +19 -19
- package/dist/{dist-uRuGmkMB.mjs → dist-DAeCUX-u.mjs} +3 -3
- package/dist/{dls-DoqfqutH.mjs → dls-BBODA9Rk.mjs} +1 -1
- package/dist/{dns-DC6WcO3m.mjs → dns-CK_hyn5q.mjs} +5 -5
- package/dist/{dns-firewall-DpQH9BCE.mjs → dns-firewall-DbvX9R-7.mjs} +1 -1
- package/dist/{docs-CqNRBHab.mjs → docs-BDTijwM3.mjs} +1 -1
- package/dist/{dot-prop-IITUZ2XW-BnPfnQkb.mjs → dot-prop-IITUZ2XW-C4pkmT-K.mjs} +1 -1
- package/dist/{dotenv-usOKkeW7.mjs → dotenv-Ck-6V1hm.mjs} +1 -1
- package/dist/{dry-run-C2KjGX10.mjs → dry-run-DQmFkNK_.mjs} +1 -1
- package/dist/{durable-objects-CJDDy3CC.mjs → durable-objects-DcFbd1Ka.mjs} +1 -1
- package/dist/{email-auth--NHg1TjG.mjs → email-auth-BEgDxU-g.mjs} +1 -1
- package/dist/{email-routing-COjENK55.mjs → email-routing-DKWmPOVo.mjs} +1 -1
- package/dist/{email-security-rdjH95T2.mjs → email-security-RWbAp8qa.mjs} +15 -15
- package/dist/{email-sending-26VJhR6Q.mjs → email-sending-BbJy_vl8.mjs} +1 -1
- package/dist/error-sanitization-Byb-_IS9.mjs +2 -0
- package/dist/{error-sanitization-pOyzm2F1.mjs → error-sanitization-DWJ5ka7h.mjs} +1 -1
- package/dist/{field-extractors-DBOvGOwz.mjs → field-extractors-Bob6udAc.mjs} +1 -1
- package/dist/{firewall-D8K93ffF.mjs → firewall-DziiEsR8.mjs} +1 -1
- package/dist/{flagship-CHdmCmvQ.mjs → flagship-xOtgddUK.mjs} +1 -1
- package/dist/{fraud-CY4TV5Vc.mjs → fraud-BUS7i5Yh.mjs} +1 -1
- package/dist/generate-D6V4Q58z.mjs +2 -0
- package/dist/get-BTisquA3.mjs +2 -0
- package/dist/{google-tag-gateway-DzSt4wlz.mjs → google-tag-gateway-DgSzyeK-.mjs} +1 -1
- package/dist/{gt-3bcLGJ7V.mjs → gt-D6YemCLh.mjs} +1 -1
- package/dist/{healthchecks-B52Mf3uL.mjs → healthchecks-CbD2PsnM.mjs} +1 -1
- package/dist/{hyperdrive-CHsW0r6Z.mjs → hyperdrive-Cs_cfSXU.mjs} +1 -1
- package/dist/{iam-o1n9eUXf.mjs → iam-DvsCztqU.mjs} +5 -5
- package/dist/{images-CJHAGxX6.mjs → images-BipVjHNw.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/init-LvFgCsNX.mjs +43 -0
- package/dist/{intel-B3S1gxUg.mjs → intel-D1LPkkBM.mjs} +31 -41
- package/dist/{interactive-BW9T1D1q.mjs → interactive-d_lFnSev.mjs} +3 -3
- package/dist/interactive-pjVqirHx.mjs +2 -0
- package/dist/{ips-q_UJMiy8.mjs → ips-2iUGs8ws.mjs} +1 -1
- package/dist/{k2-BNqVZnDN.mjs → k2-DGzRm3NJ.mjs} +1 -1
- package/dist/{kv-B0nXSOcW.mjs → kv-BW-s9MJY.mjs} +4 -4
- package/dist/{lazy-command-4ccdBqrc.mjs → lazy-command-Bq-rWPQe.mjs} +1 -1
- package/dist/{leaked-credential-checks-BXwIjlTs.mjs → leaked-credential-checks-CnY6ih6p.mjs} +1 -1
- package/dist/{load-balancers-DJtMztJ0.mjs → load-balancers-CtnusAzP.mjs} +1 -1
- package/dist/{local-Dil4fTWX.mjs → local-B4sZZTRA.mjs} +1 -1
- package/dist/local-DCnFIgLJ.mjs +2 -0
- package/dist/{local-runtime-B7TKFu6E.mjs → local-runtime-DoBuyriC.mjs} +1 -1
- package/dist/login-CqZJgUF1.mjs +5 -0
- package/dist/{login-D-1FiBNv.mjs → login-DR60WiAY.mjs} +1 -1
- package/dist/{logo-matches-qVYq8tWL.mjs → logo-matches-C1-6KOkZ.mjs} +1 -1
- package/dist/{logos-tnIahhcu.mjs → logos-Yzhd-VKb.mjs} +2 -2
- package/dist/{logpush-D4s3pJRw.mjs → logpush-JYG4gXZ-.mjs} +3 -3
- package/dist/{logs-cw7UL5V2.mjs → logs-DLblEjK0.mjs} +1 -1
- package/dist/{magic-cloud-networking-CLEHztNY.mjs → magic-cloud-networking-CblQwsQr.mjs} +13 -13
- package/dist/{magic-network-monitoring-DRwygeVq.mjs → magic-network-monitoring-D2px4Ep4.mjs} +3 -3
- package/dist/{magic-transit-BFopRdPs.mjs → magic-transit-Bnwsi0UQ.mjs} +61 -61
- package/dist/{managed-defense-D5kpmq0T.mjs → managed-defense-CTtNoxzW.mjs} +3 -3
- package/dist/{managed-transforms-CT4jjnzJ.mjs → managed-transforms-B92mJi5i.mjs} +1 -1
- package/dist/{matches-ClJ_24EY.mjs → matches-CzbL1XD-.mjs} +1 -1
- package/dist/{mcp-50os3IRG.mjs → mcp-Cic_aMer.mjs} +1 -1
- package/dist/{mesh-jxtQP8sS.mjs → mesh-DZTgD16C.mjs} +14 -14
- package/dist/{migrate-DerOyuv2.mjs → migrate-DtNDRcAI.mjs} +1 -1
- package/dist/{monetization-D6cCDi-h.mjs → monetization-DCQ2_niU.mjs} +1 -1
- package/dist/{network-dnWHB2uY.mjs → network-BqMqD2qn.mjs} +1 -1
- package/dist/{network-interconnects-Cf8qSVdt.mjs → network-interconnects-BFQ1yARl.mjs} +2 -2
- package/dist/{o11y-oMSg1pG4.mjs → o11y-CS5q1vSh.mjs} +5 -5
- package/dist/oauth-DPLYUvRl.mjs +2 -0
- package/dist/oauth-DdYSPYoE.mjs +4 -0
- package/dist/{oauth-clients-XDmoe-b4.mjs → oauth-clients-9BPswYm_.mjs} +1 -1
- package/dist/{oauth-scopes-D9VYGuTs.mjs → oauth-scopes-CLOKfQi2.mjs} +1 -1
- package/dist/{open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs → open-PCXX3ZDZ-5J5IU2MX-DFe2CQkm.mjs} +1 -1
- package/dist/{open-PCXX3ZDZ-D55O2jpQ.mjs → open-PCXX3ZDZ-BD2iNJqn.mjs} +1 -1
- package/dist/{organization-94lHeeOs.mjs → organization-DFRN2g6z.mjs} +1 -1
- package/dist/{organizations-BJf3UTFi.mjs → organizations-yiGopnKf.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DMytVSUZ.mjs → origin-post-quantum-encryption-n9gsxikn.mjs} +1 -1
- package/dist/output-O6b9MR9R.mjs +2 -0
- package/dist/{page-rules-BUI-50oz.mjs → page-rules-F1Jdxx6A.mjs} +1 -1
- package/dist/{pages-CcdpCzHs.mjs → pages-CezC0YrR.mjs} +2 -2
- package/dist/{pay-per-crawl-B1uHZn9j.mjs → pay-per-crawl-fZ-kTBbN.mjs} +2 -2
- package/dist/{pay-per-use-t066I5wm.mjs → pay-per-use-B14BTKVI.mjs} +2 -2
- package/dist/{pipelines-Co6S044l.mjs → pipelines-BN7ydBHl.mjs} +5 -5
- package/dist/{precursor-BftyvS86.mjs → precursor-B88RDDZT.mjs} +2 -2
- package/dist/previews-CiqRIq_k.mjs +7 -0
- package/dist/process-DiXf4VPi.mjs +2 -0
- package/dist/{progress-Q5w9PNTT.mjs → progress-CdlDthXA.mjs} +1 -1
- package/dist/{prompt-C0hKSr-R.mjs → prompt-1AC-qwxS.mjs} +1 -1
- package/dist/{queries-4MubO6Sz.mjs → queries-C2sgUI9j.mjs} +1 -1
- package/dist/{queues-CteS5M92.mjs → queues-DCP5x-PZ.mjs} +1 -1
- package/dist/{r2-2QpT_Gso.mjs → r2-D7UhzWR7.mjs} +26 -26
- package/dist/{radar-ODKaK4FJ.mjs → radar-osOiFeY_.mjs} +1 -1
- package/dist/{raw-fetch-CEOuoKl9.mjs → raw-fetch-1VlXDwwX.mjs} +1 -1
- package/dist/{realtime-DkfU8uEX.mjs → realtime-DCnqxiWo.mjs} +90 -87
- package/dist/{registrar-DM6JTVPS.mjs → registrar-DAFYjjRa.mjs} +8 -8
- package/dist/{registrar-sandbox-BPNGf65G.mjs → registrar-sandbox-zeNHABZ0.mjs} +4 -4
- package/dist/{registry-CRnk93ur.mjs → registry-DG4ZiuN9.mjs} +1 -1
- package/dist/{reporting-5yFNXbJg.mjs → reporting-KehV_PXm.mjs} +1 -1
- package/dist/{request-headers-DXvswze2.mjs → request-headers-ojAw3pQO.mjs} +1 -1
- package/dist/{request-tracers-BarLZY95.mjs → request-tracers-BStCgh6m.mjs} +1 -1
- package/dist/resolve-BGNMAcGR.mjs +2 -0
- package/dist/{resource-sharing-BVEwBPs8.mjs → resource-sharing-3xtSgWG7.mjs} +3 -3
- package/dist/{rules-_C31X4Jz.mjs → rules-7F-G2Bg_.mjs} +3 -3
- package/dist/{rulesets-8RwxoFhG.mjs → rulesets-B0YtS2br.mjs} +20 -20
- package/dist/{rum-CAUcpXpM.mjs → rum-B3V6tqS-.mjs} +1 -1
- package/dist/{run-DtFLvOHB.mjs → run-B_07PrkW.mjs} +1 -1
- package/dist/run-D6AJfZT-.mjs +2 -0
- package/dist/{schema-S3pUZwpI.mjs → schema-C-tyhSnb.mjs} +1 -1
- package/dist/{schema-flags-DibfxEF6.mjs → schema-flags-DY3OKCvr.mjs} +4 -4
- package/dist/{scim-DX5XrQ4w.mjs → scim-CQ9TdajH.mjs} +6 -6
- package/dist/{secrets-store-DSqqrr25.mjs → secrets-store-Dl2hDxXu.mjs} +2 -2
- package/dist/{security-insights-FSktO04S.mjs → security-insights-BsLMdo1r.mjs} +2 -2
- package/dist/{security-txt-D2g3lQdg.mjs → security-txt-pCAiHvys.mjs} +1 -1
- package/dist/session-BsNzFtPi.mjs +2 -0
- package/dist/shared-CWBjMZDR.mjs +2 -0
- package/dist/{smart-shield-IVb2sR0C.mjs → smart-shield-BTXQsVxz.mjs} +1 -1
- package/dist/{snippets-cWwWficN.mjs → snippets-CYVieyc3.mjs} +2 -2
- package/dist/source-AlTrHNem.mjs +6 -0
- package/dist/{spawn-BW2bJmKO.mjs → spawn-Bdznd0EB.mjs} +2 -2
- package/dist/{spectrum-DYiIBYRB.mjs → spectrum-DLRr4Q03.mjs} +14 -14
- package/dist/{speed-C7uiW2Wf.mjs → speed-BJfaDYxz.mjs} +13 -13
- package/dist/sql-DQ4xrdc2.mjs +4 -0
- package/dist/src-BnMvFE3q.mjs +125 -0
- package/dist/{ssl-xQP_HbWN.mjs → ssl-CL1B69Pw.mjs} +1 -1
- package/dist/startup-profile-DuaJFX1y.mjs +2 -0
- package/dist/startup-profile-HMblAiBi.mjs +29 -0
- package/dist/{state-Boubf1X6.mjs → state-DN9yfd2C.mjs} +1 -1
- package/dist/state-DePlO0Kv.mjs +2 -0
- package/dist/{stream-CfWgj8Cr.mjs → stream-DrMZOO5u.mjs} +17 -17
- package/dist/{submit-DxGr1T40.mjs → submit-DjlLoVk2.mjs} +1 -1
- package/dist/{tags-LEJ2VYhQ.mjs → tags-DY7Ur1k-.mjs} +4 -4
- package/dist/{telemetry-BHne10Yy.mjs → telemetry-BG3kcYsV.mjs} +1 -1
- package/dist/telemetry-Dpm6GfZD.mjs +2 -0
- package/dist/{tenant-7d5vwc6K.mjs → tenant-BEMfNMjO.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BkxlPr5O.mjs → tenant-custom-nameservers-CCRbb0ch.mjs} +1 -1
- package/dist/{tools-BCCRUENY.mjs → tools-ZffhHUDd.mjs} +1 -1
- package/dist/tunnels-_JXe-UgM.mjs +29 -0
- package/dist/{turnstile-DhLkdhij.mjs → turnstile-DXEfneQq.mjs} +1 -1
- package/dist/ui-CY79jlGZ.mjs +2 -0
- package/dist/update-check-DfbYVefm.mjs +2 -0
- package/dist/{update-check-wvjOsnGK.mjs → update-check-atcehhBC.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-CeoV5dBc.mjs → url-info-B1kL9asc.mjs} +1 -1
- package/dist/{url-normalization-9NoaoRNh.mjs → url-normalization-CUHKRKJh.mjs} +1 -1
- package/dist/{url-scanner-w_-Sumz-.mjs → url-scanner-OnZP_-jm.mjs} +2 -2
- package/dist/{user-D33B3alX.mjs → user-BBBuFNj4.mjs} +1 -1
- package/dist/{vectorize-Wp9De13y.mjs → vectorize-DcctB8bw.mjs} +3 -3
- package/dist/version-CLgSHoNm.mjs +2 -0
- package/dist/{waiting-rooms-BE8FloRd.mjs → waiting-rooms-JaFE5wP1.mjs} +2 -2
- package/dist/{web-assets-ew0iaP7c.mjs → web-assets-Cu0swUPe.mjs} +10 -10
- package/dist/{web3-BUyXBaqq.mjs → web3-C67z4OtQ.mjs} +1 -1
- package/dist/{workers-pP5tsDbD.mjs → workers-ClTP0Ysl.mjs} +5 -5
- package/dist/{workers-builds-DzU9NGno.mjs → workers-builds-C5wKhvKe.mjs} +7 -7
- package/dist/{workers-for-platforms-B4xzFNxJ.mjs → workers-for-platforms-rxwkYyb3.mjs} +5 -5
- package/dist/{workers-vpc-Bre_t9Al.mjs → workers-vpc-B4vyvr1W.mjs} +1 -1
- package/dist/{workflows-DXYGKtqq.mjs → workflows-COJ5jwvk.mjs} +24 -24
- package/dist/wrangler-migration-Cp546RDG.mjs +946 -0
- package/dist/{zaraz-DoH4QD0u.mjs → zaraz-BkZ7yW05.mjs} +2 -2
- package/dist/{zero-trust-DKt20rzE.mjs → zero-trust-lUFLYuL1.mjs} +496 -444
- package/dist/{zone-BXM3p0JR.mjs → zone-CC1_qxt-.mjs} +1 -1
- package/dist/{zones-CJdtqEBx.mjs → zones-BRiLlTmW.mjs} +37 -28
- package/package.json +11 -11
- package/dist/ai-search-DDRpxyOM.mjs +0 -79
- package/dist/auth-B73lQS2h.mjs +0 -2
- package/dist/auth-DMzEmOhG.mjs +0 -2
- package/dist/auth-Db1KT0vm.mjs +0 -2
- package/dist/body-parser-DnBfDdx3.mjs +0 -2
- package/dist/build-BRJnyeu8.mjs +0 -2
- package/dist/chunk-DSGVRFIS-C5SqiTOz.mjs +0 -2
- package/dist/containers-Bt2zFsFd.mjs +0 -78
- package/dist/deploy-context-ClNVJYlR.mjs +0 -56
- package/dist/discover-DIDEGKo3.mjs +0 -2
- package/dist/error-sanitization-CIQOep3I.mjs +0 -2
- package/dist/generate-D80-1GnZ.mjs +0 -2
- package/dist/get-By1q8YlI.mjs +0 -2
- package/dist/hostnames-BMITIM8P.mjs +0 -11
- package/dist/init-CqQDL6i3.mjs +0 -43
- package/dist/interactive-DGUWZ2Gk.mjs +0 -2
- package/dist/local-DxWDQDnG.mjs +0 -2
- package/dist/login-chQP8825.mjs +0 -5
- package/dist/oauth-BfBdHhPS.mjs +0 -4
- package/dist/oauth-DDOiiH7h.mjs +0 -2
- package/dist/output-Co4xdFf6.mjs +0 -2
- package/dist/previews-BLhnhElx.mjs +0 -7
- package/dist/process-2wmDCy17.mjs +0 -2
- package/dist/resolve-BpgXeklt.mjs +0 -2
- package/dist/run-LcOb9rhI.mjs +0 -2
- package/dist/session-Cq3YNLoI.mjs +0 -2
- package/dist/shared-eefMO8R4.mjs +0 -2
- package/dist/source-mXUcrTVw.mjs +0 -6
- package/dist/sql-TGV8qQMj.mjs +0 -4
- package/dist/src-BUH-P_zd.mjs +0 -125
- package/dist/startup-profile-BOaseXnO.mjs +0 -29
- package/dist/startup-profile-BwEZFVGS.mjs +0 -2
- package/dist/state-CODDG9Nx.mjs +0 -2
- package/dist/telemetry-BavSU4ku.mjs +0 -2
- package/dist/tunnels-DlGODvwT.mjs +0 -29
- package/dist/ui-BtIBQeaG.mjs +0 -2
- package/dist/update-check-nLfkSfdz.mjs +0 -2
- package/dist/version-B2RUUqGT.mjs +0 -2
- package/dist/wrangler-migration-R9TQ_4Qd.mjs +0 -946
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./lazy-command-
|
|
2
|
+
import{t as e}from"./lazy-command-Bq-rWPQe.mjs";import{r as t}from"./theme-BGHWSKCw.mjs";import{r as n}from"./dotenv-Ck-6V1hm.mjs";import{q as r}from"./dist-CnKd5XoR.mjs";import"./api-eMuS5GI1.mjs";import{t as i}from"./path-DRw6Y-nd.mjs";import{t as a}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as o}from"./local-B4sZZTRA.mjs";import"./ui-CY79jlGZ.mjs";import{i as s,n as c}from"./auth-BaUNb1Ed.mjs";import{n as l}from"./dist-DAeCUX-u.mjs";import{a as u,r as d,t as f}from"./context-BQ6KeMgq.mjs";import{t as ee}from"./deploy-context-C-ZdGP0Z.mjs";import{t as te}from"./auth-token-B1pP2jaK.mjs";import{t as p}from"./output-O6b9MR9R.mjs";import{t as m}from"./dry-run-DQmFkNK_.mjs";import{t as h}from"./progress-CdlDthXA.mjs";import{n as g,t as _}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as v,n as y,r as b,s as x,t as S}from"./body-parser-ChnyBsfm.mjs";import{n as C,t as w}from"./input-validation-D7z60HJH.mjs";import{a as T,i as E,n as D}from"./prompt-1AC-qwxS.mjs";import{n as O,t as k}from"./raw-fetch-1VlXDwwX.mjs";import{l as ne,s as A}from"./containers-yUOvm-4V.mjs";import{a as j,i as M,n as N,o as P,r as F}from"./build-CMPlf8mh.mjs";import{r as I}from"./deploy-input-B8Nq6Eh6.mjs";import{n as L,t as R}from"./shared-CWBjMZDR.mjs";import{readBuildOutput as z}from"@cloudflare/build-output-utils";var B={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,query:[`force`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function V(e){return e.usage(`$0 workers delete <worker-id>
|
|
3
3
|
|
|
4
4
|
Delete a Worker and all its associated resources (versions, deployments, etc.).`).positional(`worker-id`,{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 Worker even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted Worker 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 H={command:`delete <worker-id>`,describe:`Delete Worker`,builder:V,handler:async e=>_({command:`workers 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 u();m({command:`cf workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();if(e.accountId=r,!await D({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}let i=await h(`Deleting`,async()=>n.send(B,{account_id:r,worker_id:e[`worker-id`],...t}));p(i,{successLabel:`Deleted`})})};var U={method:`POST`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`force`],body:`json`,constants:{strategy:`percentage`}};function W(e){return e.usage(`$0 workers deployments create
|
|
6
6
|
|
|
7
|
-
Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of multiple versions of a Worker.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`bypass-deployment-checks`,{type:`boolean`,description:`If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed.`}).option(`strategy`,{type:`string`,description:`The strategy field`,choices:[`percentage`]}).coerce(`strategy`,e=>C(e,`strategy`,`text`)).option(`versions`,{type:`string`,description:'Worker versions included in this deployment. Each object must contain a `version_id` UUID and a `percentage`; percentages across all objects must total 100. In the `cf` CLI, pass the entire array as one JSON value to `--versions`, either inline, for example `--versions \'[{"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]\'`, or from a JSON file with `--versions @versions.json`. 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 G={command:`create`,describe:`Create Worker Deployment`,builder:W,handler:async e=>_({command:`workers deployments create`,classification:{safeFlags:[`bypass-deployment-checks`,`strategy`,`dry-run`]}},e,async()=>{let t={force:e[`bypass-deployment-checks`]};if(e.dryRun){let n=await u();m({command:`cf workers deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?S({strategy:e.strategy,versions:
|
|
7
|
+
Deployments configure how [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions) are deployed to traffic. A deployment can consist of multiple versions of a Worker.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`bypass-deployment-checks`,{type:`boolean`,description:`If set to true, the deployment will be created even if normally blocked by something such rolling back to an older version when a secret has changed.`}).option(`strategy`,{type:`string`,description:`The strategy field`,choices:[`percentage`]}).coerce(`strategy`,e=>C(e,`strategy`,`text`)).option(`versions`,{type:`string`,description:'Worker versions included in this deployment. Each object must contain a `version_id` UUID and a `percentage`; percentages across all objects must total 100. In the `cf` CLI, pass the entire array as one JSON value to `--versions`, either inline, for example `--versions \'[{"version_id":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]\'`, or from a JSON file with `--versions @versions.json`. 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 G={command:`create`,describe:`Create Worker Deployment`,builder:W,handler:async e=>_({command:`workers deployments create`,classification:{safeFlags:[`bypass-deployment-checks`,`strategy`,`dry-run`]}},e,async()=>{let t={force:e[`bypass-deployment-checks`]};if(e.dryRun){let n=await u();m({command:`cf workers deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments`,pathParams:{"script-name":String(e[`script-name`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?S({strategy:e.strategy,versions:v(e.versions,`versions`)}):y(e.body)});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});if(e.worker=i,e.body){let a=y(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let o=await h(`Creating`,async()=>n.send(U,{body:a,account_id:r,script_name:i,...t}));p(o,{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await E(`strategy`,`The strategy field`,[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let a=S({strategy:e.strategy,versions:v(e.versions,`versions`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let s=await h(`Creating`,async()=>n.send(U,{body:a,account_id:r,script_name:i,...t}));p(s,{successLabel:`Created`})})};var K={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function q(e){return e.usage(`$0 workers deployments delete <deployment-id>
|
|
8
8
|
|
|
9
9
|
Delete a Worker Deployment. The latest deployment, which is actively serving traffic, cannot be deleted. All other deployments can be deleted.`).positional(`deployment-id`,{type:`string`,description:`Deployment ID`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).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 Worker Deployment`,builder:q,handler:async e=>_({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers deployments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/deployments/${e[`deployment-id`]==null?`<deployment-id>`:encodeURIComponent(String(e[`deployment-id`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deployment-id":String(e[`deployment-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});if(e.worker=r,!await D({force:!!e.force,message:`This will permanently delete the Worker deployment.`})){process.stderr.write(`Aborted.
|
|
10
10
|
`);return}let i=await h(`Deleting`,async()=>t.send(K,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));p(i,{successLabel:`Deleted`})})};var Y={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function X(e){return e.usage(`$0 workers deployments get <deployment-id>
|
|
@@ -22,7 +22,7 @@ Search for Worker scripts in an account.`).option(`name`,{type:`string`,descript
|
|
|
22
22
|
Create, update, or delete multiple secrets on a Worker script in a single operation using JSON Merge Patch (RFC 7396). This operation creates a single version with all changes included. Prefer this API instead of changing many secrets individually. Usage: - To create or update a secret, set its value to a secret object. - To delete a secret, set its value to \`null\`. - Secrets not included in the request are left unchanged.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`secrets`,{type:`string`,description:`Map of secret names to secret values:
|
|
23
23
|
- Set to a secret object to create or update.
|
|
24
24
|
- Set to \`null\` to delete.
|
|
25
|
-
- Omit to leave unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`version-tags`,{type:`string`,description:`Optional version tags to apply to the new script version. Provide as a JSON object 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:`JSON Merge Patch (RFC 7396) request body for bulk secret changes. `}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ve={command:`bulk`,describe:`Patch multiple Worker script secrets`,builder:_e,handler:async e=>_({command:`workers secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.file===void 0&&e.secrets===void 0&&e[`version-tags`]===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--secrets, --version-tags).`);if(e.dryRun){let t=await u();m({command:`cf workers secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets-bulk`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?S({secrets:
|
|
25
|
+
- Omit to leave unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`version-tags`,{type:`string`,description:`Optional version tags to apply to the new script version. Provide as a JSON object 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:`JSON Merge Patch (RFC 7396) request body for bulk secret changes. `}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ve={command:`bulk`,describe:`Patch multiple Worker script secrets`,builder:_e,handler:async e=>_({command:`workers secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.file===void 0&&e.secrets===void 0&&e[`version-tags`]===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--secrets, --version-tags).`);if(e.dryRun){let t=await u();m({command:`cf workers secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets-bulk`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?S({secrets:b(e.secrets,`secrets`),version_tags:b(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):y(e.body):{file:e.file}});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});if(e.worker=r,e.file){let i=w(e.file),a=await h(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i,headers:{"Content-Type":`application/merge-patch+json`}}));p(a,{successLabel:`Updated`});return}if(e.body){let i=y(e.body),a=await h(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));p(a,{successLabel:`Updated`});return}let i={};e.secrets!==void 0&&x(i,[`secrets`],b(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&x(i,[`version_tags`],b(e[`version-tags`],`version-tags`));let a=await h(`Updating`,async()=>s(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));p(a,{successLabel:`Updated`})})};var ye={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function be(e){return e.usage(`$0 workers secrets delete <secret-name>
|
|
26
26
|
|
|
27
27
|
Remove a secret from a Worker script by creating a new version without that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).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 xe={command:`delete <secret-name>`,describe:`Delete Worker script secret`,builder:be,handler:async e=>_({command:`workers secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await u();m({command:`cf workers secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=d({scriptName:e.worker});if(e.worker=i,!await D({force:!!e.force,message:`This will permanently delete the Worker script secret.`})){process.stderr.write(`Aborted.
|
|
28
28
|
`);return}let a=await h(`Deleting`,async()=>n.send(ye,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));p(a,{successLabel:`Deleted`})})};var Se={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function Ce(e){return e.usage(`$0 workers secrets get <secret-name>
|
|
@@ -31,7 +31,7 @@ Get a given secret binding (value omitted) on a Worker script.`).positional(`sec
|
|
|
31
31
|
|
|
32
32
|
List the names of secrets bound to a Worker script.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`list`,describe:`List secrets bound to a Worker script`,builder:Ee,handler:async e=>_({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});e.worker=r;let i=await h(`Loading`,async()=>t.send(Te,{account_id:n,script_name:r}));p(i,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`,body:`json`,errors:{429:`TooManyRequestsError`}};function Oe(e){return e.usage(`$0 workers secrets update <name>
|
|
33
33
|
|
|
34
|
-
Add a secret to a Worker script by creating a new version with that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`text`,{type:`string`,description:`The secret value to use.`}).option(`type`,{type:`string`,description:`The kind of resource that the binding provides.`,choices:[`secret_text`,`secret_key`]}).coerce(`type`,e=>C(e,`type`,`text`)).option(`algorithm`,{type:`string`,description:`Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). Provide as a JSON object or @path/to/file.json.`}).option(`format`,{type:`string`,description:`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,choices:[`raw`,`pkcs8`,`spki`,`jwk`]}).coerce(`format`,e=>C(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`key-jwk`,{type:`string`,description:'Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". Provide as a JSON object or @path/to/file.json.'}).option(`usages`,{type:`string`,array:!0,description:`Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A secret value accessible through a binding.`}).conflicts(`text`,[`algorithm`,`format`,`key-base64`,`key-jwk`,`usages`]).conflicts(`algorithm`,[`text`]).implies(`algorithm`,[`format`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`algorithm`,`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`key-jwk`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const ke={command:`update <name>`,describe:`Add a secret to a Worker script`,builder:Oe,handler:async e=>_({command:`workers secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?S({text:C(e.text,`text`,`text`),type:e.type,algorithm:
|
|
34
|
+
Add a secret to a Worker script by creating a new version with that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`,demandOption:!0}).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`text`,{type:`string`,description:`The secret value to use.`}).option(`type`,{type:`string`,description:`The kind of resource that the binding provides.`,choices:[`secret_text`,`secret_key`]}).coerce(`type`,e=>C(e,`type`,`text`)).option(`algorithm`,{type:`string`,description:`Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). Provide as a JSON object or @path/to/file.json.`}).option(`format`,{type:`string`,description:`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,choices:[`raw`,`pkcs8`,`spki`,`jwk`]}).coerce(`format`,e=>C(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`key-jwk`,{type:`string`,description:'Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". Provide as a JSON object or @path/to/file.json.'}).option(`usages`,{type:`string`,array:!0,description:`Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A secret value accessible through a binding.`}).conflicts(`text`,[`algorithm`,`format`,`key-base64`,`key-jwk`,`usages`]).conflicts(`algorithm`,[`text`]).implies(`algorithm`,[`format`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`algorithm`,`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`key-jwk`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const ke={command:`update <name>`,describe:`Add a secret to a Worker script`,builder:Oe,handler:async e=>_({command:`workers secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/scripts/${e.worker??`<worker>`}/secrets`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?S({text:C(e.text,`text`,`text`),type:e.type,algorithm:b(e.algorithm,`algorithm`),format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),key_jwk:b(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]):y(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let t=await c(e),n=e.local?o:await f();e.accountId=n;let r=d({scriptName:e.worker});if(e.worker=r,e.body){let i=y(e.body),a=await h(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));p(a,{successLabel:`Updated`});return}if(e.type===void 0&&(e.type=await E(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await T(`text`,`The secret value to use.`,{kind:`secret`,question:`Enter value for --text`})),e.type===`secret_key`&&e.algorithm===void 0)throw Error(`--algorithm is required (or pass --body with this field set).`);if(e.type===`secret_key`&&e.format===void 0&&(e.format=await T(`format`,`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,{question:`Enter value for --format`})),e.type===`secret_key`&&e.usages===void 0)throw Error(`--usages is required (or pass --body with this field set).`);let i=S({text:C(e.text,`text`,`text`),type:e.type,algorithm:b(e.algorithm,`algorithm`),format:e.format,key_base64:C(e[`key-base64`],`key-base64`,`text`),key_jwk:b(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]),a=await h(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));p(a,{successLabel:`Updated`})})},Ae={command:`secrets`,describe:`Operations for secrets`,builder:e=>e.command(ve).command(xe).command(we).command(De).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`DELETE`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`};function Me(e){return e.usage(`$0 workers versions delete <version-id>
|
|
35
35
|
|
|
36
36
|
Delete a Worker version.`).positional(`version-id`,{type:`string`,description:`Identifier for the version, which can be a UUID, a UUID prefix (minimum length 8), or the literal "latest" to operate on the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ne={command:`delete <version-id>`,describe:`Delete Worker Version`,builder:Me,handler:async e=>_({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`none`});return}let t=await c(e),n=e.local?o:await f();if(e.accountId=n,!await D({force:!!e.force,message:`This will permanently delete the Worker version.`})){process.stderr.write(`Aborted.
|
|
37
37
|
`);return}let r=await h(`Deleting`,async()=>t.send(je,{account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]}));p(r,{successLabel:`Deleted`})})};var Pe={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`,query:[`include`]};function Fe(e){return e.usage(`$0 workers versions get <version-id>
|
|
@@ -40,4 +40,4 @@ Get details about a specific Worker version.`).positional(`version-id`,{type:`st
|
|
|
40
40
|
|
|
41
41
|
List all versions for a Worker.`).option(`worker-id`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ze={command:`list`,describe:`List Worker Versions`,builder:Re,handler:async e=>_({command:`workers versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await u();m({command:`cf workers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions`,pathParams:{"worker-id":String(e[`worker-id`]??``)},query:t,bodyKind:`none`});return}let n=await c(e),r=e.local?o:await f();e.accountId=r;let i=await h(`Loading`,async()=>n.send(Le,{account_id:r,worker_id:e[`worker-id`],...t}));p(i,{successLabel:`Loaded`})})};function Be(e){return e.usage(`$0 workers versions profile <version-id>
|
|
42
42
|
|
|
43
|
-
Captures a CPU or heap profile from a recently active isolate running the specified Worker version. This endpoint requires the Worker profiling feature to be enabled for the account.`).positional(`version-id`,{type:`string`,description:`Identifies the version by UUID or UUID prefix with a minimum length of eight characters. Use "latest" to select the most recently created version.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifies the Worker by ID or name.`,demandOption:!0}).option(`actor-id`,{type:`string`,description:`Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested Worker version.`}).option(`duration-ms`,{type:`number`,description:`Profile duration in milliseconds.`}).option(`namespace-id`,{type:`string`,description:`Identifies the Durable Object namespace containing the actor to profile. Must be specified together with actor_id.`}).option(`profile-type`,{type:`string`,description:`The profile_type field`,choices:[`cpu`,`heap`],default:`cpu`}).coerce(`profile-type`,e=>C(e,`profile-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)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Ve={command:`profile <version-id>`,describe:`Profile Worker Version`,builder:Be,handler:async e=>_({command:`workers versions profile`,classification:{safeFlags:[`profile-type`,`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers versions profile`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}/profile`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`json`,body:e.body===void 0?S({actor_id:C(e[`actor-id`],`actor-id`,`text`),duration_ms:e[`duration-ms`],namespace_id:C(e[`namespace-id`],`namespace-id`,`text`),profile_type:e[`profile-type`]}):
|
|
43
|
+
Captures a CPU or heap profile from a recently active isolate running the specified Worker version. This endpoint requires the Worker profiling feature to be enabled for the account.`).positional(`version-id`,{type:`string`,description:`Identifies the version by UUID or UUID prefix with a minimum length of eight characters. Use "latest" to select the most recently created version, which may not be deployed. Use "latest-deployed" to profile a version in the active deployment. Versions are tried in order of traffic share until one has a loaded isolate.`,demandOption:!0}).option(`worker-id`,{type:`string`,description:`Identifies the Worker by ID or name.`,demandOption:!0}).option(`actor-id`,{type:`string`,description:`Identifies the exact Durable Object actor to profile. Must be specified together with namespace_id. The actor must currently be active and running the requested Worker version.`}).option(`duration-ms`,{type:`number`,description:`Profile duration in milliseconds.`}).option(`namespace-id`,{type:`string`,description:`Identifies the Durable Object namespace containing the actor to profile. Must be specified together with actor_id.`}).option(`profile-type`,{type:`string`,description:`The profile_type field`,choices:[`cpu`,`heap`],default:`cpu`}).coerce(`profile-type`,e=>C(e,`profile-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)`}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Ve={command:`profile <version-id>`,describe:`Profile Worker Version`,builder:Be,handler:async e=>_({command:`workers versions profile`,classification:{safeFlags:[`profile-type`,`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await u();m({command:`cf workers versions profile`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}/versions/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}/profile`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},bodyKind:`json`,body:e.body===void 0?S({actor_id:C(e[`actor-id`],`actor-id`,`text`),duration_ms:e[`duration-ms`],namespace_id:C(e[`namespace-id`],`namespace-id`,`text`),profile_type:e[`profile-type`]}):y(e.body)});return}await c(e);let t=e.local?o:await f();if(e.accountId=t,e.body){let n=y(e.body),r=await h(`Creating`,async()=>k(`/accounts/${t}/workers/workers/${encodeURIComponent(String(e[`worker-id`]))}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:JSON.stringify(n),contentType:`application/json`}));O(e.text===!0?r.toString(`utf-8`):r);return}if(e[`duration-ms`]===void 0)throw Error(`--duration-ms is required (or pass --body with this field set).`);let n={};e[`actor-id`]!==void 0&&x(n,[`actor_id`],C(e[`actor-id`],`actor-id`,`text`)),e[`duration-ms`]!==void 0&&x(n,[`duration_ms`],e[`duration-ms`]),e[`namespace-id`]!==void 0&&x(n,[`namespace_id`],C(e[`namespace-id`],`namespace-id`,`text`)),e[`profile-type`]!==void 0&&x(n,[`profile_type`],e[`profile-type`]);let r=await h(`Creating`,async()=>k(`/accounts/${t}/workers/workers/${encodeURIComponent(String(e[`worker-id`]))}/versions/${encodeURIComponent(String(e[`version-id`]))}/profile`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo,body:Object.keys(n).length>0?n:void 0}));O(e.text===!0?r.toString(`utf-8`):r)})};function $(e){return L(e).hide(`local`).hide(`persist-to`).epilogue(`Local simulation (--local) is not supported by this command.`).option(`preview-alias`,{type:`string`,description:`Preview alias for this Worker Version`,requiresArg:!0})}var He=g({command:`create`,describe:`Upload a new Worker Version without deploying it`,builder:$,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers versions create.`);await R(e,{command:`Version upload`})}},{command:`workers versions create`,classification:{safeFlags:[`dry-run`,`prebuilt`]}});const Ue={command:`versions`,describe:`Operations for versions`,builder:e=>e.command(a(He,`native`)).command(Ne).command(Ie).command(ze).command(Ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var We=e(`check`,`Profile a Worker's startup performance`,()=>import(`./command-CFV1cqfR.mjs`),{command:`workers check`,classification:{safeFlags:[`prebuilt`]}});function Ge(e){return e.hide(`local`).hide(`persist-to`).epilogue(`Local simulation (--local) is not supported by this command.`).option(`prebuilt`,{type:`boolean`,description:`Use existing Build Output Specification files without building`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Run checks without applying triggers`,default:!1}).option(`worker`,F)}const Ke={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:Ge,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf workers triggers deploy.`);if(!e.prebuilt){if(await N(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){l.success(`--dry-run: exiting now.`);return}l.message(``,{spacing:0})}await n(e,()=>qe(e))}};async function qe(e){let{workers:n,rootConfig:i}=await z(process.cwd());if(i.buildContext.isPreview){let e=[`cf previews deploy`,`--prebuilt`,...i.buildContext.mode===void 0?[]:[`--mode`,i.buildContext.mode]].join(` `);throw Error(`The Build Output was created for a Preview, but this command deploys production triggers. To use the existing Build Output and deploy the Preview, run "${e}". To deploy production triggers, rebuild without Preview settings before deploying.`)}P(e.mode,i.buildContext.mode);let a=j(n,e.worker),{wranglerConfig:o}=M(a,i),s=e[`dry-run`]?``:await te(),c=e[`dry-run`]?void 0:i.accountId??await f({skipProjectSettings:!0,complianceRegion:r(o)});ne(ee(s)),l.message(t.bold(`Deploy triggers`),{symbol:t.muted(`├`),spacing:0}),await A({...I(a,o,c,e),queueCreateCommand:e=>`cf queues create --queue-name ${e}`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`}),e[`dry-run`]||l.success(`Trigger deploy complete`)}const Je={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(g(Ke,{command:`workers triggers deploy`,classification:{safeFlags:[`dry-run`,`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ye=e(`types`,`Generate types from cloudflare.config.ts`,()=>import(`./command-D203VrTG.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});const Xe={command:`workers`,describe:`workers`,builder:e=>e.command(a(We,`preview`)).command(H).command(le).command(fe).command(a(Ye,`preview`)).command(oe).command(ge).command(Ae).command(a(Je,`native`)).command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Xe as default};
|
|
@@ -1,14 +1,14 @@
|
|
|
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-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as l,n as u,r as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/migrate_to_previews`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function h(e){return e.usage(`$0 workers-builds workers migrate-to-previews <script-tag>
|
|
3
3
|
|
|
4
|
-
Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`deploy-command`,{type:`string`,description:`Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for migrating a Worker's legacy non-production trigger to Previews.`})}const
|
|
4
|
+
Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`deploy-command`,{type:`string`,description:`Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for migrating a Worker's legacy non-production trigger to Previews.`})}const g={command:`migrate-to-previews <script-tag>`,describe:`Migrate worker to previews`,builder:h,handler:async e=>c({command:`workers-builds workers migrate-to-previews`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-builds workers migrate-to-previews`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/migrate_to_previews`,pathParams:{"script-tag":String(e[`script-tag`]??``)},bodyKind:`json`,body:e.body===void 0?f({deploy_command:p(e[`deploy-command`],`deploy-command`,`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(m,{body:t,account_id:l,script_tag:e[`script-tag`]}));a(n,{successLabel:`Created`});return}let d=f({deploy_command:p(e[`deploy-command`],`deploy-command`,`text`)}),h=await s(`Creating`,async()=>c.send(m,{body:d,account_id:l,script_tag:e[`script-tag`]}));a(h,{successLabel:`Created`})})};var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}/builds`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function v(e){return e.usage(`$0 workers-builds workers previews create-build <preview-id>
|
|
5
5
|
|
|
6
|
-
Trigger a build for a single Preview.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>
|
|
6
|
+
Trigger a build for a single Preview.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>p(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).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([`seed-repo-branch`,`seed-repo-files`,`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0)){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].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 --seed_repo-* flag is set`)}return!0})}const y={command:`create-build <preview-id>`,describe:`Create preview build`,builder:v,handler:async e=>c({command:`workers-builds workers previews create-build`,classification:{safeFlags:[`seed-repo-provider`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews create-build`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}/builds`,pathParams:{"script-tag":String(e[`script-tag`]??``),"preview-id":String(e[`preview-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):u(e.body)});return}let c=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(_,{body:t,account_id:d,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(n,{successLabel:`Created`});return}let m=f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),h=await s(`Creating`,async()=>c.send(_,{body:m,account_id:d,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(h,{successLabel:`Created`})})};var b={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function x(e){return e.usage(`$0 workers-builds workers previews edit <preview-id>
|
|
7
7
|
|
|
8
|
-
Update a single Preview of a Worker. Supports partial updates to the tracked branch, the automation flags, and the build settings.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`auto-build`,{type:`boolean`,description:`Whether pushes to the git branch build this Preview. Deploy hooks, manual builds, and retries run regardless of this setting.`}).option(`auto-delete`,{type:`boolean`,description:`Whether deleting the git branch also deletes this Preview.`}).option(`branch`,{type:`string`,description:`Git branch this Preview tracks`}).option(`settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Preview. At least one field must be provided, and omitted fields are left unchanged.`})}const
|
|
8
|
+
Update a single Preview of a Worker. Supports partial updates to the tracked branch, the automation flags, and the build settings.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`auto-build`,{type:`boolean`,description:`Whether pushes to the git branch build this Preview. Deploy hooks, manual builds, and retries run regardless of this setting.`}).option(`auto-delete`,{type:`boolean`,description:`Whether deleting the git branch also deletes this Preview.`}).option(`branch`,{type:`string`,description:`Git branch this Preview tracks`}).option(`settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Preview. At least one field must be provided, and omitted fields are left unchanged.`})}const S={command:`edit <preview-id>`,describe:`Update preview`,builder:x,handler:async e=>c({command:`workers-builds workers previews edit`,classification:{safeFlags:[`auto-build`,`auto-delete`,`settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``),"preview-id":String(e[`preview-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({auto_build:e[`auto-build`],auto_delete:e[`auto-delete`],branch:p(e.branch,`branch`,`text`),settings:{build_caching_enabled:e[`settings-build-caching-enabled`],build_command:p(e[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:p(e[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:p(e[`settings-deploy-command`],`settings-deploy-command`,`text`),environment_variables:d(e[`settings-environment-variables`],`settings-environment-variables`),path_excludes:e[`settings-path-excludes`],path_includes:e[`settings-path-includes`],root_directory:p(e[`settings-root-directory`],`settings-root-directory`,`text`)}},[[`settings`,`environment_variables`]]):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(`Updating`,async()=>c.send(b,{body:t,account_id:l,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(n,{successLabel:`Updated`});return}let m=f({auto_build:e[`auto-build`],auto_delete:e[`auto-delete`],branch:p(e.branch,`branch`,`text`),settings:{build_caching_enabled:e[`settings-build-caching-enabled`],build_command:p(e[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:p(e[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:p(e[`settings-deploy-command`],`settings-deploy-command`,`text`),environment_variables:d(e[`settings-environment-variables`],`settings-environment-variables`),path_excludes:e[`settings-path-excludes`],path_includes:e[`settings-path-includes`],root_directory:p(e[`settings-root-directory`],`settings-root-directory`,`text`)}},[[`settings`,`environment_variables`]]),h=await s(`Updating`,async()=>c.send(b,{body:m,account_id:l,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(h,{successLabel:`Updated`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function w(e){return e.usage(`$0 workers-builds workers previews get <preview-id>
|
|
9
9
|
|
|
10
|
-
Retrieve a single Preview of a Worker, including the build settings it currently uses.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
10
|
+
Retrieve a single Preview of a Worker, including the build settings it currently uses.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <preview-id>`,describe:`Get preview`,builder:w,handler:async e=>c({command:`workers-builds workers previews get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``),"preview-id":String(e[`preview-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(C,{account_id:l,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(u,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}/builds`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function D(e){return e.usage(`$0 workers-builds workers previews list-builds <preview-id>
|
|
11
11
|
|
|
12
|
-
List the builds of a single Preview with pagination.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
12
|
+
List the builds of a single Preview with pagination.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list-builds <preview-id>`,describe:`List builds by preview`,builder:D,handler:async e=>c({command:`workers-builds workers previews list-builds`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews list-builds`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}/builds`,pathParams:{"script-tag":String(e[`script-tag`]??``),"preview-id":String(e[`preview-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(E,{account_id:u,script_tag:e[`script-tag`],preview_id:e[`preview-id`],...c}));a(d,{successLabel:`Loaded`})})};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function A(e){return e.usage(`$0 workers-builds workers previews list
|
|
13
13
|
|
|
14
|
-
List the Previews of a Worker with pagination.`).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
14
|
+
List the Previews of a Worker with pagination.`).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List previews`,builder:A,handler:async e=>c({command:`workers-builds workers previews list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews`,pathParams:{"script-tag":String(e[`script-tag`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(k,{account_id:u,script_tag:e[`script-tag`],...c}));a(d,{successLabel:`Loaded`})})},M={command:`previews`,describe:`Operations for workers.previews`,builder:e=>e.command(y).command(S).command(T).command(j).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},N={command:`workers`,describe:`Operations for workers`,builder:e=>e.command(g).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`workers-builds`,describe:`workers-builds`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
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-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as u,r as d,s 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-1AC-qwxS.mjs";var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces`,body:`json`};function ee(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces create
|
|
3
3
|
|
|
4
|
-
Create a new Workers for Platforms dispatch namespace.`).option(`name`,{type:`string`,description:`The name of the dispatch namespace.`}).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 te={command:`create`,describe:`Create Workers for Platforms Dispatch Namespace`,builder:ee,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):
|
|
4
|
+
Create a new Workers for Platforms dispatch namespace.`).option(`name`,{type:`string`,description:`The name of the dispatch namespace.`}).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 te={command:`create`,describe:`Create Workers for Platforms Dispatch Namespace`,builder:ee,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let d=p({name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(y,{body:d,account_id:l}));o(f,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}`};function x(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces delete <dispatch-namespace>
|
|
5
5
|
|
|
6
6
|
Delete a Workers for Platforms dispatch namespace.`).positional(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <dispatch-namespace>`,describe:`Delete Workers for Platforms Dispatch Namespace`,builder:x,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`This will permanently delete the Workers for Platforms dispatch namespace.`})){process.stderr.write(`Aborted.
|
|
7
7
|
`);return}let u=await c(`Deleting`,async()=>n.send(b,{account_id:l,dispatch_namespace:e[`dispatch-namespace`]}));o(u,{successLabel:`Deleted`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}`};function w(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces get <dispatch-namespace>
|
|
@@ -22,7 +22,7 @@ Fetch a list of scripts uploaded to a Workers for Platforms dispatch namespace.`
|
|
|
22
22
|
Create, update, or delete multiple secrets on a Workers for Platforms script in a single operation using JSON Merge Patch (RFC 7396). This operation creates a single version with all changes included. Prefer this API instead of changing many secrets individually. Usage: - To create or update a secret, set its value to a secret object. - To delete a secret, set its value to \`null\`. - Secrets not included in the request are left unchanged.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`secrets`,{type:`string`,description:`Map of secret names to secret values:
|
|
23
23
|
- Set to a secret object to create or update.
|
|
24
24
|
- Set to \`null\` to delete.
|
|
25
|
-
- Omit to leave unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`version-tags`,{type:`string`,description:`Optional version tags to apply to the new script version. Provide as a JSON object 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:`JSON Merge Patch (RFC 7396) request body for bulk secret changes. `}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const U={command:`bulk`,describe:`Patch multiple Workers for Platforms script secrets`,builder:H,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.file===void 0&&e.secrets===void 0&&e[`version-tags`]===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--secrets, --version-tags).`);if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?p({secrets:
|
|
25
|
+
- Omit to leave unchanged. Provide as a JSON object or @path/to/file.json.`}).option(`version-tags`,{type:`string`,description:`Optional version tags to apply to the new script version. Provide as a JSON object 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:`JSON Merge Patch (RFC 7396) request body for bulk secret changes. `}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const U={command:`bulk`,describe:`Patch multiple Workers for Platforms script secrets`,builder:H,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets bulk`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.file===void 0&&e.secrets===void 0&&e[`version-tags`]===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--secrets, --version-tags).`);if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets bulk`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:e.file===void 0?`json`:`octet-stream`,body:e.file===void 0?e.body===void 0?p({secrets:d(e.secrets,`secrets`),version_tags:d(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):u(e.body):{file:e.file}});return}let l=await r(e),m=e.local?t:await a();if(e.accountId=m,e.file){let t=h(e.file),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${m}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:t,headers:{"Content-Type":`application/merge-patch+json`}}));o(r,{successLabel:`Updated`});return}if(e.body){let t=u(e.body),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${m}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:t}));o(r,{successLabel:`Updated`});return}let g={};e.secrets!==void 0&&f(g,[`secrets`],d(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&f(g,[`version_tags`],d(e[`version-tags`],`version-tags`));let _=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${m}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:g}));o(_,{successLabel:`Updated`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets/${t.secret_name}`,query:[`url_encoded`]};function W(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets delete <secret-name>
|
|
26
26
|
|
|
27
27
|
Remove a secret from a Workers for Platforms script by creating a new version without that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).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 G={command:`delete <secret-name>`,describe:`Delete Workers for Platforms script secret`,builder:W,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets delete`,classification:{safeFlags:[`url-encoded`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={url_encoded:e[`url-encoded`]};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets/${e[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(e[`secret-name`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``),"secret-name":String(e[`secret-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await v({force:!!e.force,message:`This will permanently delete the Workers for Platforms script secret.`})){process.stderr.write(`Aborted.
|
|
28
28
|
`);return}let d=await c(`Deleting`,async()=>l.send(ne,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...n}));o(d,{successLabel:`Deleted`})})};var K={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets/${t.secret_name}`,query:[`url_encoded`]};function q(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets get <secret-name>
|
|
@@ -31,7 +31,7 @@ Get a given secret binding (value omitted) on a script uploaded to a Workers for
|
|
|
31
31
|
|
|
32
32
|
List secrets bound to a script uploaded to a Workers for Platforms dispatch namespace.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Workers for Platforms Script Secrets`,builder:X,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Y,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets`,body:`json`,errors:{429:`TooManyRequestsError`}};function re(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets update <script-name>
|
|
33
33
|
|
|
34
|
-
Add a secret to a Workers for Platforms script by creating a new version with that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`}).option(`text`,{type:`string`,description:`The secret value to use.`}).option(`type`,{type:`string`,description:`The kind of resource that the binding provides.`,choices:[`secret_text`,`secret_key`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`algorithm`,{type:`string`,description:`Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). Provide as a JSON object or @path/to/file.json.`}).option(`format`,{type:`string`,description:`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,choices:[`raw`,`pkcs8`,`spki`,`jwk`]}).coerce(`format`,e=>m(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`key-jwk`,{type:`string`,description:'Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". Provide as a JSON object or @path/to/file.json.'}).option(`usages`,{type:`string`,array:!0,description:`Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A secret value accessible through a binding.`}).conflicts(`text`,[`algorithm`,`format`,`key-base64`,`key-jwk`,`usages`]).conflicts(`algorithm`,[`text`]).implies(`algorithm`,[`format`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`algorithm`,`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`key-jwk`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const ie={command:`update <script-name>`,describe:`Add a secret to a Workers for Platforms script`,builder:re,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),text:m(e.text,`text`,`text`),type:e.type,algorithm:
|
|
34
|
+
Add a secret to a Workers for Platforms script by creating a new version with that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`}).option(`text`,{type:`string`,description:`The secret value to use.`}).option(`type`,{type:`string`,description:`The kind of resource that the binding provides.`,choices:[`secret_text`,`secret_key`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`algorithm`,{type:`string`,description:`Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). Provide as a JSON object or @path/to/file.json.`}).option(`format`,{type:`string`,description:`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,choices:[`raw`,`pkcs8`,`spki`,`jwk`]}).coerce(`format`,e=>m(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`key-jwk`,{type:`string`,description:'Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". Provide as a JSON object or @path/to/file.json.'}).option(`usages`,{type:`string`,array:!0,description:`Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A secret value accessible through a binding.`}).conflicts(`text`,[`algorithm`,`format`,`key-base64`,`key-jwk`,`usages`]).conflicts(`algorithm`,[`text`]).implies(`algorithm`,[`format`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`algorithm`,`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`key-jwk`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const ie={command:`update <script-name>`,describe:`Add a secret to a Workers for Platforms script`,builder:re,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),text:m(e.text,`text`,`text`),type:e.type,algorithm:d(e.algorithm,`algorithm`),format:e.format,key_base64:m(e[`key-base64`],`key-base64`,`text`),key_jwk:d(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]):u(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(Q,{body:t,account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await g(`name`,`A JavaScript variable name for the binding.`)),e.type===void 0&&(e.type=await _(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await g(`text`,`The secret value to use.`,{kind:`secret`,question:`Enter value for --text`})),e.type===`secret_key`&&e.algorithm===void 0)throw Error(`--algorithm is required (or pass --body with this field set).`);if(e.type===`secret_key`&&e.format===void 0&&(e.format=await g(`format`,`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,{question:`Enter value for --format`})),e.type===`secret_key`&&e.usages===void 0)throw Error(`--usages is required (or pass --body with this field set).`);let f=p({name:m(e.name,`name`,`text`),text:m(e.text,`text`,`text`),type:e.type,algorithm:d(e.algorithm,`algorithm`),format:e.format,key_base64:m(e[`key-base64`],`key-base64`,`text`),key_jwk:d(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]),h=await c(`Updating`,async()=>n.send(Q,{body:f,account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(h,{successLabel:`Updated`})})},ae={command:`secrets`,describe:`Operations for dispatch-namespaces.scripts.secrets`,builder:e=>e.command(U).command(G).command(J).command(Z).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/settings`,pathParams:[`account_id`,`dispatch_namespace`,`script_name`],body:`form`};function se(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts settings edit <script-name>
|
|
35
35
|
|
|
36
36
|
Patch metadata for a script uploaded to a Workers for Platforms dispatch namespace, such as bindings.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`settings`,{type:`string`,description:`Script and version settings for Workers for Platforms namespace scripts. Same as script-and-version-settings-item but without annotations, which are not supported for namespace scripts. `})}const ce={command:`edit <script-name>`,describe:`Patch Workers for Platforms Script Settings`,builder:se,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts settings edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/settings`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,settings:e.settings}});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.settings!==void 0){let t=new FormData;if(e.file){let n=h(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);if(e.settings!==void 0){let n=typeof e.settings==`string`?m(e.settings,`settings`,`text`):e.settings;t.append(`settings`,typeof n==`string`?n:JSON.stringify(n))}let r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/settings`,{body:t}));o(r,{successLabel:`Updated`});return}if(e.body){let t=m(e.body,`body`,`binary`),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/settings`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));o(r,{successLabel:`Updated`});return}let d=await c(`Updating`,async()=>l.send(oe,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(d,{successLabel:`Updated`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/settings`};function ue(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts settings get <script-name>
|
|
37
37
|
|
|
@@ -40,4 +40,4 @@ Get settings for a script uploaded to a Workers for Platforms dispatch namespace
|
|
|
40
40
|
|
|
41
41
|
Fetch tags from a script uploaded to a Workers for Platforms dispatch namespace.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list`,describe:`List Workers for Platforms Script Tags`,builder:he,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(me,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};function _e(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags update <script-name>
|
|
42
42
|
|
|
43
|
-
Replace tags for a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Tags associated with the Worker.`})}const ve={command:`update <script-name>`,describe:`Replace Workers for Platforms Script Tags`,builder:_e,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:
|
|
43
|
+
Replace tags for a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Tags associated with the Worker.`})}const ve={command:`update <script-name>`,describe:`Replace Workers for Platforms Script Tags`,builder:_e,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body){let t=u(e.body);if(Array.isArray(t)&&t.length>10){let r=Math.ceil(t.length/10),i=null;for(let a=0;a<t.length;a+=10){let o=t.slice(a,a+10),s=Math.floor(a/10)+1;i=await c(`Updating: batch ${s}/${r}`,async()=>n(l,`PUT`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags`,{body:o}))}o(i,{successLabel:`Updated`});return}let r=await c(`Updating`,async()=>n(l,`PUT`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags`,{body:t}));o(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ye={command:`tags`,describe:`Operations for dispatch-namespaces.scripts.tags`,builder:e=>e.command($).command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`scripts`,describe:`Operations for dispatch-namespaces.scripts`,builder:e=>e.command(F).command(R).command(V).command(M).command(ae).command(fe).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`dispatch-namespaces`,describe:`Operations for dispatch-namespaces`,builder:e=>e.command(te).command(S).command(T).command(O).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`workers-for-platforms`,describe:`workers-for-platforms`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Se 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-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-1AC-qwxS.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services`,body:`json`};function g(e){return e.usage(`$0 workers-vpc services create
|
|
3
3
|
|
|
4
4
|
Creates a new Workers VPC connectivity service in the account.`).option(`host-ipv4`,{type:`string`,description:`The host.ipv4 field`}).option(`host-network-tunnel-id`,{type:`string`,description:`The host.network.tunnel_id field`}).option(`host-ipv6`,{type:`string`,description:`The host.ipv6 field`}).option(`host-hostname`,{type:`string`,description:`The host.hostname field`}).option(`host-resolver-network-resolver-ips`,{type:`string`,array:!0,description:`The host.resolver_network.resolver_ips field`}).option(`host-resolver-network-tunnel-id`,{type:`string`,description:`The host.resolver_network.tunnel_id field`}).option(`name`,{type:`string`,description:`The name field`}).option(`tls-settings-cert-verification-mode`,{type:`string`,description:'TLS certificate verification mode for the connection to the origin.\n\n- `"verify_full"` — verify certificate chain and hostname (default)\n- `"verify_ca"` — verify certificate chain only, skip hostname check\n- `"disabled"` — do not verify the server certificate at all'}).option(`type`,{type:`string`,description:`The type field`,choices:[`tcp`,`http`]}).coerce(`type`,e=>d(e,`type`,`text`)).option(`http-port`,{type:`number`,description:`The http_port field`}).option(`https-port`,{type:`number`,description:`The https_port field`}).option(`app-protocol`,{type:`string`,description:`The app_protocol field`,choices:[`postgresql`,`mysql`]}).coerce(`app-protocol`,e=>d(e,`app-protocol`,`text`)).option(`tcp-port`,{type:`number`,description:`The tcp_port field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`host-ipv4`,[`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-ipv6`,[`host-ipv4`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-hostname`,[`host-ipv4`,`host-ipv6`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-ipv6`]).conflicts(`http-port`,[`app-protocol`,`tcp-port`]).conflicts(`https-port`,[`app-protocol`,`tcp-port`]).conflicts(`app-protocol`,[`http-port`,`https-port`]).conflicts(`tcp-port`,[`http-port`,`https-port`]).check(e=>{if([`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`].some(t=>e[t]!==void 0)){let t=[`host-network-tunnel-id`,`host-resolver-network-tunnel-id`].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 --host-* flag is set`)}return!0}).check(e=>{if([`tls-settings-cert-verification-mode`].some(t=>e[t]!==void 0)){let t=[`tls-settings-cert-verification-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 --tls_settings-* flag is set`)}return!0})}const _={command:`create`,describe:`Create Workers VPC connectivity service`,builder:g,handler:async e=>c({command:`workers-vpc services create`,classification:{safeFlags:[`type`,`app-protocol`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-vpc services create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({host:{ipv4:d(e[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:d(e[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:d(e[`host-ipv6`],`host-ipv6`,`text`),hostname:d(e[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:e[`host-resolver-network-resolver-ips`],tunnel_id:d(e[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:d(e.name,`name`,`text`),tls_settings:{cert_verification_mode:d(e[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:e.type,http_port:e[`http-port`],https_port:e[`https-port`],app_protocol:e[`app-protocol`],tcp_port:e[`tcp-port`]}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`The name field`)),e.type===void 0&&(e.type=await p(`type`,`The type field`,[`tcp`,`http`]));let g=u({host:{ipv4:d(e[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:d(e[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:d(e[`host-ipv6`],`host-ipv6`,`text`),hostname:d(e[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:e[`host-resolver-network-resolver-ips`],tunnel_id:d(e[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:d(e.name,`name`,`text`),tls_settings:{cert_verification_mode:d(e[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:e.type,http_port:e[`http-port`],https_port:e[`https-port`],app_protocol:e[`app-protocol`],tcp_port:e[`tcp-port`]}),_=await s(`Creating`,async()=>c.send(h,{body:g,account_id:m}));a(_,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services/${t.service_id}`,response:!1};function y(e){return e.usage(`$0 workers-vpc services delete <service-id>
|
|
5
5
|
|