cf 1.0.0-beta.16 → 1.0.0-beta.18
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 +6117 -4540
- package/dist/_meta/schemas.json +5016 -3257
- package/dist/{abuse-reports-17K-TRhO.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
- package/dist/{access-BwB7sg1D.mjs → access-BtsMwesh.mjs} +1 -1
- package/dist/{accounts-BnIGu_ac.mjs → accounts-X5QVzEUW.mjs} +27 -21
- package/dist/{acm-CQRcu_zw.mjs → acm-C_NepMi6.mjs} +1 -1
- package/dist/{addressing-Qcm9jd3C.mjs → addressing-BkQY1hoA.mjs} +18 -18
- package/dist/{agent-memory-B3xN9I6-.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
- package/dist/{ai-BRKOCckA.mjs → ai-Bb0_Zknm.mjs} +1 -1
- package/dist/{ai-audit-Cd9Rc2Fc.mjs → ai-audit-DuEjVdML.mjs} +1 -1
- package/dist/{ai-gateway-BWU5064V.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
- package/dist/ai-search-DDRpxyOM.mjs +79 -0
- package/dist/{ai-security-Dn0Ee6QS.mjs → ai-security-A2STvE1b.mjs} +5 -5
- package/dist/{alerting-BXTiMfXo.mjs → alerting-CIwSk-Ks.mjs} +1 -1
- package/dist/{analytics-Jyd04TRW.mjs → analytics-H--uM3DA.mjs} +7 -7
- package/dist/{analytics-engine-CzrNfUeh.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
- package/dist/{api-security-DRBHZaf_.mjs → api-security-D-pcnhUL.mjs} +26 -26
- package/dist/{argo-DiQt0pSb.mjs → argo-Lvmcx3am.mjs} +1 -1
- package/dist/{artifacts-eBZ4YN53.mjs → artifacts-xT5S-mVa.mjs} +1 -1
- package/dist/{audit-logs-Bb4HTZay.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
- package/dist/{auth-C6My1gI6.mjs → auth-B73lQS2h.mjs} +1 -1
- package/dist/auth-DMzEmOhG.mjs +2 -0
- package/dist/{auth-eVI_UEt8.mjs → auth-Db1KT0vm.mjs} +1 -1
- package/dist/{auth-token-Cfj2yehs.mjs → auth-token-D9XIPlwf.mjs} +1 -1
- package/dist/{autoconfig-B0ESZ8DJ.mjs → autoconfig-9po_tqsS.mjs} +1 -1
- package/dist/{basin-catalog-Cwk1RSMX.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
- package/dist/{billing-CfV8oi6A.mjs → billing-Bm2JNSGa.mjs} +6 -6
- package/dist/body-parser-DnBfDdx3.mjs +2 -0
- package/dist/{bot-management-CH4_Kewx.mjs → bot-management-CSr38g-O.mjs} +4 -4
- package/dist/{botnet-feed-Cg_Wp8ei.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
- package/dist/{brand-protection-Cp2ckWou.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
- package/dist/browser-run-BcWxzhAn.mjs +42 -0
- package/dist/build-BRJnyeu8.mjs +2 -0
- package/dist/{build-sBpqm9ga.mjs → build-i8l2qGVZ.mjs} +1 -1
- package/dist/{builds-B2RBgVL9.mjs → builds-BMwDzi7G.mjs} +39 -39
- package/dist/{cache-yvrYPvRI.mjs → cache-_VaTLC5T.mjs} +1 -1
- package/dist/chunk-JP6R7L72-C0kFUelb.mjs +2 -0
- package/dist/cli-P3q5DG3W.mjs +6 -0
- package/dist/{client-side-security-D50iZjd_.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
- package/dist/{cloud-connector-wvSGdxWT.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
- package/dist/{cloudforce-one-j6vlmaMB.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
- package/dist/{command-CM_f48gs.mjs → command-BXiA79DP.mjs} +1 -1
- package/dist/{command-CmUtmu5j.mjs → command-BbsPxJBT.mjs} +1 -1
- package/dist/{command-BDpm-U8z.mjs → command-Bkc04OyY.mjs} +1 -1
- package/dist/{command-BSbhJRmu.mjs → command-BtTc28ql.mjs} +1 -1
- package/dist/{command-DFRsim8q.mjs → command-CBZhxmKD.mjs} +1 -1
- package/dist/{command-BbO3sBQ2.mjs → command-CL7LLXM7.mjs} +1 -1
- package/dist/{command-DQojhTEQ.mjs → command-CYyfigfC.mjs} +1 -1
- package/dist/{command-DiqRELHF.mjs → command-CxWLFv5Y.mjs} +1 -1
- package/dist/{command-74P4_CTx.mjs → command-DDcBC4px.mjs} +1 -1
- package/dist/{command-Dr4PEvB2.mjs → command-NoxvOARP.mjs} +1 -1
- package/dist/{completions-oD1EcuHk.mjs → completions-CrDmwKnK.mjs} +1 -1
- package/dist/{connector-interrupts-DP4rbOe8.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
- package/dist/{connector-telemetry-events-BQGBQwzR.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DBO0Mdcj.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
- package/dist/{connectors-BSVr3Kz1.mjs → connectors-DvVlxGDx.mjs} +1 -1
- package/dist/{containers-BTqAeVV2.mjs → containers-Bt2zFsFd.mjs} +8 -8
- package/dist/{containers-BOpKpipz.mjs → containers-BtcOgwm5.mjs} +2 -2
- package/dist/{content-scan-B9Keyxe-.mjs → content-scan-DldLmTjy.mjs} +1 -1
- package/dist/{context-B-vEsyrK.mjs → context-C_a8oSY9.mjs} +1 -1
- package/dist/cps-REo1OWP1.mjs +6 -0
- package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
- package/dist/{custom-csrs-DM5X-K6H.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
- package/dist/{custom-hostnames-BBjqaiFF.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
- package/dist/{custom-nameservers-C0NDMLPJ.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
- package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
- package/dist/{d1-hin5PmxW.mjs → d1-DvCiQibO.mjs} +8 -8
- package/dist/{deploy-Bo7FtE44.mjs → deploy-K664XPOb.mjs} +1 -1
- package/dist/{deploy-context-ClvBD87y.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
- package/dist/{deploy-input-BqJ7GVZ-.mjs → deploy-input-KK6yyBN_.mjs} +1 -1
- package/dist/{dev-EtnMYA7K.mjs → dev-CnoMHxf4.mjs} +1 -1
- package/dist/{diagnostics-LZuMrGjK.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
- package/dist/{dls-Bq8k3iy-.mjs → dls-DoqfqutH.mjs} +1 -1
- package/dist/{dns-ry5E2Bsa.mjs → dns-DC6WcO3m.mjs} +21 -21
- package/dist/{dns-firewall-zavP5Qxj.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
- package/dist/{docs-B08YtL0U.mjs → docs-CqNRBHab.mjs} +1 -1
- package/dist/{durable-objects-B9fo41B1.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
- package/dist/{email-auth-D9LGjFlh.mjs → email-auth--NHg1TjG.mjs} +1 -1
- package/dist/{email-routing-6iDnNPhY.mjs → email-routing-COjENK55.mjs} +13 -13
- package/dist/{email-security-ty4ufRnJ.mjs → email-security-rdjH95T2.mjs} +38 -38
- package/dist/{email-sending-d7LO_Cz_.mjs → email-sending-26VJhR6Q.mjs} +18 -18
- package/dist/{field-extractors-DkgQ7PSw.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
- package/dist/{firewall-Q88YyEwD.mjs → firewall-D8K93ffF.mjs} +20 -20
- package/dist/{flagship-CzI8zhd6.mjs → flagship-CHdmCmvQ.mjs} +11 -11
- package/dist/{fraud-CvFXTR0w.mjs → fraud-CY4TV5Vc.mjs} +1 -1
- package/dist/{google-tag-gateway-Y2zbyey8.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
- package/dist/healthchecks-B52Mf3uL.mjs +22 -0
- package/dist/{hostnames-B3k7fIUL.mjs → hostnames-BMITIM8P.mjs} +1 -1
- package/dist/{hyperdrive-BWGYz95H.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
- package/dist/{iam-AXco_qmt.mjs → iam-o1n9eUXf.mjs} +9 -9
- package/dist/{images-BzYh8y0u.mjs → images-CJHAGxX6.mjs} +37 -37
- package/dist/index.mjs +1 -1
- package/dist/{init-DlenHBtS.mjs → init-CqQDL6i3.mjs} +1 -1
- package/dist/{intel-BBi3i_GU.mjs → intel-B3S1gxUg.mjs} +1 -1
- package/dist/{ips-CWG2b7AM.mjs → ips-q_UJMiy8.mjs} +1 -1
- package/dist/{k2-DXdMe3Cb.mjs → k2-BNqVZnDN.mjs} +2 -2
- package/dist/{kv-FUd7UdDu.mjs → kv-B0nXSOcW.mjs} +1 -1
- package/dist/{lazy-command-BC8rIlHu.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
- package/dist/{leaked-credential-checks-BufVA9vL.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
- package/dist/load-balancers-DJtMztJ0.mjs +76 -0
- package/dist/{login-DVbXZ_Tv.mjs → login-D-1FiBNv.mjs} +1 -1
- package/dist/{login-BJr2PBaJ.mjs → login-chQP8825.mjs} +1 -1
- package/dist/{logo-matches-BluaPvMa.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
- package/dist/{logos-CXtmYWEJ.mjs → logos-tnIahhcu.mjs} +1 -1
- package/dist/{logpush-DCYgrqz0.mjs → logpush-D4s3pJRw.mjs} +24 -24
- package/dist/{logs-as60IP29.mjs → logs-cw7UL5V2.mjs} +3 -3
- package/dist/{magic-cloud-networking-0RsHugUF.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
- package/dist/{magic-network-monitoring-CPqvZdcb.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
- package/dist/{magic-transit-ClPyGzOE.mjs → magic-transit-BFopRdPs.mjs} +170 -170
- package/dist/{managed-defense-P4_QWSbK.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
- package/dist/{managed-transforms-CUwQXMij.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
- package/dist/{matches-BjckDBW1.mjs → matches-ClJ_24EY.mjs} +1 -1
- package/dist/{mcp-C2EG2c7L.mjs → mcp-50os3IRG.mjs} +10 -10
- package/dist/{mesh-CpMZA7Xt.mjs → mesh-jxtQP8sS.mjs} +2 -2
- package/dist/{migrate-6e5mJ79R.mjs → migrate-DerOyuv2.mjs} +1 -1
- package/dist/{monetization-DypuCZmU.mjs → monetization-D6cCDi-h.mjs} +4 -4
- package/dist/{network-DQ5Ridgy.mjs → network-dnWHB2uY.mjs} +27 -25
- package/dist/{network-interconnects-ifU4JhGE.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
- package/dist/{o11y-CzssfRHt.mjs → o11y-oMSg1pG4.mjs} +49 -49
- package/dist/{oauth-BNTiErBG.mjs → oauth-BfBdHhPS.mjs} +1 -1
- package/dist/{oauth-BDdhqasa.mjs → oauth-DDOiiH7h.mjs} +1 -1
- package/dist/{oauth-clients-gknNcBdV.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
- package/dist/{oauth-scopes-BJeSanuF.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
- package/dist/open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs +4 -0
- package/dist/organization-94lHeeOs.mjs +75 -0
- package/dist/{organizations-kfFFW4uO.mjs → organizations-BJf3UTFi.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DfrnptJ1.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
- package/dist/{page-rules-ByrDMDBZ.mjs → page-rules-BUI-50oz.mjs} +4 -4
- package/dist/pages-CcdpCzHs.mjs +54 -0
- package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
- package/dist/{pay-per-use-49EXt75f.mjs → pay-per-use-t066I5wm.mjs} +7 -7
- package/dist/{pipelines-Bvgh1BQZ.mjs → pipelines-Co6S044l.mjs} +8 -8
- package/dist/precursor-BftyvS86.mjs +4 -0
- package/dist/previews-BLhnhElx.mjs +7 -0
- package/dist/{progress-R-1tIuep.mjs → progress-Q5w9PNTT.mjs} +1 -1
- package/dist/{prompt-dgLm0iFJ.mjs → prompt-C0hKSr-R.mjs} +1 -1
- package/dist/{queries-EbIadtC5.mjs → queries-4MubO6Sz.mjs} +3 -3
- package/dist/{queues-C4GZ-O3f.mjs → queues-CteS5M92.mjs} +17 -17
- package/dist/{r2-DEuFfWBR.mjs → r2-2QpT_Gso.mjs} +24 -24
- package/dist/{radar-CDOERVcR.mjs → radar-ODKaK4FJ.mjs} +1 -1
- package/dist/{raw-fetch-BapeoreV.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
- package/dist/{realtime-D_A9Qgly.mjs → realtime-DkfU8uEX.mjs} +84 -84
- package/dist/registrar-DM6JTVPS.mjs +43 -0
- package/dist/{registrar-sandbox-BF3cYO3n.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
- package/dist/{reporting-BWm9jIF8.mjs → reporting-5yFNXbJg.mjs} +1 -1
- package/dist/{request-headers-BRxv6NkA.mjs → request-headers-DXvswze2.mjs} +1 -1
- package/dist/request-tracers-BarLZY95.mjs +4 -0
- package/dist/{resource-sharing-C186jZv0.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
- package/dist/{rules-DYnGIU_0.mjs → rules-_C31X4Jz.mjs} +6 -6
- package/dist/{rulesets-BcNrbVcq.mjs → rulesets-8RwxoFhG.mjs} +6 -6
- package/dist/{rum-BDyRecfp.mjs → rum-CAUcpXpM.mjs} +6 -6
- package/dist/{run-BvDCuZ8q.mjs → run-DtFLvOHB.mjs} +1 -1
- package/dist/run-LcOb9rhI.mjs +2 -0
- package/dist/{schema-flags-DcKjAxI1.mjs → schema-flags-DibfxEF6.mjs} +1 -1
- package/dist/{scim-zn-CNCsc.mjs → scim-DX5XrQ4w.mjs} +1 -1
- package/dist/{secrets-store-CFhyQUV6.mjs → secrets-store-DSqqrr25.mjs} +1 -1
- package/dist/{security-insights-D8XgtCed.mjs → security-insights-FSktO04S.mjs} +1 -1
- package/dist/{security-txt-CCM-Vro0.mjs → security-txt-D2g3lQdg.mjs} +1 -1
- package/dist/{shared-ouAF7o4S.mjs → shared-eefMO8R4.mjs} +1 -1
- package/dist/smart-shield-IVb2sR0C.mjs +24 -0
- package/dist/{snippets-B2jBY0m_.mjs → snippets-cWwWficN.mjs} +2 -2
- package/dist/{spawn-DQttFH05.mjs → spawn-BW2bJmKO.mjs} +1 -1
- package/dist/{spectrum-Cf_4cGE8.mjs → spectrum-DYiIBYRB.mjs} +1 -1
- package/dist/{speed-DoXdyIYK.mjs → speed-C7uiW2Wf.mjs} +1 -1
- package/dist/{sql-Bze4h80q.mjs → sql-TGV8qQMj.mjs} +1 -1
- package/dist/{src-BguQDHjS.mjs → src-BUH-P_zd.mjs} +5 -5
- package/dist/ssl-xQP_HbWN.mjs +139 -0
- package/dist/{stream-BcReYIHJ.mjs → stream-CfWgj8Cr.mjs} +55 -55
- package/dist/{submit-ldFVNfNC.mjs → submit-DxGr1T40.mjs} +1 -1
- package/dist/tags-LEJ2VYhQ.mjs +23 -0
- package/dist/{telemetry-Cojgz4Sv.mjs → telemetry-BHne10Yy.mjs} +1 -1
- package/dist/telemetry-BavSU4ku.mjs +2 -0
- package/dist/{tenant-AZ0EAsmT.mjs → tenant-7d5vwc6K.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-aozjaasc.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
- package/dist/{tunnels-CXez5LPB.mjs → tunnels-DlGODvwT.mjs} +4 -4
- package/dist/{turnstile-B2NQ8Nsk.mjs → turnstile-DhLkdhij.mjs} +5 -5
- package/dist/update-check-nLfkSfdz.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{update-check-BlyKN8m0.mjs → update-check-wvjOsnGK.mjs} +1 -1
- package/dist/{url-info-D_UqGiWD.mjs → url-info-CeoV5dBc.mjs} +1 -1
- package/dist/{url-normalization-CF1YHpIN.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
- package/dist/{url-scanner-ChF3GO2U.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
- package/dist/{user-BfWRsdJh.mjs → user-D33B3alX.mjs} +59 -59
- package/dist/{vectorize-CRYbWKg5.mjs → vectorize-Wp9De13y.mjs} +17 -17
- package/dist/version-B2RUUqGT.mjs +2 -0
- package/dist/{waiting-rooms-Crp7MVd9.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
- package/dist/{web-assets-CgyrPnT-.mjs → web-assets-ew0iaP7c.mjs} +35 -35
- package/dist/{web3-Cd0Yd0eQ.mjs → web3-BUyXBaqq.mjs} +6 -6
- package/dist/{workers-builds-f2nVw7EZ.mjs → workers-builds-DzU9NGno.mjs} +7 -7
- package/dist/{workers-for-platforms-DjeKp2uy.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
- package/dist/{workers-CTwJpTfJ.mjs → workers-pP5tsDbD.mjs} +25 -22
- package/dist/{workers-vpc-B_L3TEg2.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
- package/dist/{workflows-CBPGf65x.mjs → workflows-DXYGKtqq.mjs} +1 -1
- package/dist/wrangler-migration-R9TQ_4Qd.mjs +946 -0
- package/dist/zaraz-DoH4QD0u.mjs +22 -0
- package/dist/{zero-trust-B9xY8zcn.mjs → zero-trust-DKt20rzE.mjs} +461 -458
- package/dist/{zone-CmwVqTI2.mjs → zone-BXM3p0JR.mjs} +1 -1
- package/dist/{zones-Bf0VVpMf.mjs → zones-CJdtqEBx.mjs} +21 -21
- package/package.json +11 -11
- package/dist/account-tags-povXTDAu.mjs +0 -15
- package/dist/ai-search-CJ3b8eot.mjs +0 -79
- package/dist/auth-OFqV2M4q.mjs +0 -2
- package/dist/body-parser-DkHKPkJ7.mjs +0 -2
- package/dist/browser-run-CfQ30dB6.mjs +0 -42
- package/dist/build-Bm6kGyzo.mjs +0 -2
- package/dist/certificate-authorities-BdMRaOnD.mjs +0 -6
- package/dist/cli-CsnoQloF.mjs +0 -6
- package/dist/client-certificates-CuWGvZSr.mjs +0 -13
- package/dist/cps-VRP794c5.mjs +0 -6
- package/dist/csam-scanner-C1jOgXVu.mjs +0 -10
- package/dist/ct-alerting-Y9vfa6Fo.mjs +0 -5
- package/dist/custom-certificates-CojTEC0E.mjs +0 -17
- package/dist/custom-pages-M4RUxcn6.mjs +0 -21
- package/dist/dcv-delegation-KOO8syyQ.mjs +0 -4
- package/dist/healthchecks-4Hz-6xYi.mjs +0 -22
- package/dist/keyless-certificates-B4ta_OGS.mjs +0 -13
- package/dist/keys-B9zvFzrf.mjs +0 -4
- package/dist/load-balancers-CWd9mSWM.mjs +0 -76
- package/dist/mtls-certificates-B5AWTU6u.mjs +0 -13
- package/dist/organization-CXAM41sd.mjs +0 -71
- package/dist/origin-ca-certificates-DwhYV3m_.mjs +0 -11
- package/dist/origin-tls-client-auth-COSxTc2q.mjs +0 -30
- package/dist/pages-DuGcBC6k.mjs +0 -54
- package/dist/pay-per-crawl-B3_Gn9Cj.mjs +0 -38
- package/dist/precursor-VobQf--m.mjs +0 -4
- package/dist/previews-DkwFHNRx.mjs +0 -7
- package/dist/registrar-X1YLlnmg.mjs +0 -43
- package/dist/request-tracers-CHWpiejG.mjs +0 -4
- package/dist/resource-tagging-BTagOZli.mjs +0 -4
- package/dist/run-roYb_Odh.mjs +0 -2
- package/dist/smart-shield-DwW7N92r.mjs +0 -24
- package/dist/ssl-u_0gUhPA.mjs +0 -45
- package/dist/tags-D_Hc_A-r.mjs +0 -4
- package/dist/telemetry-Ct_2AaO4.mjs +0 -2
- package/dist/update-check-BnGDxswi.mjs +0 -2
- package/dist/values-CLfxkAUJ.mjs +0 -4
- package/dist/version-CVlh2Zaq.mjs +0 -2
- package/dist/wrangler-migration-DxTB5yPT.mjs +0 -2
- package/dist/zaraz-3VDxl0gF.mjs +0 -22
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s,r as c,t as l}from"./body-parser-DnBfDdx3.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-C0hKSr-R.mjs";var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery`};function ee(e){return e.usage(`$0 web-assets discovery get
|
|
3
3
|
|
|
4
|
-
Returns the latest API operations discovered from zone traffic, rendered as OpenAPI schemas.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
4
|
+
Returns the latest API operations discovered from zone traffic, rendered as OpenAPI schemas.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get`,describe:`Export discovered API operations as OpenAPI schemas`,builder:ee,handler:async e=>o({command:`web-assets discovery get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets discovery get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var te={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery/operations`,body:`json`};function ne(e){return e.usage(`$0 web-assets discovery operations bulk-edit
|
|
5
5
|
|
|
6
|
-
Updates the state of one or more discovered web and API operations.`).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
|
|
6
|
+
Updates the state of one or more discovered web and API operations.`).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 re={command:`bulk-edit`,describe:`Edit discovered web and API operations`,builder:ne,handler:async e=>o({command:`web-assets discovery operations bulk-edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets discovery operations bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(te,{body:t,zone_id:c}));r(n,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var g={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery/operations/${t.discovery_id}`,body:`json`};function ie(e){return e.usage(`$0 web-assets discovery operations edit <discovery-id>
|
|
7
7
|
|
|
8
|
-
Updates the state of a discovered web or API operation.`).positional(`discovery-id`,{type:`string`,description:`Discovery ID of a discovered operation`,demandOption:!0}).option(`state`,{type:`string`,description:"Mark state of operation in API Discovery\n * `review` - Mark operation as for review\n * `ignored` - Mark operation as ignored\n",choices:[`review`,`ignored`]}).coerce(`state`,e=>
|
|
8
|
+
Updates the state of a discovered web or API operation.`).positional(`discovery-id`,{type:`string`,description:`Discovery ID of a discovered operation`,demandOption:!0}).option(`state`,{type:`string`,description:"Mark state of operation in API Discovery\n * `review` - Mark operation as for review\n * `ignored` - Mark operation as ignored\n",choices:[`review`,`ignored`]}).coerce(`state`,e=>u(e,`state`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ae={command:`edit <discovery-id>`,describe:`Edit a discovered web or API operation`,builder:ie,handler:async e=>o({command:`web-assets discovery operations edit`,classification:{safeFlags:[`state`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets discovery operations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery/operations/${e[`discovery-id`]==null?`<discovery-id>`:encodeURIComponent(String(e[`discovery-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"discovery-id":String(e[`discovery-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({state:e.state}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(g,{body:t,zone_id:c,discovery_id:e[`discovery-id`]}));r(n,{successLabel:`Updated`});return}let u=l({state:e.state}),d=await a(`Updating`,async()=>o.send(g,{body:u,zone_id:c,discovery_id:e[`discovery-id`]}));r(d,{successLabel:`Updated`})})};var oe={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery/operations/${t.discovery_id}`};function se(e){return e.usage(`$0 web-assets discovery operations get <discovery-id>
|
|
9
9
|
|
|
10
|
-
Returns a discovered web or API operation by discovery ID.`).positional(`discovery-id`,{type:`string`,description:`Discovery ID of a discovered operation`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
10
|
+
Returns a discovered web or API operation by discovery ID.`).positional(`discovery-id`,{type:`string`,description:`Discovery ID of a discovered operation`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get <discovery-id>`,describe:`Get a discovered web or API operation`,builder:se,handler:async e=>o({command:`web-assets discovery operations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets discovery operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery/operations/${e[`discovery-id`]==null?`<discovery-id>`:encodeURIComponent(String(e[`discovery-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"discovery-id":String(e[`discovery-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(oe,{zone_id:s,discovery_id:e[`discovery-id`]}));r(c,{successLabel:`Loaded`})})};var le={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/discovery/operations`,query:[`page`,`per_page`,`host`,`method`,`endpoint`,`direction`,`order`,`diff`,`origin`,`state`]};function _(e){return e.usage(`$0 web-assets discovery operations list
|
|
11
11
|
|
|
12
|
-
Returns the latest web and API operations discovered from zone traffic.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`host`,{type:`string`,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,description:`Filter results to only include the specified HTTP methods.`}).option(`endpoint`,{type:`string`,description:`Filter results to only include endpoints containing this pattern.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Field to order by`,choices:[`host`,`method`,`endpoint`,`traffic_stats.requests`,`traffic_stats.last_updated`]}).option(`diff`,{type:`boolean`,description:"When `true`, only return API Discovery results that are not saved into API Shield Endpoint Management"}).option(`origin`,{type:`string`,description:"Filter results to only include discovery results sourced from a particular discovery engine\n * `ML` - Discovered operations that were sourced using ML API Discovery\n * `SessionIdentifier` - Discovered operations that were sourced using Session Identifier API Discovery",choices:[`ML`,`SessionIdentifier`,`LabelDiscovery`]}).option(`state`,{type:`string`,description:"Filter results to only include discovery results in a particular state. States are as follows\n * `review` - Discovered operations that are not saved into API Shield Endpoint Management\n * `saved` - Discovered operations that are already saved into API Shield Endpoint Management\n * `ignored` - Discovered operations that have been marked as ignored",choices:[`review`,`saved`,`ignored`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
12
|
+
Returns the latest web and API operations discovered from zone traffic.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`host`,{type:`string`,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,description:`Filter results to only include the specified HTTP methods.`}).option(`endpoint`,{type:`string`,description:`Filter results to only include endpoints containing this pattern.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Field to order by`,choices:[`host`,`method`,`endpoint`,`traffic_stats.requests`,`traffic_stats.last_updated`]}).option(`diff`,{type:`boolean`,description:"When `true`, only return API Discovery results that are not saved into API Shield Endpoint Management"}).option(`origin`,{type:`string`,description:"Filter results to only include discovery results sourced from a particular discovery engine\n * `ML` - Discovered operations that were sourced using ML API Discovery\n * `SessionIdentifier` - Discovered operations that were sourced using Session Identifier API Discovery",choices:[`ML`,`SessionIdentifier`,`LabelDiscovery`]}).option(`state`,{type:`string`,description:"Filter results to only include discovery results in a particular state. States are as follows\n * `review` - Discovered operations that are not saved into API Shield Endpoint Management\n * `saved` - Discovered operations that are already saved into API Shield Endpoint Management\n * `ignored` - Discovered operations that have been marked as ignored",choices:[`review`,`saved`,`ignored`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List discovered web and API operations`,builder:_,handler:async e=>o({command:`web-assets discovery operations list`,classification:{safeFlags:[`direction`,`order`,`diff`,`origin`,`state`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],host:e.host,method:e.method,endpoint:e.endpoint,direction:e.direction,order:e.order,diff:e.diff,origin:e.origin,state:e.state};if(e.dryRun){i({command:`cf web-assets discovery operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/discovery/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(le,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},y={command:`operations`,describe:`Operations for discovery.operations`,builder:e=>e.command(re).command(ae).command(ce).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`discovery`,describe:`Operations for discovery`,builder:e=>e.command(h).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels`,query:[`page`,`per_page`,`order`,`direction`,`source`,`filter`,`with_mapped_resource_counts`]};function S(e){return e.usage(`$0 web-assets labels list
|
|
13
13
|
|
|
14
|
-
Returns all managed and user-defined labels available for web and API operations in the zone.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:`Field to order by`,choices:[`name`,`description`,`created_at`,`last_updated`,`mapped_resources.operations`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`source`,{type:`string`,description:`Filter for labels with source`,choices:[`user`,`managed`]}).option(`filter`,{type:`string`,description:`Filter for labels where the name or description matches using substring match`}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
14
|
+
Returns all managed and user-defined labels available for web and API operations in the zone.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:`Field to order by`,choices:[`name`,`description`,`created_at`,`last_updated`,`mapped_resources.operations`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`source`,{type:`string`,description:`Filter for labels with source`,choices:[`user`,`managed`]}).option(`filter`,{type:`string`,description:`Filter for labels where the name or description matches using substring match`}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List operation labels`,builder:S,handler:async e=>o({command:`web-assets labels list`,classification:{safeFlags:[`order`,`direction`,`source`,`with-mapped-resource-counts`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,source:e.source,filter:e.filter,with_mapped_resource_counts:e[`with-mapped-resource-counts`]};if(e.dryRun){i({command:`cf web-assets labels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(x,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/managed/${t.name}`,query:[`with_mapped_resource_counts`]};function T(e){return e.usage(`$0 web-assets labels managed get <name>
|
|
15
15
|
|
|
16
|
-
Returns a managed label and the web and API operations associated with it.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
16
|
+
Returns a managed label and the web and API operations associated with it.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <name>`,describe:`Get a managed operation label`,builder:T,handler:async e=>o({command:`web-assets labels managed get`,classification:{safeFlags:[`with-mapped-resource-counts`,`dry-run`]}},e,async()=>{let o={with_mapped_resource_counts:e[`with-mapped-resource-counts`]};if(e.dryRun){i({command:`cf web-assets labels managed get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/managed/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(w,{zone_id:c,name:e.name,...o}));r(l,{successLabel:`Loaded`})})};var D={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/managed/${t.name}/resources/operation`,body:`json`};function O(e){return e.usage(`$0 web-assets labels managed operations update <name>
|
|
17
17
|
|
|
18
|
-
Replaces the complete set of web and API operations attached to the managed label.`).positional(`name`,{type:`string`,description:`The label name`,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)`})}const
|
|
18
|
+
Replaces the complete set of web and API operations attached to the managed label.`).positional(`name`,{type:`string`,description:`The label name`,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)`})}const k={command:`update <name>`,describe:`Replace operations attached to a managed label`,builder:O,handler:async e=>o({command:`web-assets labels managed operations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels managed operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/managed/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}/resources/operation`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(D,{body:t,zone_id:c,name:e.name}));r(n,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},A={command:`operations`,describe:`Operations for labels.managed.operations`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`managed`,describe:`Operations for labels.managed`,builder:e=>e.command(E).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user`,body:`json`};function N(e){return e.usage(`$0 web-assets labels user bulk-create
|
|
19
19
|
|
|
20
|
-
Creates one or more user-defined labels for classifying web and API operations.`).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
|
|
20
|
+
Creates one or more user-defined labels for classifying web and API operations.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`bulk-create`,describe:`Create user-defined operation labels`,builder:N,handler:async e=>o({command:`web-assets labels user bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(M,{body:t,zone_id:c}));r(n,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var F={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user`,body:`json`};function I(e){return e.usage(`$0 web-assets labels user bulk-delete
|
|
21
21
|
|
|
22
|
-
Deletes one or more user-defined labels and removes their associations with web and API operations.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
23
|
-
`);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(
|
|
22
|
+
Deletes one or more user-defined labels and removes their associations with web and API operations.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`bulk-delete`,describe:`Delete user-defined operation labels`,builder:I,handler:async e=>o({command:`web-assets labels user bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,!await p({force:!!e.force,message:`This operation deletes the selected user-defined labels and removes them from associated web and API operations.`})){process.stderr.write(`Aborted.
|
|
23
|
+
`);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(F,{body:t,zone_id:c}));r(n,{successLabel:`Deleted`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var R={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}`};function z(e){return e.usage(`$0 web-assets labels user delete <name>
|
|
24
24
|
|
|
25
|
-
Deletes a user-defined label and removes its associations with web and API operations.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
26
|
-
`);return}let c=await a(`Deleting`,async()=>o.send(
|
|
25
|
+
Deletes a user-defined label and removes its associations with web and API operations.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`delete <name>`,describe:`Delete a user-defined operation label`,builder:z,handler:async e=>o({command:`web-assets labels user delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`This operation deletes the user-defined label and removes it from associated web and API operations.`})){process.stderr.write(`Aborted.
|
|
26
|
+
`);return}let c=await a(`Deleting`,async()=>o.send(R,{zone_id:s,name:e.name}));r(c,{successLabel:`Deleted`})})};var V={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}`,body:`json`};function H(e){return e.usage(`$0 web-assets labels user edit <name>
|
|
27
27
|
|
|
28
|
-
Updates only the supplied fields on a user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`description`,{type:`string`,description:`The description of the label`}).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
|
|
28
|
+
Updates only the supplied fields on a user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`description`,{type:`string`,description:`The description of the label`}).option(`metadata`,{type:`string`,description:`Metadata for the label. 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:`Raw JSON request body (bypasses individual flags)`})}const U={command:`edit <name>`,describe:`Edit a user-defined operation label`,builder:H,handler:async e=>o({command:`web-assets labels user edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(V,{body:t,zone_id:d,name:e.name}));r(n,{successLabel:`Updated`});return}let f=l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]),p=await a(`Updating`,async()=>o.send(V,{body:f,zone_id:d,name:e.name}));r(p,{successLabel:`Updated`})})};var W={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}`,query:[`with_mapped_resource_counts`]};function ue(e){return e.usage(`$0 web-assets labels user get <name>
|
|
29
29
|
|
|
30
|
-
Returns a user-defined label and the web and API operations associated with it.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
30
|
+
Returns a user-defined label and the web and API operations associated with it.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`with-mapped-resource-counts`,{type:`boolean`,description:"Include `mapped_resources` for each label"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <name>`,describe:`Get a user-defined operation label`,builder:ue,handler:async e=>o({command:`web-assets labels user get`,classification:{safeFlags:[`with-mapped-resource-counts`,`dry-run`]}},e,async()=>{let o={with_mapped_resource_counts:e[`with-mapped-resource-counts`]};if(e.dryRun){i({command:`cf web-assets labels user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(W,{zone_id:c,name:e.name,...o}));r(l,{successLabel:`Loaded`})})};var fe={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}/resources/operation`,body:`json`};function pe(e){return e.usage(`$0 web-assets labels user operations update <name>
|
|
31
31
|
|
|
32
|
-
Replaces the complete set of web and API operations attached to the user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,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)`})}const
|
|
32
|
+
Replaces the complete set of web and API operations attached to the user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,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)`})}const me={command:`update <name>`,describe:`Replace operations attached to a user-defined label`,builder:pe,handler:async e=>o({command:`web-assets labels user operations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user operations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}/resources/operation`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(fe,{body:t,zone_id:c,name:e.name}));r(n,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},he={command:`operations`,describe:`Operations for labels.user.operations`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/labels/user/${t.name}`,body:`json`};function ge(e){return e.usage(`$0 web-assets labels user update <name>
|
|
33
33
|
|
|
34
|
-
Replaces all editable fields on a user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`description`,{type:`string`,description:`The description of the label`}).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
|
|
34
|
+
Replaces all editable fields on a user-defined label.`).positional(`name`,{type:`string`,description:`The label name`,demandOption:!0}).option(`description`,{type:`string`,description:`The description of the label`}).option(`metadata`,{type:`string`,description:`Metadata for the label. 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:`Raw JSON request body (bypasses individual flags)`})}const _e={command:`update <name>`,describe:`Update a user-defined operation label`,builder:ge,handler:async e=>o({command:`web-assets labels user update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets labels user update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/labels/user/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),name:String(e.name??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(G,{body:t,zone_id:d,name:e.name}));r(n,{successLabel:`Updated`});return}let f=l({description:u(e.description,`description`,`text`),metadata:c(e.metadata,`metadata`)},[[`metadata`]]),p=await a(`Updating`,async()=>o.send(G,{body:f,zone_id:d,name:e.name}));r(p,{successLabel:`Updated`})})},ve={command:`user`,describe:`Operations for labels.user`,builder:e=>e.command(P).command(L).command(B).command(U).command(de).command(_e).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`labels`,describe:`Operations for labels`,builder:e=>e.command(C).command(j).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var be={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations`,body:`json`};function xe(e){return e.usage(`$0 web-assets operations bulk-create
|
|
35
35
|
|
|
36
|
-
Creates one or more web or API operations. Hosts, methods, and paths are normalized; an existing matching operation is returned instead of duplicated.`).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
|
|
36
|
+
Creates one or more web or API operations. Hosts, methods, and paths are normalized; an existing matching operation is returned instead of duplicated.`).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 Se={command:`bulk-create`,describe:`Create web or API operations`,builder:xe,handler:async e=>o({command:`web-assets operations bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(be,{body:t,zone_id:c}));r(n,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var Ce={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations`,body:`json`};function we(e){return e.usage(`$0 web-assets operations bulk-delete
|
|
37
37
|
|
|
38
|
-
Deletes multiple web or API operations from endpoint management in one request.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
39
|
-
`);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(
|
|
38
|
+
Deletes multiple web or API operations from endpoint management in one request.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`bulk-delete`,describe:`Delete web or API operations`,builder:we,handler:async e=>o({command:`web-assets operations bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,!await p({force:!!e.force,message:`This operation deletes the selected web or API operations.`})){process.stderr.write(`Aborted.
|
|
39
|
+
`);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(Ce,{body:t,zone_id:c}));r(n,{successLabel:`Deleted`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var K={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/item`,body:`json`};function Ee(e){return e.usage(`$0 web-assets operations create
|
|
40
40
|
|
|
41
|
-
Creates one web or API operation. The host, method, and path are normalized; an existing matching operation is returned instead of duplicated.`).option(`endpoint`,{type:`string`,description:`The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.`}).option(`host`,{type:`string`,description:`RFC3986-compliant host.`}).option(`method`,{type:`string`,description:`The HTTP method used to access the endpoint.`,choices:[`GET`,`POST`,`HEAD`,`OPTIONS`,`PUT`,`DELETE`,`CONNECT`,`PATCH`,`TRACE`]}).coerce(`method`,e=>
|
|
41
|
+
Creates one web or API operation. The host, method, and path are normalized; an existing matching operation is returned instead of duplicated.`).option(`endpoint`,{type:`string`,description:`The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.`}).option(`host`,{type:`string`,description:`RFC3986-compliant host.`}).option(`method`,{type:`string`,description:`The HTTP method used to access the endpoint.`,choices:[`GET`,`POST`,`HEAD`,`OPTIONS`,`PUT`,`DELETE`,`CONNECT`,`PATCH`,`TRACE`]}).coerce(`method`,e=>u(e,`method`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const De={command:`create`,describe:`Create a web or API operation`,builder:Ee,handler:async e=>o({command:`web-assets operations create`,classification:{safeFlags:[`method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/item`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({endpoint:u(e.endpoint,`endpoint`,`text`),host:u(e.host,`host`,`text`),method:e.method}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(K,{body:t,zone_id:c}));r(n,{successLabel:`Created`});return}e.endpoint===void 0&&(e.endpoint=await d(`endpoint`,`The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.`)),e.host===void 0&&(e.host=await d(`host`,`RFC3986-compliant host.`)),e.method===void 0&&(e.method=await f(`method`,`The HTTP method used to access the endpoint.`,[`GET`,`POST`,`HEAD`,`OPTIONS`,`PUT`,`DELETE`,`CONNECT`,`PATCH`,`TRACE`]));let p=l({endpoint:u(e.endpoint,`endpoint`,`text`),host:u(e.host,`host`,`text`),method:e.method}),m=await a(`Creating`,async()=>o.send(K,{body:p,zone_id:c}));r(m,{successLabel:`Created`})})};var Oe={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}`};function ke(e){return e.usage(`$0 web-assets operations delete <operation-id>
|
|
42
42
|
|
|
43
|
-
Deletes a web or API operation from endpoint management so its feature configuration is no longer tracked.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,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
|
|
44
|
-
`);return}let c=await a(`Deleting`,async()=>o.send(
|
|
43
|
+
Deletes a web or API operation from endpoint management so its feature configuration is no longer tracked.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ae={command:`delete <operation-id>`,describe:`Delete a web or API operation`,builder:ke,handler:async e=>o({command:`web-assets operations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`This operation deletes the web or API operation.`})){process.stderr.write(`Aborted.
|
|
44
|
+
`);return}let c=await a(`Deleting`,async()=>o.send(Oe,{zone_id:s,operation_id:e[`operation-id`]}));r(c,{successLabel:`Deleted`})})};var je={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}`,query:[`feature`,`with_schemas`]};function Me(e){return e.usage(`$0 web-assets operations get <operation-id>
|
|
45
45
|
|
|
46
|
-
Returns a web or API operation, including its schema validation settings and requested feature data.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`with-schemas`,{type:`boolean`,description:`When true, includes OpenAPI schemas (both uploaded and learned) for the operation in the response. Due to the conversion overhead, this parameter is only supported on single-operation retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
46
|
+
Returns a web or API operation, including its schema validation settings and requested feature data.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`with-schemas`,{type:`boolean`,description:`When true, includes OpenAPI schemas (both uploaded and learned) for the operation in the response. Due to the conversion overhead, this parameter is only supported on single-operation retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ne={command:`get <operation-id>`,describe:`Get a web or API operation`,builder:Me,handler:async e=>o({command:`web-assets operations get`,classification:{safeFlags:[`with-schemas`,`dry-run`]}},e,async()=>{let o={feature:e.feature,with_schemas:e[`with-schemas`]};if(e.dryRun){i({command:`cf web-assets operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(je,{zone_id:c,operation_id:e[`operation-id`],...o}));r(l,{successLabel:`Loaded`})})};var q={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/labels`,body:`json`};function Pe(e){return e.usage(`$0 web-assets operations labels bulk-create
|
|
47
47
|
|
|
48
|
-
Attaches labels to multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names.`}).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
|
|
48
|
+
Attaches labels to multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names.`}).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 Fe={command:`bulk-create`,describe:`Attach labels to web or API operations`,builder:Pe,handler:async e=>o({command:`web-assets operations labels bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(q,{body:t,zone_id:c}));r(n,{successLabel:`Created`});return}let u=l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}),d=await a(`Creating`,async()=>o.send(q,{body:u,zone_id:c}));r(d,{successLabel:`Created`})})};var J={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/labels`,body:`json`};function Ie(e){return e.usage(`$0 web-assets operations labels bulk-delete
|
|
49
49
|
|
|
50
|
-
Removes labels from multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
51
|
-
`);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(J,{body:t,zone_id:
|
|
50
|
+
Removes labels from multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Le={command:`bulk-delete`,describe:`Remove labels from web or API operations`,builder:Ie,handler:async e=>o({command:`web-assets operations labels bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,!await p({force:!!e.force,message:`This operation removes the selected labels from the selected web and API operations.`})){process.stderr.write(`Aborted.
|
|
51
|
+
`);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(J,{body:t,zone_id:c}));r(n,{successLabel:`Deleted`});return}let u=l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}),d=await a(`Deleting`,async()=>o.send(J,{body:u,zone_id:c}));r(d,{successLabel:`Deleted`})})};var Y={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/labels`,body:`json`};function Re(e){return e.usage(`$0 web-assets operations labels bulk-update
|
|
52
52
|
|
|
53
|
-
Replaces the complete label sets on multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names. Providing an empty array will result in all managed labels being removed from all affected operations`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names. Providing an empty array will result in all user labels being removed from all affected operations`}).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
|
|
53
|
+
Replaces the complete label sets on multiple web or API operations in one request.`).option(`managed-labels`,{type:`string`,array:!0,description:`List of managed label names. Providing an empty array will result in all managed labels being removed from all affected operations`}).option(`user-labels`,{type:`string`,array:!0,description:`List of user label names. Providing an empty array will result in all user labels being removed from all affected operations`}).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 ze={command:`bulk-update`,describe:`Replace labels on web or API operations`,builder:Re,handler:async e=>o({command:`web-assets operations labels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(Y,{body:t,zone_id:c}));r(n,{successLabel:`Updated`});return}if(e[`managed-labels`]===void 0)throw Error(`--managed-labels is required (or pass --body with this field set).`);if(e[`user-labels`]===void 0)throw Error(`--user-labels is required (or pass --body with this field set).`);let u=l({managed:{labels:e[`managed-labels`]},user:{labels:e[`user-labels`]}}),d=await a(`Updating`,async()=>o.send(Y,{body:u,zone_id:c}));r(d,{successLabel:`Updated`})})};var X={method:`POST`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}/labels`,body:`json`};function Be(e){return e.usage(`$0 web-assets operations labels create <operation-id>
|
|
54
54
|
|
|
55
|
-
Attaches one or more labels to a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user`,{type:`string`,array:!0,description:`List of user label names.`}).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
|
|
55
|
+
Attaches one or more labels to a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user`,{type:`string`,array:!0,description:`List of user label names.`}).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 Ve={command:`create <operation-id>`,describe:`Attach labels to a web or API operation`,builder:Be,handler:async e=>o({command:`web-assets operations labels create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:e.managed,user:e.user}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(X,{body:t,zone_id:c,operation_id:e[`operation-id`]}));r(n,{successLabel:`Created`});return}let u=l({managed:e.managed,user:e.user}),d=await a(`Creating`,async()=>o.send(X,{body:u,zone_id:c,operation_id:e[`operation-id`]}));r(d,{successLabel:`Created`})})};var Z={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}/labels`,body:`json`};function He(e){return e.usage(`$0 web-assets operations labels delete <operation-id>
|
|
56
56
|
|
|
57
|
-
Removes one or more labels from a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user`,{type:`string`,array:!0,description:`List of user label names.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
58
|
-
`);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(Z,{body:t,zone_id:
|
|
57
|
+
Removes one or more labels from a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names.`}).option(`user`,{type:`string`,array:!0,description:`List of user label names.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Q={command:`delete <operation-id>`,describe:`Remove labels from a web or API operation`,builder:He,handler:async e=>o({command:`web-assets operations labels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:e.managed,user:e.user}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,!await p({force:!!e.force,message:`This operation removes the selected labels from the web or API operation.`})){process.stderr.write(`Aborted.
|
|
58
|
+
`);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(Z,{body:t,zone_id:c,operation_id:e[`operation-id`]}));r(n,{successLabel:`Deleted`});return}let u=l({managed:e.managed,user:e.user}),d=await a(`Deleting`,async()=>o.send(Z,{body:u,zone_id:c,operation_id:e[`operation-id`]}));r(d,{successLabel:`Deleted`})})};var $={method:`PUT`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations/${t.operation_id}/labels`,body:`json`};function Ue(e){return e.usage(`$0 web-assets operations labels update <operation-id>
|
|
59
59
|
|
|
60
|
-
Replaces the complete label set on a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names. Omitting this property or passing an empty array will result in all managed labels being removed from the operation`}).option(`user`,{type:`string`,array:!0,description:`List of user label names. Omitting this property or passing an empty array will result in all user labels being removed from the operation`}).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 We={command:`update <operation-id>`,describe:`Replace labels on a web or API operation`,builder:Ue,handler:async e=>o({command:`web-assets operations labels update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
60
|
+
Replaces the complete label set on a web or API operation.`).positional(`operation-id`,{type:`string`,description:`Identifier for the operation`,demandOption:!0}).option(`managed`,{type:`string`,array:!0,description:`List of managed label names. Omitting this property or passing an empty array will result in all managed labels being removed from the operation`}).option(`user`,{type:`string`,array:!0,description:`List of user label names. Omitting this property or passing an empty array will result in all user labels being removed from the operation`}).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 We={command:`update <operation-id>`,describe:`Replace labels on a web or API operation`,builder:Ue,handler:async e=>o({command:`web-assets operations labels update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web-assets operations labels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}/labels`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operation-id":String(e[`operation-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({managed:e.managed,user:e.user}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send($,{body:t,zone_id:c,operation_id:e[`operation-id`]}));r(n,{successLabel:`Updated`});return}let u=l({managed:e.managed,user:e.user}),d=await a(`Updating`,async()=>o.send($,{body:u,zone_id:c,operation_id:e[`operation-id`]}));r(d,{successLabel:`Updated`})})},Ge={command:`labels`,describe:`Operations for operations.labels`,builder:e=>e.command(Fe).command(Le).command(ze).command(Ve).command(Q).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ke={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/operations`,query:[`page`,`per_page`,`order`,`direction`,`host`,`method`,`endpoint`,`feature`]};function qe(e){return e.usage(`$0 web-assets operations list
|
|
61
61
|
|
|
62
|
-
Lists web and API operations tracked for the zone, including each operation's method, path, and feature configuration.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:"Field to order by. When requesting a feature, the feature keys are available for ordering as well, e.g., `thresholds.suggested_threshold`.",choices:[`method`,`host`,`endpoint`,`thresholds.$key`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`host`,{type:`string`,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,description:`Filter results to only include the specified HTTP methods.`}).option(`endpoint`,{type:`string`,description:`Filter results to only include endpoints containing this pattern.`}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
62
|
+
Lists web and API operations tracked for the zone, including each operation's method, path, and feature configuration.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:"Field to order by. When requesting a feature, the feature keys are available for ordering as well, e.g., `thresholds.suggested_threshold`.",choices:[`method`,`host`,`endpoint`,`thresholds.$key`]}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`host`,{type:`string`,description:`Filter results to only include the specified hosts.`}).option(`method`,{type:`string`,description:`Filter results to only include the specified HTTP methods.`}).option(`endpoint`,{type:`string`,description:`Filter results to only include endpoints containing this pattern.`}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Je={command:`list`,describe:`List web and API operations`,builder:qe,handler:async e=>o({command:`web-assets operations list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,host:e.host,method:e.method,endpoint:e.endpoint,feature:e.feature};if(e.dryRun){i({command:`cf web-assets operations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/operations`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(Ke,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},Ye={command:`operations`,describe:`Operations for operations`,builder:e=>e.command(Se).command(Te).command(De).command(Ae).command(Ne).command(Je).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xe={method:`GET`,path:t=>e`/zones/${t.zone_id}/api_gateway/schemas`,query:[`host`,`feature`,`include_schema_kind`]};function Ze(e){return e.usage(`$0 web-assets schemas list
|
|
63
63
|
|
|
64
|
-
Returns tracked web and API operations and their feature configuration rendered as OpenAPI schemas.`).option(`host`,{type:`string`,description:`Receive schema only for the given host(s).`}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`include-schema-kind`,{type:`string`,description:`Schema kinds to include in exported OpenAPI schemas.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
64
|
+
Returns tracked web and API operations and their feature configuration rendered as OpenAPI schemas.`).option(`host`,{type:`string`,description:`Receive schema only for the given host(s).`}).option(`feature`,{type:`string`,description:`Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.`}).option(`include-schema-kind`,{type:`string`,description:`Schema kinds to include in exported OpenAPI schemas.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`list`,describe:`Export web and API operations as OpenAPI schemas`,builder:Ze,handler:async e=>o({command:`web-assets schemas list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={host:e.host,feature:e.feature,include_schema_kind:e[`include-schema-kind`]};if(e.dryRun){i({command:`cf web-assets schemas list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/api_gateway/schemas`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(Xe,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},$e={command:`schemas`,describe:`Operations for schemas`,builder:e=>e.command(Qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},et={command:`web-assets`,describe:`web-assets`,builder:e=>e.command(b).command(ye).command(Ye).command($e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{et as default};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as s,n as c,t as l}from"./body-parser-DnBfDdx3.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-C0hKSr-R.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/web3/hostnames`,body:`json`};function h(e){return e.usage(`$0 web3 hostnames create
|
|
3
3
|
|
|
4
|
-
Create Web3 Hostname`).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`name`,{type:`string`,description:`Specify the hostname that points to the target gateway via CNAME.`}).option(`target`,{type:`string`,description:`Specify the target gateway of the hostname.`,choices:[`ethereum`,`ipfs`,`ipfs_universal_path`]}).coerce(`target`,e=>u(e,`target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create Web3 Hostname`,builder:h,handler:async e=>o({command:`web3 hostnames create`,classification:{safeFlags:[`target`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`),name:u(e.name,`name`,`text`),target:e.target}):
|
|
4
|
+
Create Web3 Hostname`).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`name`,{type:`string`,description:`Specify the hostname that points to the target gateway via CNAME.`}).option(`target`,{type:`string`,description:`Specify the target gateway of the hostname.`,choices:[`ethereum`,`ipfs`,`ipfs_universal_path`]}).coerce(`target`,e=>u(e,`target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create Web3 Hostname`,builder:h,handler:async e=>o({command:`web3 hostnames create`,classification:{safeFlags:[`target`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`),name:u(e.name,`name`,`text`),target:e.target}):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Creating`,async()=>o.send(m,{body:t,zone_id:s}));r(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await d(`name`,`Specify the hostname that points to the target gateway via CNAME.`)),e.target===void 0&&(e.target=await f(`target`,`Specify the target gateway of the hostname.`,[`ethereum`,`ipfs`,`ipfs_universal_path`]));let p=l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`),name:u(e.name,`name`,`text`),target:e.target}),h=await a(`Creating`,async()=>o.send(m,{body:p,zone_id:s}));r(h,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}`};function v(e){return e.usage(`$0 web3 hostnames delete <identifier>
|
|
5
5
|
|
|
6
6
|
Delete Web3 Hostname`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,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 y={command:`delete <identifier>`,describe:`Delete Web3 Hostname`,builder:v,handler:async e=>o({command:`web3 hostnames delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force})){process.stderr.write(`Aborted.
|
|
7
7
|
`);return}let c=await a(`Deleting`,async()=>o.send(_,{zone_id:s,identifier:e.identifier}));r(c,{successLabel:`Deleted`})})};var b={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}`,body:`json`};function x(e){return e.usage(`$0 web3 hostnames edit <identifier>
|
|
8
8
|
|
|
9
|
-
Edit Web3 Hostname`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`edit <identifier>`,describe:`Edit Web3 Hostname`,builder:x,handler:async e=>o({command:`web3 hostnames edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`)}):
|
|
9
|
+
Edit Web3 Hostname`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`description`,{type:`string`,description:`Specify an optional description of the hostname.`}).option(`dnslink`,{type:`string`,description:`Specify the DNSLink value used if the target is ipfs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`edit <identifier>`,describe:`Edit Web3 Hostname`,builder:x,handler:async e=>o({command:`web3 hostnames edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`)}):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(b,{body:t,zone_id:s,identifier:e.identifier}));r(n,{successLabel:`Updated`});return}let d=l({description:u(e.description,`description`,`text`),dnslink:u(e.dnslink,`dnslink`,`text`)}),f=await a(`Updating`,async()=>o.send(b,{body:d,zone_id:s,identifier:e.identifier}));r(f,{successLabel:`Updated`})})};var C={method:`GET`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}`};function w(e){return e.usage(`$0 web3 hostnames get <identifier>
|
|
10
10
|
|
|
11
11
|
Web3 Hostname Details`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <identifier>`,describe:`Web3 Hostname Details`,builder:w,handler:async e=>o({command:`web3 hostnames get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(C,{zone_id:s,identifier:e.identifier}));r(c,{successLabel:`Loaded`})})};var E={method:`POST`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list/entries`,body:`json`};function D(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries create <identifier>
|
|
12
12
|
|
|
13
|
-
Create IPFS Universal Path Gateway Content List Entry`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`create <identifier>`,describe:`Create IPFS Universal Path Gateway Content List Entry`,builder:D,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}):
|
|
13
|
+
Create IPFS Universal Path Gateway Content List Entry`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`create <identifier>`,describe:`Create IPFS Universal Path Gateway Content List Entry`,builder:D,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Creating`,async()=>o.send(E,{body:t,zone_id:s,identifier:e.identifier}));r(n,{successLabel:`Created`});return}e.content===void 0&&(e.content=await d(`content`,`Specify the CID or content path of content to block.`)),e.type===void 0&&(e.type=await f(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let p=l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}),m=await a(`Creating`,async()=>o.send(E,{body:p,zone_id:s,identifier:e.identifier}));r(m,{successLabel:`Created`})})};var k={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list/entries/${t.content_list_entry_identifier}`};function A(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries delete <content-list-entry-identifier>
|
|
14
14
|
|
|
15
15
|
Delete IPFS Universal Path Gateway Content List Entry`).positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const j={command:`delete <content-list-entry-identifier>`,describe:`Delete IPFS Universal Path Gateway Content List Entry`,builder:A,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``),"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force})){process.stderr.write(`Aborted.
|
|
16
16
|
`);return}let c=await a(`Deleting`,async()=>o.send(k,{zone_id:s,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]}));r(c,{successLabel:`Deleted`})})};var M={method:`GET`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list/entries/${t.content_list_entry_identifier}`};function N(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries get <content-list-entry-identifier>
|
|
@@ -19,10 +19,10 @@ IPFS Universal Path Gateway Content List Entry Details`).positional(`content-lis
|
|
|
19
19
|
|
|
20
20
|
List IPFS Universal Path Gateway Content List Entries`).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`list`,describe:`List IPFS Universal Path Gateway Content List Entries`,builder:I,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(F,{zone_id:s,identifier:e.identifier}));r(c,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list/entries/${t.content_list_entry_identifier}`,body:`json`};function R(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists entries update <content-list-entry-identifier>
|
|
21
21
|
|
|
22
|
-
Edit IPFS Universal Path Gateway Content List Entry`).positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update <content-list-entry-identifier>`,describe:`Edit IPFS Universal Path Gateway Content List Entry`,builder:R,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries update`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``),"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}):
|
|
22
|
+
Edit IPFS Universal Path Gateway Content List Entry`).positional(`content-list-entry-identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`content`,{type:`string`,description:`Specify the CID or content path of content to block.`}).option(`description`,{type:`string`,description:`Specify an optional description of the content list entry.`}).option(`type`,{type:`string`,description:`Specify the type of content list entry to block.`,choices:[`cid`,`content_path`]}).coerce(`type`,e=>u(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update <content-list-entry-identifier>`,describe:`Edit IPFS Universal Path Gateway Content List Entry`,builder:R,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists entries update`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists entries update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list/entries/${e[`content-list-entry-identifier`]==null?`<content-list-entry-identifier>`:encodeURIComponent(String(e[`content-list-entry-identifier`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``),"content-list-entry-identifier":String(e[`content-list-entry-identifier`]??``)},bodyKind:`json`,body:e.body===void 0?l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(L,{body:t,zone_id:s,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]}));r(n,{successLabel:`Updated`});return}e.content===void 0&&(e.content=await d(`content`,`Specify the CID or content path of content to block.`)),e.type===void 0&&(e.type=await f(`type`,`Specify the type of content list entry to block.`,[`cid`,`content_path`]));let p=l({content:u(e.content,`content`,`text`),description:u(e.description,`description`,`text`),type:e.type}),m=await a(`Updating`,async()=>o.send(L,{body:p,zone_id:s,identifier:e.identifier,content_list_entry_identifier:e[`content-list-entry-identifier`]}));r(m,{successLabel:`Updated`})})},B={command:`entries`,describe:`Operations for hostnames.ipfs-universal-paths.content-lists.entries`,builder:e=>e.command(O).command(j).command(P).command(ee).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list`};function H(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists get <identifier>
|
|
23
23
|
|
|
24
24
|
IPFS Universal Path Gateway Content List Details`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <identifier>`,describe:`IPFS Universal Path Gateway Content List Details`,builder:H,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(V,{zone_id:s,identifier:e.identifier}));r(c,{successLabel:`Loaded`})})};var W={method:`PUT`,path:t=>e`/zones/${t.zone_id}/web3/hostnames/${t.identifier}/ipfs_universal_path/content_list`,body:`json`,constants:{action:`block`}};function G(e){return e.usage(`$0 web3 hostnames ipfs-universal-paths content-lists update <identifier>
|
|
25
25
|
|
|
26
|
-
Update IPFS Universal Path Gateway Content List`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`action`,{type:`string`,description:`Behavior of the content list.`,choices:[`block`]}).coerce(`action`,e=>u(e,`action`,`text`)).option(`entries`,{type:`string`,description:`Provides content list entries. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`update <identifier>`,describe:`Update IPFS Universal Path Gateway Content List`,builder:G,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists update`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({action:e.action,entries:
|
|
26
|
+
Update IPFS Universal Path Gateway Content List`).positional(`identifier`,{type:`string`,description:`Specify the identifier of the hostname.`,demandOption:!0}).option(`action`,{type:`string`,description:`Behavior of the content list.`,choices:[`block`]}).coerce(`action`,e=>u(e,`action`,`text`)).option(`entries`,{type:`string`,description:`Provides content list entries. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`update <identifier>`,describe:`Update IPFS Universal Path Gateway Content List`,builder:G,handler:async e=>o({command:`web3 hostnames ipfs-universal-paths content-lists update`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames ipfs-universal-paths content-lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}/ipfs_universal_path/content_list`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?l({action:e.action,entries:s(e.entries,`entries`)}):c(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=c(e.body),n=await a(`Updating`,async()=>o.send(W,{body:t,zone_id:u,identifier:e.identifier}));r(n,{successLabel:`Updated`});return}if(e.action===void 0&&(e.action=await f(`action`,`Behavior of the content list.`,[`block`])),e.entries===void 0)throw Error(`--entries is required (or pass --body with this field set).`);let d=l({action:e.action,entries:s(e.entries,`entries`)}),p=await a(`Updating`,async()=>o.send(W,{body:d,zone_id:u,identifier:e.identifier}));r(p,{successLabel:`Updated`})})},q={command:`content-lists`,describe:`Operations for hostnames.ipfs-universal-paths.content-lists`,builder:e=>e.command(U).command(K).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`ipfs-universal-paths`,describe:`Operations for hostnames.ipfs-universal-paths`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`GET`,path:t=>e`/zones/${t.zone_id}/web3/hostnames`};function X(e){return e.usage(`$0 web3 hostnames list
|
|
27
27
|
|
|
28
28
|
List Web3 Hostnames`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Web3 Hostnames`,builder:X,handler:async e=>o({command:`web3 hostnames list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf web3 hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/web3/hostnames`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(Y,{zone_id:s}));r(c,{successLabel:`Loaded`})})},Q={command:`hostnames`,describe:`Operations for hostnames`,builder:e=>e.command(g).command(y).command(S).command(T).command(Z).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$={command:`web3`,describe:`web3`,builder:e=>e.command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$ as default};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,t as i}from"./context-C_a8oSY9.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-Q5w9PNTT.mjs";import{t as c}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as l,r as u,t as d}from"./body-parser-DnBfDdx3.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";var p={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 m(e){return e.usage(`$0 workers-builds workers migrate-to-previews <script-tag>
|
|
3
3
|
|
|
4
|
-
Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`deploy-command`,{type:`string`,description:`Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for migrating a Worker's legacy non-production trigger to Previews.`})}const
|
|
4
|
+
Migrate a Worker's legacy non-production trigger to Previews. The legacy build settings become the Previews base config and the legacy trigger is removed.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`deploy-command`,{type:`string`,description:`Deploy command for the migrated Preview settings. Omit it to have the existing 'wrangler versions upload' command rewritten to 'wrangler preview' automatically, which fails with 400 when the existing command cannot be rewritten.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for migrating a Worker's legacy non-production trigger to Previews.`})}const h={command:`migrate-to-previews <script-tag>`,describe:`Migrate worker to previews`,builder:m,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?d({deploy_command:f(e[`deploy-command`],`deploy-command`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(p,{body:t,account_id:u,script_tag:e[`script-tag`]}));a(n,{successLabel:`Created`});return}let m=d({deploy_command:f(e[`deploy-command`],`deploy-command`,`text`)}),h=await s(`Creating`,async()=>c.send(p,{body:m,account_id:u,script_tag:e[`script-tag`]}));a(h,{successLabel:`Created`})})};var g={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 _(e){return e.usage(`$0 workers-builds workers previews create-build <preview-id>
|
|
5
5
|
|
|
6
|
-
Trigger a build for a single Preview.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>
|
|
6
|
+
Trigger a build for a single Preview.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-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=>f(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`seed-repo-branch`,`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0)){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --seed_repo-* flag is set`)}return!0})}const v={command:`create-build <preview-id>`,describe:`Create preview build`,builder:_,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?d({branch:f(e.branch,`branch`,`text`),commit_hash:f(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:f(e[`seed-repo-branch`],`seed-repo-branch`,`text`),owner:f(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:f(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:f(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(g,{body:t,account_id:u,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(n,{successLabel:`Created`});return}let p=d({branch:f(e.branch,`branch`,`text`),commit_hash:f(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:f(e[`seed-repo-branch`],`seed-repo-branch`,`text`),owner:f(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:f(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:f(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),m=await s(`Creating`,async()=>c.send(g,{body:p,account_id:u,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(m,{successLabel:`Created`})})};var y={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 b(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-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Preview. At least one field must be provided, and omitted fields are left unchanged.`})}const
|
|
8
|
+
Update a single Preview of a Worker. Supports partial updates to the tracked branch, the automation flags, and the build settings.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`auto-build`,{type:`boolean`,description:`Whether pushes to the git branch build this Preview. Deploy hooks, manual builds, and retries run regardless of this setting.`}).option(`auto-delete`,{type:`boolean`,description:`Whether deleting the git branch also deletes this Preview.`}).option(`branch`,{type:`string`,description:`Git branch this Preview tracks`}).option(`settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Preview. At least one field must be provided, and omitted fields are left unchanged.`})}const x={command:`edit <preview-id>`,describe:`Update preview`,builder:b,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?d({auto_build:e[`auto-build`],auto_delete:e[`auto-delete`],branch:f(e.branch,`branch`,`text`),settings:{build_caching_enabled:e[`settings-build-caching-enabled`],build_command:f(e[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:f(e[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:f(e[`settings-deploy-command`],`settings-deploy-command`,`text`),environment_variables:u(e[`settings-environment-variables`],`settings-environment-variables`),path_excludes:e[`settings-path-excludes`],path_includes:e[`settings-path-includes`],root_directory:f(e[`settings-root-directory`],`settings-root-directory`,`text`)}},[[`settings`,`environment_variables`]]):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(y,{body:t,account_id:p,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(n,{successLabel:`Updated`});return}let m=d({auto_build:e[`auto-build`],auto_delete:e[`auto-delete`],branch:f(e.branch,`branch`,`text`),settings:{build_caching_enabled:e[`settings-build-caching-enabled`],build_command:f(e[`settings-build-command`],`settings-build-command`,`text`),build_token_uuid:f(e[`settings-build-token-uuid`],`settings-build-token-uuid`,`text`),deploy_command:f(e[`settings-deploy-command`],`settings-deploy-command`,`text`),environment_variables:u(e[`settings-environment-variables`],`settings-environment-variables`),path_excludes:e[`settings-path-excludes`],path_includes:e[`settings-path-includes`],root_directory:f(e[`settings-root-directory`],`settings-root-directory`,`text`)}},[[`settings`,`environment_variables`]]),h=await s(`Updating`,async()=>c.send(y,{body:m,account_id:p,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(h,{successLabel:`Updated`})})};var S={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews/${t.preview_id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function C(e){return e.usage(`$0 workers-builds workers previews get <preview-id>
|
|
9
9
|
|
|
10
|
-
Retrieve a single Preview of a Worker, including the build settings it currently uses.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
10
|
+
Retrieve a single Preview of a Worker, including the build settings it currently uses.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <preview-id>`,describe:`Get preview`,builder:C,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(S,{account_id:l,script_tag:e[`script-tag`],preview_id:e[`preview-id`]}));a(u,{successLabel:`Loaded`})})};var T={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 E(e){return e.usage(`$0 workers-builds workers previews list-builds <preview-id>
|
|
11
11
|
|
|
12
|
-
List the builds of a single Preview with pagination.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
12
|
+
List the builds of a single Preview with pagination.`).positional(`preview-id`,{type:`string`,description:`The script tag of the Preview, which is a Worker in its own right`,demandOption:!0}).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list-builds <preview-id>`,describe:`List builds by preview`,builder:E,handler:async e=>c({command:`workers-builds workers previews list-builds`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews list-builds`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}/builds`,pathParams:{"script-tag":String(e[`script-tag`]??``),"preview-id":String(e[`preview-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(T,{account_id:u,script_tag:e[`script-tag`],preview_id:e[`preview-id`],...c}));a(d,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}/previews`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function k(e){return e.usage(`$0 workers-builds workers previews list
|
|
13
13
|
|
|
14
|
-
List the Previews of a Worker with pagination.`).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
14
|
+
List the Previews of a Worker with pagination.`).option(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List previews`,builder:k,handler:async e=>c({command:`workers-builds workers previews list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await r();o({command:`cf workers-builds workers previews list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}/previews`,pathParams:{"script-tag":String(e[`script-tag`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(O,{account_id:u,script_tag:e[`script-tag`],...c}));a(d,{successLabel:`Loaded`})})},j={command:`previews`,describe:`Operations for workers.previews`,builder:e=>e.command(v).command(x).command(w).command(A).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`workers`,describe:`Operations for workers`,builder:e=>e.command(h).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},N={command:`workers-builds`,describe:`workers-builds`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{N as default};
|