cf 1.0.0-beta.20 → 1.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_meta/commands.json +911 -751
- package/dist/_meta/schemas.json +401 -382
- package/dist/{abuse-reports-mKv00yPh.mjs → abuse-reports-CbUAnJxd.mjs} +1 -1
- package/dist/{access-CyRjTbhh.mjs → access-C-78DlxL.mjs} +1 -1
- package/dist/{accounts-BmF_YKvG.mjs → accounts-DEqQPxCz.mjs} +8 -15
- package/dist/{acm-BcIFiAb8.mjs → acm-jmhCq3Yh.mjs} +2 -3
- package/dist/{addressing-D6xVD7MM.mjs → addressing-BeYFpQvC.mjs} +12 -23
- package/dist/{agent-memory-Blldunhv.mjs → agent-memory-Chlovb7j.mjs} +5 -9
- package/dist/{ai-CU8tdTfC.mjs → ai-BndH3HYN.mjs} +2 -3
- package/dist/{ai-audit-Id3hq5pV.mjs → ai-audit-BUJ-70O_.mjs} +1 -1
- package/dist/{ai-gateway-BKeZ28CQ.mjs → ai-gateway-CCk7VKhL.mjs} +9 -15
- package/dist/{ai-search-DOiZEmn7.mjs → ai-search-BexET_wp.mjs} +6 -11
- package/dist/{ai-security-CioADDZi.mjs → ai-security-D4MxRlxX.mjs} +3 -5
- package/dist/{alerting-BzN1N3Se.mjs → alerting-rw8Oi3x7.mjs} +5 -9
- package/dist/{analytics-engine-CugCQfDe.mjs → analytics-engine-Bk7dQLcm.mjs} +1 -1
- package/dist/{analytics-Cte-DrzH.mjs → analytics-q-guNEOK.mjs} +1 -1
- package/dist/{api-security-CCs0g510.mjs → api-security-BDc6gkf1.mjs} +9 -17
- package/dist/{argo-BHBFZnmO.mjs → argo-CnLIqm0i.mjs} +1 -1
- package/dist/args-BAOHroBC.mjs +2 -0
- package/dist/{artifacts-BzAwvrCD.mjs → artifacts-Cil33dzV.mjs} +4 -7
- package/dist/{audit-logs-jWivEKCy.mjs → audit-logs--E2Eclb7.mjs} +1 -1
- package/dist/auth-B0lEsD_1.mjs +2 -0
- package/dist/{auth-BUQscD5b.mjs → auth-BcNLQji1.mjs} +1 -1
- package/dist/auth-BtZmY6sE.mjs +2 -0
- package/dist/{auth-token-T0aqYgl9.mjs → auth-token-aF5AVLlH.mjs} +1 -1
- package/dist/{autoconfig-CBdcYYf4.mjs → autoconfig-Dbp6J25P.mjs} +88 -88
- package/dist/{basin-catalog-_8w_4599.mjs → basin-catalog-dnVyzopm.mjs} +3 -5
- package/dist/{billing-Ce0WN0yw.mjs → billing-Fqp3jB2V.mjs} +2 -3
- package/dist/{blocks-CFAm0Ma3.mjs → blocks-BOQH-Won.mjs} +1 -1
- package/dist/{bot-management-DskcSr4B.mjs → bot-management-SEDgo1Xg.mjs} +1 -1
- package/dist/{botnet-feed-CmBm13-D.mjs → botnet-feed-DPqR4M0Y.mjs} +2 -3
- package/dist/{brand-protection-DTuFrsN0.mjs → brand-protection-B8vwKfM9.mjs} +2 -3
- package/dist/{browser-run-CXdzSOHa.mjs → browser-run-BybYDq3I.mjs} +3 -5
- package/dist/build-BqGmiORA.mjs +2 -0
- package/dist/build-CWlpWVBf.mjs +2 -0
- package/dist/{builds-_1u5Nx6f.mjs → builds-CvtOG-Gk.mjs} +8 -15
- package/dist/cache-Bme_d2Wx.mjs +36 -0
- package/dist/cf-fIBhEAxU.mjs +18 -0
- package/dist/chunk-DSGVRFIS-DHC6NOIj.mjs +2 -0
- package/dist/{chunk-2K52M2W5-iYNzknM1.mjs → chunk-XVBBSNW2-DfMyGS-l.mjs} +8 -8
- package/dist/{cli-DyhOdzMo.mjs → cli-CIKDqm-u.mjs} +3 -3
- package/dist/{client-side-security-DnnYaRsd.mjs → client-side-security-ZQeRoo1t.mjs} +2 -3
- package/dist/{cloud-connector-Ct6b6pz8.mjs → cloud-connector-BeunZlNV.mjs} +1 -1
- package/dist/{cloudflared-CHLpWU35.mjs → cloudflared-DbzoIouQ.mjs} +1 -1
- package/dist/{cloudforce-one-Rl6nCCm0.mjs → cloudforce-one-D20t9ojD.mjs} +26 -51
- package/dist/{command-BwgvUpNx.mjs → command-B3uWlw57.mjs} +1 -1
- package/dist/{command-DuLxEkGq.mjs → command-BGRucANI.mjs} +1 -1
- package/dist/{command-BONLLcyz.mjs → command-C6kE7BU0.mjs} +1 -1
- package/dist/{command-DOpykk8X.mjs → command-C9CNvZi_.mjs} +1 -1
- package/dist/{command-BRpBIju7.mjs → command-CQ5qHE7n.mjs} +1 -1
- package/dist/{command-CHGc-KZ7.mjs → command-CkZkTjIj.mjs} +1 -1
- package/dist/{command-BRXOUAGD.mjs → command-CqKRlHGv.mjs} +1 -1
- package/dist/{command-BwlIi3Bv.mjs → command-CtlD6MEi.mjs} +1 -1
- package/dist/{command-CXzje7qc.mjs → command-CzWWQv8j.mjs} +1 -1
- package/dist/{command-BMYi_gS-.mjs → command-DWWuXQV8.mjs} +1 -1
- package/dist/{command-CPDQPdss.mjs → command-DkwmylF2.mjs} +1 -1
- package/dist/{command-CMa807gY.mjs → command-MxFFWqMg.mjs} +1 -1
- package/dist/{command-BVO9UOuU.mjs → command-orlUsdgf.mjs} +1 -1
- package/dist/{command-CVoDyQnL.mjs → command-prWMAJbg.mjs} +1 -1
- package/dist/{command-0WS5I_JW.mjs → command-rUCxlpQI.mjs} +1 -1
- package/dist/command-resolution-DAQ4PWUt.mjs +2 -0
- package/dist/{completions-DMwrvK_S.mjs → completions-2Otv0HMd.mjs} +1 -1
- package/dist/{connector-interrupts-DyWilINb.mjs → connector-interrupts-Dfhxupmg.mjs} +1 -1
- package/dist/{connector-telemetry-events-BUW9qTOs.mjs → connector-telemetry-events-CLVpDTIa.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-Djs5QssR.mjs → connector-telemetry-snapshots-E_1tmNmQ.mjs} +1 -1
- package/dist/{connectors-e_cpzDEm.mjs → connectors-ChJpQFSl.mjs} +2 -3
- package/dist/{containers-CEH15JUu.mjs → containers-Cj5-9nUg.mjs} +6 -9
- package/dist/containers-CzAZfmnj.mjs +380 -0
- package/dist/{content-scan-B6Ahw9JA.mjs → content-scan-CIA_9PV8.mjs} +3 -5
- package/dist/{context-Sgba0fZP.mjs → context-DVh8Wyfs.mjs} +2 -2
- package/dist/{cps-uDD0SSJ-.mjs → cps-hJkqdsHx.mjs} +1 -1
- package/dist/{csam-scanner-BSUl7jGn.mjs → csam-scanner-cCVO3lNF.mjs} +1 -1
- package/dist/{custom-csrs-BDcXggph.mjs → custom-csrs-BrTWUZ0c.mjs} +2 -3
- package/dist/{custom-hostnames-UmIlwkwt.mjs → custom-hostnames-C4ft77oC.mjs} +4 -7
- package/dist/{custom-nameservers-D7kU6d--.mjs → custom-nameservers-BWfrZhD1.mjs} +2 -3
- package/dist/{custom-pages-CkhIQCfM.mjs → custom-pages-DqTMKtRc.mjs} +2 -3
- package/dist/{d1-myRLEAGs.mjs → d1-B58AA9PA.mjs} +3 -6
- package/dist/delegate-D7yYckA4.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BJqCpycz.mjs → deploy-CEROLAdh.mjs} +1 -1
- package/dist/deploy-context-Do89WayB.mjs +56 -0
- package/dist/{deploy-input-v2DryyLP.mjs → deploy-input-DyMuMsi5.mjs} +1 -1
- package/dist/{dev-S1PJi83q.mjs → dev-BaFS7kOM.mjs} +2 -2
- package/dist/{diagnostics-q65rcNIk.mjs → diagnostics-4gfYj7Pf.mjs} +2 -3
- package/dist/dialog-D5lus4M4.mjs +2 -0
- package/dist/discover-6kAmVMPp.mjs +2 -0
- package/dist/discover-C06Syc2B.mjs +2 -0
- package/dist/dist-BtzWfAjU.mjs +453 -0
- package/dist/dls-ClWVxTBg.mjs +16 -0
- package/dist/{dns-DhARjFQs.mjs → dns-CML-wxIt.mjs} +68 -68
- package/dist/{dns-firewall-BP6r9QG6.mjs → dns-firewall-CL0b3dJ1.mjs} +2 -3
- package/dist/{docs-CReGWDrw.mjs → docs-BeYBHwUN.mjs} +1 -1
- package/dist/{dotenv-Ck-6V1hm.mjs → dotenv-CmPRiXmU.mjs} +1 -1
- package/dist/{dry-run-BBjUQUhR.mjs → dry-run-gy0Hl9xo.mjs} +1 -1
- package/dist/{durable-objects-tOJy-5te.mjs → durable-objects-uZECeq_f.mjs} +1 -1
- package/dist/{email-auth-Bq9sq_2j.mjs → email-auth-CCNW798I.mjs} +1 -1
- package/dist/email-domains-1rD1d84O.mjs +12 -0
- package/dist/{email-routing-CYo4dp50.mjs → email-routing-CYv-LrbV.mjs} +4 -7
- package/dist/{email-security-CNtWET2d.mjs → email-security-CWEUYPYo.mjs} +16 -31
- package/dist/{email-sending-BvagNLRr.mjs → email-sending-DHSzCfJx.mjs} +3 -5
- package/dist/{errors-DpbAQQv8.mjs → errors-ol9sMqSe.mjs} +8 -8
- package/dist/{field-extractors-C9R3Qivh.mjs → field-extractors-CuBM_uO4.mjs} +2 -3
- package/dist/{firewall-DsgUY-Qv.mjs → firewall-SMIUSypF.mjs} +4 -7
- package/dist/flagship-D3v6iDdw.mjs +24 -0
- package/dist/{fraud-24l8dKyk.mjs → fraud-B2f7O15X.mjs} +1 -1
- package/dist/{google-tag-gateway-CAkudP5W.mjs → google-tag-gateway-BwOc62Gy.mjs} +1 -1
- package/dist/{gt-D6YemCLh.mjs → gt-BQkaDQDq.mjs} +1 -1
- package/dist/{healthchecks-CEGMe3lO.mjs → healthchecks-BQXHnihB.mjs} +3 -5
- package/dist/{hyperdrive-DLDaOU2O.mjs → hyperdrive-Bd6Yfje3.mjs} +2 -3
- package/dist/{iam-ChldOMSL.mjs → iam-qJPI1_aZ.mjs} +5 -9
- package/dist/{images-Ba9tS5wT.mjs → images-goHZJOxy.mjs} +6 -11
- package/dist/index.mjs +1 -1
- package/dist/init-CVx0Ya1E.mjs +43 -0
- package/dist/{intel-DbLRah4Y.mjs → intel-CwiqwJI9.mjs} +18 -21
- package/dist/interactive-CHcvofEp.mjs +2 -0
- package/dist/{interactive-d_lFnSev.mjs → interactive-D4E8PdaW.mjs} +31 -31
- package/dist/interactive-wQM7Blhm.mjs +2 -0
- package/dist/internal-5cnlw9mH.mjs +4 -0
- package/dist/{ips-BGyzyQLL.mjs → ips-KBxmXhvO.mjs} +1 -1
- package/dist/{k2-BVQ3MqEl.mjs → k2-KhIP5NFT.mjs} +2 -3
- package/dist/kv-CCem2sEY.mjs +12 -0
- package/dist/{lazy-command-D0I6itZs.mjs → lazy-command-BMhD5ffF.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dga83Qy3.mjs → leaked-credential-checks-BkPZiwE2.mjs} +3 -5
- package/dist/live-BhHzxFna.mjs +4 -0
- package/dist/{load-balancers-D9cB6of8.mjs → load-balancers-17GBXdju.mjs} +5 -9
- package/dist/local-CAs8RWYW.mjs +2 -0
- package/dist/{local-B7ZJ78al.mjs → local-CSH3UMpD.mjs} +1 -1
- package/dist/{local-runtime-DB545Gqq.mjs → local-runtime-KOFLRZeZ.mjs} +1 -1
- package/dist/log-BWdaOGOW.mjs +66 -0
- package/dist/log-DZfik9Jk.mjs +2 -0
- package/dist/login-BTiflOun.mjs +2 -0
- package/dist/login-Buhvx6Fi.mjs +5 -0
- package/dist/{logpush-Ccmr0Y_I.mjs → logpush-BCCUxa4J.mjs} +3 -5
- package/dist/{logs-CZBMuuBC.mjs → logs-4CwupKRG.mjs} +2 -3
- package/dist/{magic-cloud-networking-BwOxZVql.mjs → magic-cloud-networking-Xy6SC-V-.mjs} +4 -7
- package/dist/{magic-network-monitoring-Cx5kKdbk.mjs → magic-network-monitoring-B8pRZp2g.mjs} +3 -5
- package/dist/{magic-transit-BJwg3sVK.mjs → magic-transit-CwfO3OOX.mjs} +36 -67
- package/dist/managed-defense-CtFLuvuB.mjs +18 -0
- package/dist/{managed-transforms-C-HMtesC.mjs → managed-transforms-Hto8OCBS.mjs} +2 -3
- package/dist/{mcp-bGKgzz6F.mjs → mcp-SQ0MAVUJ.mjs} +3 -5
- package/dist/{mesh-DeQIll19.mjs → mesh-C8A6tVqA.mjs} +3 -5
- package/dist/{migrate-B6HsPeFh.mjs → migrate-Dufxsb_F.mjs} +1 -1
- package/dist/{monetization-B-TIrpA5.mjs → monetization-CYVaCAe9.mjs} +3 -5
- package/dist/{network-BrjykU-I.mjs → network-CJBTdEM3.mjs} +5 -9
- package/dist/{network-interconnects-I06kbxIl.mjs → network-interconnects-CKlNFj3i.mjs} +3 -5
- package/dist/{o11y-Ba0Fa98_.mjs → o11y-5x2Q8CWm.mjs} +8 -15
- package/dist/{oauth-BH-uQd3C.mjs → oauth-BN6_FpYp.mjs} +1 -1
- package/dist/oauth-D_A8AcIS.mjs +4 -0
- package/dist/{oauth-clients-Dd5gvDqf.mjs → oauth-clients-qKXg8ZH3.mjs} +3 -5
- package/dist/{oauth-scopes-CXpH3Syj.mjs → oauth-scopes-Ct1jDyC5.mjs} +1 -1
- package/dist/{organization-DKPqwe3j.mjs → organization-lBQSeqS1.mjs} +3 -5
- package/dist/{organizations-Cq4iy-Yr.mjs → organizations-DEX8Er3g.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DSB1sbYV.mjs → origin-post-quantum-encryption-DUsxVGCs.mjs} +1 -1
- package/dist/output-BJEgbI0G.mjs +2 -0
- package/dist/package-BqSbnt6u.mjs +2 -0
- package/dist/{page-rules-CDWTYaf7.mjs → page-rules-BMt6nt03.mjs} +2 -3
- package/dist/{pages-Dgtm51Uj.mjs → pages-Jxa92ECz.mjs} +7 -13
- package/dist/{pay-per-crawl-CHenxdhv.mjs → pay-per-crawl-Cv0044CZ.mjs} +3 -5
- package/dist/{pay-per-use-Bd5l0hBi.mjs → pay-per-use-DGEeG-dC.mjs} +2 -3
- package/dist/{pipelines-GsyD6nUM.mjs → pipelines-CEC78A3w.mjs} +5 -9
- package/dist/{precursor-mO-Zua09.mjs → precursor-Ba0Ejhzt.mjs} +1 -1
- package/dist/previews-DnZbUTym.mjs +6 -0
- package/dist/progress-CtGsPOpV.mjs +2 -0
- package/dist/prompt-YrI7ltMa.mjs +4 -0
- package/dist/{queues-D8cAr2lB.mjs → queues-Chq997uj.mjs} +6 -11
- package/dist/{r2-CJiJbG6b.mjs → r2-BFgZDs-F.mjs} +17 -33
- package/dist/{radar-PUZ_PCZ8.mjs → radar-DJdDzLJw.mjs} +1 -1
- package/dist/{raw-fetch-DSdFjojI.mjs → raw-fetch-BE3QgdTE.mjs} +1 -1
- package/dist/ready-Cok0aqke.mjs +4 -0
- package/dist/{realtime-X6uQsldp.mjs → realtime-BHWWCiKp.mjs} +10 -19
- package/dist/{registrar-BqZdUTss.mjs → registrar-9Y-1IQ0n.mjs} +1 -1
- package/dist/{registrar-sandbox-CmM3e1QN.mjs → registrar-sandbox-DTS1kRnb.mjs} +1 -1
- package/dist/{registry-D0tMkLv6.mjs → registry-Bm-GgDC3.mjs} +1 -1
- package/dist/{reporting-DFVz98Xg.mjs → reporting-D5RbKQJf.mjs} +1 -1
- package/dist/request-headers-KhW_hy36.mjs +2 -0
- package/dist/{request-tracers-BC1u2WDU.mjs → request-tracers-wxWCjmHo.mjs} +1 -1
- package/dist/{resource-sharing-CdEn5Iex.mjs → resource-sharing-BGoaVvJa.mjs} +5 -9
- package/dist/rolldown-runtime-BNtqjh-B.mjs +2 -0
- package/dist/{rules-B663VetJ.mjs → rules-Cd3EjhdF.mjs} +3 -5
- package/dist/{rulesets-p4EijVr6.mjs → rulesets-Bnz3rSBT.mjs} +4 -7
- package/dist/{rum-CHHXe4KK.mjs → rum-CK9HEe3O.mjs} +3 -5
- package/dist/run-Be6Js7D6.mjs +2 -0
- package/dist/run-DnZGQbq_.mjs +2 -0
- package/dist/sanitization-DkVWMHkc.mjs +2 -0
- package/dist/{schema-B38ojvsS.mjs → schema-DuLIZRhA.mjs} +1 -1
- package/dist/{schema-flags-z7yn0JZ_.mjs → schema-flags-BrDlFwLv.mjs} +1 -1
- package/dist/{scim-BMnUa4Oz.mjs → scim-UdqaWnOu.mjs} +3 -5
- package/dist/{secrets-store-EYrhEzVG.mjs → secrets-store-Bf5v96LC.mjs} +3 -5
- package/dist/{security-insights-C-AwDwXb.mjs → security-insights-BAGySlGu.mjs} +1 -1
- package/dist/{security-txt-CQMe8TD3.mjs → security-txt-D0fMmjHs.mjs} +2 -3
- package/dist/session-6xqrJWXy.mjs +2 -0
- package/dist/shared-DYRRG9A-.mjs +2 -0
- package/dist/signed-url-Ce0muRem.mjs +4 -0
- package/dist/{smart-shield-CHSuitaH.mjs → smart-shield-CCy7_M3j.mjs} +3 -5
- package/dist/{snippets-DGSBz4lg.mjs → snippets-Bc8m3HSV.mjs} +3 -5
- package/dist/spawn-BAEdy9kS.mjs +5 -0
- package/dist/{spectrum-59LhYG1t.mjs → spectrum-DtNX8WBX.mjs} +2 -3
- package/dist/{speed-CMCfoG3s.mjs → speed-TbkeWV_x.mjs} +3 -5
- package/dist/{sql-MxWaTDdj.mjs → sql-DI319y25.mjs} +1 -1
- package/dist/src-COwxoocl.mjs +2 -0
- package/dist/{src-J3Yss3VM.mjs → src-Dc6ojwUW.mjs} +5 -5
- package/dist/{ssl-DTTFZR9x.mjs → ssl-D0MIzFl2.mjs} +9 -17
- package/dist/startup-profile-CZYtQziF.mjs +2 -0
- package/dist/{startup-profile-bp348qmf.mjs → startup-profile-DlWrt4Fm.mjs} +5 -5
- package/dist/state-B3Uy1jPX.mjs +2 -0
- package/dist/{state-CqAtTENS.mjs → state-DazGSbRx.mjs} +1 -1
- package/dist/{stream-gVG_7si-.mjs → stream-4Mrb8HEo.mjs} +14 -27
- package/dist/tags-BP25qydR.mjs +22 -0
- package/dist/telemetry-CvZean4s.mjs +2 -0
- package/dist/telemetry-DKSJSLtq.mjs +2 -0
- package/dist/{tenant-custom-nameservers-DBmmUcxn.mjs → tenant-custom-nameservers-BzVP85Tq.mjs} +2 -3
- package/dist/{tenant-Qv_PC8gW.mjs → tenant-jmfZqEZ4.mjs} +1 -1
- package/dist/{tools-B1ajcUAF.mjs → tools-C-vmgYSv.mjs} +1 -1
- package/dist/{tunnels-CHNKPYRV.mjs → tunnels-BNswR1Dj.mjs} +4 -6
- package/dist/{turnstile-C60RxPo2.mjs → turnstile-BgsTP2fz.mjs} +2 -3
- package/dist/ui-Bo6DCvbS.mjs +2 -0
- package/dist/{update-check-BHarE3V9.mjs → update-check-BOF1hn_I.mjs} +1 -1
- package/dist/update-check-C7mfEeQ7.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-3t6Xpafi.mjs → url-normalization-Bqrs4-2F.mjs} +2 -3
- package/dist/{url-scanner-DNG__DiK.mjs → url-scanner-Dm4Fps5T.mjs} +1 -1
- package/dist/{user-B4i7OIFK.mjs → user-u_LxzLM4.mjs} +8 -15
- package/dist/{vectorize-y3PCQDDf.mjs → vectorize-DLGiOyd4.mjs} +3 -5
- package/dist/version-DmTuWNZ5.mjs +2 -0
- package/dist/{waiting-rooms-xkZLvPkT.mjs → waiting-rooms-DmgJgJXb.mjs} +4 -7
- package/dist/{web-assets-BlqHZywy.mjs → web-assets-rNhZWP-6.mjs} +7 -13
- package/dist/{web3-DGAJMcLv.mjs → web3-BVBdFt8E.mjs} +3 -5
- package/dist/{workers-cCNBx0Bc.mjs → workers-CjUKJvH8.mjs} +18 -22
- package/dist/{workers-builds-COKp3NfU.mjs → workers-builds-D3Q97l7X.mjs} +1 -1
- package/dist/{workers-for-platforms-CAtiWI_G.mjs → workers-for-platforms-C_fcw30y.mjs} +5 -9
- package/dist/{workers-vpc-ChBfXwPy.mjs → workers-vpc-CnRO3Stc.mjs} +2 -3
- package/dist/{workflows-BYhgJvyR.mjs → workflows-cpHFe5v6.mjs} +5 -9
- package/dist/{wrangler-migration-B12OR2bu.mjs → wrangler-migration-DQehjmoh.mjs} +74 -74
- package/dist/{zaraz-BW0kvRCK.mjs → zaraz-BRj0J7vK.mjs} +1 -1
- package/dist/{zero-trust-DSeWXkNV.mjs → zero-trust-CVZKDLCB.mjs} +75 -149
- package/dist/{zone-B-YJG2UA.mjs → zone-N6ccK70C.mjs} +1 -1
- package/dist/{zones-B8pqPHu8.mjs → zones-C4S_kpGz.mjs} +49 -52
- package/package.json +12 -12
- package/dist/auth-CdEGiJ5Y.mjs +0 -2
- package/dist/auth-DF_ml7rE.mjs +0 -2
- package/dist/build-BJHRK6qE.mjs +0 -2
- package/dist/build-D7s3a8zW.mjs +0 -2
- package/dist/cache-CDPUUv_O.mjs +0 -45
- package/dist/cf-3vj8dGYz.mjs +0 -18
- package/dist/chunk-DSGVRFIS-RUG6Dtqz.mjs +0 -2
- package/dist/containers-CcZHRM9g.mjs +0 -376
- package/dist/delegate-Tgfxa-MZ.mjs +0 -2
- package/dist/deploy-context-DIAl408H.mjs +0 -56
- package/dist/dialog-BnIgdgWi.mjs +0 -2
- package/dist/discover-DEjUARkU.mjs +0 -2
- package/dist/discover-P20XeGBF.mjs +0 -2
- package/dist/dist-CX6dDtzj.mjs +0 -449
- package/dist/dist-DAeCUX-u.mjs +0 -60
- package/dist/dls-CMTrCDjZ.mjs +0 -17
- package/dist/flagship-geGDHp9H.mjs +0 -28
- package/dist/init-C08hBFYn.mjs +0 -43
- package/dist/interactive-pjVqirHx.mjs +0 -2
- package/dist/kv-Cd8vbPWK.mjs +0 -15
- package/dist/local-CFZtOOxg.mjs +0 -2
- package/dist/log-CRbgNbDp.mjs +0 -3
- package/dist/login-C3Bahro9.mjs +0 -5
- package/dist/login-DvsRxI3E.mjs +0 -2
- package/dist/logo-matches-jeNkUxAq.mjs +0 -6
- package/dist/logos-pxN5aumY.mjs +0 -7
- package/dist/managed-defense-C_KLy4oB.mjs +0 -18
- package/dist/matches-DnjBnG-Y.mjs +0 -6
- package/dist/oauth-Cf3-g-kk.mjs +0 -4
- package/dist/output-CpiIVa7Q.mjs +0 -2
- package/dist/previews-oHUiD54J.mjs +0 -7
- package/dist/progress-B1dpmxCT.mjs +0 -2
- package/dist/prompt-Y5OBwDVE.mjs +0 -4
- package/dist/queries-CS0sYfte.mjs +0 -9
- package/dist/request-headers-Bg8_Idw3.mjs +0 -2
- package/dist/run-0EozpORq.mjs +0 -2
- package/dist/run-DKg70Sqf.mjs +0 -2
- package/dist/session-3DgztoAI.mjs +0 -2
- package/dist/shared-o8saqcSK.mjs +0 -2
- package/dist/source-AlTrHNem.mjs +0 -6
- package/dist/spawn-BZd__5sj.mjs +0 -10
- package/dist/startup-profile-DJsOtbVN.mjs +0 -2
- package/dist/state-Dvzl3aSj.mjs +0 -2
- package/dist/submit-wJYcQB8d.mjs +0 -4
- package/dist/tags-BwFKjaOr.mjs +0 -23
- package/dist/telemetry-BczXOpQn.mjs +0 -2
- package/dist/telemetry-CE15pfOU.mjs +0 -2
- package/dist/ui-CBhKUPys.mjs +0 -2
- package/dist/update-check-C3RhhXja.mjs +0 -2
- package/dist/url-info-By6VD20A.mjs +0 -4
- package/dist/version-izjB0Yrl.mjs +0 -2
|
@@ -1,43 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./lazy-command-
|
|
2
|
+
import{t as e}from"./lazy-command-BMhD5ffF.mjs";import{r as t}from"./dotenv-CmPRiXmU.mjs";import{J as n}from"./dist-BtzWfAjU.mjs";import"./api-eMuS5GI1.mjs";import{t as r}from"./path-DRw6Y-nd.mjs";import{t as i}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as a}from"./local-CSH3UMpD.mjs";import{i as o,n as s}from"./auth-BcNLQji1.mjs";import{t as c}from"./log-BWdaOGOW.mjs";import{a as l,r as u,t as d}from"./context-DVh8Wyfs.mjs";import{t as ee}from"./deploy-context-Do89WayB.mjs";import{t as f}from"./output-BJEgbI0G.mjs";import{t as p}from"./dry-run-gy0Hl9xo.mjs";import{t as m}from"./progress-CtGsPOpV.mjs";import{n as h,t as g}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as _,n as v,r as y,s as b,t as x}from"./body-parser-ChnyBsfm.mjs";import{n as S,t as C}from"./input-validation-D7z60HJH.mjs";import{a as w,i as T,n as E}from"./prompt-YrI7ltMa.mjs";import{n as D,t as O}from"./raw-fetch-BE3QgdTE.mjs";import{c as te,r as ne,u as k}from"./containers-CzAZfmnj.mjs";import{a as A,i as j,n as M,o as N,r as P,s as F}from"./build-CWlpWVBf.mjs";import{r as I}from"./deploy-input-DyMuMsi5.mjs";import{n as L,t as R}from"./shared-DYRRG9A-.mjs";import{readBuildOutput as z}from"@cloudflare/build-output-utils";var B={method:`DELETE`,path:e=>r`/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
|
-
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
|
|
5
|
-
`);return}let i=await h(`Deleting`,async()=>n.send(V,{account_id:r,worker_id:e[`worker-id`],...t}));p(i,{successLabel:`Deleted`})})};var W={method:`POST`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`force`],body:`json`,constants:{strategy:`percentage`}};function G(e){return e.usage(`$0 workers deployments create
|
|
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=>g({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 l();p({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 s(e),r=e.local?a:await d();if(e.accountId=r,!await E({force:!!e.force,message:`This will permanently delete the Worker and its associated versions and deployments.`}))return;let i=await m(`Deleting`,async()=>n.send(B,{account_id:r,worker_id:e[`worker-id`],...t}));f(i,{successLabel:`Deleted`})})};var U={method:`POST`,path:e=>r`/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
5
|
|
|
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=>
|
|
6
|
+
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=>S(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=>g({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 l();p({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?x({strategy:e.strategy,versions:_(e.versions,`versions`)}):v(e.body)});return}let n=await s(e),r=e.local?a:await d();e.accountId=r;let i=u({scriptName:e.worker});if(e.worker=i,e.body){let a=v(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let o=await m(`Creating`,async()=>n.send(U,{body:a,account_id:r,script_name:i,...t}));f(o,{successLabel:`Created`});return}if(e.strategy===void 0&&(e.strategy=await T(`strategy`,`The strategy field`,[`percentage`])),e.versions===void 0)throw Error(`--versions is required (or pass --body with this field set).`);let o=x({strategy:e.strategy,versions:_(e.versions,`versions`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let c=await m(`Creating`,async()=>n.send(U,{body:o,account_id:r,script_name:i,...t}));f(c,{successLabel:`Created`})})};var K={method:`DELETE`,path:e=>r`/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
7
|
|
|
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
|
|
10
|
-
`);return}let i=await h(`Deleting`,async()=>t.send(q,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));p(i,{successLabel:`Deleted`})})};var X={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments/${e.deployment_id}`};function Z(e){return e.usage(`$0 workers deployments get <deployment-id>
|
|
8
|
+
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=>g({command:`workers deployments delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await l();p({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 s(e),n=e.local?a:await d();e.accountId=n;let r=u({scriptName:e.worker});if(e.worker=r,!await E({force:!!e.force,message:`This will permanently delete the Worker deployment.`}))return;let i=await m(`Deleting`,async()=>t.send(K,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));f(i,{successLabel:`Deleted`})})};var Y={method:`GET`,path:e=>r`/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>
|
|
11
9
|
|
|
12
|
-
Get information about a Worker Deployment.`).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})}const
|
|
10
|
+
Get information about a Worker Deployment.`).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})}const Z={command:`get <deployment-id>`,describe:`Get Worker Deployment`,builder:X,handler:async e=>g({command:`workers deployments get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await l();p({command:`cf workers deployments get`,method:`GET`,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 s(e),n=e.local?a:await d();e.accountId=n;let r=u({scriptName:e.worker});e.worker=r;let i=await m(`Loading`,async()=>t.send(Y,{account_id:n,script_name:r,deployment_id:e[`deployment-id`]}));f(i,{successLabel:`Loaded`})})};var re={method:`GET`,path:e=>r`/accounts/${e.account_id}/workers/scripts/${e.script_name}/deployments`,query:[`since`,`until`,`page`,`per_page`]};function ie(e){return e.usage(`$0 workers deployments list
|
|
13
11
|
|
|
14
|
-
List Worker deployments. The first deployment in the list is the latest deployment actively serving traffic.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`since`,{type:`string`,description:`Start of the deployment creation time range, inclusive.`}).option(`until`,{type:`string`,description:`End of the deployment creation time range, inclusive.`}).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
|
|
12
|
+
List Worker deployments. The first deployment in the list is the latest deployment actively serving traffic.`).option(`worker`,{type:`string`,alias:`script-name`,description:`Name of the script.`}).option(`since`,{type:`string`,description:`Start of the deployment creation time range, inclusive.`}).option(`until`,{type:`string`,description:`End of the deployment creation time range, inclusive.`}).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 ae={command:`list`,describe:`List Worker Deployments`,builder:ie,handler:async e=>g({command:`workers deployments list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={since:e.since,until:e.until,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let n=await l();p({command:`cf workers deployments list`,method:`GET`,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:`none`});return}let n=await s(e),r=e.local?a:await d();e.accountId=r;let i=u({scriptName:e.worker});e.worker=i;let o=await m(`Loading`,async()=>n.send(re,{account_id:r,script_name:i,...t}));f(o,{successLabel:`Loaded`})})},oe={command:`deployments`,describe:`Operations for deployments`,builder:e=>e.command(G).command(J).command(Z).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var se={method:`GET`,path:e=>r`/accounts/${e.account_id}/workers/workers/${e.worker_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function ce(e){return e.usage(`$0 workers get <worker-id>
|
|
15
13
|
|
|
16
|
-
Get details about a specific Worker.`).positional(`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})}const
|
|
14
|
+
Get details about a specific Worker.`).positional(`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})}const le={command:`get <worker-id>`,describe:`Get Worker`,builder:ce,handler:async e=>g({command:`workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await l();p({command:`cf workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/workers/${e[`worker-id`]==null?`<worker-id>`:encodeURIComponent(String(e[`worker-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``)},bodyKind:`none`});return}let t=await s(e),n=e.local?a:await d();e.accountId=n;let r=await m(`Loading`,async()=>t.send(se,{account_id:n,worker_id:e[`worker-id`]}));f(r,{successLabel:`Loaded`})})};var ue={method:`GET`,path:e=>r`/accounts/${e.account_id}/workers/workers`,query:[`page`,`per_page`,`order_by`,`order`],errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function de(e){return e.usage(`$0 workers list
|
|
17
15
|
|
|
18
|
-
List all Workers for an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`order-by`,{type:`string`,description:`Property to sort results by.`,choices:[`deployed_on`,`updated_on`,`created_on`,`name`]}).option(`order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
16
|
+
List all Workers for an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`order-by`,{type:`string`,description:`Property to sort results by.`,choices:[`deployed_on`,`updated_on`,`created_on`,`name`]}).option(`order`,{type:`string`,description:`Sort direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`List Workers`,builder:de,handler:async e=>g({command:`workers list`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order_by:e[`order-by`],order:e.order};if(e.dryRun){let e=await l();p({command:`cf workers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/workers`,pathParams:{},query:t,bodyKind:`none`});return}let n=await s(e),r=e.local?a:await d();e.accountId=r;let i=await m(`Loading`,async()=>n.send(ue,{account_id:r,...t}));f(i,{successLabel:`Loaded`})})};var pe={method:`GET`,path:e=>r`/accounts/${e.account_id}/workers/scripts-search`,query:[`name`,`id`,`order_by`,`page`,`per_page`]};function me(e){return e.usage(`$0 workers scripts search
|
|
19
17
|
|
|
20
|
-
Search for Worker scripts in an account.`).option(`name`,{type:`string`,description:`Worker name to search for. Both exact and partial matches are returned.`}).option(`id`,{type:`string`,description:`Worker ID (also called tag) to search for. Only exact matches are returned.`}).option(`order-by`,{type:`string`,description:`Property to sort results by. Results are sorted in ascending order.`,choices:[`created_on`,`modified_on`,`name`]}).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
|
|
18
|
+
Search for Worker scripts in an account.`).option(`name`,{type:`string`,description:`Worker name to search for. Both exact and partial matches are returned.`}).option(`id`,{type:`string`,description:`Worker ID (also called tag) to search for. Only exact matches are returned.`}).option(`order-by`,{type:`string`,description:`Property to sort results by. Results are sorted in ascending order.`,choices:[`created_on`,`modified_on`,`name`]}).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 he={command:`search`,describe:`Search Worker Scripts`,builder:me,handler:async e=>g({command:`workers scripts search`,classification:{safeFlags:[`order-by`,`dry-run`]}},e,async()=>{let t={name:e.name,id:e.id,order_by:e[`order-by`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await l();p({command:`cf workers scripts search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/scripts-search`,pathParams:{},query:t,bodyKind:`none`});return}let n=await s(e),r=e.local?a:await d();e.accountId=r;let i=await m(`Loading`,async()=>n.send(pe,{account_id:r,...t}));f(i,{successLabel:`Loaded`})})},ge={command:`scripts`,describe:`Operations for scripts`,builder:e=>e.command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(e){return e.usage(`$0 workers secrets bulk
|
|
21
19
|
|
|
22
20
|
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
21
|
- Set to a secret object to create or update.
|
|
24
22
|
- 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
|
|
23
|
+
- 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=>g({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 l();p({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?x({secrets:y(e.secrets,`secrets`),version_tags:y(e[`version-tags`],`version-tags`)},[[`secrets`],[`version_tags`]]):v(e.body):{file:e.file}});return}let t=await s(e),n=e.local?a:await d();e.accountId=n;let r=u({scriptName:e.worker});if(e.worker=r,e.file){let i=C(e.file),a=await m(`Updating`,async()=>o(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i,headers:{"Content-Type":`application/merge-patch+json`}}));f(a,{successLabel:`Updated`});return}if(e.body){let i=v(e.body),a=await m(`Updating`,async()=>o(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));f(a,{successLabel:`Updated`});return}let i={};e.secrets!==void 0&&b(i,[`secrets`],y(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&b(i,[`version_tags`],y(e[`version-tags`],`version-tags`));let c=await m(`Updating`,async()=>o(t,`PATCH`,`/accounts/${n}/workers/scripts/${r}/secrets-bulk`,{body:i}));f(c,{successLabel:`Updated`})})};var ye={method:`DELETE`,path:e=>r`/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
24
|
|
|
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
|
|
28
|
-
`);return}let a=await h(`Deleting`,async()=>n.send(be,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));p(a,{successLabel:`Deleted`})})};var Ce={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets/${e.secret_name}`,query:[`url_encoded`]};function we(e){return e.usage(`$0 workers secrets get <secret-name>
|
|
25
|
+
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=>g({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 l();p({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 s(e),r=e.local?a:await d();e.accountId=r;let i=u({scriptName:e.worker});if(e.worker=i,!await E({force:!!e.force,message:`This will permanently delete the Worker script secret.`}))return;let o=await m(`Deleting`,async()=>n.send(ye,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));f(o,{successLabel:`Deleted`})})};var Se={method:`GET`,path:e=>r`/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>
|
|
29
26
|
|
|
30
|
-
Get a given secret binding (value omitted) on a Worker script.`).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})}const
|
|
27
|
+
Get a given secret binding (value omitted) on a Worker script.`).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})}const we={command:`get <secret-name>`,describe:`Get a secret binding`,builder:Ce,handler:async e=>g({command:`workers secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},e,async()=>{let t={url_encoded:e[`url-encoded`]};if(e.dryRun){let n=await l();p({command:`cf workers secrets get`,method:`GET`,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 s(e),r=e.local?a:await d();e.accountId=r;let i=u({scriptName:e.worker});e.worker=i;let o=await m(`Loading`,async()=>n.send(Se,{account_id:r,script_name:i,secret_name:e[`secret-name`],...t}));f(o,{successLabel:`Loaded`})})};var Te={method:`GET`,path:e=>r`/accounts/${e.account_id}/workers/scripts/${e.script_name}/secrets`};function Ee(e){return e.usage(`$0 workers secrets list
|
|
31
28
|
|
|
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
|
|
29
|
+
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=>g({command:`workers secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await l();p({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 s(e),n=e.local?a:await d();e.accountId=n;let r=u({scriptName:e.worker});e.worker=r;let i=await m(`Loading`,async()=>t.send(Te,{account_id:n,script_name:r}));f(i,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:e=>r`/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
30
|
|
|
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=>
|
|
31
|
+
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=>S(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=>S(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=>g({command:`workers secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await l();p({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?x({text:S(e.text,`text`,`text`),type:e.type,algorithm:y(e.algorithm,`algorithm`),format:e.format,key_base64:S(e[`key-base64`],`key-base64`,`text`),key_jwk:y(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]):v(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let t=await s(e),n=e.local?a:await d();e.accountId=n;let r=u({scriptName:e.worker});if(e.worker=r,e.body){let i=v(e.body),a=await m(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));f(a,{successLabel:`Updated`});return}if(e.type===void 0&&(e.type=await T(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await w(`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 w(`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=x({text:S(e.text,`text`,`text`),type:e.type,algorithm:y(e.algorithm,`algorithm`),format:e.format,key_base64:S(e[`key-base64`],`key-base64`,`text`),key_jwk:y(e[`key-jwk`],`key-jwk`),usages:e.usages,name:e.name},[[`algorithm`],[`key_jwk`]]),o=await m(`Updating`,async()=>t.send(Q,{body:i,account_id:n,script_name:r}));f(o,{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=>r`/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
32
|
|
|
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
|
|
37
|
-
`);return}let r=await h(`Deleting`,async()=>t.send(Me,{account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]}));p(r,{successLabel:`Deleted`})})};var Fe={method:`GET`,path:e=>i`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions/${e.version_id}`,query:[`include`]};function Ie(e){return e.usage(`$0 workers versions get <version-id>
|
|
33
|
+
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=>g({command:`workers versions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await l();p({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 s(e),n=e.local?a:await d();if(e.accountId=n,!await E({force:!!e.force,message:`This will permanently delete the Worker version.`}))return;let r=await m(`Deleting`,async()=>t.send(je,{account_id:n,worker_id:e[`worker-id`],version_id:e[`version-id`]}));f(r,{successLabel:`Deleted`})})};var Pe={method:`GET`,path:e=>r`/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>
|
|
38
34
|
|
|
39
|
-
Get details about a specific 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(`include`,{type:`string`,description:"Whether to include the `modules` property of the version in the response, which contains code and sourcemap content and may add several megabytes to the response size.",choices:[`modules`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
35
|
+
Get details about a specific 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(`include`,{type:`string`,description:"Whether to include the `modules` property of the version in the response, which contains code and sourcemap content and may add several megabytes to the response size.",choices:[`modules`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`get <version-id>`,describe:`Get Worker Version`,builder:Fe,handler:async e=>g({command:`workers versions get`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let t={include:e.include};if(e.dryRun){let n=await l();p({command:`cf workers versions get`,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/${e[`version-id`]==null?`<version-id>`:encodeURIComponent(String(e[`version-id`]))}`,pathParams:{"worker-id":String(e[`worker-id`]??``),"version-id":String(e[`version-id`]??``)},query:t,bodyKind:`none`});return}let n=await s(e),r=e.local?a:await d();e.accountId=r;let i=await m(`Loading`,async()=>n.send(Pe,{account_id:r,worker_id:e[`worker-id`],version_id:e[`version-id`],...t}));f(i,{successLabel:`Loaded`})})};var Le={method:`GET`,path:e=>r`/accounts/${e.account_id}/workers/workers/${e.worker_id}/versions`,query:[`page`,`per_page`]};function Re(e){return e.usage(`$0 workers versions list
|
|
40
36
|
|
|
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
|
|
37
|
+
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=>g({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 l();p({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 s(e),r=e.local?a:await d();e.accountId=r;let i=await m(`Loading`,async()=>n.send(Le,{account_id:r,worker_id:e[`worker-id`],...t}));f(i,{successLabel:`Loaded`})})};function Be(e){return e.usage(`$0 workers versions profile <version-id>
|
|
42
38
|
|
|
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=>
|
|
39
|
+
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=>S(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=>g({command:`workers versions profile`,classification:{safeFlags:[`profile-type`,`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await l();p({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?x({actor_id:S(e[`actor-id`],`actor-id`,`text`),duration_ms:e[`duration-ms`],namespace_id:S(e[`namespace-id`],`namespace-id`,`text`),profile_type:e[`profile-type`]}):v(e.body)});return}await s(e);let t=e.local?a:await d();if(e.accountId=t,e.body){let n=v(e.body),r=await m(`Creating`,async()=>O(`/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`}));D(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&&b(n,[`actor_id`],S(e[`actor-id`],`actor-id`,`text`)),e[`duration-ms`]!==void 0&&b(n,[`duration_ms`],e[`duration-ms`]),e[`namespace-id`]!==void 0&&b(n,[`namespace_id`],S(e[`namespace-id`],`namespace-id`,`text`)),e[`profile-type`]!==void 0&&b(n,[`profile_type`],e[`profile-type`]);let r=await m(`Creating`,async()=>O(`/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}));D(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=h({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(i(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-CQ5qHE7n.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`,P)}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 M(e.mode,{worker:e.worker,dryRun:e[`dry-run`]})===`setup-needed`){c.success(`--dry-run: exiting now.`);return}c.message(``)}await t(e,()=>qe(e))}};async function qe(e){let{workers:t,rootConfig:r}=await z(process.cwd());if(r.buildContext.isPreview){let e=[`cf previews deploy`,`--prebuilt`,...r.buildContext.mode===void 0?[]:[`--mode`,r.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.`)}F(e.mode,r.buildContext.mode),N(r.accountId,e[`temporary-account`]===!0);let i=A(t,e.worker),{wranglerConfig:a}=j(i,r),o=n(a),{authToken:s,accountId:l}=await ne({accountId:r.accountId,complianceRegion:o,dryRun:e[`dry-run`]});k(ee(s)),c.section(`Deploy triggers`),await te({...I(i,a,l,e),queueCreateCommand:e=>`cf queues create --queue-name ${e}`,workersDevConfigFieldName:`workersDev`,workersDevConfigAssignment:e=>`workersDev: ${e}`,previewUrlsConfigFieldName:`previewUrls`,previewUrlsConfigAssignment:e=>`previewUrls: ${e}`}),e[`dry-run`]||c.success(`Trigger deploy complete`)}const Je={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(h(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-MxFFWqMg.mjs`),{command:`workers types`,classification:{safeFlags:[`include-runtime`]}});const Xe={command:`workers`,describe:`workers`,builder:e=>e.command(i(We,`preview`)).command(H).command(le).command(fe).command(i(Ye,`preview`)).command(oe).command(ge).command(Ae).command(i(Je,`native`)).command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Xe as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as l,n as u,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
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
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{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-YrI7ltMa.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
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
|
-
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.`})){
|
|
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>
|
|
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.`}))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>
|
|
8
7
|
|
|
9
8
|
Get 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})}const T={command:`get <dispatch-namespace>`,describe:`Get Workers for Platforms Dispatch Namespace`,builder:w,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces get`,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`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``)},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(C,{account_id:l,dispatch_namespace:e[`dispatch-namespace`]}));o(u,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces`};function D(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces list
|
|
10
9
|
|
|
@@ -12,8 +11,7 @@ Fetch a list of Workers for Platforms dispatch namespaces.`).option(`dry-run`,{t
|
|
|
12
11
|
|
|
13
12
|
Fetch bindings from 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})}const j={command:`get <script-name>`,describe:`Get Workers for Platforms Script Bindings`,builder:A,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts bindings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts bindings get`,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`]))}/bindings`,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(k,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})},M={command:`bindings`,describe:`Operations for dispatch-namespaces.scripts.bindings`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}`,query:[`force`]};function P(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts delete <script-name>
|
|
14
13
|
|
|
15
|
-
Delete a script from a Workers for Platforms dispatch namespace. This call has no response body on a successful delete.`).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(`delete-with-references`,{type:`boolean`,description:`If true, delete the script even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted script 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 F={command:`delete <script-name>`,describe:`Delete Workers for Platforms Script`,builder:P,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={force:e[`delete-with-references`]};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts 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`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-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.`})){
|
|
16
|
-
`);return}let d=await c(`Deleting`,async()=>l.send(N,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],...n}));o(d,{successLabel:`Deleted`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}`};function L(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts get <script-name>
|
|
14
|
+
Delete a script from a Workers for Platforms dispatch namespace. This call has no response body on a successful delete.`).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(`delete-with-references`,{type:`boolean`,description:`If true, delete the script even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted script 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 F={command:`delete <script-name>`,describe:`Delete Workers for Platforms Script`,builder:P,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={force:e[`delete-with-references`]};if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts 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`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-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.`}))return;let d=await c(`Deleting`,async()=>l.send(N,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],...n}));o(d,{successLabel:`Deleted`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}`};function L(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts get <script-name>
|
|
17
15
|
|
|
18
16
|
Fetch information about 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})}const R={command:`get <script-name>`,describe:`Get Workers for Platforms Script details`,builder:L,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts get`,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`]))}`,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(I,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};var z={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts`,query:[`tags`]};function B(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts list
|
|
19
17
|
|
|
@@ -24,8 +22,7 @@ Create, update, or delete multiple secrets on a Workers for Platforms script in
|
|
|
24
22
|
- Set to \`null\` to delete.
|
|
25
23
|
- 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
24
|
|
|
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.`})){
|
|
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>
|
|
25
|
+
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.`}))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>
|
|
29
26
|
|
|
30
27
|
Get a given secret binding (value omitted) on a script uploaded to a Workers for Platforms dispatch namespace.`).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})}const J={command:`get <secret-name>`,describe:`Get Workers for Platforms Script Secret`,builder:q,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets get`,classification:{safeFlags:[`url-encoded`,`dry-run`]}},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 get`,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/${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();e.accountId=u;let d=await c(`Loading`,async()=>l.send(K,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...n}));o(d,{successLabel:`Loaded`})})};var Y={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets`};function X(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets list
|
|
31
28
|
|
|
@@ -35,8 +32,7 @@ Add a secret to a Workers for Platforms script by creating a new version with th
|
|
|
35
32
|
|
|
36
33
|
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
34
|
|
|
38
|
-
Get settings 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})}const de={command:`get <script-name>`,describe:`Get Workers for Platforms Script Settings`,builder:ue,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts settings get`,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`]))}/settings`,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(le,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})},fe={command:`settings`,describe:`Operations for dispatch-namespaces.scripts.settings`,builder:e=>e.command(ce).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.usage("$0 workers-for-platforms dispatch-namespaces scripts tags delete <tag>\n\nDelete a tag from a script uploaded to a Workers for Platforms dispatch namespace. On `api-version` dates on or after `2026-10-01`, `tag` identifies a key and the operation returns the complete updated tag map. Deleting a missing key succeeds. Earlier versions retain the legacy string-tag behavior and return a null result.").positional(`tag`,{type:`string`,description:`Tag`,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(`api-version`,{type:`string`,description:"Requested API compatibility date in `YYYY-MM-DD[.release]` format (UTC). The optional release suffix contains lowercase letters; for example, `2026-10-01.epoch`.\n\nTyped Worker tag operations require a date on or after `2026-10-01`."}).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 $={command:`delete <tag>`,describe:`Delete Workers for Platforms Script Tag`,builder:pe,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`api-version`]!==void 0&&(l[`api-version`]=String(e[`api-version`])),e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags 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`]))}/tags/${e.tag==null?`<tag>`:encodeURIComponent(String(e.tag))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``),tag:String(e.tag??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This will delete the tag from the Workers for Platforms script.`})){
|
|
39
|
-
`);return}let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags/${encodeURIComponent(String(e.tag))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/tags`};function he(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags list
|
|
35
|
+
Get settings 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})}const de={command:`get <script-name>`,describe:`Get Workers for Platforms Script Settings`,builder:ue,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts settings get`,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`]))}/settings`,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(le,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})},fe={command:`settings`,describe:`Operations for dispatch-namespaces.scripts.settings`,builder:e=>e.command(ce).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.usage("$0 workers-for-platforms dispatch-namespaces scripts tags delete <tag>\n\nDelete a tag from a script uploaded to a Workers for Platforms dispatch namespace. On `api-version` dates on or after `2026-10-01`, `tag` identifies a key and the operation returns the complete updated tag map. Deleting a missing key succeeds. Earlier versions retain the legacy string-tag behavior and return a null result.").positional(`tag`,{type:`string`,description:`Tag`,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(`api-version`,{type:`string`,description:"Requested API compatibility date in `YYYY-MM-DD[.release]` format (UTC). The optional release suffix contains lowercase letters; for example, `2026-10-01.epoch`.\n\nTyped Worker tag operations require a date on or after `2026-10-01`."}).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 $={command:`delete <tag>`,describe:`Delete Workers for Platforms Script Tag`,builder:pe,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`api-version`]!==void 0&&(l[`api-version`]=String(e[`api-version`])),e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags 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`]))}/tags/${e.tag==null?`<tag>`:encodeURIComponent(String(e.tag))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``),tag:String(e.tag??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force,message:`This will delete the tag from the Workers for Platforms script.`}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/tags/${encodeURIComponent(String(e.tag))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/tags`};function he(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags list
|
|
40
36
|
|
|
41
37
|
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
38
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{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-YrI7ltMa.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
|
|
|
6
|
-
Removes a single Workers VPC connectivity service by its ID. Any Worker bindings referencing this service will stop working.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <service-id>`,describe:`Delete Workers VPC connectivity service`,builder:y,handler:async e=>c({command:`workers-vpc services delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-vpc services delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services/${e[`service-id`]==null?`<service-id>`:encodeURIComponent(String(e[`service-id`]))}`,pathParams:{"service-id":String(e[`service-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`This operation permanently deletes a Workers VPC connectivity service.`})){
|
|
7
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,service_id:e[`service-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services/${t.service_id}`};function S(e){return e.usage(`$0 workers-vpc services get <service-id>
|
|
6
|
+
Removes a single Workers VPC connectivity service by its ID. Any Worker bindings referencing this service will stop working.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <service-id>`,describe:`Delete Workers VPC connectivity service`,builder:y,handler:async e=>c({command:`workers-vpc services delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-vpc services delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services/${e[`service-id`]==null?`<service-id>`:encodeURIComponent(String(e[`service-id`]))}`,pathParams:{"service-id":String(e[`service-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force,message:`This operation permanently deletes a Workers VPC connectivity service.`}))return;let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,service_id:e[`service-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services/${t.service_id}`};function S(e){return e.usage(`$0 workers-vpc services get <service-id>
|
|
8
7
|
|
|
9
8
|
Fetches a single Workers VPC connectivity service by its ID.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <service-id>`,describe:`Get Workers VPC connectivity service`,builder:S,handler:async e=>c({command:`workers-vpc services get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-vpc services get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/connectivity/directory/services/${e[`service-id`]==null?`<service-id>`:encodeURIComponent(String(e[`service-id`]))}`,pathParams:{"service-id":String(e[`service-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(x,{account_id:l,service_id:e[`service-id`]}));a(u,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services`,query:[`type`,`page`,`per_page`]};function T(e){return e.usage(`$0 workers-vpc services list
|
|
10
9
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as u,o as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-YrI7ltMa.mjs";import{n as _,t as ee}from"./raw-fetch-BE3QgdTE.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`}};function te(e){return e.usage(`$0 workflows concurrency create
|
|
3
3
|
|
|
4
4
|
Creates an account-scoped concurrency key. Limits count steps still in flight from a previously deleted key of the same name.`).option(`limit`,{type:`number`,description:`Maximum number of steps that may concurrently hold this key.`}).option(`name`,{type:`string`,description:`Unique (per account) name of the concurrency key. Referenced by workflow steps via step config.`}).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 ne={command:`create`,describe:`Create a concurrency key`,builder:te,handler:async e=>l({command:`workflows concurrency create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows concurrency create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/concurrency`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({limit:e.limit,name:p(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(v,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.limit===void 0)throw Error(`--limit is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await m(`name`,`Unique (per account) name of the concurrency key. Referenced by workflow steps via step config.`));let d=f({limit:e.limit,name:p(e.name,`name`,`text`)}),h=await c(`Creating`,async()=>n.send(v,{body:d,account_id:l}));o(h,{successLabel:`Created`})})};var re={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency/${t.key_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function ie(e){return e.usage(`$0 workflows concurrency delete <key-id>
|
|
5
5
|
|
|
6
|
-
Deletes a concurrency key. Fails while any workflow’s latest version references the key. The key disappears immediately, but steps already holding it keep their slots until they finish and still count against a key re-created with the same name.`).positional(`key-id`,{type:`string`,description:`Identifier of the concurrency key.`,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 ae={command:`delete <key-id>`,describe:`Delete a concurrency key`,builder:ie,handler:async e=>l({command:`workflows concurrency delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows concurrency delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/concurrency/${e[`key-id`]==null?`<key-id>`:encodeURIComponent(String(e[`key-id`]))}`,pathParams:{"key-id":String(e[`key-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force})){
|
|
7
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(re,{account_id:l,key_id:e[`key-id`]}));o(u,{successLabel:`Deleted`})})};var y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency/${t.key_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function oe(e){return e.usage(`$0 workflows concurrency edit <key-id>
|
|
6
|
+
Deletes a concurrency key. Fails while any workflow’s latest version references the key. The key disappears immediately, but steps already holding it keep their slots until they finish and still count against a key re-created with the same name.`).positional(`key-id`,{type:`string`,description:`Identifier of the concurrency key.`,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 ae={command:`delete <key-id>`,describe:`Delete a concurrency key`,builder:ie,handler:async e=>l({command:`workflows concurrency delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows concurrency delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/concurrency/${e[`key-id`]==null?`<key-id>`:encodeURIComponent(String(e[`key-id`]))}`,pathParams:{"key-id":String(e[`key-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(re,{account_id:l,key_id:e[`key-id`]}));o(u,{successLabel:`Deleted`})})};var y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency/${t.key_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function oe(e){return e.usage(`$0 workflows concurrency edit <key-id>
|
|
8
7
|
|
|
9
8
|
Updates the limit of a concurrency key. Applies to instances that start after the change.`).positional(`key-id`,{type:`string`,description:`Identifier of the concurrency key.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Maximum number of steps that may concurrently hold this key.`}).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 b={command:`edit <key-id>`,describe:`Update a concurrency key`,builder:oe,handler:async e=>l({command:`workflows concurrency edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows concurrency edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/concurrency/${e[`key-id`]==null?`<key-id>`:encodeURIComponent(String(e[`key-id`]))}`,pathParams:{"key-id":String(e[`key-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({limit:e.limit}):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(`Updating`,async()=>n.send(y,{body:t,account_id:l,key_id:e[`key-id`]}));o(r,{successLabel:`Updated`});return}if(e.limit===void 0)throw Error(`--limit is required (or pass --body with this field set).`);let d=f({limit:e.limit}),p=await c(`Updating`,async()=>n.send(y,{body:d,account_id:l,key_id:e[`key-id`]}));o(p,{successLabel:`Updated`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/workflows/concurrency/${t.key_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function S(e){return e.usage(`$0 workflows concurrency get <key-id>
|
|
10
9
|
|
|
@@ -12,8 +11,7 @@ Retrieves a concurrency key and the workflows whose latest version references it
|
|
|
12
11
|
|
|
13
12
|
Lists the account-scoped concurrency keys.`).option(`per-page`,{type:`number`,description:`Per page`}).option(`page`,{type:`number`,description:`Page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List concurrency keys`,builder:T,handler:async e=>l({command:`workflows concurrency list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await i();s({command:`cf workflows concurrency list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workflows/concurrency`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(w,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},D={command:`concurrency`,describe:`Operations for concurrency`,builder:e=>e.command(ne).command(ae).command(b).command(C).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workflows/${t.workflow_name}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function k(e){return e.usage(`$0 workflows delete <workflow-name>
|
|
14
13
|
|
|
15
|
-
Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.`).positional(`workflow-name`,{type:`string`,description:`Workflow 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 A={command:`delete <workflow-name>`,describe:`Deletes a Workflow`,builder:k,handler:async e=>l({command:`workflows delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}`,pathParams:{"workflow-name":String(e[`workflow-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation permanently deletes the Workflow.`})){
|
|
16
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(O,{account_id:l,workflow_name:e[`workflow-name`]}));o(u,{successLabel:`Deleted`})})};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/workflows/${t.workflow_name}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function M(e){return e.usage(`$0 workflows get <workflow-name>
|
|
14
|
+
Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.`).positional(`workflow-name`,{type:`string`,description:`Workflow 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 A={command:`delete <workflow-name>`,describe:`Deletes a Workflow`,builder:k,handler:async e=>l({command:`workflows delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}`,pathParams:{"workflow-name":String(e[`workflow-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation permanently deletes the Workflow.`}))return;let u=await c(`Deleting`,async()=>n.send(O,{account_id:l,workflow_name:e[`workflow-name`]}));o(u,{successLabel:`Deleted`})})};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/workflows/${t.workflow_name}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function M(e){return e.usage(`$0 workflows get <workflow-name>
|
|
17
15
|
|
|
18
16
|
Retrieves configuration and metadata for a specific workflow.`).positional(`workflow-name`,{type:`string`,description:`Workflow name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get <workflow-name>`,describe:`Get Workflow details`,builder:M,handler:async e=>l({command:`workflows get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}`,pathParams:{"workflow-name":String(e[`workflow-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(j,{account_id:l,workflow_name:e[`workflow-name`]}));o(u,{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 workflows instances batch create <workflow-name>
|
|
19
17
|
|
|
@@ -21,8 +19,7 @@ Creates multiple workflow instances in a single batch operation.`).positional(`w
|
|
|
21
19
|
|
|
22
20
|
Creates a new instance of a workflow, starting its execution.`).positional(`workflow-name`,{type:`string`,description:`Workflow name`,demandOption:!0}).option(`instance-id`,{type:`string`,description:"The system reserves IDs that consist of the `cf_` prefix and exactly 64 lowercase hexadecimal characters."}).option(`instance-retention-error`,{type:`string`,description:`Specifies the duration in milliseconds or as a string like '5 minutes'. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`instance-retention-success`,{type:`string`,description:`Specifies the duration in milliseconds or as a string like '5 minutes'. Accepts a JSON scalar or plain string, or @path/to/file.`}).option(`location-hint`,{type:`string`,description:`The location_hint field`,choices:[`wnam`,`weur`,`enam`,`eeur`,`apac`,`apac-ne`,`apac-se`,`oc`,`sam`,`afr`,`me`]}).coerce(`location-hint`,e=>p(e,`location-hint`,`text`)).option(`params`,{type:`string`,description:`JSON-encoded event payload passed into the new instance.`}).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 z={command:`create <workflow-name>`,describe:`Create a new workflow instance`,builder:R,handler:async e=>l({command:`workflows instances create`,classification:{safeFlags:[`location-hint`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows instances create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}/instances`,pathParams:{"workflow-name":String(e[`workflow-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({instance_id:p(e[`instance-id`],`instance-id`,`text`),instance_retention:{error_retention:d(e[`instance-retention-error`],`instance-retention-error`),success_retention:d(e[`instance-retention-success`],`instance-retention-success`)},location_hint:e[`location-hint`],params:p(e.params,`params`,`json`)}):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(L,{body:t,account_id:l,workflow_name:e[`workflow-name`]}));o(r,{successLabel:`Created`});return}let m=f({instance_id:p(e[`instance-id`],`instance-id`,`text`),instance_retention:{error_retention:d(e[`instance-retention-error`],`instance-retention-error`),success_retention:d(e[`instance-retention-success`],`instance-retention-success`)},location_hint:e[`location-hint`],params:p(e.params,`params`,`json`)}),h=await c(`Creating`,async()=>n.send(L,{body:m,account_id:l,workflow_name:e[`workflow-name`]}));o(h,{successLabel:`Created`})})};var B={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workflows/${t.workflow_name}/instances/${t.instance_id}`,errors:{404:`NotFoundError`}};function V(e){return e.usage(`$0 workflows instances delete <instance-id>
|
|
23
21
|
|
|
24
|
-
Deletes a workflow instance and its stored state.`).positional(`instance-id`,{type:`string`,description:"Instance identifier. User-created instances match `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances can use a longer, system-generated id derived from the cron expression.",demandOption:!0}).option(`workflow-name`,{type:`string`,description:`Workflow 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 H={command:`delete <instance-id>`,describe:`Delete a workflow instance`,builder:V,handler:async e=>l({command:`workflows instances delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows instances delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}`,pathParams:{"workflow-name":String(e[`workflow-name`]??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force})){
|
|
25
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(B,{account_id:l,workflow_name:e[`workflow-name`],instance_id:e[`instance-id`]}));o(u,{successLabel:`Deleted`})})};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/workflows/${t.workflow_name}/instances/${t.instance_id}/events/${t.event_type}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function W(e){return e.usage(`$0 workflows instances events send <event-type>
|
|
22
|
+
Deletes a workflow instance and its stored state.`).positional(`instance-id`,{type:`string`,description:"Instance identifier. User-created instances match `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances can use a longer, system-generated id derived from the cron expression.",demandOption:!0}).option(`workflow-name`,{type:`string`,description:`Workflow 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 H={command:`delete <instance-id>`,describe:`Delete a workflow instance`,builder:V,handler:async e=>l({command:`workflows instances delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows instances delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}`,pathParams:{"workflow-name":String(e[`workflow-name`]??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(B,{account_id:l,workflow_name:e[`workflow-name`],instance_id:e[`instance-id`]}));o(u,{successLabel:`Deleted`})})};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/workflows/${t.workflow_name}/instances/${t.instance_id}/events/${t.event_type}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function W(e){return e.usage(`$0 workflows instances events send <event-type>
|
|
26
23
|
|
|
27
24
|
Sends an event to a running workflow instance to trigger state transitions.`).positional(`event-type`,{type:`string`,description:`Event type`,demandOption:!0}).option(`workflow-name`,{type:`string`,description:`Workflow name`,demandOption:!0}).option(`instance-id`,{type:`string`,description:"Instance identifier. User-created instances match `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances can use a longer, system-generated id derived from the cron expression.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`send <event-type>`,describe:`Send event to instance`,builder:W,handler:async e=>l({command:`workflows instances events send`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows instances events send`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}/events/${e[`event-type`]==null?`<event-type>`:encodeURIComponent(String(e[`event-type`]))}`,pathParams:{"workflow-name":String(e[`workflow-name`]??``),"instance-id":String(e[`instance-id`]??``),"event-type":String(e[`event-type`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(U,{account_id:l,workflow_name:e[`workflow-name`],instance_id:e[`instance-id`],event_type:e[`event-type`]}));o(u,{successLabel:`Created`})})},K={command:`events`,describe:`Operations for instances.events`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/workflows/${t.workflow_name}/instances/${t.instance_id}`,query:[`simple`,`order`],errors:{400:`BadRequestError`,404:`NotFoundError`}};function se(e){return e.usage(`$0 workflows instances get <instance-id>
|
|
28
25
|
|
|
@@ -36,8 +33,7 @@ Changes the execution status of a workflow instance (e.g., pause, resume, termin
|
|
|
36
33
|
|
|
37
34
|
Changes the execution status of a workflow instance (e.g., pause, resume, terminate).`).positional(`instance-id`,{type:`string`,description:"Instance identifier. User-created instances match `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances can use a longer, system-generated id derived from the cron expression.",demandOption:!0}).option(`workflow-name`,{type:`string`,description:`Workflow name`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`pause`,`resume`,`terminate`,`restart`]}).coerce(`status`,e=>p(e,`status`,`text`)).option(`rollback`,{type:`boolean`,description:`Run rollback before terminating.`}).option(`from-count`,{type:`number`,description:`The from.count field`}).option(`from-name`,{type:`string`,description:`The from.name field`}).option(`from-type`,{type:`string`,description:`The from.type field`,choices:[`do`,`sleep`,`waitForEvent`]}).coerce(`from-type`,e=>p(e,`from-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`rollback`,[`from-count`,`from-name`,`from-type`]).conflicts(`from-count`,[`rollback`]).conflicts(`from-name`,[`rollback`]).conflicts(`from-type`,[`rollback`]).check(e=>{if([`from-count`,`from-name`,`from-type`].some(t=>e[t]!==void 0)){let t={"from-name":[`rollback`]},n=[`from-name`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --from-* flag is set`)}return!0})}const _e={command:`resume <instance-id>`,describe:`Change status of instance`,builder:ge,handler:async e=>l({command:`workflows instances resume`,classification:{safeFlags:[`status`,`rollback`,`from-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows instances resume`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}/status`,pathParams:{"workflow-name":String(e[`workflow-name`]??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({status:e.status,rollback:e.rollback,from:{count:e[`from-count`],name:p(e[`from-name`],`from-name`,`text`),type:e[`from-type`]}}):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(`Updating`,async()=>n.send(X,{body:t,account_id:l,workflow_name:e[`workflow-name`],instance_id:e[`instance-id`]}));o(r,{successLabel:`Updated`});return}e.status===void 0&&(e.status=await h(`status`,`The status field`,[`pause`,`resume`,`terminate`,`restart`]));let d=f({status:e.status,rollback:e.rollback,from:{count:e[`from-count`],name:p(e[`from-name`],`from-name`,`text`),type:e[`from-type`]}}),m=await c(`Updating`,async()=>n.send(X,{body:d,account_id:l,workflow_name:e[`workflow-name`],instance_id:e[`instance-id`]}));o(m,{successLabel:`Updated`})})};function ve(e){return e.usage("$0 workflows instances step get <instance-id>\n\nRetrieves the full, untruncated output for a specific step on a workflow instance. Returns a flat status-shaped JSON body with step `status` ('running' | 'waiting' | 'complete' | 'errored'), `error` (nullable), and `output` (the step value, or null while running/waiting/errored). When the step returned a ReadableStream from step.do, the response is served as 'application/octet-stream' with the raw bytes as the body instead of JSON. A `status='running'` response with non-null `error` indicates the step is currently retrying after a prior attempt failed.").positional(`instance-id`,{type:`string`,description:"Instance identifier. User-created instances match `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances can use a longer, system-generated id derived from the cron expression.",demandOption:!0}).option(`workflow-name`,{type:`string`,description:`Workflow name`,demandOption:!0}).option(`name`,{type:`string`,description:`Exact step name from the instance logs response, including the generated counter suffix.`,demandOption:!0}).option(`type`,{type:`string`,description:`Step type to disambiguate step.do and waitForEvent entries that share the same name.`,choices:[`step`,`waitForEvent`],demandOption:!0}).option(`attempt`,{type:`number`,description:`Specific attempt number to retrieve output or error for.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const ye={command:`get <instance-id>`,describe:`Get full step output from instance`,builder:ve,handler:async e=>l({command:`workflows instances step get`,classification:{safeFlags:[`type`,`dry-run`,`text`]}},e,async()=>{let n={name:e.name,type:e.type,attempt:e.attempt};if(e.dryRun){let t=await i();s({command:`cf workflows instances step get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}/step`,pathParams:{"workflow-name":String(e[`workflow-name`]??``),"instance-id":String(e[`instance-id`]??``)},query:n,bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>ee(`/accounts/${o}/workflows/${encodeURIComponent(String(e[`workflow-name`]))}/instances/${encodeURIComponent(String(e[`instance-id`]))}/step${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));_(e.text===!0?u.toString(`utf-8`):u)})},be={command:`step`,describe:`Operations for instances.step`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workflows/${t.workflow_name}/instances/${t.instance_id}/status`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function xe(e){return e.usage(`$0 workflows instances terminate <instance-id>
|
|
38
35
|
|
|
39
|
-
Changes the execution status of a workflow instance (e.g., pause, resume, terminate).`).positional(`instance-id`,{type:`string`,description:"Instance identifier. User-created instances match `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances can use a longer, system-generated id derived from the cron expression.",demandOption:!0}).option(`workflow-name`,{type:`string`,description:`Workflow name`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`pause`,`resume`,`terminate`,`restart`]}).coerce(`status`,e=>p(e,`status`,`text`)).option(`rollback`,{type:`boolean`,description:`Run rollback before terminating.`}).option(`from-count`,{type:`number`,description:`The from.count field`}).option(`from-name`,{type:`string`,description:`The from.name field`}).option(`from-type`,{type:`string`,description:`The from.type field`,choices:[`do`,`sleep`,`waitForEvent`]}).coerce(`from-type`,e=>p(e,`from-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`rollback`,[`from-count`,`from-name`,`from-type`]).conflicts(`from-count`,[`rollback`]).conflicts(`from-name`,[`rollback`]).conflicts(`from-type`,[`rollback`]).check(e=>{if([`from-count`,`from-name`,`from-type`].some(t=>e[t]!==void 0)){let t={"from-name":[`rollback`]},n=[`from-name`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --from-* flag is set`)}return!0})}const Se={command:`terminate <instance-id>`,describe:`Change status of instance`,builder:xe,handler:async e=>l({command:`workflows instances terminate`,classification:{safeFlags:[`status`,`rollback`,`from-type`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows instances terminate`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}/status`,pathParams:{"workflow-name":String(e[`workflow-name`]??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({status:e.status,rollback:e.rollback,from:{count:e[`from-count`],name:p(e[`from-name`],`from-name`,`text`),type:e[`from-type`]}}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation terminates the running Workflow instance.`})){
|
|
40
|
-
`);return}if(e.body){let t=u(e.body),r=await c(`Deleting`,async()=>n.send(Z,{body:t,account_id:l,workflow_name:e[`workflow-name`],instance_id:e[`instance-id`]}));o(r,{successLabel:`Deleted`});return}e.status===void 0&&(e.status=await h(`status`,`The status field`,[`pause`,`resume`,`terminate`,`restart`]));let d=f({status:e.status,rollback:e.rollback,from:{count:e[`from-count`],name:p(e[`from-name`],`from-name`,`text`),type:e[`from-type`]}}),m=await c(`Deleting`,async()=>n.send(Z,{body:d,account_id:l,workflow_name:e[`workflow-name`],instance_id:e[`instance-id`]}));o(m,{successLabel:`Deleted`})})},Ce={command:`instances`,describe:`Workflow instance operations`,builder:e=>e.command(z).command(H).command(ce).command(de).command(pe).command(he).command(_e).command(Se).command(I).command(K).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var we={method:`GET`,path:t=>e`/accounts/${t.account_id}/workflows`,query:[`per_page`,`page`,`search`],errors:{400:`BadRequestError`}};function Te(e){return e.usage(`$0 workflows list
|
|
36
|
+
Changes the execution status of a workflow instance (e.g., pause, resume, terminate).`).positional(`instance-id`,{type:`string`,description:"Instance identifier. User-created instances match `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances can use a longer, system-generated id derived from the cron expression.",demandOption:!0}).option(`workflow-name`,{type:`string`,description:`Workflow name`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`pause`,`resume`,`terminate`,`restart`]}).coerce(`status`,e=>p(e,`status`,`text`)).option(`rollback`,{type:`boolean`,description:`Run rollback before terminating.`}).option(`from-count`,{type:`number`,description:`The from.count field`}).option(`from-name`,{type:`string`,description:`The from.name field`}).option(`from-type`,{type:`string`,description:`The from.type field`,choices:[`do`,`sleep`,`waitForEvent`]}).coerce(`from-type`,e=>p(e,`from-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`rollback`,[`from-count`,`from-name`,`from-type`]).conflicts(`from-count`,[`rollback`]).conflicts(`from-name`,[`rollback`]).conflicts(`from-type`,[`rollback`]).check(e=>{if([`from-count`,`from-name`,`from-type`].some(t=>e[t]!==void 0)){let t={"from-name":[`rollback`]},n=[`from-name`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --from-* flag is set`)}return!0})}const Se={command:`terminate <instance-id>`,describe:`Change status of instance`,builder:xe,handler:async e=>l({command:`workflows instances terminate`,classification:{safeFlags:[`status`,`rollback`,`from-type`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workflows instances terminate`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workflows/${e[`workflow-name`]==null?`<workflow-name>`:encodeURIComponent(String(e[`workflow-name`]))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}/status`,pathParams:{"workflow-name":String(e[`workflow-name`]??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({status:e.status,rollback:e.rollback,from:{count:e[`from-count`],name:p(e[`from-name`],`from-name`,`text`),type:e[`from-type`]}}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation terminates the running Workflow instance.`}))return;if(e.body){let t=u(e.body),r=await c(`Deleting`,async()=>n.send(Z,{body:t,account_id:l,workflow_name:e[`workflow-name`],instance_id:e[`instance-id`]}));o(r,{successLabel:`Deleted`});return}e.status===void 0&&(e.status=await h(`status`,`The status field`,[`pause`,`resume`,`terminate`,`restart`]));let d=f({status:e.status,rollback:e.rollback,from:{count:e[`from-count`],name:p(e[`from-name`],`from-name`,`text`),type:e[`from-type`]}}),m=await c(`Deleting`,async()=>n.send(Z,{body:d,account_id:l,workflow_name:e[`workflow-name`],instance_id:e[`instance-id`]}));o(m,{successLabel:`Deleted`})})},Ce={command:`instances`,describe:`Workflow instance operations`,builder:e=>e.command(z).command(H).command(ce).command(de).command(pe).command(he).command(_e).command(Se).command(I).command(K).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var we={method:`GET`,path:t=>e`/accounts/${t.account_id}/workflows`,query:[`per_page`,`page`,`search`],errors:{400:`BadRequestError`}};function Te(e){return e.usage(`$0 workflows list
|
|
41
37
|
|
|
42
38
|
Lists all workflows configured for the account.`).option(`per-page`,{type:`number`,description:`Per page`}).option(`page`,{type:`number`,description:`Page`}).option(`search`,{type:`string`,description:"Allows filtering workflows` name."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`list`,describe:`List all Workflows`,builder:Te,handler:async e=>l({command:`workflows list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={per_page:e[`per-page`],page:e.page,search:e.search};if(e.dryRun){let e=await i();s({command:`cf workflows list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workflows`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(we,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workflows/settings`,body:`json`,errors:{400:`BadRequestError`}};function De(e){return e.usage(`$0 workflows settings edit
|
|
43
39
|
|