cf 1.0.0-beta.26 → 1.0.0-beta.28
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/dist/_meta/commands.json +7373 -4926
- package/dist/_meta/hand-written-commands.json +2 -2
- package/dist/_meta/schemas.json +11614 -4465
- package/dist/abuse-reports-D9edOyag.mjs +24 -0
- package/dist/{access-DCOOmDC5.mjs → access-CKCCSrrU.mjs} +1 -1
- package/dist/{accounts-HC6XuIwP.mjs → accounts-CNb9U9bK.mjs} +33 -27
- package/dist/{acm-DYgr6SAR.mjs → acm-CdKTAToZ.mjs} +3 -3
- package/dist/{addressing-BS66pJ_a.mjs → addressing-eZI_C-b0.mjs} +18 -18
- package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
- package/dist/{ai-BiIKznNv.mjs → ai-Csl_QNwv.mjs} +7 -7
- package/dist/ai-audit-DlqWsQi-.mjs +6 -0
- package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
- package/dist/ai-search-BxyhS3X7.mjs +74 -0
- package/dist/{ai-security-BUwS6kVh.mjs → ai-security-DvU2iYkY.mjs} +3 -3
- package/dist/{alerting-BSzuvFk1.mjs → alerting-r0G2X9y9.mjs} +10 -10
- package/dist/analytics-C6bfqm-W.mjs +17 -0
- package/dist/analytics-engine-BlIecoOe.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BBxEJjGv.mjs → api-security-DZ7GWOqD.mjs} +26 -26
- package/dist/argo-Bh0_cj49.mjs +14 -0
- package/dist/{artifacts-B9g9aPrk.mjs → artifacts-VZJWVq_6.mjs} +16 -16
- package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
- package/dist/auth-B-h0BHg7.mjs +2 -0
- package/dist/auth-B6tswVxH.mjs +2 -0
- package/dist/{auth-C50SqX9F.mjs → auth-clmqFEWU.mjs} +3 -3
- package/dist/{auth-token-DvNoIhRL.mjs → auth-token-DW4dJVdj.mjs} +1 -1
- package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-C0ynlGHf.mjs} +23 -23
- package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
- package/dist/billing-B2KusU6g.mjs +22 -0
- package/dist/{blocks-DnNrvi8s.mjs → blocks-BFulF68V.mjs} +1 -1
- package/dist/body-parser-DoewLePl.mjs +2 -0
- package/dist/body-unions-DNs981Ia.mjs +2 -0
- package/dist/bot-management-CXHXgrQC.mjs +9 -0
- package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
- package/dist/brand-protection-kv1ba80i.mjs +14 -0
- package/dist/browser-run-D-vRoZmf.mjs +40 -0
- package/dist/build-BzJGqb2o.mjs +2 -0
- package/dist/build-FFxzigo4.mjs +2 -0
- package/dist/{builds-D3mAH87h.mjs → builds-BbxINHRP.mjs} +27 -27
- package/dist/cache-BacNNtLu.mjs +36 -0
- package/dist/{cf-CpC4giTf.mjs → cf-BQ_LRiut.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
- package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +363 -0
- package/dist/{cli-Cm4Twas4.mjs → cli-B7vslRfu.mjs} +1 -1
- package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-bzB9JosR.mjs} +6 -6
- package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
- package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
- package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-DWBPQDA3.mjs} +126 -124
- package/dist/{command--Y_QAiU2.mjs → command-AVwd7XjE.mjs} +1 -1
- package/dist/{command-DlI7Z_7j.mjs → command-B87T_f2f.mjs} +1 -1
- package/dist/{command-QHmV62Fv.mjs → command-CEHhi3t0.mjs} +1 -1
- package/dist/{command-B-_ba4rQ.mjs → command-CYmQE79n.mjs} +1 -1
- package/dist/{command-DsOv6z9q.mjs → command-CbxXc5IW.mjs} +1 -1
- package/dist/{command-BKNQsGqu.mjs → command-Ce8CVLth.mjs} +1 -1
- package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
- package/dist/{command-BV8-laJK.mjs → command-D4YcwpVp.mjs} +1 -1
- package/dist/{command-BVz2aES3.mjs → command-D895kdlh.mjs} +1 -1
- package/dist/{command-yOG9VUtq.mjs → command-D9Qyi1B0.mjs} +1 -1
- package/dist/{command-CfOqnqlN.mjs → command-DeutqL1n.mjs} +1 -1
- package/dist/{command-Dn39o5xQ.mjs → command-Dl9ICrRK.mjs} +1 -1
- package/dist/{command-CN8NFLs2.mjs → command-DtCSe8Hy.mjs} +1 -1
- package/dist/{command-BsCFkho-.mjs → command-DwzVtmb3.mjs} +1 -1
- package/dist/{command-CQMRxiDz.mjs → command-wtBubtZ4.mjs} +1 -1
- package/dist/{completions-BA52jTea.mjs → completions-BvdKtzsX.mjs} +1 -1
- package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
- package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
- package/dist/{connectors-D8H6rQz9.mjs → connectors-DZFGNw3i.mjs} +4 -4
- package/dist/{containers-D4sa-Eoy.mjs → containers-B06OGOEB.mjs} +212 -212
- package/dist/{containers-Db-eWudu.mjs → containers-DCzQCo79.mjs} +8 -8
- package/dist/{content-scan-DUVq09i8.mjs → content-scan-XhnNJqXf.mjs} +4 -4
- package/dist/{context-BvLXzoMs.mjs → context-BY1Eh_Qe.mjs} +1 -1
- package/dist/{cps-CqaRliZZ.mjs → cps-CohlxvuN.mjs} +2 -2
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-BV4bHq8v.mjs} +2 -4
- package/dist/custom-csrs-BVdMQjYq.mjs +18 -0
- package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
- package/dist/custom-nameservers-CapMDyly.mjs +12 -0
- package/dist/custom-pages-BVIniWfq.mjs +38 -0
- package/dist/d1-nJCOJZb8.mjs +50 -0
- package/dist/{delegate-CMfEjvHn.mjs → delegate-CcL6RoGw.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-DDbmxkiX.mjs → deploy-DJMnWFNk.mjs} +1 -1
- package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
- package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
- package/dist/{dev-BS156bim.mjs → dev-GsYHvMah.mjs} +1 -1
- package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
- package/dist/{dist-DehXZozc.mjs → dist-D-ihn_mV.mjs} +42 -33
- package/dist/{dls-DciZC_gQ.mjs → dls-N1x8sAK3.mjs} +3 -3
- package/dist/{dns-C2YPspGN.mjs → dns-DATWP-PF.mjs} +36 -30
- package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-n3Y2ui6W.mjs} +8 -8
- package/dist/{docs-CYjyBA8q.mjs → docs-CRc_WOXh.mjs} +1 -1
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
- package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
- package/dist/{email-auth-CMCQAu99.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
- package/dist/email-domains-uL22-zRY.mjs +14 -0
- package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CV43rMJC.mjs} +15 -13
- package/dist/{email-security-Bu0fAYh-.mjs → email-security-DK_SJ0yi.mjs} +38 -38
- package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CTQafGec.mjs} +17 -17
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/{errors-C5RGao2J.mjs → errors-VG1mgwJl.mjs} +1 -1
- package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
- package/dist/{firewall-CJ-VIOk1.mjs → firewall-CW-fAI9m.mjs} +30 -14
- package/dist/{flagship-C5PTR1ND.mjs → flagship-RiLnDwfJ.mjs} +8 -8
- package/dist/{fraud-B7hwBheX.mjs → fraud-DvfBBTe8.mjs} +2 -2
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/global-options-DiKj2cQy.mjs +2 -0
- package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
- package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
- package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
- package/dist/iam-LlGEzRCq.mjs +62 -0
- package/dist/{images-Ttea4khD.mjs → images-C5WqUXkK.mjs} +11 -11
- package/dist/index.mjs +1 -1
- package/dist/{init-BeYrAg7Q.mjs → init-EVsjBrOz.mjs} +2 -2
- package/dist/{intel-CJznBf5n.mjs → intel-vcWyslaX.mjs} +18 -19
- package/dist/{interactive-DsU8VDvK.mjs → interactive-BCDFSPtq.mjs} +1 -1
- package/dist/{internal-DOho_iA0.mjs → internal-BhV9WjLp.mjs} +1 -1
- package/dist/{ips-BgNoRwFN.mjs → ips-CqHjVsqd.mjs} +1 -1
- package/dist/{k2-Cj1ORHul.mjs → k2-CZT2Pd5J.mjs} +2 -2
- package/dist/kv-Ipa7dnvF.mjs +12 -0
- package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
- package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
- package/dist/{live-BfrWKfq8.mjs → live-C9L1bNuE.mjs} +1 -1
- package/dist/load-balancers-Cb3VkSfc.mjs +84 -0
- package/dist/local-D5Vq6ooZ.mjs +2 -0
- package/dist/{local-CvzO-cQH.mjs → local-DIJ7SIKC.mjs} +1 -1
- package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-BZjgkacr.mjs} +1 -1
- package/dist/{login-CVWkMh1L.mjs → login-DG5ebyab.mjs} +1 -1
- package/dist/login-DRJugxya.mjs +2 -0
- package/dist/logpush-C5Gw7F_9.mjs +68 -0
- package/dist/logs-y3REfHbb.mjs +51 -0
- package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
- package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BPV_POf5.mjs} +129 -129
- package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
- package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
- package/dist/{mcp-BUOfMkBP.mjs → mcp-RPtrISTy.mjs} +6 -6
- package/dist/{mesh-B1RrhAT1.mjs → mesh-DZ4QHBPE.mjs} +5 -5
- package/dist/{migrate-BTU8AvlP.mjs → migrate-CRIUqGi2.mjs} +1 -1
- package/dist/{monetization-Da3ooFLC.mjs → monetization-CVZqM8Xo.mjs} +9 -5
- package/dist/{network-CjhSzhMm.mjs → network-DLt2JUo1.mjs} +15 -15
- package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
- package/dist/o11y-ySxrnP1Z.mjs +88 -0
- package/dist/{oauth-Dnog5v-Q.mjs → oauth-CFVUl-Wv.mjs} +1 -1
- package/dist/{oauth-DdXkpU44.mjs → oauth-Cidoyxfp.mjs} +1 -1
- package/dist/observability-C-KNh__y.mjs +4 -0
- package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
- package/dist/organizations-DbeeWUL4.mjs +71 -0
- package/dist/output-BZQEl3mK.mjs +2 -0
- package/dist/package-B7RgwuFR.mjs +2 -0
- package/dist/{page-rules-D2eFbKWb.mjs → page-rules-DRw763O1.mjs} +4 -4
- package/dist/{pages-DYZDvWK6.mjs → pages-DfQnxiTk.mjs} +12 -12
- package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
- package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-wdEhl8k4.mjs} +14 -12
- package/dist/{pipelines-D6pkhlpm.mjs → pipelines-DbyrI6F4.mjs} +11 -11
- package/dist/precursor-Dx8lN4UJ.mjs +4 -0
- package/dist/previews-DEVNSip2.mjs +6 -0
- package/dist/{progress-B-CVX0kn.mjs → progress-yvPscjYg.mjs} +1 -1
- package/dist/{prompt-DJF_Rs5S.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
- package/dist/{queues-DaqLO-UO.mjs → queues-DgMc7Z6A.mjs} +18 -18
- package/dist/{r2-DDIU9JN3.mjs → r2-BpTVicIq.mjs} +43 -43
- package/dist/{radar-D59qCgld.mjs → radar-DW-S1VUh.mjs} +11 -11
- package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
- package/dist/{ready-DgE08svD.mjs → ready-d0li0X6r.mjs} +1 -1
- package/dist/realtime-DMKHLYF4.mjs +170 -0
- package/dist/registrar-D23gfKBi.mjs +43 -0
- package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
- package/dist/{reporting-Dx2YTick.mjs → reporting-WX8P3Y0k.mjs} +2 -2
- package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-C0FpeBhz.mjs} +1 -1
- package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-qd7XOAka.mjs} +2 -2
- package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
- package/dist/{rules-CjgLSlUC.mjs → rules-CB0QQTB3.mjs} +5 -5
- package/dist/rulesets-DmqwixUC.mjs +42 -0
- package/dist/{rum-vPEpMS_h.mjs → rum-BZ_24qZU.mjs} +9 -9
- package/dist/{run-BZ6Fj3jQ.mjs → run-BOKI1uWa.mjs} +1 -1
- package/dist/run-DBqOjD1P.mjs +2 -0
- package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
- package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
- package/dist/schema-flags-CXm9iIv6.mjs +4 -0
- package/dist/{scim-BA7XbsSu.mjs → scim-DchxaJfE.mjs} +8 -8
- package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-oAft1cFE.mjs} +5 -5
- package/dist/security-insights-DMm0qg_m.mjs +62 -0
- package/dist/{security-txt-DikhnR2L.mjs → security-txt-CIt0494b.mjs} +2 -2
- package/dist/{session-BOnam-Wv.mjs → session-vzNfUhPl.mjs} +1 -1
- package/dist/{shared-DmmWSObC.mjs → shared-MK-_lkbn.mjs} +1 -1
- package/dist/{signed-url-C-24KbWB.mjs → signed-url-gNangfwc.mjs} +1 -1
- package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
- package/dist/{snippets-Bi3Uq1DF.mjs → snippets-DdoDYXW-.mjs} +3 -3
- package/dist/{spawn-C3hzWVrJ.mjs → spawn-B5F4OIHG.mjs} +1 -1
- package/dist/{spectrum-BaWKMoAl.mjs → spectrum-DLYIHelC.mjs} +3 -3
- package/dist/{speed-DShjlpAs.mjs → speed-DugG9Tm9.mjs} +2 -2
- package/dist/{sql-DCoFf15T.mjs → sql-Bb56llsb.mjs} +2 -2
- package/dist/src-BoSDeQ9m.mjs +133 -0
- package/dist/{ssl-C4nt4pJK.mjs → ssl-Bg4X3WGk.mjs} +24 -24
- package/dist/startup-profile-DQVkZZpb.mjs +2 -0
- package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DZL2DC44.mjs} +1 -1
- package/dist/state-DW3QZtfh.mjs +2 -0
- package/dist/{state-DmjHXZat.mjs → state-mr5ux1Nb.mjs} +1 -1
- package/dist/{stream-CpZbnSpH.mjs → stream-BuZYDbNR.mjs} +21 -21
- package/dist/{tags-BIjQ3Kjh.mjs → tags-SKz2odE_.mjs} +12 -6
- package/dist/{telemetry-BDhqOpUw.mjs → telemetry-B4zmCpT0.mjs} +1 -1
- package/dist/telemetry-DkDUr4KK.mjs +2 -0
- package/dist/tenant-custom-nameservers-BhkhBerL.mjs +8 -0
- package/dist/tenants-DD-GMq0K.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
- package/dist/{tunnels-CXAO2CeL.mjs → tunnels-D90ztENM.mjs} +6 -6
- package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-DhSU_Xar.mjs} +4 -4
- package/dist/ui-xjCox-gU.mjs +2 -0
- package/dist/{update-check-D_Wtw0_D.mjs → update-check-CRttabfu.mjs} +1 -1
- package/dist/{update-check-Dc7cRFlx.mjs → update-check-HltjTMDE.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
- package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BRdWwka4.mjs} +3 -3
- package/dist/{user-BaF0qvvO.mjs → user-Cmb1_Wu5.mjs} +50 -52
- package/dist/{vectorize-D5qiggZU.mjs → vectorize-BTBerJME.mjs} +11 -11
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-6Bpy6Bgt.mjs +2 -0
- package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-LymmKIGr.mjs} +16 -14
- package/dist/{web-assets-BySw_Tme.mjs → web-assets-LHPQsrnY.mjs} +21 -21
- package/dist/{web3-BKkKf1RF.mjs → web3-BsOio0Ae.mjs} +12 -12
- package/dist/workers-BnLiOjZf.mjs +39 -0
- package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-sKpITeRk.mjs} +4 -4
- package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
- package/dist/workers-vpc-D8lefWDo.mjs +12 -0
- package/dist/{workflows-Cr957c4U.mjs → workflows-B-ZIG3y7.mjs} +22 -22
- package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-6E6wT_LZ.mjs} +67 -58
- package/dist/zaraz-BBKki5WS.mjs +22 -0
- package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-BZDXM5r6.mjs} +487 -409
- package/dist/{zones-BzyjOT10.mjs → zones-B-UV_DGE.mjs} +24 -24
- package/package.json +16 -16
- package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
- package/dist/ai-audit-DI4Rw2wl.mjs +0 -6
- package/dist/ai-search-QOenIzDL.mjs +0 -74
- package/dist/analytics-CQ-Yt1mm.mjs +0 -17
- package/dist/analytics-engine-CdrY5-95.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-BiefH8wc.mjs +0 -14
- package/dist/auth-Czzy5Rs_.mjs +0 -2
- package/dist/auth-D5Yj9eYU.mjs +0 -2
- package/dist/billing-BrLJqlOf.mjs +0 -22
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/bot-management-BSBVuKc0.mjs +0 -9
- package/dist/brand-protection-Byoa1hvj.mjs +0 -26
- package/dist/browser-run-BSVANGzU.mjs +0 -40
- package/dist/build-CPKxZ3kL.mjs +0 -2
- package/dist/build-Dwd1_7o0.mjs +0 -2
- package/dist/cache-0xCdyNg9.mjs +0 -36
- package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
- package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
- package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
- package/dist/d1-BsWI546w.mjs +0 -89
- package/dist/email-domains-1Nx60ETD.mjs +0 -12
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/iam-DuZenYtc.mjs +0 -48
- package/dist/kv-CTyuvcAz.mjs +0 -12
- package/dist/load-balancers-DMTsh-9q.mjs +0 -72
- package/dist/local-CWTti4ot.mjs +0 -2
- package/dist/login-Djz5mvHJ.mjs +0 -2
- package/dist/logpush-OMhp7VgE.mjs +0 -44
- package/dist/logs-BSyyNwso.mjs +0 -35
- package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
- package/dist/magic-network-monitoring-DRRvSrDP.mjs +0 -34
- package/dist/o11y-DeNxXxcp.mjs +0 -86
- package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
- package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
- package/dist/organization-IsxVyWol.mjs +0 -73
- package/dist/organizations-p8Mgo8A7.mjs +0 -4
- package/dist/origin-post-quantum-encryption-Bwysyttf.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-BOE_De2L.mjs +0 -2
- package/dist/precursor-B35P8h6h.mjs +0 -4
- package/dist/previews-B1mqjXaJ.mjs +0 -6
- package/dist/realtime-DWjdrDzv.mjs +0 -168
- package/dist/registrar-uYOU1U27.mjs +0 -43
- package/dist/resource-sharing-CIsLVAcK.mjs +0 -36
- package/dist/rulesets-C7_aZA7m.mjs +0 -34
- package/dist/run-D4-K_cbQ.mjs +0 -2
- package/dist/schema-flags-Cr6kleor.mjs +0 -4
- package/dist/security-insights-ZKtey62s.mjs +0 -40
- package/dist/src-jyCTFHcS.mjs +0 -131
- package/dist/startup-profile-D_Qjgca1.mjs +0 -2
- package/dist/state-C7lNNN31.mjs +0 -2
- package/dist/telemetry-BZdRnr26.mjs +0 -2
- package/dist/tenant-CqYoylyU.mjs +0 -10
- package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
- package/dist/ui-BUCBQ3Sq.mjs +0 -2
- package/dist/version-DNcdABcr.mjs +0 -2
- package/dist/workers-TS0oQ-XH.mjs +0 -39
- package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
- package/dist/zaraz-C8__FhOh.mjs +0 -22
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as l,n as u,r as d,t as f}from"./body-parser-DoewLePl.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/migrate_to_previews`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function h(e){return e.usage(`$0 workers-builds workers migrate-to-previews <script-tag>
|
|
3
3
|
|
|
4
|
-
Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`deploy-command`,{type:`string`,description:`Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for migrating a Worker's legacy non-production trigger to Previews.`})}const 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),
|
|
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=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>l.send(m,{body:t,account_id:d,script_tag:e[`script-tag`]}));a(n,{successLabel:`Created`});return}let h=f({deploy_command:p(e[`deploy-command`],`deploy-command`,`text`)}),g=await s(`Creating`,async()=>l.send(m,{body:h,account_id:d,script_tag:e[`script-tag`]}));a(g,{successLabel:`Created`})})};var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}/builds`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function v(e){return e.usage(`$0 workers-builds workers previews create-build <preview-id>
|
|
5
5
|
|
|
6
|
-
Trigger a build for a single Preview.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>p(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{
|
|
6
|
+
Trigger a build for a single Preview.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>p(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`seed-repo-branch`,`seed-repo-files`,`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --seed-repo-* flag is set`)}return!0})}const y={command:`create-build <preview-id>`,describe:`Create preview build`,builder:v,handler:async e=>c({command:`workers-builds workers previews create-build`,classification:{safeFlags:[`seed-repo-provider`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews create-build`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}/builds`,pathParams:{"script-tag":String(e[`script-tag`]??``),"preview-id":String(e[`preview-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),d=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>d.send(_,{body:t,account_id:m,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(n,{successLabel:`Created`});return}let h=f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),g=await s(`Creating`,async()=>d.send(_,{body:h,account_id:m,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(g,{successLabel:`Created`})})};var b={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function x(e){return e.usage(`$0 workers-builds workers previews edit <preview-id>
|
|
7
7
|
|
|
8
|
-
Update a single Preview of a Worker. Supports partial updates to the tracked branch, the automation flags, and the build settings.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`auto-build`,{type:`boolean`,description:`Whether pushes to the git branch build this Preview. Deploy hooks, manual builds, and retries run regardless of this setting.`}).option(`auto-delete`,{type:`boolean`,description:`Whether deleting the git branch also deletes this Preview.`}).option(`branch`,{type:`string`,description:`Git branch this Preview tracks`}).option(`settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Preview. At least one field must be provided, and omitted fields are left unchanged.`})}const S={command:`edit <preview-id>`,describe:`Update preview`,builder:x,handler:async e=>c({command:`workers-builds workers previews edit`,classification:{safeFlags:[`auto-build`,`auto-delete`,`settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``),"preview-id":String(e[`preview-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({auto_build:e[`auto-build`],auto_delete:e[`auto-delete`],branch:p(e.branch,`branch`,`text`),settings:{build_caching_enabled:e[`settings-build-caching-enabled`],build_command:p(e[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:p(e[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:p(e[`settings-deploy-command`],`settings-deploy-command`,`text`),environment_variables:d(e[`settings-environment-variables`],`settings-environment-variables`),path_excludes:e[`settings-path-excludes`],path_includes:e[`settings-path-includes`],root_directory:p(e[`settings-root-directory`],`settings-root-directory`,`text`)}},[[`settings`,`environment_variables`]]):u(e.body)});return}let c=await n(e),
|
|
8
|
+
Update a single Preview of a Worker. Supports partial updates to the tracked branch, the automation flags, and the build settings.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`auto-build`,{type:`boolean`,description:`Whether pushes to the git branch build this Preview. Deploy hooks, manual builds, and retries run regardless of this setting.`}).option(`auto-delete`,{type:`boolean`,description:`Whether deleting the git branch also deletes this Preview.`}).option(`branch`,{type:`string`,description:`Git branch this Preview tracks`}).option(`settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Preview. At least one field must be provided, and omitted fields are left unchanged.`})}const S={command:`edit <preview-id>`,describe:`Update preview`,builder:x,handler:async e=>c({command:`workers-builds workers previews edit`,classification:{safeFlags:[`auto-build`,`auto-delete`,`settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``),"preview-id":String(e[`preview-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({auto_build:e[`auto-build`],auto_delete:e[`auto-delete`],branch:p(e.branch,`branch`,`text`),settings:{build_caching_enabled:e[`settings-build-caching-enabled`],build_command:p(e[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:p(e[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:p(e[`settings-deploy-command`],`settings-deploy-command`,`text`),environment_variables:d(e[`settings-environment-variables`],`settings-environment-variables`),path_excludes:e[`settings-path-excludes`],path_includes:e[`settings-path-includes`],root_directory:p(e[`settings-root-directory`],`settings-root-directory`,`text`)}},[[`settings`,`environment_variables`]]):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(b,{body:t,account_id:m,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(n,{successLabel:`Updated`});return}let h=f({auto_build:e[`auto-build`],auto_delete:e[`auto-delete`],branch:p(e.branch,`branch`,`text`),settings:{build_caching_enabled:e[`settings-build-caching-enabled`],build_command:p(e[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:p(e[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:p(e[`settings-deploy-command`],`settings-deploy-command`,`text`),environment_variables:d(e[`settings-environment-variables`],`settings-environment-variables`),path_excludes:e[`settings-path-excludes`],path_includes:e[`settings-path-includes`],root_directory:p(e[`settings-root-directory`],`settings-root-directory`,`text`)}},[[`settings`,`environment_variables`]]),g=await s(`Updating`,async()=>l.send(b,{body:h,account_id:m,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(g,{successLabel:`Updated`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function w(e){return e.usage(`$0 workers-builds workers previews get <preview-id>
|
|
9
9
|
|
|
10
10
|
Retrieve a single Preview of a Worker, including the build settings it currently uses.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <preview-id>`,describe:`Get preview`,builder:w,handler:async e=>c({command:`workers-builds workers previews get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``),"preview-id":String(e[`preview-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(C,{account_id:l,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(u,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}/builds`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function D(e){return e.usage(`$0 workers-builds workers previews list-builds <preview-id>
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as u,r as d,s as f,t as p}from"./body-parser-DoewLePl.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-CEpZ-lQZ.mjs";var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces`,body:`json`};function ee(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces create
|
|
3
3
|
|
|
4
|
-
Create a new Workers for Platforms dispatch namespace.`).option(`name`,{type:`string`,description:`The name of the dispatch namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Create Workers for Platforms Dispatch Namespace`,builder:ee,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):u(e.body)});return}let n=await r(e),
|
|
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=e.body===void 0?void 0:u(e.body),l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(y,{body:e,account_id:d}));o(t,{successLabel:`Created`});return}let f=p({name:m(e.name,`name`,`text`)}),h=await c(`Creating`,async()=>l.send(y,{body:f,account_id:d}));o(h,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}`};function x(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces delete <dispatch-namespace>
|
|
5
5
|
|
|
6
6
|
Delete a Workers for Platforms dispatch namespace.`).positional(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <dispatch-namespace>`,describe:`Delete Workers for Platforms Dispatch Namespace`,builder:x,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`This will permanently delete the Workers for Platforms dispatch namespace.`}))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>
|
|
7
7
|
|
|
@@ -20,20 +20,20 @@ Fetch a list of scripts uploaded to a Workers for Platforms dispatch namespace.`
|
|
|
20
20
|
Create, update, or delete multiple secrets on a Workers for Platforms script in a single operation using JSON Merge Patch (RFC 7396). This operation creates a single version with all changes included. Prefer this API instead of changing many secrets individually. Usage: - To create or update a secret, set its value to a secret object. - To delete a secret, set its value to \`null\`. - Secrets not included in the request are left unchanged.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`secrets`,{type:`string`,description:`Map of secret names to secret values:
|
|
21
21
|
- Set to a secret object to create or update.
|
|
22
22
|
- Set to \`null\` to delete.
|
|
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),
|
|
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=e.file===void 0?e.body===void 0?void 0:u(e.body):void 0,m=await r(e),g=e.local?t:await a();if(e.accountId=g,e.file!==void 0){let t=h(e.file),r=await c(`Updating`,async()=>n(m,`PATCH`,`/accounts/${g}/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!==void 0){let t=l,r=await c(`Updating`,async()=>n(m,`PATCH`,`/accounts/${g}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:t}));o(r,{successLabel:`Updated`});return}let _={};e.secrets!==void 0&&f(_,[`secrets`],d(e.secrets,`secrets`)),e[`version-tags`]!==void 0&&f(_,[`version_tags`],d(e[`version-tags`],`version-tags`));let v=await c(`Updating`,async()=>n(m,`PATCH`,`/accounts/${g}/workers/dispatch/namespaces/${encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(e[`script-name`]))}/secrets-bulk`,{body:_}));o(v,{successLabel:`Updated`})})};var W={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 G(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets delete <secret-name>
|
|
24
24
|
|
|
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
|
|
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 K={command:`delete <secret-name>`,describe:`Delete Workers for Platforms script secret`,builder:G,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(W,{account_id:u,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`],secret_name:e[`secret-name`],...n}));o(d,{successLabel:`Deleted`})})};var q={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 ne(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets get <secret-name>
|
|
26
26
|
|
|
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:
|
|
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:ne,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(q,{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
|
|
28
28
|
|
|
29
29
|
List secrets bound to a script uploaded to a Workers for Platforms dispatch namespace.`).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Workers for Platforms Script Secrets`,builder:X,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Y,{account_id:l,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(u,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/secrets`,body:`json`,errors:{429:`TooManyRequestsError`}};function re(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts secrets update <script-name>
|
|
30
30
|
|
|
31
|
-
Add a secret to a Workers for Platforms script by creating a new version with that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`}).option(`text`,{type:`string`,description:`The secret value to use.`}).option(`type`,{type:`string`,description:`The kind of resource that the binding provides.`,choices:[`secret_text`,`secret_key`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`algorithm`,{type:`string`,description:`Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). Provide as a JSON object or @path/to/file.json.`}).option(`format`,{type:`string`,description:`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,choices:[`raw`,`pkcs8`,`spki`,`jwk`]}).coerce(`format`,e=>m(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`key-jwk`,{type:`string`,description:'Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". Provide as a JSON object or @path/to/file.json.'}).option(`usages`,{type:`string`,array:!0,description:`Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A secret value accessible through a binding.`}).conflicts(`text`,[`algorithm`,`format`,`key-base64`,`key-jwk`,`usages`]).conflicts(`algorithm`,[`text`]).implies(`algorithm`,[`format`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`algorithm`,`usages`]).conflicts(`key-base64`,[`text`]).conflicts(`key-jwk`,[`text`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const ie={command:`update <script-name>`,describe:`Add a secret to a Workers for Platforms script`,builder:re,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),text:m(e.text,`text`,`text`),type:e.type,algorithm:d(e.algorithm,`algorithm`),format:e.format,key_base64:m(e[`key-base64`],`key-base64`,`text`),key_jwk:d(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]):u(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let n=await r(e),
|
|
31
|
+
Add a secret to a Workers for Platforms script by creating a new version with that secret. When changing more than one secret at a time, prefer the "Patch multiple script secrets" API instead of changing many secrets individually.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`name`,{type:`string`,description:`A JavaScript variable name for the binding.`}).option(`text`,{type:`string`,description:`The secret value to use.`}).option(`type`,{type:`string`,description:`The kind of resource that the binding provides.`,choices:[`secret_text`,`secret_key`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`algorithm`,{type:`string`,description:`Algorithm-specific key parameters. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#algorithm). Provide as a JSON object or @path/to/file.json.`}).option(`format`,{type:`string`,description:`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,choices:[`raw`,`pkcs8`,`spki`,`jwk`]}).coerce(`format`,e=>m(e,`format`,`text`)).option(`key-base64`,{type:`string`,description:'Base64-encoded key data. Required if `format` is "raw", "pkcs8", or "spki".'}).option(`key-jwk`,{type:`string`,description:'Key data in [JSON Web Key](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#json_web_key) format. Required if `format` is "jwk". Provide as a JSON object or @path/to/file.json.'}).option(`usages`,{type:`string`,array:!0,description:`Allowed operations with the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#keyUsages).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A secret value accessible through a binding.`}).conflicts(`text`,[`algorithm`,`format`,`key-base64`,`key-jwk`,`usages`]).conflicts(`algorithm`,[`text`]).implies(`algorithm`,[`format`,`usages`]).conflicts(`format`,[`text`]).implies(`format`,[`algorithm`,`usages`]).conflicts(`key-base64`,[`text`]).implies(`key-base64`,[`algorithm`,`format`,`usages`]).conflicts(`key-jwk`,[`text`]).implies(`key-jwk`,[`algorithm`,`format`,`usages`]).conflicts(`usages`,[`text`]).implies(`usages`,[`algorithm`,`format`])}const ie={command:`update <script-name>`,describe:`Add a secret to a Workers for Platforms script`,builder:re,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts secrets update`,classification:{safeFlags:[`type`,`format`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts secrets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/secrets`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),text:m(e.text,`text`,`text`),type:e.type,algorithm:d(e.algorithm,`algorithm`),format:e.format,key_base64:m(e[`key-base64`],`key-base64`,`text`),key_jwk:d(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]):u(e.body),sensitiveBodyPaths:[[`text`],[`key_base64`],[`key_jwk`]]});return}let n=e.body===void 0?void 0:u(e.body),l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(Q,{body:t,account_id:f,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await g(`name`,`A JavaScript variable name for the binding.`)),e.type===void 0&&(e.type=await _(`type`,`The kind of resource that the binding provides.`,[`secret_text`,`secret_key`])),e.type===`secret_text`&&e.text===void 0&&(e.text=await g(`text`,`The secret value to use.`,{kind:`secret`,question:`Enter value for --text`})),e.type===`secret_key`&&e.algorithm===void 0)throw Error(`--algorithm is required (or pass --body with this field set).`);if(e.type===`secret_key`&&e.format===void 0&&(e.format=await g(`format`,`Data format of the key. [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey#format).`,{question:`Enter value for --format`})),e.type===`secret_key`&&e.usages===void 0)throw Error(`--usages is required (or pass --body with this field set).`);let h=p({name:m(e.name,`name`,`text`),text:m(e.text,`text`,`text`),type:e.type,algorithm:d(e.algorithm,`algorithm`),format:e.format,key_base64:m(e[`key-base64`],`key-base64`,`text`),key_jwk:d(e[`key-jwk`],`key-jwk`),usages:e.usages},[[`algorithm`],[`key_jwk`]]),v=await c(`Updating`,async()=>l.send(Q,{body:h,account_id:f,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(v,{successLabel:`Updated`})})},ae={command:`secrets`,describe:`Operations for dispatch-namespaces.scripts.secrets`,builder:e=>e.command(U).command(K).command(J).command(Z).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/settings`,pathParams:[`account_id`,`dispatch_namespace`,`script_name`],body:`form`};function se(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts settings edit <script-name>
|
|
32
32
|
|
|
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>
|
|
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!==void 0){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!==void 0){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>
|
|
34
34
|
|
|
35
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
|
|
36
36
|
|
|
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
|
|
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`})})};var _e={method:`PUT`,path:t=>e`/accounts/${t.account_id}/workers/dispatch/namespaces/${t.dispatch_namespace}/scripts/${t.script_name}/tags`,body:`json`};function ve(e){return e.usage(`$0 workers-for-platforms dispatch-namespaces scripts tags update <script-name>
|
|
38
38
|
|
|
39
|
-
Replace tags for a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Tags associated with the Worker.`})}const
|
|
39
|
+
Replace tags for a script uploaded to a Workers for Platforms dispatch namespace.`).positional(`script-name`,{type:`string`,description:`Name of the script.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Tags associated with the Worker.`})}const ye={command:`update <script-name>`,describe:`Replace Workers for Platforms Script Tags`,builder:ve,handler:async e=>l({command:`workers-for-platforms dispatch-namespaces scripts tags update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf workers-for-platforms dispatch-namespaces scripts tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/dispatch/namespaces/${e[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(e[`dispatch-namespace`]))}/scripts/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/tags`,pathParams:{"dispatch-namespace":String(e[`dispatch-namespace`]??``),"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body,[],10)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:u(e.body,[],10),l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(_e,{body:t,account_id:d,dispatch_namespace:e[`dispatch-namespace`],script_name:e[`script-name`]}));o(r,{successLabel:`Updated`})}})},be={command:`tags`,describe:`Operations for dispatch-namespaces.scripts.tags`,builder:e=>e.command($).command(ge).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`scripts`,describe:`Operations around customer Workers deployed inside a dispatch namespace`,builder:e=>e.command(F).command(R).command(V).command(M).command(ae).command(fe).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`dispatch-namespaces`,describe:`Isolate and route requests to many individual user Workers`,builder:e=>e.command(te).command(S).command(T).command(O).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ce={command:`workers-for-platforms`,describe:`Workers for Platforms uses dispatch namespaces to isolate and route requests to many individual user Workers, letting platforms run untrusted customer or AI-generated code at scale with per-tenant bindings, limits, and observability`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ce as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as l,t as u}from"./body-parser-DoewLePl.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-CEpZ-lQZ.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
|
+
|
|
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\n\n`disabled` cannot be combined with `certificate_authority`: a custom CA is\nonly used to verify the server certificate.'}).option(`tls-settings-certificate-authority`,{type:`string`,description:`UUID of the custom CA certificate or chain.`}).option(`tls-settings-client-certificate`,{type:`string`,description:`UUID of the mTLS client certificate and private key.`}).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-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv4`,[`host-network-tunnel-id`]).conflicts(`host-network-tunnel-id`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).conflicts(`host-ipv6`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv6`,[`host-network-tunnel-id`]).conflicts(`host-hostname`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-hostname`,[`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-resolver-ips`,[`host-hostname`,`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-tunnel-id`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-tunnel-id`,[`host-hostname`]).implies(`tls-settings-certificate-authority`,[`tls-settings-cert-verification-mode`]).implies(`tls-settings-client-certificate`,[`tls-settings-cert-verification-mode`]).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`])}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`),certificate_authority:d(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:d(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`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=e.body===void 0?void 0:l(e.body),m=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>m.send(h,{body:e,account_id:g}));a(t,{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 _=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`),certificate_authority:d(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:d(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`text`)},type:e.type,http_port:e[`http-port`],https_port:e[`https-port`],app_protocol:e[`app-protocol`],tcp_port:e[`tcp-port`]}),v=await s(`Creating`,async()=>m.send(h,{body:_,account_id:g}));a(v,{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
|
+
|
|
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>
|
|
7
|
+
|
|
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
|
|
9
|
+
|
|
10
|
+
Lists the Workers VPC connectivity services in the account.`).option(`type`,{type:`string`,description:`Type`,choices:[`tcp`,`http`]}).option(`page`,{type:`number`,description:`Current page in the response`}).option(`per-page`,{type:`number`,description:`Max amount of entries returned per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Workers VPC connectivity services`,builder:T,handler:async e=>c({command:`workers-vpc services list`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{let c={type:e.type,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf workers-vpc services list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/connectivity/directory/services`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(w,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var D={method:`PUT`,path:t=>e`/accounts/${t.account_id}/connectivity/directory/services/${t.service_id}`,body:`json`};function O(e){return e.usage(`$0 workers-vpc services update <service-id>
|
|
11
|
+
|
|
12
|
+
Updates an existing Workers VPC connectivity service by its ID.`).positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).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\n\n`disabled` cannot be combined with `certificate_authority`: a custom CA is\nonly used to verify the server certificate.'}).option(`tls-settings-certificate-authority`,{type:`string`,description:`UUID of the custom CA certificate or chain.`}).option(`tls-settings-client-certificate`,{type:`string`,description:`UUID of the mTLS client certificate and private key.`}).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-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv4`,[`host-network-tunnel-id`]).conflicts(`host-network-tunnel-id`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).conflicts(`host-ipv6`,[`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`]).implies(`host-ipv6`,[`host-network-tunnel-id`]).conflicts(`host-hostname`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-hostname`,[`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-resolver-ips`,[`host-hostname`,`host-resolver-network-tunnel-id`]).conflicts(`host-resolver-network-tunnel-id`,[`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`]).implies(`host-resolver-network-tunnel-id`,[`host-hostname`]).implies(`tls-settings-certificate-authority`,[`tls-settings-cert-verification-mode`]).implies(`tls-settings-client-certificate`,[`tls-settings-cert-verification-mode`]).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`])}const k={command:`update <service-id>`,describe:`Update Workers VPC connectivity service`,builder:O,handler:async e=>c({command:`workers-vpc services update`,classification:{safeFlags:[`type`,`app-protocol`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf workers-vpc services update`,method:`PUT`,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:`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`),certificate_authority:d(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:d(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`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=e.body===void 0?void 0:l(e.body),m=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>m.send(D,{body:t,account_id:h,service_id:e[`service-id`]}));a(n,{successLabel:`Updated`});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`),certificate_authority:d(e[`tls-settings-certificate-authority`],`tls-settings-certificate-authority`,`text`),client_certificate:d(e[`tls-settings-client-certificate`],`tls-settings-client-certificate`,`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(`Updating`,async()=>m.send(D,{body:g,account_id:h,service_id:e[`service-id`]}));a(_,{successLabel:`Updated`})})},A={command:`services`,describe:`Operations for services`,builder:e=>e.command(_).command(b).command(C).command(E).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`workers-vpc`,describe:`workers-vpc`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{j as default};
|