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,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-C_a8oSY9.mjs";import{n as r}from"./cloudflared-By8BzYXc.mjs";const i={command:`ssh-config`,describe:`Print an example SSH configuration for an Access application.`,builder:e=>e.option(`hostname`,{type:`string`,description:`Hostname of the Access application`}).option(`short-lived-cert`,{type:`boolean`,description:`Include short-lived certificate configuration`}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access ssh-config.`);if(await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`)throw Error(`cf access ssh-config does not support FedRAMP because cloudflared does not include --fedramp in its generated SSH configuration.`);let a=[`access`,`ssh-config`];throw i.hostname&&a.push(`--hostname`,i.hostname),i[`short-lived-cert`]&&a.push(`--short-lived-cert`),new e(await r(a))}};export{i as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import"./api-eMuS5GI1.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{n as r}from"./auth-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import"./api-eMuS5GI1.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{n as r}from"./auth-Db1KT0vm.mjs";import{r as i}from"./resolve-C3FmNlSO.mjs";import{t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./progress-Q5w9PNTT.mjs";import{t as s}from"./get-iPUHxD1r.mjs";import{n as c,t as l}from"./cloudflared-By8BzYXc.mjs";const u={method:`GET`,path:e=>n`/accounts/${e.account_id}/cfd_tunnel`,query:[`name`,`is_deleted`,`existed_at`,`uuid`,`was_active_at`,`was_inactive_at`,`include_prefix`,`exclude_prefix`,`status`,`per_page`,`page`]},d=1e3;async function f(e,t,n){if(i(n))return n;let r=0,a;for(let i=1;;i++){let o=await e.send(u,{account_id:t,name:n,is_deleted:!1,page:i,per_page:d}),s=o.result??[];for(let e of s)e.name===n&&(r++,a=e.id);let c=o.result_info?.per_page||d;if(s.length<c)break}if(r===0)throw Error(`"${n}" is neither the ID nor the name of any tunnel. Run \`cf tunnels list\` to see available tunnels.`);if(r>1)throw Error(`Found multiple tunnels named "${n}". Pass the tunnel UUID instead.`);if(!a)throw Error(`Tunnel "${n}" was found but has no ID. Pass the tunnel UUID instead.`);return a}async function p(e,t,n){let r=await e.send(s,{account_id:t,tunnel_id:n});if(typeof r!=`string`||r.length===0)throw Error(`The API returned an empty token for tunnel ${n}.`);return r}function m(e){return e.positional(`tunnel`,{type:`string`,description:`Tunnel name or UUID; required unless --token is provided`}).option(`token`,{type:`string`,description:`Tunnel token supplied directly to cloudflared`}).option(`log-level`,{type:`string`,choices:l,default:`info`,description:`cloudflared log level`})}const h={command:`run [tunnel]`,describe:`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,builder:m,handler:async n=>{if(n.local)throw Error(`--local is not supported by cf tunnels run.`);let i=n.token,s=n.tunnel;if(!i){if(!s)throw Error(`Either a tunnel name/UUID or --token must be provided.`);i=await t(n,async()=>{let e=await r(n),t=await a();return o(`Fetching tunnel token`,async()=>{let n=await f(e,t,s);return p(e,t,n)})})}let l=[`tunnel`,`--loglevel`,n[`log-level`]];throw l.push(`run`),new e(await c(l,{env:{TUNNEL_TOKEN:i}}))}};export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-C_a8oSY9.mjs";import{n as r}from"./cloudflared-By8BzYXc.mjs";const i={command:`curl <url>`,describe:`Run curl against an Access-protected application with its JWT injected by cloudflared.`,builder:e=>e.parserConfiguration({"populate--":!0,"parse-positional-numbers":!1,"short-option-groups":!1}).option(`allow-request`,{alias:`ar`,type:`boolean`,description:`Continue the request when no Access token is available`}).positional(`url`,{type:`string`,description:`URL of the Access application`,demandOption:!0}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access curl.`);let a=[`access`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`curl`),i[`allow-request`]&&a.push(`--allow-request`),a.push(i.url,...(i[`--`]??[]).map(String)),new e(await r(a))}};export{i as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{x as e}from"./dist-DZRTPMMA.mjs";import{t}from"./chunk-DSGVRFIS-C5SqiTOz.mjs";import{i as n,n as r,t as i}from"./startup-profile-BOaseXnO.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./progress-
|
|
2
|
+
import{x as e}from"./dist-DZRTPMMA.mjs";import{t}from"./chunk-DSGVRFIS-C5SqiTOz.mjs";import{i as n,n as r,t as i}from"./startup-profile-BOaseXnO.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./progress-Q5w9PNTT.mjs";import{a as s,i as c,n as l,o as u,r as d,s as f}from"./build-i8l2qGVZ.mjs";import{t as p}from"./deploy-input-KK6yyBN_.mjs";import m from"node:path";import{writeFile as h}from"node:fs/promises";import{readBuildOutput as g}from"@cloudflare/build-output-utils";function _(e){return e.option(`outfile`,{type:`string`,description:`Output file for the startup CPU profile`,default:`worker-startup.cpuprofile`,requiresArg:!0}).option(`prebuilt`,{type:`boolean`,description:`Use existing Build Output Specification files without building`,default:!1}).option(`worker`,d)}const v={command:`check`,describe:`Profile a Worker's startup performance`,builder:_,handler:async d=>{if(d.local)throw Error(`--local is not supported by cf workers check.`);d.prebuilt||await l(d.mode,{output:d.quiet?`silent`:`stderr`,worker:d.worker});let{workers:_,rootConfig:v}=await g(process.cwd());u(d.mode,v.buildContext.mode);let y=s(_,d.worker),{wranglerConfig:b,builtConfig:x}=c(y,v),S=p(y,x);if(!S.resolvedEntryPointPath)throw new f(`Startup profiling requires a Worker entrypoint; assets-only projects cannot be profiled.`);if(S.bundleType===`commonjs`)throw new f(`Startup profiling does not support service-worker format Workers. Refer to https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ for migration guidance.`);let C=t({name:b.name??y.config.name??`worker`,main:{name:x.manifest?.mainModule??m.basename(S.resolvedEntryPointPath),filePath:S.resolvedEntryPointPath,content:S.content,type:S.bundleType},modules:S.modules,sourceMaps:S.sourceMaps,compatibility_date:b.compatibility_date,compatibility_flags:b.compatibility_flags??[],assets:void 0,containers:void 0,migrations:void 0,exports:void 0,keepVars:void 0,keepSecrets:void 0,logpush:void 0,placement:void 0,tail_consumers:void 0,streaming_tail_consumers:void 0,limits:void 0,annotations:void 0,observability:void 0,cache:void 0,package_dependencies:void 0},e(b),{dryRun:!0,unsafe:b.unsafe}),w=await r(C),T=d.quiet?await i(C):await o(`Profiling Worker startup`,()=>i(C)),E=n(T);await h(d.outfile,JSON.stringify(T)),a({bundle:{sizeBytes:w.size,gzipSizeBytes:w.gzipSize},startup:{profileWindowMs:E.profileWindow/1e3,sampledTimeMs:E.sampledTime/1e3,activeTimeMs:E.activeTime/1e3,garbageCollectionTimeMs:E.garbageCollectionTime/1e3,idleTimeMs:E.idleTime/1e3,sampleCount:E.sampleCount},profile:d.outfile,note:`This profile was measured locally. Use it to understand where startup time is spent, not to predict startup time on Cloudflare.`},{quiet:d.quiet})}};export{v as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-C_a8oSY9.mjs";import{n as r}from"./cloudflared-By8BzYXc.mjs";const i={command:`ssh-gen`,describe:`Generate a short-lived certificate for an Access SSH application.`,builder:e=>e.option(`hostname`,{type:`string`,description:`Hostname of the Access application`,demandOption:!0}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access ssh-gen.`);let a=[`access`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`ssh-gen`,`--hostname`,i.hostname),new e(await r(a))}};export{i as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-C_a8oSY9.mjs";import{n as r,t as i}from"./cloudflared-By8BzYXc.mjs";function a(e){return e.option(`hostname`,{type:`string`,demandOption:!0,description:`Hostname of the Access application`}).option(`destination`,{type:`string`,description:`Destination address of the target server`}).option(`url`,{type:`string`,description:`Local host and port to forward to the Cloudflare edge`}).option(`header`,{type:`string`,array:!0,description:`Additional request header; repeat for multiple headers`}).option(`service-token-id`,{type:`string`,description:`Access service token ID`}).option(`service-token-secret`,{type:`string`,description:`Access service token secret`}).option(`log-level`,{alias:`loglevel`,type:`string`,choices:i,description:`cloudflared log level`})}const o={command:`tcp`,aliases:[`ssh`,`rdp`,`smb`],describe:`Proxy a TCP connection through Access. The command is also available as ssh, rdp, and smb.`,builder:a,handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access tcp.`);let a=[`access`];await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`tcp`),a.push(`--hostname`,i.hostname),i.destination&&a.push(`--destination`,i.destination),i.url&&a.push(`--url`,i.url);for(let e of i.header??[])a.push(`--header`,e);i[`service-token-id`]&&a.push(`--service-token-id`,i[`service-token-id`]),i[`log-level`]&&a.push(`--loglevel`,i[`log-level`]);let o=i[`service-token-secret`]?{TUNNEL_SERVICE_TOKEN_SECRET:i[`service-token-secret`]}:void 0;throw new e(await r(a,{env:o}))}};export{o as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./auth-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{t as r}from"./context-C_a8oSY9.mjs";import{t as i}from"./progress-Q5w9PNTT.mjs";import{t as a}from"./create-OXylMu6m.mjs";import{n as o}from"./cloudflared-By8BzYXc.mjs";const s=[`cloudflared`,`http`,`tcp`,`udp`],c=[`debug`,`info`,`warn`,`error`],l=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function u(e,t){if(!l.test(e))throw Error(`${t} must be a valid UUID.`);return e}const d={command:`tail [tunnel-id]`,describe:`Stream logs from a remote cloudflared instance.`,builder:e=>e.positional(`tunnel-id`,{type:`string`,coerce:e=>u(e,`Tunnel ID`),description:`Tunnel UUID to stream logs from`}).option(`connector-id`,{type:`string`,coerce:e=>u(e,`--connector-id`),description:`Target a specific cloudflared connector`}).option(`event`,{type:`string`,choices:s,array:!0,description:`Filter by event type (may be repeated)`}).option(`level`,{type:`string`,choices:c,description:`Filter by log level`}).option(`sample`,{type:`number`,coerce:e=>{if(!Number.isFinite(e)||e<=0||e>1)throw Error(`--sample must be greater than 0.0 and no greater than 1.0.`);return e},description:`Sample log events by fraction greater than 0.0 and no greater than 1.0`}),handler:async s=>{if(s.local)throw Error(`--local is not supported by cf tunnels tail.`);let c=process.env.TUNNEL_MANAGEMENT_TOKEN;if(c!==void 0&&!c.trim())throw Error(`TUNNEL_MANAGEMENT_TOKEN must not be empty.`);if(c&&s[`tunnel-id`])throw Error(`Specify either a tunnel ID or TUNNEL_MANAGEMENT_TOKEN, not both.`);let l=c;if(!l){let e=s[`tunnel-id`];if(!e)throw Error(`Either a tunnel ID or TUNNEL_MANAGEMENT_TOKEN must be provided.`);l=await t({mode:s.mode,local:s.local},async()=>{let t=await n(s),o=await r();return i(`Fetching tunnel management token`,async()=>t.send(a,{account_id:o,tunnel_id:e,body:{resources:[`logs`]}}))})}let u=[`tail`,`--output`,`json`];if(s[`connector-id`]&&u.push(`--connector-id`,s[`connector-id`]),s.event)for(let e of s.event)u.push(`--event`,e);throw s.level&&u.push(`--level`,s.level),s.sample!==void 0&&u.push(`--sample`,String(s.sample)),s[`tunnel-id`]&&u.push(s[`tunnel-id`]),new e(await o(u,{env:{TUNNEL_MANAGEMENT_TOKEN:l}}))}};export{d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-C_a8oSY9.mjs";import{n as r}from"./cloudflared-By8BzYXc.mjs";const i={command:`token <url>`,describe:`Print a JWT for authenticating with an Access application.`,builder:e=>e.positional(`url`,{type:`string`,description:`URL of the Access application`,demandOption:!0}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access token.`);let a=[`access`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`token`,i.url),new e(await r(a))}};export{i as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-C_a8oSY9.mjs";import{n as r}from"./cloudflared-By8BzYXc.mjs";const i={command:`login <url>`,describe:`Authenticate with an Access application and store its JWT through cloudflared.`,builder:e=>e.positional(`url`,{type:`string`,description:`URL of the Access application`,demandOption:!0}),handler:async i=>{if(i.local)throw Error(`--local is not supported by cf access login.`);let a=[`access`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),a.push(`login`),i.quiet&&a.push(`--quiet`),a.push(i.url),new e(await r(a))}};export{i as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{r as t}from"./dotenv-usOKkeW7.mjs";import{n}from"./context-C_a8oSY9.mjs";import{n as r}from"./cloudflared-By8BzYXc.mjs";const i={command:`login`,describe:`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,handler:async i=>{if(i.local)throw Error(`--local is not supported by cf tunnels login.`);let a=[`tunnel`,`login`];throw await t({mode:i.mode,local:i.local},()=>n())===`fedramp_high`&&a.push(`--fedramp`),new e(await r(a))}};export{i as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,t}from"./metadata-Df5kCWJv.mjs";import{t as n}from"./run-
|
|
2
|
+
import{n as e,t}from"./metadata-Df5kCWJv.mjs";import{t as n}from"./run-DtFLvOHB.mjs";import r from"node:assert";function i(e,t){return`#compdef ${e}
|
|
3
3
|
compdef _${e} ${e}
|
|
4
4
|
|
|
5
5
|
# zsh completion for ${e} -*- shell-script -*-
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-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,t as u}from"./body-parser-DnBfDdx3.mjs";var d={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/connectors/${t.connector_id}/interrupts`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function f(e){return e.usage(`$0 connector-interrupts create <connector-id>
|
|
3
3
|
|
|
4
4
|
Creates an interrupt for a Magic WAN Connector.`).positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`reboot-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`restart-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`shutdown-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Interrupt action for a connector.`})}const p={command:`create <connector-id>`,describe:`Create Interrupt`,builder:f,handler:async e=>c({command:`connector-interrupts create`,classification:{safeFlags:[`reboot-purge`,`restart-purge`,`shutdown-purge`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf connector-interrupts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}/interrupts`,pathParams:{"connector-id":String(e[`connector-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({reboot:{purge:e[`reboot-purge`]},restart:{purge:e[`restart-purge`]},shutdown:{purge:e[`shutdown-purge`]}}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(d,{body:t,account_id:f,connector_id:e[`connector-id`]}));a(n,{successLabel:`Created`});return}let p=u({reboot:{purge:e[`reboot-purge`]},restart:{purge:e[`restart-purge`]},shutdown:{purge:e[`shutdown-purge`]}}),m=await s(`Creating`,async()=>c.send(d,{body:p,account_id:f,connector_id:e[`connector-id`]}));a(m,{successLabel:`Created`})})};var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/connectors/${t.connector_id}/interrupts`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 connector-interrupts list
|
|
5
5
|
|
package/dist/{connector-telemetry-events-BQGBQwzR.mjs → connector-telemetry-events-D9mTcfbJ.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-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";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/connectors/${t.connector_id}/telemetry/events/${t.event_t}.${t.event_n}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function u(e){return e.usage(`$0 connector-telemetry-events get <event-n>
|
|
3
3
|
|
|
4
4
|
Gets Magic WAN Connector Telemetry Event`).positional(`event-n`,{type:`string`,description:`Event n`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`event-t`,{type:`string`,description:`Event t`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <event-n>`,describe:`Get Event`,builder:u,handler:async e=>c({command:`connector-telemetry-events get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf connector-telemetry-events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}/telemetry/events/${e[`event-t`]==null?`<event-t>`:encodeURIComponent(String(e[`event-t`]))}.${e[`event-n`]==null?`<event-n>`:encodeURIComponent(String(e[`event-n`]))}`,pathParams:{"connector-id":String(e[`connector-id`]??``),"event-t":String(e[`event-t`]??``),"event-n":String(e[`event-n`]??``)},bodyKind:`none`});return}let c=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>c.send(l,{account_id:u,connector_id:e[`connector-id`],event_t:e[`event-t`],event_n:e[`event-n`]}));a(d,{successLabel:`Loaded`})})};var f={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/connectors/${t.connector_id}/telemetry/events`,query:[`from`,`to`,`limit`,`cursor`,`k`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function p(e){return e.usage(`$0 connector-telemetry-events list
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-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";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/connectors/${t.connector_id}/telemetry/snapshots/${t.snapshot_t}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function u(e){return e.usage(`$0 connector-telemetry-snapshots get <snapshot-t>
|
|
3
3
|
|
|
4
4
|
Gets Magic WAN Connector Telemetry Snapshot`).positional(`snapshot-t`,{type:`string`,description:`Snapshot t`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <snapshot-t>`,describe:`Get Snapshot`,builder:u,handler:async e=>c({command:`connector-telemetry-snapshots get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf connector-telemetry-snapshots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}/telemetry/snapshots/${e[`snapshot-t`]==null?`<snapshot-t>`:encodeURIComponent(String(e[`snapshot-t`]))}`,pathParams:{"connector-id":String(e[`connector-id`]??``),"snapshot-t":String(e[`snapshot-t`]??``)},bodyKind:`none`});return}let c=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>c.send(l,{account_id:u,connector_id:e[`connector-id`],snapshot_t:e[`snapshot-t`]}));a(d,{successLabel:`Loaded`})})};var f={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/connectors/${t.connector_id}/telemetry/snapshots`,query:[`from`,`to`,`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function p(e){return e.usage(`$0 connector-telemetry-snapshots list
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-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,t as u}from"./body-parser-DnBfDdx3.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{n as f}from"./prompt-C0hKSr-R.mjs";var p={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/connectors`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function m(e){return e.usage(`$0 connectors create
|
|
3
3
|
|
|
4
4
|
Creates a Magic WAN Connector.`).option(`device-id`,{type:`string`,description:`The device.id field`}).option(`device-provision-license`,{type:`boolean`,description:`When true, create and provision a new licence key for the connector.`}).option(`device-serial-number`,{type:`string`,description:`The device.serial_number field`}).option(`activated`,{type:`boolean`,description:`The activated field`}).option(`interrupt-window-days-of-week`,{type:`string`,array:!0,description:`Allowed days of the week for upgrades. Default is all days.`}).option(`interrupt-window-duration-hours`,{type:`number`,description:`The interrupt_window_duration_hours field`}).option(`interrupt-window-embargo-dates`,{type:`string`,array:!0,description:`List of dates (YYYY-MM-DD) when upgrades are blocked.`}).option(`interrupt-window-hour-of-day`,{type:`number`,description:`The interrupt_window_hour_of_day field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`timezone`,{type:`string`,description:`The timezone field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create Connector`,builder:m,handler:async e=>c({command:`connectors create`,classification:{safeFlags:[`device-provision-license`,`activated`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf connectors create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/connectors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({device:{id:d(e[`device-id`],`device-id`,`text`),provision_license:e[`device-provision-license`],serial_number:d(e[`device-serial-number`],`device-serial-number`,`text`)},activated:e.activated,interrupt_window_days_of_week:e[`interrupt-window-days-of-week`],interrupt_window_duration_hours:e[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:e[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:e[`interrupt-window-hour-of-day`],notes:d(e.notes,`notes`,`text`),timezone:d(e.timezone,`timezone`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(p,{body:t,account_id:f}));a(n,{successLabel:`Created`});return}let m=u({device:{id:d(e[`device-id`],`device-id`,`text`),provision_license:e[`device-provision-license`],serial_number:d(e[`device-serial-number`],`device-serial-number`,`text`)},activated:e.activated,interrupt_window_days_of_week:e[`interrupt-window-days-of-week`],interrupt_window_duration_hours:e[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:e[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:e[`interrupt-window-hour-of-day`],notes:d(e.notes,`notes`,`text`),timezone:d(e.timezone,`timezone`,`text`)}),h=await s(`Creating`,async()=>c.send(p,{body:m,account_id:f}));a(h,{successLabel:`Created`})})};var g={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/connectors/${t.connector_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function _(e){return e.usage(`$0 connectors delete <connector-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{K as e}from"./dist-DZRTPMMA.mjs";import{s as t}from"./blocks-Bat9A8V_.mjs";import"./api-eMuS5GI1.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{t as r}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as i}from"./local-Dil4fTWX.mjs";import{n as a}from"./auth-
|
|
2
|
+
import{K as e}from"./dist-DZRTPMMA.mjs";import{s as t}from"./blocks-Bat9A8V_.mjs";import"./api-eMuS5GI1.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{t as r}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as i}from"./local-Dil4fTWX.mjs";import{n as a}from"./auth-Db1KT0vm.mjs";import{a as o,n as s,t as c}from"./context-C_a8oSY9.mjs";import{E as ee,S as te,T as l,_ as u,b as ne,f as d,h as f,p as re,s as p,t as m,u as ie,v as ae}from"./deploy-context-ClNVJYlR.mjs";import{t as h}from"./auth-token-D9XIPlwf.mjs";import{n as g}from"./request-headers-DXvswze2.mjs";import{t as _}from"./output-Co4xdFf6.mjs";import{t as v}from"./dry-run-C2KjGX10.mjs";import{t as y}from"./progress-Q5w9PNTT.mjs";import{n as b,t as x}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as S,n as C,t as w}from"./body-parser-DnBfDdx3.mjs";import{n as T}from"./input-validation-D7z60HJH.mjs";import{a as E,i as D,n as O}from"./prompt-C0hKSr-R.mjs";var k={method:`POST`,path:e=>n`/accounts/${e.account_id}/containers/applications`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function oe(e){return e.usage('$0 containers applications create\n\nCreate a Containers application. Use `scheduling_policy: "default"` for a scheduler-backed application. The Containers scheduler maintains the requested instance count and manages deployment configuration, placement, scaling, versions, and rollouts. Use `scheduling_policy: "durable_object"` for a Durable Object-managed application. Each Durable Object creates and manages the lifecycle of its container instance. Supply `name`, `scheduling_policy`, and `durable_objects`, with optional `configuration` and optional top-level `observability` settings. Deployment configuration, scaling, constraints, versions, and rollouts do not apply.').option(`configuration-command`,{type:`string`,array:!0,description:`The command that runs when the container starts, passed to the entrypoint.
|
|
3
3
|
You can override this at run-time. If you override only the command,
|
|
4
4
|
it gets passed to the default entrypoint specified in the image.
|
|
5
5
|
`}).option(`configuration-entrypoint`,{type:`string`,array:!0,description:`The entry point for the container, specifying the executable to run when the container starts.
|
|
@@ -18,12 +18,12 @@ Defaults to 0.
|
|
|
18
18
|
`}).option(`scheduling-policy`,{type:`string`,description:`Selects a scheduler-backed application. Use \`default\` when the Containers
|
|
19
19
|
scheduler should maintain the requested number of instances and manage deployment
|
|
20
20
|
configuration, placement, scaling, versions, and rollouts.
|
|
21
|
-
`,choices:[`default`,`durable_object`]}).coerce(`scheduling-policy`,e=>T(e,`scheduling-policy`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Create a Containers application. Set `scheduling_policy` to `default` for a scheduler-backed application with deployment configuration, instance counts, constraints, versions, and rollouts. Set it to `durable_object` for a Durable Object-managed application where each Durable Object creates and manages the lifecycle of its container instance. For `durable_object` requests, supply `name`, `scheduling_policy`, and `durable_objects`, with optional `configuration` and top-level `observability` settings. "}).conflicts(`configuration-command`,[`configuration-wrangler-ssh-port`]).conflicts(`configuration-entrypoint`,[`configuration-wrangler-ssh-port`]).conflicts(`configuration-image`,[`configuration-wrangler-ssh-port`]).conflicts(`configuration-instance-type`,[`configuration-wrangler-ssh-port`]).conflicts(`configuration-wrangler-ssh-port`,[`configuration-command`,`configuration-entrypoint`,`configuration-image`,`configuration-instance-type`,`constraints-jurisdiction`,`constraints-regions`,`instances`,`max-instances`,`rollout-active-grace-period`]).conflicts(`constraints-jurisdiction`,[`configuration-wrangler-ssh-port`]).conflicts(`constraints-regions`,[`configuration-wrangler-ssh-port`]).conflicts(`durable-objects-namespace-id`,[`durable-objects-class-name`,`durable-objects-script-name`]).conflicts(`durable-objects-class-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-class-name`,[`durable-objects-script-name`]).conflicts(`durable-objects-script-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-script-name`,[`durable-objects-class-name`]).conflicts(`instances`,[`configuration-wrangler-ssh-port`]).implies(`instances`,[`max-instances`]).conflicts(`max-instances`,[`configuration-wrangler-ssh-port`]).implies(`max-instances`,[`instances`]).conflicts(`rollout-active-grace-period`,[`configuration-wrangler-ssh-port`])}const se={command:`create`,describe:`Create a new application`,builder:oe,handler:async e=>x({command:`containers applications create`,classification:{safeFlags:[`configuration-instance-type`,`configuration-observability-logs-enabled`,`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`scheduling-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications`,pathParams:{},bodyKind:`json`,body:e.body===void 0?w({configuration:{command:e[`configuration-command`],entrypoint:e[`configuration-entrypoint`],image:T(e[`configuration-image`],`configuration-image`,`text`),instance_type:e[`configuration-instance-type`],observability:{logs:{enabled:e[`configuration-observability-logs-enabled`]}},wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:T(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},durable_objects:{namespace_id:T(e[`durable-objects-namespace-id`],`durable-objects-namespace-id`,`text`),class_name:T(e[`durable-objects-class-name`],`durable-objects-class-name`,`text`),script_name:T(e[`durable-objects-script-name`],`durable-objects-script-name`,`text`)},instances:e.instances,max_instances:e[`max-instances`],name:T(e.name,`name`,`text`),observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`],scheduling_policy:e[`scheduling-policy`]}):
|
|
21
|
+
`,choices:[`default`,`durable_object`]}).coerce(`scheduling-policy`,e=>T(e,`scheduling-policy`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Create a Containers application. Set `scheduling_policy` to `default` for a scheduler-backed application with deployment configuration, instance counts, constraints, versions, and rollouts. Set it to `durable_object` for a Durable Object-managed application where each Durable Object creates and manages the lifecycle of its container instance. For `durable_object` requests, supply `name`, `scheduling_policy`, and `durable_objects`, with optional `configuration` and top-level `observability` settings. "}).conflicts(`configuration-command`,[`configuration-wrangler-ssh-port`]).conflicts(`configuration-entrypoint`,[`configuration-wrangler-ssh-port`]).conflicts(`configuration-image`,[`configuration-wrangler-ssh-port`]).conflicts(`configuration-instance-type`,[`configuration-wrangler-ssh-port`]).conflicts(`configuration-wrangler-ssh-port`,[`configuration-command`,`configuration-entrypoint`,`configuration-image`,`configuration-instance-type`,`constraints-jurisdiction`,`constraints-regions`,`instances`,`max-instances`,`rollout-active-grace-period`]).conflicts(`constraints-jurisdiction`,[`configuration-wrangler-ssh-port`]).conflicts(`constraints-regions`,[`configuration-wrangler-ssh-port`]).conflicts(`durable-objects-namespace-id`,[`durable-objects-class-name`,`durable-objects-script-name`]).conflicts(`durable-objects-class-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-class-name`,[`durable-objects-script-name`]).conflicts(`durable-objects-script-name`,[`durable-objects-namespace-id`]).implies(`durable-objects-script-name`,[`durable-objects-class-name`]).conflicts(`instances`,[`configuration-wrangler-ssh-port`]).implies(`instances`,[`max-instances`]).conflicts(`max-instances`,[`configuration-wrangler-ssh-port`]).implies(`max-instances`,[`instances`]).conflicts(`rollout-active-grace-period`,[`configuration-wrangler-ssh-port`])}const se={command:`create`,describe:`Create a new application`,builder:oe,handler:async e=>x({command:`containers applications create`,classification:{safeFlags:[`configuration-instance-type`,`configuration-observability-logs-enabled`,`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`scheduling-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications`,pathParams:{},bodyKind:`json`,body:e.body===void 0?w({configuration:{command:e[`configuration-command`],entrypoint:e[`configuration-entrypoint`],image:T(e[`configuration-image`],`configuration-image`,`text`),instance_type:e[`configuration-instance-type`],observability:{logs:{enabled:e[`configuration-observability-logs-enabled`]}},wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:T(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},durable_objects:{namespace_id:T(e[`durable-objects-namespace-id`],`durable-objects-namespace-id`,`text`),class_name:T(e[`durable-objects-class-name`],`durable-objects-class-name`,`text`),script_name:T(e[`durable-objects-script-name`],`durable-objects-script-name`,`text`)},instances:e.instances,max_instances:e[`max-instances`],name:T(e.name,`name`,`text`),observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`],scheduling_policy:e[`scheduling-policy`]}):C(e.body)});return}let t=await a(e),n=e.local?i:await c();if(e.accountId=n,e.body){let r=C(e.body),i=await y(`Creating`,async()=>t.send(k,{body:r,account_id:n}));_(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await E(`name`,`The name for this application.`)),e[`scheduling-policy`]===void 0&&(e[`scheduling-policy`]=await D(`scheduling-policy`,"Selects a scheduler-backed application. Use `default` when the Containers scheduler should maintain the requested number of instances and manage deployment configuration, placement, scaling, versions, and rollouts. ",[`default`,`durable_object`]));let r=w({configuration:{command:e[`configuration-command`],entrypoint:e[`configuration-entrypoint`],image:T(e[`configuration-image`],`configuration-image`,`text`),instance_type:e[`configuration-instance-type`],observability:{logs:{enabled:e[`configuration-observability-logs-enabled`]}},wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:T(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},durable_objects:{namespace_id:T(e[`durable-objects-namespace-id`],`durable-objects-namespace-id`,`text`),class_name:T(e[`durable-objects-class-name`],`durable-objects-class-name`,`text`),script_name:T(e[`durable-objects-script-name`],`durable-objects-script-name`,`text`)},instances:e.instances,max_instances:e[`max-instances`],name:T(e.name,`name`,`text`),observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`],scheduling_policy:e[`scheduling-policy`]}),s=await y(`Creating`,async()=>t.send(k,{body:r,account_id:n}));_(s,{successLabel:`Created`})})};var ce={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/containers/applications/${e.application_id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function A(e){return e.usage(`$0 containers applications delete <application-id>
|
|
22
22
|
|
|
23
23
|
Deletes a single application by id.`).positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,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 <application-id>`,describe:`Delete a single application by id`,builder:A,handler:async e=>x({command:`containers applications delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers applications delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?i:await c();if(e.accountId=n,!await O({force:!!e.force,message:`This operation permanently deletes the application and stops its containers.`})){process.stderr.write(`Aborted.
|
|
24
24
|
`);return}let r=await y(`Deleting`,async()=>t.send(ce,{account_id:n,application_id:e[`application-id`]}));_(r,{successLabel:`Deleted`})})};var M={method:`PATCH`,path:e=>n`/accounts/${e.account_id}/containers/applications/${e.application_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function N(e){return e.usage("$0 containers applications edit <application-id>\n\nModifies a single application by id. Durable Object-managed application settings are published to runtime metadata without creating deployments or rollouts. Top-level `observability` for these applications supports only `logs.enabled`. The supported fields depend on the existing application's scheduling policy. For scheduler-backed applications, changes that replace instance deployment configuration, including the image, require a rollout.").positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`configuration-wrangler-ssh-enabled`,{type:`boolean`,description:`The configuration.wrangler_ssh.enabled field`}).option(`configuration-wrangler-ssh-port`,{type:`number`,description:`The configuration.wrangler_ssh.port field`}).option(`constraints-jurisdiction`,{type:`string`,description:`Restricts placement to datacenters in the selected jurisdiction. Choose "eu", "fedramp", or "us". When combined with regions, EU supports EEUR and WEUR while FedRAMP and US support ENAM and WNAM.`}).option(`constraints-regions`,{type:`string`,array:!0,description:`The constraints.regions field`}).option(`max-instances`,{type:`number`,description:`Maximum number of instances that an autoscaling application can run.`}).option(`observability-logs-enabled`,{type:`boolean`,description:`The observability.logs.enabled field`}).option(`rollout-active-grace-period`,{type:`number`,description:`Grace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds.
|
|
25
25
|
Defaults to 0.
|
|
26
|
-
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for modifying a Containers application without replacing its instances. Durable Object-managed applications support only top-level observability.logs.enabled. The other fields apply to scheduler-backed applications, where deployment configuration changes such as image, resource allocation, command, and environment variables require an application rollout. `})}const P={command:`edit <application-id>`,describe:`Modify an application`,builder:N,handler:async e=>x({command:`containers applications edit`,classification:{safeFlags:[`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers applications edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?w({configuration:{wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:T(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},max_instances:e[`max-instances`],observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`]}):
|
|
26
|
+
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for modifying a Containers application without replacing its instances. Durable Object-managed applications support only top-level observability.logs.enabled. The other fields apply to scheduler-backed applications, where deployment configuration changes such as image, resource allocation, command, and environment variables require an application rollout. `})}const P={command:`edit <application-id>`,describe:`Modify an application`,builder:N,handler:async e=>x({command:`containers applications edit`,classification:{safeFlags:[`configuration-wrangler-ssh-enabled`,`observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers applications edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?w({configuration:{wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:T(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},max_instances:e[`max-instances`],observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`]}):C(e.body)});return}let t=await a(e),n=e.local?i:await c();if(e.accountId=n,e.body){let r=C(e.body),i=await y(`Updating`,async()=>t.send(M,{body:r,account_id:n,application_id:e[`application-id`]}));_(i,{successLabel:`Updated`});return}let r=w({configuration:{wrangler_ssh:{enabled:e[`configuration-wrangler-ssh-enabled`],port:e[`configuration-wrangler-ssh-port`]}},constraints:{jurisdiction:T(e[`constraints-jurisdiction`],`constraints-jurisdiction`,`text`),regions:e[`constraints-regions`]},max_instances:e[`max-instances`],observability:{logs:{enabled:e[`observability-logs-enabled`]}},rollout_active_grace_period:e[`rollout-active-grace-period`]}),s=await y(`Updating`,async()=>t.send(M,{body:r,account_id:n,application_id:e[`application-id`]}));_(s,{successLabel:`Updated`})})};var F={method:`GET`,path:e=>n`/accounts/${e.account_id}/containers/applications/${e.application_id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function I(e){return e.usage(`$0 containers applications get <application-id>
|
|
27
27
|
|
|
28
28
|
Returns a single application by id.`).positional(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <application-id>`,describe:`Get a single application by id`,builder:I,handler:async e=>x({command:`containers applications get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers applications get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?i:await c();e.accountId=n;let r=await y(`Loading`,async()=>t.send(F,{account_id:n,application_id:e[`application-id`]}));_(r,{successLabel:`Loaded`})})};var R={method:`GET`,path:e=>n`/accounts/${e.account_id}/containers/applications/${e.application_id}/instances/${e.instance_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function z(e){return e.usage(`$0 containers applications instances get <instance-id>
|
|
29
29
|
|
|
@@ -60,19 +60,19 @@ Specify both entrypoint and command at run-time to completely replace the image
|
|
|
60
60
|
- "standard-2": 1 vCPU, 6 GiB memory, 12 GB disk
|
|
61
61
|
- "standard-3": 2 vCPU, 8 GiB memory, 16 GB disk
|
|
62
62
|
- "standard-4": 4 vCPU, 12 GiB memory, 20 GB disk
|
|
63
|
-
`,choices:[`lite`,`basic`,`standard-1`,`standard-2`,`standard-3`,`standard-4`],default:`lite`}).coerce(`target-configuration-instance-type`,e=>T(e,`target-configuration-instance-type`,`text`)).option(`target-configuration-observability-logs-enabled`,{type:`boolean`,description:`The target_configuration.observability.logs.enabled field`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body to create a new rollout for a scheduler-backed application.`})}const fe={command:`create <application-id>`,describe:`Create a new rollout for an application`,builder:de,handler:async e=>x({command:`containers applications rollouts create`,classification:{safeFlags:[`kind`,`strategy`,`target-configuration-instance-type`,`target-configuration-observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers applications rollouts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/rollouts`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?w({description:T(e.description,`description`,`text`),kind:e.kind,percentage:e.percentage,step_percentage:e[`step-percentage`],steps:
|
|
63
|
+
`,choices:[`lite`,`basic`,`standard-1`,`standard-2`,`standard-3`,`standard-4`],default:`lite`}).coerce(`target-configuration-instance-type`,e=>T(e,`target-configuration-instance-type`,`text`)).option(`target-configuration-observability-logs-enabled`,{type:`boolean`,description:`The target_configuration.observability.logs.enabled field`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body to create a new rollout for a scheduler-backed application.`})}const fe={command:`create <application-id>`,describe:`Create a new rollout for an application`,builder:de,handler:async e=>x({command:`containers applications rollouts create`,classification:{safeFlags:[`kind`,`strategy`,`target-configuration-instance-type`,`target-configuration-observability-logs-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers applications rollouts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/rollouts`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`json`,body:e.body===void 0?w({description:T(e.description,`description`,`text`),kind:e.kind,percentage:e.percentage,step_percentage:e[`step-percentage`],steps:S(e.steps,`steps`),strategy:e.strategy,target_configuration:{command:e[`target-configuration-command`],entrypoint:e[`target-configuration-entrypoint`],image:T(e[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:e[`target-configuration-instance-type`],observability:{logs:{enabled:e[`target-configuration-observability-logs-enabled`]}}}}):C(e.body)});return}let t=await a(e),n=e.local?i:await c();if(e.accountId=n,e.body){let r=C(e.body),i=await y(`Creating`,async()=>t.send(K,{body:r,account_id:n,application_id:e[`application-id`]}));_(i,{successLabel:`Created`});return}e.description===void 0&&(e.description=await E(`description`,`Description of the rollout process.`)),e.strategy===void 0&&(e.strategy=await D(`strategy`,`Strategy used for the rollout. - "rolling": Step-based rollout with health gates. Actively replaces instances to reach each step's target percentage. - "new_instances": Percentage control over version distribution. Version sync actively replaces instances to match the configured percentage. The "full_auto" kind advances through fixed percentage targets after target-version health is observed. `,[`rolling`,`new_instances`]));let r=w({description:T(e.description,`description`,`text`),kind:e.kind,percentage:e.percentage,step_percentage:e[`step-percentage`],steps:S(e.steps,`steps`),strategy:e.strategy,target_configuration:{command:e[`target-configuration-command`],entrypoint:e[`target-configuration-entrypoint`],image:T(e[`target-configuration-image`],`target-configuration-image`,`text`),instance_type:e[`target-configuration-instance-type`],observability:{logs:{enabled:e[`target-configuration-observability-logs-enabled`]}}}}),s=await y(`Creating`,async()=>t.send(K,{body:r,account_id:n,application_id:e[`application-id`]}));_(s,{successLabel:`Created`})})},pe={command:`rollouts`,describe:`Manage rollouts for scheduler-backed applications`,builder:e=>e.command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var me={method:`GET`,path:e=>n`/accounts/${e.account_id}/containers/applications/${e.application_id}/versions`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function he(e){return e.usage('$0 containers applications versions list\n\nReturns all versions for a scheduler-backed application with `scheduling_policy: "default"`. Versions and rollouts do not apply to applications with `scheduling_policy: "durable_object"`.').option(`application-id`,{type:`string`,description:`An Application ID represents an identifier of an application.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list`,describe:`List all application versions`,builder:he,handler:async e=>x({command:`containers applications versions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers applications versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/applications/${e[`application-id`]==null?`<application-id>`:encodeURIComponent(String(e[`application-id`]))}/versions`,pathParams:{"application-id":String(e[`application-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?i:await c();e.accountId=n;let r=await y(`Loading`,async()=>t.send(me,{account_id:n,application_id:e[`application-id`]}));_(r,{successLabel:`Loaded`})})},_e={command:`versions`,describe:`Inspect versions of scheduler-backed applications`,builder:e=>e.command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ve={command:`applications`,describe:`Manage Containers applications`,builder:e=>e.command(se).command(j).command(P).command(L).command(ue).command(W).command(pe).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:e=>n`/accounts/${e.account_id}/containers/image-preparations`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ye(e){return e.usage(`$0 containers images prepare
|
|
64
64
|
|
|
65
|
-
Idempotently starts or observes preparation of the runtime artifacts required to run one digest-pinned managed container image on Cloudflare's network. Returns 202 while durable preparation continues and 200 when the image is ready or preparation has reached a terminal error.`).option(`image`,{type:`string`,description:`Image url.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A digest-pinned managed container image to prepare for the new runtime.`})}const be={command:`prepare`,describe:`Prepare a container image`,builder:ye,handler:async e=>x({command:`containers images prepare`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers images prepare`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/image-preparations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?w({image:T(e.image,`image`,`text`)}):
|
|
65
|
+
Idempotently starts or observes preparation of the runtime artifacts required to run one digest-pinned managed container image on Cloudflare's network. Returns 202 while durable preparation continues and 200 when the image is ready or preparation has reached a terminal error.`).option(`image`,{type:`string`,description:`Image url.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A digest-pinned managed container image to prepare for the new runtime.`})}const be={command:`prepare`,describe:`Prepare a container image`,builder:ye,handler:async e=>x({command:`containers images prepare`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers images prepare`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/image-preparations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?w({image:T(e.image,`image`,`text`)}):C(e.body)});return}let t=await a(e),n=e.local?i:await c();if(e.accountId=n,e.body){let r=C(e.body),i=await y(`Creating`,async()=>t.send(q,{body:r,account_id:n}));_(i,{successLabel:`Created`});return}e.image===void 0&&(e.image=await E(`image`,`Image url.`));let r=w({image:T(e.image,`image`,`text`)}),s=await y(`Creating`,async()=>t.send(q,{body:r,account_id:n}));_(s,{successLabel:`Created`})})};async function J(){let t=await h(),n=await c(),r={compliance_region:await s()};return p.HEADERS=g(),d(n,t,e(r)),{accountId:n,complianceConfig:r}}function xe(e){return e.positional(`image`,{type:`string`,demandOption:!0,description:`Image and tag to delete, of the form IMAGE:TAG`}).option(`force`,{type:`boolean`,alias:`f`,default:!1,description:`Skip the deletion confirmation prompt`})}var Se=b({command:`delete <image>`,describe:`Delete an image tag from the Cloudflare managed registry`,builder:xe,async handler(e){if(e.local)throw Error("--local is not supported with `cf containers images delete`.");if(ne(e.image),!await O({force:e.force,message:`Delete ${e.image}? This action cannot be undone.`}))return;let n=await J(),r=await y(`Deleting`,()=>f({...n,image:e.image}));_({image:e.image,...r},{quiet:e.quiet}),r.warning&&console.warn(t(r.warning))}},{command:`containers images delete`,classification:{safeFlags:[`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}});function Ce(e){return e.option(`filter`,{type:`string`,description:`Regex to filter repository names`})}var we=b({command:`list`,describe:`List images in the Cloudflare managed registry`,builder:Ce,async handler(e){if(e.local)throw Error("--local is not supported with `cf containers images list`.");e.filter!==void 0&&new RegExp(e.filter);let t=await J(),n=await y(`Loading`,()=>ae({...t,filter:e.filter}));_(n,{quiet:e.quiet})}},{command:`containers images list`,classification:{safeFlags:[]}});const Te={command:`images`,describe:`Operations for images`,builder:e=>e.command(r(Se,`preview`)).command(r(we,`preview`)).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:e=>n`/accounts/${e.account_id}/containers/registries`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function Ee(e){return e.usage(`$0 containers registries create
|
|
66
66
|
|
|
67
67
|
Registers credentials for a supported private external image registry so Containers can pull images from it. This endpoint does not create a registry or upload an image. Public Docker Hub images and images in the Cloudflare managed registry do not require this configuration. Refer to [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported registries and instructions for storing registry credentials.`).option(`auth-private-credential-secret-name`,{type:`string`,description:`Name of the secret within the store.`}).option(`auth-private-credential-store-id`,{type:`string`,description:`Identifier of the Secrets Store containing the secret.`}).option(`auth-public-credential`,{type:`string`,description:`The non-secret part of the registry credential: an AWS access key ID for ECR,
|
|
68
68
|
a username for Docker Hub, or a service account email for Google Artifact Registry.
|
|
69
69
|
`}).option(`domain`,{type:`string`,description:"Hostname of the private registry, without a scheme or image path. Supported\nhostnames are `docker.io`, AWS ECR hostnames, and Google Artifact Registry\n`*-docker.pkg.dev` hostnames.\n"}).option(`is-public`,{type:`boolean`,description:`Omit this field or set it to \`false\`. Public Docker Hub images do not require
|
|
70
70
|
registry configuration and cannot be added with this endpoint.
|
|
71
|
-
`}).option(`kind`,{type:`string`,description:"Registry provider. This must match `domain`: `DockerHub` for `docker.io`,\n`ECR` for AWS ECR, or `GAR` for Google Artifact Registry.\n",choices:[`ECR`,`DockerHub`,`GAR`]}).coerce(`kind`,e=>T(e,`kind`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configuration for connecting Containers to a supported private external image registry. See [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported providers and credential setup instructions. `})}const De={command:`create`,describe:`Configure a private external image registry`,builder:Ee,handler:async e=>x({command:`containers registries create`,classification:{safeFlags:[`is-public`,`kind`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers registries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?w({auth:{private_credential:{secret_name:T(e[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:T(e[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:T(e[`auth-public-credential`],`auth-public-credential`,`text`)},domain:T(e.domain,`domain`,`text`),is_public:e[`is-public`],kind:e.kind}):
|
|
71
|
+
`}).option(`kind`,{type:`string`,description:"Registry provider. This must match `domain`: `DockerHub` for `docker.io`,\n`ECR` for AWS ECR, or `GAR` for Google Artifact Registry.\n",choices:[`ECR`,`DockerHub`,`GAR`]}).coerce(`kind`,e=>T(e,`kind`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configuration for connecting Containers to a supported private external image registry. See [Image management](https://developers.cloudflare.com/containers/platform-details/image-management/) for supported providers and credential setup instructions. `})}const De={command:`create`,describe:`Configure a private external image registry`,builder:Ee,handler:async e=>x({command:`containers registries create`,classification:{safeFlags:[`is-public`,`kind`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers registries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?w({auth:{private_credential:{secret_name:T(e[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:T(e[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:T(e[`auth-public-credential`],`auth-public-credential`,`text`)},domain:T(e.domain,`domain`,`text`),is_public:e[`is-public`],kind:e.kind}):C(e.body)});return}let t=await a(e),n=e.local?i:await c();if(e.accountId=n,e.body){let r=C(e.body),i=await y(`Creating`,async()=>t.send(Y,{body:r,account_id:n}));_(i,{successLabel:`Created`});return}e[`auth-private-credential-secret-name`]===void 0&&(e[`auth-private-credential-secret-name`]=await E(`auth-private-credential-secret-name`,`Name of the secret within the store.`)),e[`auth-private-credential-store-id`]===void 0&&(e[`auth-private-credential-store-id`]=await E(`auth-private-credential-store-id`,`Identifier of the Secrets Store containing the secret.`)),e[`auth-public-credential`]===void 0&&(e[`auth-public-credential`]=await E(`auth-public-credential`,`The non-secret part of the registry credential: an AWS access key ID for ECR, a username for Docker Hub, or a service account email for Google Artifact Registry. `)),e.domain===void 0&&(e.domain=await E(`domain`,"Hostname of the private registry, without a scheme or image path. Supported hostnames are `docker.io`, AWS ECR hostnames, and Google Artifact Registry `*-docker.pkg.dev` hostnames. ")),e.kind===void 0&&(e.kind=await D(`kind`,"Registry provider. This must match `domain`: `DockerHub` for `docker.io`, `ECR` for AWS ECR, or `GAR` for Google Artifact Registry. ",[`ECR`,`DockerHub`,`GAR`]));let r=w({auth:{private_credential:{secret_name:T(e[`auth-private-credential-secret-name`],`auth-private-credential-secret-name`,`text`),store_id:T(e[`auth-private-credential-store-id`],`auth-private-credential-store-id`,`text`)},public_credential:T(e[`auth-public-credential`],`auth-public-credential`,`text`)},domain:T(e.domain,`domain`,`text`),is_public:e[`is-public`],kind:e.kind}),s=await y(`Creating`,async()=>t.send(Y,{body:r,account_id:n}));_(s,{successLabel:`Created`})})};var X={method:`POST`,path:e=>n`/accounts/${e.account_id}/containers/registries/${e.domain}/credentials`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Oe(e){return e.usage(`$0 containers registries credentials generate <domain>
|
|
72
72
|
|
|
73
|
-
Generates credentials for accessing a configured container image registry.`).positional(`domain`,{type:`string`,description:`The domain to get credentials for.`,demandOption:!0}).option(`expiration-minutes`,{type:`number`,description:`The number of minutes Cloudflare managed registry credentials stay valid. Required for managed registries and must remain positive. Cloudflare ignores this value for external registries.`}).option(`permissions`,{type:`string`,array:!0,description:`The permissions for Cloudflare managed registry credentials. Required for managed registries. Cloudflare ignores this value for external registries.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specifies the configuration for the image registry credential to create. Cloudflare requires both fields for managed registries. For external registries, Cloudflare ignores both fields, and the registry provider determines the returned credentials' permissions and lifetime.`})}const ke={command:`generate <domain>`,describe:`Generate a JWT to interact with the specified image registry.`,builder:Oe,handler:async e=>x({command:`containers registries credentials generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers registries credentials generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}/credentials`,pathParams:{domain:String(e.domain??``)},bodyKind:`json`,body:e.body===void 0?w({expiration_minutes:e[`expiration-minutes`],permissions:e.permissions}):
|
|
73
|
+
Generates credentials for accessing a configured container image registry.`).positional(`domain`,{type:`string`,description:`The domain to get credentials for.`,demandOption:!0}).option(`expiration-minutes`,{type:`number`,description:`The number of minutes Cloudflare managed registry credentials stay valid. Required for managed registries and must remain positive. Cloudflare ignores this value for external registries.`}).option(`permissions`,{type:`string`,array:!0,description:`The permissions for Cloudflare managed registry credentials. Required for managed registries. Cloudflare ignores this value for external registries.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specifies the configuration for the image registry credential to create. Cloudflare requires both fields for managed registries. For external registries, Cloudflare ignores both fields, and the registry provider determines the returned credentials' permissions and lifetime.`})}const ke={command:`generate <domain>`,describe:`Generate a JWT to interact with the specified image registry.`,builder:Oe,handler:async e=>x({command:`containers registries credentials generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers registries credentials generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}/credentials`,pathParams:{domain:String(e.domain??``)},bodyKind:`json`,body:e.body===void 0?w({expiration_minutes:e[`expiration-minutes`],permissions:e.permissions}):C(e.body)});return}let t=await a(e),n=e.local?i:await c();if(e.accountId=n,e.body){let r=C(e.body),i=await y(`Creating`,async()=>t.send(X,{body:r,account_id:n,domain:e.domain}));_(i,{successLabel:`Created`});return}let r=w({expiration_minutes:e[`expiration-minutes`],permissions:e.permissions}),s=await y(`Creating`,async()=>t.send(X,{body:r,account_id:n,domain:e.domain}));_(s,{successLabel:`Created`})})},Ae={command:`credentials`,describe:`Generate image registry credentials`,builder:e=>e.command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`DELETE`,path:e=>n`/accounts/${e.account_id}/containers/registries/${e.domain}`,errors:{403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Me(e){return e.usage(`$0 containers registries delete <domain>
|
|
74
74
|
|
|
75
75
|
Delete a registry from the account, this will prevent Containers from pulling images from the registry.`).positional(`domain`,{type:`string`,description:`The domain to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ne={command:`delete <domain>`,describe:`Delete a registry from the account`,builder:Me,handler:async e=>x({command:`containers registries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await o();v({command:`cf containers registries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/containers/registries/${e.domain==null?`<domain>`:encodeURIComponent(String(e.domain))}`,pathParams:{domain:String(e.domain??``)},bodyKind:`none`});return}let t=await a(e),n=e.local?i:await c();if(e.accountId=n,!await O({force:!!e.force,message:`This operation deletes the registry configuration. Containers will no longer be able to pull images from it.`})){process.stderr.write(`Aborted.
|
|
76
76
|
`);return}let r=await y(`Deleting`,async()=>t.send(je,{account_id:n,domain:e.domain}));_(r,{successLabel:`Deleted`})})};var Pe={method:`GET`,path:e=>n`/accounts/${e.account_id}/containers/registries`,errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function Fe(e){return e.usage(`$0 containers registries list
|
|
77
77
|
|
|
78
|
-
Get the list of configured registries in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`list`,describe:`Get the list of configured registries in the account`,builder:Fe,handler:async e=>x({command:`containers registries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();v({command:`cf containers registries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`none`});return}let t=await a(e),n=e.local?i:await c();e.accountId=n;let r=await y(`Loading`,async()=>t.send(Pe,{account_id:n}));_(r,{successLabel:`Loaded`})})},Z={command:`registries`,describe:`Manage Containers image registries`,builder:e=>e.command(De).command(Ne).command(Ie).command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.positional(`path`,{type:`string`,demandOption:!0,description:`Directory containing the Dockerfile to build`}).option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Name and optional tag for the built image`}).option(`push`,{alias:`p`,type:`boolean`,default:!1,description:`Push the built image to Cloudflare's managed registry`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var Re=b({command:`build <path>`,describe:`Build a Container image`,builder:Le,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers build`.");let n={compliance_region:t.push?await s():`public`},r=t.push?await h():``,i=m(r);u({logger:i.logger,fetchResult:i.fetchResult,fetchPagedListResult:i.fetchPagedListResult}),t.push&&d(await c(),r,e(n)),await ie({PATH:t.path,tag:t.tag,push:t.push,pathToDocker:t[`path-to-docker`]},n)}},{command:`containers build`,classification:{safeFlags:[`push`],shortFlagAliases:{p:{canonical:`push`,type:`boolean`},t:{canonical:`tag`,type:`value`}}}});function ze(e){return e.option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Tag of the local image to push`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var Be=b({command:`push`,describe:`Push a local image to the Cloudflare managed registry`,builder:ze,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers push`.");let n=await h(),r=await c(),i={compliance_region:await s()},a=m(n);u({logger:a.logger,fetchResult:a.fetchResult,fetchPagedListResult:a.fetchPagedListResult}),d(r,n,e(i)),await te({TAG:t.tag,pathToDocker:t[`path-to-docker`]},r,i)}},{command:`containers push`,classification:{safeFlags:[],shortFlagAliases:{t:{canonical:`tag`,type:`value`}}}});function Ve(e){return e.positional(`id`,{type:`string`,demandOption:!0,description:`ID of the container instance`}).positional(`ssh-command`,{type:`string`,array:!0,description:`Command and arguments to run in the container`}).options(re).middleware(e=>{l(e)&&(e.quiet=!0)},!0).parserConfiguration({"populate--":!0,"unknown-options-as-args":!0,"parse-positional-numbers":!1})}const Q={command:`ssh <id> [ssh-command..]`,describe:`SSH into a container`,builder:Ve,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers ssh`.");let n=await h(),r=await c(),i={compliance_region:await s()},a=m(n);u({logger:a.logger,fetchResult:a.fetchResult}),p.HEADERS=g(),d(r,n,e(i)),await ee({...t,id:t.id,command:[...t[`ssh-command`]??[],...Array.isArray(t[`--`])?t[`--`].map(String):[]]})}},$=b(Q,{command:`containers ssh`,recordArgs:!1});var He={...$,handler:async e=>{if(l(e)){let{markCommandReported:t}=await import(`./telemetry-
|
|
78
|
+
Get the list of configured registries in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`list`,describe:`Get the list of configured registries in the account`,builder:Fe,handler:async e=>x({command:`containers registries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await o();v({command:`cf containers registries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/containers/registries`,pathParams:{},bodyKind:`none`});return}let t=await a(e),n=e.local?i:await c();e.accountId=n;let r=await y(`Loading`,async()=>t.send(Pe,{account_id:n}));_(r,{successLabel:`Loaded`})})},Z={command:`registries`,describe:`Manage Containers image registries`,builder:e=>e.command(De).command(Ne).command(Ie).command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.positional(`path`,{type:`string`,demandOption:!0,description:`Directory containing the Dockerfile to build`}).option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Name and optional tag for the built image`}).option(`push`,{alias:`p`,type:`boolean`,default:!1,description:`Push the built image to Cloudflare's managed registry`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var Re=b({command:`build <path>`,describe:`Build a Container image`,builder:Le,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers build`.");let n={compliance_region:t.push?await s():`public`},r=t.push?await h():``,i=m(r);u({logger:i.logger,fetchResult:i.fetchResult,fetchPagedListResult:i.fetchPagedListResult}),t.push&&d(await c(),r,e(n)),await ie({PATH:t.path,tag:t.tag,push:t.push,pathToDocker:t[`path-to-docker`]},n)}},{command:`containers build`,classification:{safeFlags:[`push`],shortFlagAliases:{p:{canonical:`push`,type:`boolean`},t:{canonical:`tag`,type:`value`}}}});function ze(e){return e.option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Tag of the local image to push`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var Be=b({command:`push`,describe:`Push a local image to the Cloudflare managed registry`,builder:ze,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers push`.");let n=await h(),r=await c(),i={compliance_region:await s()},a=m(n);u({logger:a.logger,fetchResult:a.fetchResult,fetchPagedListResult:a.fetchPagedListResult}),d(r,n,e(i)),await te({TAG:t.tag,pathToDocker:t[`path-to-docker`]},r,i)}},{command:`containers push`,classification:{safeFlags:[],shortFlagAliases:{t:{canonical:`tag`,type:`value`}}}});function Ve(e){return e.positional(`id`,{type:`string`,demandOption:!0,description:`ID of the container instance`}).positional(`ssh-command`,{type:`string`,array:!0,description:`Command and arguments to run in the container`}).options(re).middleware(e=>{l(e)&&(e.quiet=!0)},!0).parserConfiguration({"populate--":!0,"unknown-options-as-args":!0,"parse-positional-numbers":!1})}const Q={command:`ssh <id> [ssh-command..]`,describe:`SSH into a container`,builder:Ve,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers ssh`.");let n=await h(),r=await c(),i={compliance_region:await s()},a=m(n);u({logger:a.logger,fetchResult:a.fetchResult}),p.HEADERS=g(),d(r,n,e(i)),await ee({...t,id:t.id,command:[...t[`ssh-command`]??[],...Array.isArray(t[`--`])?t[`--`].map(String):[]]})}},$=b(Q,{command:`containers ssh`,recordArgs:!1});var He={...$,handler:async e=>{if(l(e)){let{markCommandReported:t}=await import(`./telemetry-BHne10Yy.mjs`);return t(),Q.handler(e)}return $.handler(e)}};const Ue={command:`containers`,describe:`Deploy and manage Containers applications on Cloudflare's global network`,builder:e=>e.command(r(Re,`preview`)).command(r(Be,`preview`)).command(r(He,`preview`)).command(ve).command(Te).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ue as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,n as t,t as n}from"./source-mXUcrTVw.mjs";import{a as r}from"./dotenv-usOKkeW7.mjs";import{B as i,C as a,F as o,G as s,I as c,P as l,Q as u,S as d,T as f,U as p,V as m,W as h,Y as g,Z as _,b as v,f as y,it as b,k as x,n as S,o as ee,p as te,r as C,rt as w,u as T,x as ne,y as E}from"./dist-DZRTPMMA.mjs";import{D as re,M as D,N as O,O as ie,S as ae,T as k,_ as oe,a as se,d as ce,g as A,h as le,i as ue,j as de,l as fe,m as pe,n as me,p as he,r as ge,s as _e,t as ve,v as ye,w as be,y as xe}from"./chunk-2HLTAS5V-D7COzUOd.mjs";import{a as Se,c as Ce,i as we,o as j,r as Te,s as Ee,t as De}from"./chunk-DSGVRFIS-C5SqiTOz.mjs";import{C as Oe,D as ke,O as Ae,S as je,T as Me,a as Ne,d as Pe,f as Fe,k as Ie,m as Le,o as Re,r as ze,s as Be,u as Ve,v as He,w as Ue,x as We,y as Ge}from"./interactive-BW9T1D1q.mjs";import{C as Ke,D as qe,_ as Je,a as Ye,c as Xe,g as Ze,i as Qe,m as $e,n as et,o as tt,r as nt,w as rt,x as it,y as at}from"./deploy-context-ClvBD87y.mjs";import{s as ot}from"./build-sBpqm9ga.mjs";import{createRequire as st}from"node:module";import{setTimeout as ct}from"node:timers/promises";import{createReadStream as lt,mkdirSync as ut,readFileSync as dt,writeFileSync as ft}from"node:fs";import*as pt from"node:path";import mt,{extname as ht,isAbsolute as gt,resolve as _t,sep as vt}from"node:path";import yt,{URLSearchParams as bt}from"node:url";import{access as xt,readFile as St,readdir as Ct,stat as wt,writeFile as Tt}from"node:fs/promises";import M from"node:assert";import{isDeepStrictEqual as Et}from"node:util";import{Blob as Dt}from"node:buffer";import{gzipSync as Ot}from"node:zlib";import{createHash as kt}from"node:crypto";import{execSync as At}from"node:child_process";import{getFreshSourceMapSupport as jt,getNodeCompat as Mt}from"miniflare";import Nt from"node:readline";import{hash as Pt}from"blake3-wasm";import{convertToWranglerConfig as Ft}from"@cloudflare/config";st(import.meta.url||(typeof __filename==`string`?__filename:`/`));var N,P,It,Lt,Rt,zt,Bt,F=o();function Vt(e){F=o(e.cliPresentation),N=e.logger,P=e.fetchResult,It=e.fetchListResult,Lt=e.fetchPagedListResult,e.fetchKVGetValue,Rt=e.confirm,zt=e.prompt,Bt=e.select}j(Vt,`initDeployHelpersContext`);var Ht=/* @__PURE__ */ t(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)})),Ut=m(),Wt=/* @__PURE__ */ e(Ht(),1),Gt=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};const Kt=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function qt(e,t){let{milliseconds:n,fallback:r,message:i,customTimers:a={setTimeout,clearTimeout},signal:o}=t,s,c,l=new Promise((t,l)=>{if(typeof n!=`number`||Math.sign(n)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(o?.aborted){l(Kt(o));return}if(o&&(c=()=>{l(Kt(o))},o.addEventListener(`abort`,c,{once:!0})),e.then(t,l),n===1/0)return;let u=new Gt;s=a.setTimeout.call(void 0,()=>{if(r){try{t(r())}catch(e){l(e)}return}typeof e.cancel==`function`&&e.cancel(),i===!1?t():i instanceof Error?l(i):(u.message=i??`Promise timed out after ${n} milliseconds`,l(u))},n)}).finally(()=>{l.clear(),c&&o&&o.removeEventListener(`abort`,c)});return l.clear=()=>{a.clearTimeout.call(void 0,s),s=void 0},l}function Jt(e,t,n){let r=0,i=e.length;for(;i>0;){let a=Math.trunc(i/2),o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}var Yt=class{#e=[];enqueue(e,t){let{priority:n=0,id:r}=t??{},i={priority:n,id:r,run:e};if(this.size===0||this.#e[this.size-1].priority>=n){this.#e.push(i);return}let a=Jt(this.#e,i,(e,t)=>t.priority-e.priority);this.#e.splice(a,0,i)}setPriority(e,t){let n=this.#e.findIndex(t=>t.id===e);if(n===-1)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[r]=this.#e.splice(n,1);this.enqueue(r.run,{priority:t,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this.#e.length}},Xt=class extends Wt.default{#e;#t;#n=0;#r;#i=!1;#a=!1;#o;#s=0;#c=0;#l;#u;#d;#f;#p=0;#m;#h;#g=1n;#_=/* @__PURE__ */ new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:Yt,...e},!(typeof e.intervalCap==`number`&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??``}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??``}\` (${typeof e.interval})`);if(this.#e=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#t=e.intervalCap===1/0||e.interval===0,this.#r=e.intervalCap,this.#o=e.interval,this.#d=new e.queueClass,this.#f=e.queueClass,this.concurrency=e.concurrency,e.timeout!==void 0&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#h=e.autoStart===!1,this.#M()}get#v(){return this.#t||this.#n<this.#r}get#y(){return this.#p<this.#m}#b(){this.#p--,this.#p===0&&this.emit(`pendingZero`),this.#E(),this.emit(`next`)}#x(){this.#O(),this.#D(),this.#u=void 0}get#S(){let e=Date.now();if(this.#l===void 0){let t=this.#s-e;if(t<0){if(this.#c>0){let t=e-this.#c;if(t<this.#o)return this.#C(this.#o-t),!0}this.#n=this.#e?this.#p:0}else return this.#C(t),!0}return!1}#C(e){this.#u===void 0&&(this.#u=setTimeout(()=>{this.#x()},e))}#w(){this.#l&&=(clearInterval(this.#l),void 0)}#T(){this.#u&&=(clearTimeout(this.#u),void 0)}#E(){if(this.#d.size===0)return this.#w(),this.emit(`empty`),this.#p===0&&(this.#T(),this.emit(`idle`)),!1;let e=!1;if(!this.#h){let t=!this.#S;if(this.#v&&this.#y){let n=this.#d.dequeue();this.#t||(this.#n++,this.#N()),this.emit(`active`),this.#c=Date.now(),n(),t&&this.#D(),e=!0}}return e}#D(){this.#t||this.#l!==void 0||(this.#l=setInterval(()=>{this.#O()},this.#o),this.#s=Date.now()+this.#o)}#O(){this.#n===0&&this.#p===0&&this.#l&&this.#w(),this.#n=this.#e?this.#p:0,this.#k(),this.#N()}#k(){for(;this.#E(););}get concurrency(){return this.#m}set concurrency(e){if(!(typeof e==`number`&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#m=e,this.#k()}async#A(e){return new Promise((t,n)=>{e.addEventListener(`abort`,()=>{n(e.reason)},{once:!0})})}setPriority(e,t){if(typeof t!=`number`||!Number.isFinite(t))throw TypeError(`Expected \`priority\` to be a finite number, got \`${t}\` (${typeof t})`);this.#d.setPriority(e,t)}async add(e,t={}){return t.id??=(this.#g++).toString(),t={timeout:this.timeout,...t},new Promise((n,r)=>{let i=Symbol(`task-${t.id}`);this.#d.enqueue(async()=>{this.#p++,this.#_.set(i,{id:t.id,priority:t.priority??0,startTime:Date.now(),timeout:t.timeout});try{try{t.signal?.throwIfAborted()}catch(e){throw this.#t||this.#n--,this.#_.delete(i),e}let r=e({signal:t.signal});t.timeout&&(r=qt(Promise.resolve(r),{milliseconds:t.timeout,message:`Task timed out after ${t.timeout}ms (queue has ${this.#p} running, ${this.#d.size} waiting)`})),t.signal&&(r=Promise.race([r,this.#A(t.signal)]));let a=await r;n(a),this.emit(`completed`,a)}catch(e){r(e),this.emit(`error`,e)}finally{this.#_.delete(i),queueMicrotask(()=>{this.#b()})}},t),this.emit(`add`),this.#E()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this.#h?(this.#h=!1,this.#k(),this):this}pause(){this.#h=!0}clear(){this.#d=new this.#f,this.#P()}async onEmpty(){this.#d.size!==0&&await this.#j(`empty`)}async onSizeLessThan(e){this.#d.size<e||await this.#j(`next`,()=>this.#d.size<e)}async onIdle(){(this.#p!==0||this.#d.size!==0)&&await this.#j(`idle`)}async onPendingZero(){this.#p!==0&&await this.#j(`pendingZero`)}async onRateLimit(){this.isRateLimited||await this.#j(`rateLimit`)}async onRateLimitCleared(){this.isRateLimited&&await this.#j(`rateLimitCleared`)}async onError(){return new Promise((e,t)=>{let n=e=>{this.off(`error`,n),t(e)};this.on(`error`,n)})}async#j(e,t){return new Promise(n=>{let r=()=>{(!t||t())&&(this.off(e,r),n())};this.on(e,r)})}get size(){return this.#d.size}sizeBy(e){return this.#d.filter(e).length}get pending(){return this.#p}get isPaused(){return this.#h}#M(){this.#t||(this.on(`add`,()=>{this.#d.size>0&&this.#N()}),this.on(`next`,()=>{this.#N()}))}#N(){this.#t||this.#a||(this.#a=!0,queueMicrotask(()=>{this.#a=!1,this.#P()}))}#P(){let e=this.#i,t=!this.#t&&this.#n>=this.#r&&this.#d.size>0;t!==e&&(this.#i=t,this.emit(t?`rateLimit`:`rateLimitCleared`))}get isRateLimited(){return this.#i}get isSaturated(){return this.#p===this.#m&&this.#d.size>0||this.isRateLimited&&this.#d.size>0}get runningTasks(){return[...this.#_.values()].map(e=>({...e}))}};const Zt=[`B`,`kB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],Qt=[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`],$t=[`b`,`kbit`,`Mbit`,`Gbit`,`Tbit`,`Pbit`,`Ebit`,`Zbit`,`Ybit`],en=[`b`,`kibit`,`Mibit`,`Gibit`,`Tibit`,`Pibit`,`Eibit`,`Zibit`,`Yibit`],tn=(e,t,n)=>{let r=e;return typeof t==`string`||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function nn(e,t){if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};let n=t.bits?t.binary?en:$t:t.binary?Qt:Zt,r=t.space?` `:``;if(t.signed&&e===0)return` 0${r}${n[0]}`;let i=e<0,a=i?`-`:t.signed?`+`:``;i&&(e=-e);let o;if(t.minimumFractionDigits!==void 0&&(o={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(o={maximumFractionDigits:t.maximumFractionDigits,...o}),e<1)return a+tn(e,t.locale,o)+r+n[0];let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,o||(e=e.toPrecision(3));let c=tn(Number(e),t.locale,o),l=n[s];return a+c+r+l}var rn=r();st(import.meta.url||(typeof __filename==`string`?__filename:`/`));var an=we({"../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js"(e,t){function n(e){return Array.isArray(e)?e:[e]}j(n,`makeArray`);var r=``,i=` `,a=`\\`,o=/^\s+$/,s=/(?:[^\\]|^)\\$/,c=/^\\!/,l=/^\\#/,u=/\r?\n/g,d=/^\.*\/|^\.+$/,f=`/`,p=`node-ignore`;typeof Symbol<`u`&&(p=Symbol.for(`node-ignore`));var m=p,h=/* @__PURE__ */ j((e,t,n)=>Object.defineProperty(e,t,{value:n}),`define`),g=/([0-z])-([0-z])/g,_=/* @__PURE__ */ j(()=>!1,`RETURN_FALSE`),v=/* @__PURE__ */ j(e=>e.replace(g,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:r),`sanitizeRange`),y=/* @__PURE__ */ j(e=>{let{length:t}=e;return e.slice(0,t-t%2)},`cleanRangeBackSlash`),b=[[/^\uFEFF/,()=>r],[/\\?\s+$/,e=>e.indexOf(`\\`)===0?i:r],[/\\\s/g,()=>i],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,/* @__PURE__ */ j(function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`},`startingReplacer`)],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>a],[/\\\\/g,()=>a],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===a?`\\[${n}${y(r)}${i}`:i===`]`&&r.length%2==0?`[${v(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`]],x=/* @__PURE__ */ Object.create(null),S=/* @__PURE__ */ j((e,t)=>{let n=x[e];return n||(n=b.reduce((t,n)=>t.replace(n[0],n[1].bind(e)),e),x[e]=n),t?new RegExp(n,`i`):new RegExp(n)},`makeRegex`),ee=/* @__PURE__ */ j(e=>typeof e==`string`,`isString`),te=/* @__PURE__ */ j(e=>e&&ee(e)&&!o.test(e)&&!s.test(e)&&e.indexOf(`#`)!==0,`checkPattern`),C=/* @__PURE__ */ j(e=>e.split(u),`splitPattern`),w=class{static{j(this,`IgnoreRule`)}constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}},T=/* @__PURE__ */ j((e,t)=>{let n=e,r=!1;e.indexOf(`!`)===0&&(r=!0,e=e.substr(1)),e=e.replace(c,`!`).replace(l,`#`);let i=S(e,t);return new w(n,e,r,i)},`createRule`),ne=/* @__PURE__ */ j((e,t)=>{throw new t(e)},`throwError`),E=/* @__PURE__ */ j((e,t,n)=>ee(e)?e?!E.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),`checkPath`),re=/* @__PURE__ */ j(e=>d.test(e),`isNotRelative`);E.isNotRelative=re,E.convert=e=>e;var D=class{static{j(this,`Ignore`)}constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){h(this,m,!0),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=/* @__PURE__ */ Object.create(null),this._testCache=/* @__PURE__ */ Object.create(null)}_addPattern(e){if(e&&e[m]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(te(e)){let t=T(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(ee(e)?C(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach(i=>{let{negative:a}=i;r===a&&n!==r||a&&!n&&!r&&!t||i.regex.test(e)&&(n=!a,r=a)}),{ignored:n,unignored:r}}_test(e,t,n,r){let i=e&&E.convert(e);return E(i,e,this._allowRelativePaths?_:ne),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(f),r.pop(),!r.length)return t[e]=this._testOne(e,n);let i=this._t(r.join(f)+f,t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},O=/* @__PURE__ */ j(e=>new D(e),`factory`);if(O.isPathValid=/* @__PURE__ */ j(e=>E(e&&E.convert(e),e,_),`isPathValid`),O.default=O,t.exports=O,typeof process<`u`&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform===`win32`)){E.convert=/* @__PURE__ */ j(e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`),`makePosix`);let e=/^[a-z]:\//i;E.isNotRelative=t=>e.test(t)||re(t)}}}),on=we({"../../node_modules/.pnpm/heap@0.2.7/node_modules/heap/lib/heap.js"(e,t){(function(){var n,r,i=Math.floor,a,o,s,c,l,u,d=Math.min,f,p,m,h,g;r=/* @__PURE__ */ j(function(e,t){return e<t?-1:+(e>t)},`defaultCmp`),u=/* @__PURE__ */ j(function(e,t,n,a,o){var s;if(n??=0,o??=r,n<0)throw Error(`lo must be non-negative`);for(a??=e.length;n<a;)s=i((n+a)/2),o(t,e[s])<0?a=s:n=s+1;return[].splice.apply(e,[n,n-n].concat(t)),t},`insort`),s=/* @__PURE__ */ j(function(e,t,n){return n??=r,e.push(t),h(e,0,e.length-1,n)},`heappush`),o=/* @__PURE__ */ j(function(e,t){var n,i;return t??=r,n=e.pop(),e.length?(i=e[0],e[0]=n,g(e,0,t)):i=n,i},`heappop`),l=/* @__PURE__ */ j(function(e,t,n){var i;return n??=r,i=e[0],e[0]=t,g(e,0,n),i},`heapreplace`),c=/* @__PURE__ */ j(function(e,t,n){var i;return n??=r,e.length&&n(e[0],t)<0&&(i=[e[0],t],t=i[0],e[0]=i[1],g(e,0,n)),t},`heappushpop`),a=/* @__PURE__ */ j(function(e,t){var n,a,o,s,c,l;for(t??=r,s=function(){l=[];for(var t=0,n=i(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)l.push(t);return l}.apply(this).reverse(),c=[],a=0,o=s.length;a<o;a++)n=s[a],c.push(g(e,n,t));return c},`heapify`),m=/* @__PURE__ */ j(function(e,t,n){var i;if(n??=r,i=e.indexOf(t),i!==-1)return h(e,0,i,n),g(e,i,n)},`updateItem`),f=/* @__PURE__ */ j(function(e,t,n){var i,o,s,l,u;if(n??=r,o=e.slice(0,t),!o.length)return o;for(a(o,n),u=e.slice(t),s=0,l=u.length;s<l;s++)i=u[s],c(o,i,n);return o.sort(n).reverse()},`nlargest`),p=/* @__PURE__ */ j(function(e,t,n){var i,s,c,l,f,p,m,h,g;if(n??=r,t*10<=e.length){if(c=e.slice(0,t).sort(n),!c.length)return c;for(s=c[c.length-1],m=e.slice(t),l=0,p=m.length;l<p;l++)i=m[l],n(i,s)<0&&(u(c,i,0,null,n),c.pop(),s=c[c.length-1]);return c}for(a(e,n),g=[],f=0,h=d(t,e.length);0<=h?f<h:f>h;0<=h?++f:--f)g.push(o(e,n));return g},`nsmallest`),h=/* @__PURE__ */ j(function(e,t,n,i){var a,o,s;for(i??=r,a=e[n];n>t;){if(s=n-1>>1,o=e[s],i(a,o)<0){e[n]=o,n=s;continue}break}return e[n]=a},`_siftdown`),g=/* @__PURE__ */ j(function(e,t,n){var i,a,o,s,c;for(n??=r,a=e.length,c=t,o=e[t],i=2*t+1;i<a;)s=i+1,s<a&&!(n(e[i],e[s])<0)&&(i=s),e[t]=e[i],t=i,i=2*t+1;return e[t]=o,h(e,c,t,n)},`_siftup`),n=function(){e.push=s,e.pop=o,e.replace=l,e.pushpop=c,e.heapify=a,e.updateItem=m,e.nlargest=f,e.nsmallest=p;function e(e){this.cmp=e??r,this.nodes=[]}return j(e,`Heap`),e.prototype.push=function(e){return s(this.nodes,e,this.cmp)},e.prototype.pop=function(){return o(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return this.nodes.indexOf(e)!==-1},e.prototype.replace=function(e){return l(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return c(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return a(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return m(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return this.nodes.length===0},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t=new e;return t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(function(n,r){return typeof define==`function`&&define.amd?define([],r):typeof e==`object`?t.exports=r():n.Heap=r()})(this,function(){return n})}).call(e)}}),sn=we({"../../node_modules/.pnpm/heap@0.2.7/node_modules/heap/index.js"(e,t){t.exports=on()}}),cn=we({"../../node_modules/.pnpm/@ewoudenberg+difflib@0.1.0/node_modules/@ewoudenberg/difflib/lib/difflib.js"(e){(function(){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S=[].indexOf;({floor:h,max:_,min:v}=Math),n=sn(),p=Ee(`assert`),c=/* @__PURE__ */ j(function(e,t){return t?2*e/t:1},`_calculateRatio`),s=/* @__PURE__ */ j(function(e,t){var n,r,i,a,o;for([i,a]=[e.length,t.length],n=r=0,o=v(i,a);0<=o?r<o:r>o;n=0<=o?++r:--r){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return i-a},`_arrayCmp`),f=/* @__PURE__ */ j(function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},`_has`),o=/* @__PURE__ */ j(function(e){for(var t,n=0,r=e.length;n<r;n++)if(t=e[n],t)return!0;return!1},`_any`),a=class{static{j(this,`SequenceMatcher`)}constructor(e,t=``,n=``,r=!0){this.isjunk=e,this.autojunk=r,this.a=this.b=null,this.setSeqs(t,n)}setSeqs(e,t){return this.setSeq1(e),this.setSeq2(t)}setSeq1(e){if(e!==this.a)return this.a=e,this.matchingBlocks=this.opcodes=null}setSeq2(e){if(e!==this.b)return this.b=e,this.matchingBlocks=this.opcodes=null,this.fullbcount=null,this._chainB()}_chainB(){var e=this.b,t,n,r,i,a,o,s,c,l,u,d;for(this.b2j=t=/* @__PURE__ */ new Map,r=s=0,c=e.length;s<c;r=++s)n=e[r],t.has(n)||t.set(n,[]),i=t.get(n),i.push(r);return o=/* @__PURE__ */ new Map,a=this.isjunk,a&&t.forEach(function(e,n){if(a(n))return o.set(n,!0),t.delete(n)}),d=/* @__PURE__ */ new Map,l=e.length,this.autojunk&&l>=200&&(u=h(l/100)+1,t.forEach(function(e,n){if(e.length>u)return d.set(n,!0),t.delete(n)})),this.isbjunk=function(e){return o.has(e)},this.isbpopular=function(e){return d.has(e)}}findLongestMatch(e,t,n,r){var i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x;for([i,a,o,d]=[this.a,this.b,this.b2j,this.isbjunk],[s,c,l]=[e,n,0],p={},u=g=b=e,x=t;b<=x?g<x:g>x;u=b<=x?++g:--g){for(y={},m=[],o.has(i[u])&&(m=o.get(i[u])),v=0,_=m.length;v<_;v++)if(f=m[v],!(f<n)){if(f>=r)break;h=y[f]=(p[f-1]||0)+1,h>l&&([s,c,l]=[u-h+1,f-h+1,h])}p=y}for(;s>e&&c>n&&!d(a[c-1])&&i[s-1]===a[c-1];)[s,c,l]=[s-1,c-1,l+1];for(;s+l<t&&c+l<r&&!d(a[c+l])&&i[s+l]===a[c+l];)l++;for(;s>e&&c>n&&d(a[c-1])&&i[s-1]===a[c-1];)[s,c,l]=[s-1,c-1,l+1];for(;s+l<t&&c+l<r&&d(a[c+l])&&i[s+l]===a[c+l];)l++;return[s,c,l]}getMatchingBlocks(){var e,t,n,r,i,a,o,c,l,u,d,f,p,m,h,g,_,v,y,b,x;if(this.matchingBlocks)return this.matchingBlocks;for([h,g]=[this.a.length,this.b.length],b=[[0,h,0,g]],v=[];b.length;)[t,e,r,n]=b.pop(),[i,c,d]=x=this.findLongestMatch(t,e,r,n),d&&(v.push(x),t<i&&r<c&&b.push([t,i,r,c]),i+d<e&&c+d<n&&b.push([i+d,e,c+d,n]));for(v.sort(s),a=l=f=0,y=[],m=0,_=v.length;m<_;m++)[o,u,p]=v[m],a+f===o&&l+f===u?f+=p:(f&&y.push([a,l,f]),[a,l,f]=[o,u,p]);return f&&y.push([a,l,f]),y.push([h,g,0]),this.matchingBlocks=y}getOpcodes(){var e,t,n,r,i,a,o,s,c,l;if(this.opcodes)return this.opcodes;for(r=i=0,this.opcodes=t=[],s=this.getMatchingBlocks(),a=0,o=s.length;a<o;a++)[e,n,c]=s[a],l=``,r<e&&i<n?l=`replace`:r<e?l=`delete`:i<n&&(l=`insert`),l&&t.push([l,r,e,i,n]),[r,i]=[e+c,n+c],c&&t.push([`equal`,e,r,n,i]);return t}getGroupedOpcodes(e=3){var t=this.getOpcodes(),n,r,i,a,o,s,c,l,u,d;for(t.length||(t=[[`equal`,0,1,0,1]]),t[0][0]===`equal`&&([d,i,a,o,s]=t[0],t[0]=[d,_(i,a-e),a,_(o,s-e),s]),t[t.length-1][0]===`equal`&&([d,i,a,o,s]=t[t.length-1],t[t.length-1]=[d,i,v(a,i+e),o,v(s,o+e)]),u=e+e,r=[],n=[],c=0,l=t.length;c<l;c++)[d,i,a,o,s]=t[c],d===`equal`&&a-i>u&&(n.push([d,i,v(a,i+e),o,v(s,o+e)]),r.push(n),n=[],[i,o]=[_(i,a-e),_(o,s-e)]),n.push([d,i,a,o,s]);return n.length&&(n.length!==1||n[0][0]!==`equal`)&&r.push(n),r}ratio(){var e,t,n,r=0,i=this.getMatchingBlocks();for(e=0,t=i.length;e<t;e++)n=i[e],r+=n[2];return c(r,this.a.length+this.b.length)}quickRatio(){var e,t,n,r,i,a,o,s,l,u,d;if(!this.fullbcount)for(this.fullbcount=n={},u=this.b,r=0,i=u.length;r<i;r++)t=u[r],n[t]=(n[t]||0)+1;for(n=this.fullbcount,e={},s=0,d=this.a,o=0,a=d.length;o<a;o++)t=d[o],l=f(e,t)?e[t]:n[t]||0,e[t]=l-1,l>0&&s++;return c(s,this.a.length+this.b.length)}realQuickRatio(){var e,t;return[e,t]=[this.a.length,this.b.length],c(v(e,t),e+t)}},g=/* @__PURE__ */ j(function(e,t,r=3,i=.6){var o,c,l,u,d,f,p,m,h;if(!(r>0))throw Error(`n must be > 0: (${r})`);if(!(0<=i&&i<=1))throw Error(`cutoff must be in [0.0, 1.0]: (${i})`);for(d=[],p=new a,p.setSeq2(e),o=0,c=t.length;o<c;o++)h=t[o],p.setSeq1(h),p.realQuickRatio()>=i&&p.quickRatio()>=i&&p.ratio()>=i&&d.push([p.ratio(),h]);for(d=n.nlargest(d,r,s),f=[],u=0,l=d.length;u<l;u++)[m,h]=d[u],f.push(h);return f},`getCloseMatches`),l=/* @__PURE__ */ j(function(e,t){var n,r;for([n,r]=[0,e.length];n<r&&e[n]===t;)n++;return n},`_countLeading`),t=class{static{j(this,`Differ`)}constructor(e,t){this.linejunk=e,this.charjunk=t}compare(e,t){var n,r,i,o,s=new a(this.linejunk,e,t),c,l,u,d,f,p=[],m,h=s.getOpcodes(),g;for(l=0,u=h.length;l<u;l++){switch([g,r,n,o,i]=h[l],g){case`replace`:c=this._fancyReplace(e,r,n,t,o,i);break;case`delete`:c=this._dump(`-`,e,r,n);break;case`insert`:c=this._dump(`+`,t,o,i);break;case`equal`:c=this._dump(` `,e,r,n);break;default:throw Error(`unknow tag (${g})`)}for(m=0,d=c.length;m<d;m++)f=c[m],p.push(f)}return p}_dump(e,t,n,r){var i,a,o,s,c=[];for(i=a=o=n,s=r;o<=s?a<s:a>s;i=o<=s?++a:--a)c.push(`${e} ${t[i]}`);return c}_plainReplace(e,t,n,r,i,a){var o,s,c,l,u,d,f,m,h,g;for(p(t<n&&i<a),a-i<n-t?(o=this._dump(`+`,r,i,a),g=this._dump(`-`,e,t,n)):(o=this._dump(`-`,e,t,n),g=this._dump(`+`,r,i,a)),f=[],h=[o,g],c=0,l=h.length;c<l;c++)for(s=h[c],m=0,u=s.length;m<u;m++)d=s[m],f.push(d);return f}_fancyReplace(e,t,n,r,i,o){var s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,ee,te,C,w,T,ne,E,re,D,O,ie,ae,k,oe,se,ce,A,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,be;for([p,x]=[.74,.75],b=new a(this.charjunk),[S,ee]=[null,null],k=[],C=w=ue=i,de=o;ue<=de?w<de:w>de;C=ue<=de?++w:--w)for(g=r[C],b.setSeq2(g),te=oe=fe=t,pe=n;fe<=pe?oe<pe:oe>pe;te=fe<=pe?++oe:--oe){if(c=e[te],c===g){S===null&&([S,ee]=[te,C]);continue}b.setSeq1(c),b.realQuickRatio()>p&&b.quickRatio()>p&&b.ratio()>p&&([p,m,h]=[b.ratio(),te,C])}if(p<x){if(S===null){for(me=this._plainReplace(e,t,n,r,i,o),se=0,E=me.length;se<E;se++)ae=me[se],k.push(ae);return k}[m,h,p]=[S,ee,1]}else S=null;for(he=this._fancyHelper(e,t,m,r,i,h),ce=0,re=he.length;ce<re;ce++)ae=he[ce],k.push(ae);if([s,f]=[e[m],r[h]],S===null){for(d=y=``,b.setSeqs(s,f),ge=b.getOpcodes(),A=0,D=ge.length;A<D;A++)switch([be,l,u,_,v]=ge[A],[T,ne]=[u-l,v-_],be){case`replace`:d+=Array(T+1).join(`^`),y+=Array(ne+1).join(`^`);break;case`delete`:d+=Array(T+1).join(`-`);break;case`insert`:y+=Array(ne+1).join(`+`);break;case`equal`:d+=Array(T+1).join(` `),y+=Array(ne+1).join(` `);break;default:throw Error(`unknow tag (${be})`)}for(_e=this._qformat(s,f,d,y),le=0,O=_e.length;le<O;le++)ae=_e[le],k.push(ae)}else k.push(` `+s);for(ve=this._fancyHelper(e,m+1,n,r,h+1,o),ye=0,ie=ve.length;ye<ie;ye++)ae=ve[ye],k.push(ae);return k}_fancyHelper(e,t,n,r,i,a){var o=[];return t<n?o=i<a?this._fancyReplace(e,t,n,r,i,a):this._dump(`-`,e,t,n):i<a&&(o=this._dump(`+`,r,i,a)),o}_qformat(e,t,n,r){var i,a=[];return i=v(l(e,` `),l(t,` `)),i=v(i,l(n.slice(0,i),` `)),i=v(i,l(r.slice(0,i),` `)),n=n.slice(i).replace(/\s+$/,``),r=r.slice(i).replace(/\s+$/,``),a.push(`- `+e),n.length&&a.push(`? ${Array(i+1).join(` `)}${n}
|
|
2
|
+
import{i as e,n as t,t as n}from"./source-mXUcrTVw.mjs";import{a as r}from"./dotenv-usOKkeW7.mjs";import{B as i,C as a,F as o,G as s,I as c,P as l,Q as u,S as d,T as f,U as p,V as m,W as h,Y as g,Z as _,b as v,f as y,it as b,k as x,n as S,o as ee,p as te,r as C,rt as w,u as T,x as ne,y as E}from"./dist-DZRTPMMA.mjs";import{D as re,M as D,N as O,O as ie,S as ae,T as k,_ as oe,a as se,d as ce,g as A,h as le,i as ue,j as de,l as fe,m as pe,n as me,p as he,r as ge,s as _e,t as ve,v as ye,w as be,y as xe}from"./chunk-2HLTAS5V-D7COzUOd.mjs";import{a as Se,c as Ce,i as we,o as j,r as Te,s as Ee,t as De}from"./chunk-DSGVRFIS-C5SqiTOz.mjs";import{C as Oe,D as ke,O as Ae,S as je,T as Me,a as Ne,d as Pe,f as Fe,k as Ie,m as Le,o as Re,r as ze,s as Be,u as Ve,v as He,w as Ue,x as We,y as Ge}from"./interactive-BW9T1D1q.mjs";import{C as Ke,D as qe,_ as Je,a as Ye,c as Xe,g as Ze,i as Qe,m as $e,n as et,o as tt,r as nt,w as rt,x as it,y as at}from"./deploy-context-ClNVJYlR.mjs";import{s as ot}from"./build-i8l2qGVZ.mjs";import{createRequire as st}from"node:module";import{setTimeout as ct}from"node:timers/promises";import{createReadStream as lt,mkdirSync as ut,readFileSync as dt,writeFileSync as ft}from"node:fs";import*as pt from"node:path";import mt,{extname as ht,isAbsolute as gt,resolve as _t,sep as vt}from"node:path";import yt,{URLSearchParams as bt}from"node:url";import{access as xt,readFile as St,readdir as Ct,stat as wt,writeFile as Tt}from"node:fs/promises";import M from"node:assert";import{isDeepStrictEqual as Et}from"node:util";import{Blob as Dt}from"node:buffer";import{gzipSync as Ot}from"node:zlib";import{createHash as kt}from"node:crypto";import{execSync as At}from"node:child_process";import{getFreshSourceMapSupport as jt,getNodeCompat as Mt}from"miniflare";import Nt from"node:readline";import{hash as Pt}from"blake3-wasm";import{convertToWranglerConfig as Ft}from"@cloudflare/config";st(import.meta.url||(typeof __filename==`string`?__filename:`/`));var N,P,It,Lt,Rt,zt,Bt,F=o();function Vt(e){F=o(e.cliPresentation),N=e.logger,P=e.fetchResult,It=e.fetchListResult,Lt=e.fetchPagedListResult,e.fetchKVGetValue,Rt=e.confirm,zt=e.prompt,Bt=e.select}j(Vt,`initDeployHelpersContext`);var Ht=/* @__PURE__ */ t(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)})),Ut=m(),Wt=/* @__PURE__ */ e(Ht(),1),Gt=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};const Kt=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function qt(e,t){let{milliseconds:n,fallback:r,message:i,customTimers:a={setTimeout,clearTimeout},signal:o}=t,s,c,l=new Promise((t,l)=>{if(typeof n!=`number`||Math.sign(n)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(o?.aborted){l(Kt(o));return}if(o&&(c=()=>{l(Kt(o))},o.addEventListener(`abort`,c,{once:!0})),e.then(t,l),n===1/0)return;let u=new Gt;s=a.setTimeout.call(void 0,()=>{if(r){try{t(r())}catch(e){l(e)}return}typeof e.cancel==`function`&&e.cancel(),i===!1?t():i instanceof Error?l(i):(u.message=i??`Promise timed out after ${n} milliseconds`,l(u))},n)}).finally(()=>{l.clear(),c&&o&&o.removeEventListener(`abort`,c)});return l.clear=()=>{a.clearTimeout.call(void 0,s),s=void 0},l}function Jt(e,t,n){let r=0,i=e.length;for(;i>0;){let a=Math.trunc(i/2),o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}var Yt=class{#e=[];enqueue(e,t){let{priority:n=0,id:r}=t??{},i={priority:n,id:r,run:e};if(this.size===0||this.#e[this.size-1].priority>=n){this.#e.push(i);return}let a=Jt(this.#e,i,(e,t)=>t.priority-e.priority);this.#e.splice(a,0,i)}setPriority(e,t){let n=this.#e.findIndex(t=>t.id===e);if(n===-1)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[r]=this.#e.splice(n,1);this.enqueue(r.run,{priority:t,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this.#e.length}},Xt=class extends Wt.default{#e;#t;#n=0;#r;#i=!1;#a=!1;#o;#s=0;#c=0;#l;#u;#d;#f;#p=0;#m;#h;#g=1n;#_=/* @__PURE__ */ new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:Yt,...e},!(typeof e.intervalCap==`number`&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??``}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??``}\` (${typeof e.interval})`);if(this.#e=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#t=e.intervalCap===1/0||e.interval===0,this.#r=e.intervalCap,this.#o=e.interval,this.#d=new e.queueClass,this.#f=e.queueClass,this.concurrency=e.concurrency,e.timeout!==void 0&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#h=e.autoStart===!1,this.#M()}get#v(){return this.#t||this.#n<this.#r}get#y(){return this.#p<this.#m}#b(){this.#p--,this.#p===0&&this.emit(`pendingZero`),this.#E(),this.emit(`next`)}#x(){this.#O(),this.#D(),this.#u=void 0}get#S(){let e=Date.now();if(this.#l===void 0){let t=this.#s-e;if(t<0){if(this.#c>0){let t=e-this.#c;if(t<this.#o)return this.#C(this.#o-t),!0}this.#n=this.#e?this.#p:0}else return this.#C(t),!0}return!1}#C(e){this.#u===void 0&&(this.#u=setTimeout(()=>{this.#x()},e))}#w(){this.#l&&=(clearInterval(this.#l),void 0)}#T(){this.#u&&=(clearTimeout(this.#u),void 0)}#E(){if(this.#d.size===0)return this.#w(),this.emit(`empty`),this.#p===0&&(this.#T(),this.emit(`idle`)),!1;let e=!1;if(!this.#h){let t=!this.#S;if(this.#v&&this.#y){let n=this.#d.dequeue();this.#t||(this.#n++,this.#N()),this.emit(`active`),this.#c=Date.now(),n(),t&&this.#D(),e=!0}}return e}#D(){this.#t||this.#l!==void 0||(this.#l=setInterval(()=>{this.#O()},this.#o),this.#s=Date.now()+this.#o)}#O(){this.#n===0&&this.#p===0&&this.#l&&this.#w(),this.#n=this.#e?this.#p:0,this.#k(),this.#N()}#k(){for(;this.#E(););}get concurrency(){return this.#m}set concurrency(e){if(!(typeof e==`number`&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#m=e,this.#k()}async#A(e){return new Promise((t,n)=>{e.addEventListener(`abort`,()=>{n(e.reason)},{once:!0})})}setPriority(e,t){if(typeof t!=`number`||!Number.isFinite(t))throw TypeError(`Expected \`priority\` to be a finite number, got \`${t}\` (${typeof t})`);this.#d.setPriority(e,t)}async add(e,t={}){return t.id??=(this.#g++).toString(),t={timeout:this.timeout,...t},new Promise((n,r)=>{let i=Symbol(`task-${t.id}`);this.#d.enqueue(async()=>{this.#p++,this.#_.set(i,{id:t.id,priority:t.priority??0,startTime:Date.now(),timeout:t.timeout});try{try{t.signal?.throwIfAborted()}catch(e){throw this.#t||this.#n--,this.#_.delete(i),e}let r=e({signal:t.signal});t.timeout&&(r=qt(Promise.resolve(r),{milliseconds:t.timeout,message:`Task timed out after ${t.timeout}ms (queue has ${this.#p} running, ${this.#d.size} waiting)`})),t.signal&&(r=Promise.race([r,this.#A(t.signal)]));let a=await r;n(a),this.emit(`completed`,a)}catch(e){r(e),this.emit(`error`,e)}finally{this.#_.delete(i),queueMicrotask(()=>{this.#b()})}},t),this.emit(`add`),this.#E()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this.#h?(this.#h=!1,this.#k(),this):this}pause(){this.#h=!0}clear(){this.#d=new this.#f,this.#P()}async onEmpty(){this.#d.size!==0&&await this.#j(`empty`)}async onSizeLessThan(e){this.#d.size<e||await this.#j(`next`,()=>this.#d.size<e)}async onIdle(){(this.#p!==0||this.#d.size!==0)&&await this.#j(`idle`)}async onPendingZero(){this.#p!==0&&await this.#j(`pendingZero`)}async onRateLimit(){this.isRateLimited||await this.#j(`rateLimit`)}async onRateLimitCleared(){this.isRateLimited&&await this.#j(`rateLimitCleared`)}async onError(){return new Promise((e,t)=>{let n=e=>{this.off(`error`,n),t(e)};this.on(`error`,n)})}async#j(e,t){return new Promise(n=>{let r=()=>{(!t||t())&&(this.off(e,r),n())};this.on(e,r)})}get size(){return this.#d.size}sizeBy(e){return this.#d.filter(e).length}get pending(){return this.#p}get isPaused(){return this.#h}#M(){this.#t||(this.on(`add`,()=>{this.#d.size>0&&this.#N()}),this.on(`next`,()=>{this.#N()}))}#N(){this.#t||this.#a||(this.#a=!0,queueMicrotask(()=>{this.#a=!1,this.#P()}))}#P(){let e=this.#i,t=!this.#t&&this.#n>=this.#r&&this.#d.size>0;t!==e&&(this.#i=t,this.emit(t?`rateLimit`:`rateLimitCleared`))}get isRateLimited(){return this.#i}get isSaturated(){return this.#p===this.#m&&this.#d.size>0||this.isRateLimited&&this.#d.size>0}get runningTasks(){return[...this.#_.values()].map(e=>({...e}))}};const Zt=[`B`,`kB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],Qt=[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`],$t=[`b`,`kbit`,`Mbit`,`Gbit`,`Tbit`,`Pbit`,`Ebit`,`Zbit`,`Ybit`],en=[`b`,`kibit`,`Mibit`,`Gibit`,`Tibit`,`Pibit`,`Eibit`,`Zibit`,`Yibit`],tn=(e,t,n)=>{let r=e;return typeof t==`string`||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function nn(e,t){if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};let n=t.bits?t.binary?en:$t:t.binary?Qt:Zt,r=t.space?` `:``;if(t.signed&&e===0)return` 0${r}${n[0]}`;let i=e<0,a=i?`-`:t.signed?`+`:``;i&&(e=-e);let o;if(t.minimumFractionDigits!==void 0&&(o={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(o={maximumFractionDigits:t.maximumFractionDigits,...o}),e<1)return a+tn(e,t.locale,o)+r+n[0];let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,o||(e=e.toPrecision(3));let c=tn(Number(e),t.locale,o),l=n[s];return a+c+r+l}var rn=r();st(import.meta.url||(typeof __filename==`string`?__filename:`/`));var an=we({"../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js"(e,t){function n(e){return Array.isArray(e)?e:[e]}j(n,`makeArray`);var r=``,i=` `,a=`\\`,o=/^\s+$/,s=/(?:[^\\]|^)\\$/,c=/^\\!/,l=/^\\#/,u=/\r?\n/g,d=/^\.*\/|^\.+$/,f=`/`,p=`node-ignore`;typeof Symbol<`u`&&(p=Symbol.for(`node-ignore`));var m=p,h=/* @__PURE__ */ j((e,t,n)=>Object.defineProperty(e,t,{value:n}),`define`),g=/([0-z])-([0-z])/g,_=/* @__PURE__ */ j(()=>!1,`RETURN_FALSE`),v=/* @__PURE__ */ j(e=>e.replace(g,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:r),`sanitizeRange`),y=/* @__PURE__ */ j(e=>{let{length:t}=e;return e.slice(0,t-t%2)},`cleanRangeBackSlash`),b=[[/^\uFEFF/,()=>r],[/\\?\s+$/,e=>e.indexOf(`\\`)===0?i:r],[/\\\s/g,()=>i],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,/* @__PURE__ */ j(function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`},`startingReplacer`)],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>a],[/\\\\/g,()=>a],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===a?`\\[${n}${y(r)}${i}`:i===`]`&&r.length%2==0?`[${v(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`]],x=/* @__PURE__ */ Object.create(null),S=/* @__PURE__ */ j((e,t)=>{let n=x[e];return n||(n=b.reduce((t,n)=>t.replace(n[0],n[1].bind(e)),e),x[e]=n),t?new RegExp(n,`i`):new RegExp(n)},`makeRegex`),ee=/* @__PURE__ */ j(e=>typeof e==`string`,`isString`),te=/* @__PURE__ */ j(e=>e&&ee(e)&&!o.test(e)&&!s.test(e)&&e.indexOf(`#`)!==0,`checkPattern`),C=/* @__PURE__ */ j(e=>e.split(u),`splitPattern`),w=class{static{j(this,`IgnoreRule`)}constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}},T=/* @__PURE__ */ j((e,t)=>{let n=e,r=!1;e.indexOf(`!`)===0&&(r=!0,e=e.substr(1)),e=e.replace(c,`!`).replace(l,`#`);let i=S(e,t);return new w(n,e,r,i)},`createRule`),ne=/* @__PURE__ */ j((e,t)=>{throw new t(e)},`throwError`),E=/* @__PURE__ */ j((e,t,n)=>ee(e)?e?!E.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),`checkPath`),re=/* @__PURE__ */ j(e=>d.test(e),`isNotRelative`);E.isNotRelative=re,E.convert=e=>e;var D=class{static{j(this,`Ignore`)}constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){h(this,m,!0),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=/* @__PURE__ */ Object.create(null),this._testCache=/* @__PURE__ */ Object.create(null)}_addPattern(e){if(e&&e[m]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(te(e)){let t=T(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(ee(e)?C(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach(i=>{let{negative:a}=i;r===a&&n!==r||a&&!n&&!r&&!t||i.regex.test(e)&&(n=!a,r=a)}),{ignored:n,unignored:r}}_test(e,t,n,r){let i=e&&E.convert(e);return E(i,e,this._allowRelativePaths?_:ne),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(f),r.pop(),!r.length)return t[e]=this._testOne(e,n);let i=this._t(r.join(f)+f,t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},O=/* @__PURE__ */ j(e=>new D(e),`factory`);if(O.isPathValid=/* @__PURE__ */ j(e=>E(e&&E.convert(e),e,_),`isPathValid`),O.default=O,t.exports=O,typeof process<`u`&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform===`win32`)){E.convert=/* @__PURE__ */ j(e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`),`makePosix`);let e=/^[a-z]:\//i;E.isNotRelative=t=>e.test(t)||re(t)}}}),on=we({"../../node_modules/.pnpm/heap@0.2.7/node_modules/heap/lib/heap.js"(e,t){(function(){var n,r,i=Math.floor,a,o,s,c,l,u,d=Math.min,f,p,m,h,g;r=/* @__PURE__ */ j(function(e,t){return e<t?-1:+(e>t)},`defaultCmp`),u=/* @__PURE__ */ j(function(e,t,n,a,o){var s;if(n??=0,o??=r,n<0)throw Error(`lo must be non-negative`);for(a??=e.length;n<a;)s=i((n+a)/2),o(t,e[s])<0?a=s:n=s+1;return[].splice.apply(e,[n,n-n].concat(t)),t},`insort`),s=/* @__PURE__ */ j(function(e,t,n){return n??=r,e.push(t),h(e,0,e.length-1,n)},`heappush`),o=/* @__PURE__ */ j(function(e,t){var n,i;return t??=r,n=e.pop(),e.length?(i=e[0],e[0]=n,g(e,0,t)):i=n,i},`heappop`),l=/* @__PURE__ */ j(function(e,t,n){var i;return n??=r,i=e[0],e[0]=t,g(e,0,n),i},`heapreplace`),c=/* @__PURE__ */ j(function(e,t,n){var i;return n??=r,e.length&&n(e[0],t)<0&&(i=[e[0],t],t=i[0],e[0]=i[1],g(e,0,n)),t},`heappushpop`),a=/* @__PURE__ */ j(function(e,t){var n,a,o,s,c,l;for(t??=r,s=function(){l=[];for(var t=0,n=i(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)l.push(t);return l}.apply(this).reverse(),c=[],a=0,o=s.length;a<o;a++)n=s[a],c.push(g(e,n,t));return c},`heapify`),m=/* @__PURE__ */ j(function(e,t,n){var i;if(n??=r,i=e.indexOf(t),i!==-1)return h(e,0,i,n),g(e,i,n)},`updateItem`),f=/* @__PURE__ */ j(function(e,t,n){var i,o,s,l,u;if(n??=r,o=e.slice(0,t),!o.length)return o;for(a(o,n),u=e.slice(t),s=0,l=u.length;s<l;s++)i=u[s],c(o,i,n);return o.sort(n).reverse()},`nlargest`),p=/* @__PURE__ */ j(function(e,t,n){var i,s,c,l,f,p,m,h,g;if(n??=r,t*10<=e.length){if(c=e.slice(0,t).sort(n),!c.length)return c;for(s=c[c.length-1],m=e.slice(t),l=0,p=m.length;l<p;l++)i=m[l],n(i,s)<0&&(u(c,i,0,null,n),c.pop(),s=c[c.length-1]);return c}for(a(e,n),g=[],f=0,h=d(t,e.length);0<=h?f<h:f>h;0<=h?++f:--f)g.push(o(e,n));return g},`nsmallest`),h=/* @__PURE__ */ j(function(e,t,n,i){var a,o,s;for(i??=r,a=e[n];n>t;){if(s=n-1>>1,o=e[s],i(a,o)<0){e[n]=o,n=s;continue}break}return e[n]=a},`_siftdown`),g=/* @__PURE__ */ j(function(e,t,n){var i,a,o,s,c;for(n??=r,a=e.length,c=t,o=e[t],i=2*t+1;i<a;)s=i+1,s<a&&!(n(e[i],e[s])<0)&&(i=s),e[t]=e[i],t=i,i=2*t+1;return e[t]=o,h(e,c,t,n)},`_siftup`),n=function(){e.push=s,e.pop=o,e.replace=l,e.pushpop=c,e.heapify=a,e.updateItem=m,e.nlargest=f,e.nsmallest=p;function e(e){this.cmp=e??r,this.nodes=[]}return j(e,`Heap`),e.prototype.push=function(e){return s(this.nodes,e,this.cmp)},e.prototype.pop=function(){return o(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return this.nodes.indexOf(e)!==-1},e.prototype.replace=function(e){return l(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return c(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return a(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return m(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return this.nodes.length===0},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t=new e;return t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(function(n,r){return typeof define==`function`&&define.amd?define([],r):typeof e==`object`?t.exports=r():n.Heap=r()})(this,function(){return n})}).call(e)}}),sn=we({"../../node_modules/.pnpm/heap@0.2.7/node_modules/heap/index.js"(e,t){t.exports=on()}}),cn=we({"../../node_modules/.pnpm/@ewoudenberg+difflib@0.1.0/node_modules/@ewoudenberg/difflib/lib/difflib.js"(e){(function(){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S=[].indexOf;({floor:h,max:_,min:v}=Math),n=sn(),p=Ee(`assert`),c=/* @__PURE__ */ j(function(e,t){return t?2*e/t:1},`_calculateRatio`),s=/* @__PURE__ */ j(function(e,t){var n,r,i,a,o;for([i,a]=[e.length,t.length],n=r=0,o=v(i,a);0<=o?r<o:r>o;n=0<=o?++r:--r){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return i-a},`_arrayCmp`),f=/* @__PURE__ */ j(function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},`_has`),o=/* @__PURE__ */ j(function(e){for(var t,n=0,r=e.length;n<r;n++)if(t=e[n],t)return!0;return!1},`_any`),a=class{static{j(this,`SequenceMatcher`)}constructor(e,t=``,n=``,r=!0){this.isjunk=e,this.autojunk=r,this.a=this.b=null,this.setSeqs(t,n)}setSeqs(e,t){return this.setSeq1(e),this.setSeq2(t)}setSeq1(e){if(e!==this.a)return this.a=e,this.matchingBlocks=this.opcodes=null}setSeq2(e){if(e!==this.b)return this.b=e,this.matchingBlocks=this.opcodes=null,this.fullbcount=null,this._chainB()}_chainB(){var e=this.b,t,n,r,i,a,o,s,c,l,u,d;for(this.b2j=t=/* @__PURE__ */ new Map,r=s=0,c=e.length;s<c;r=++s)n=e[r],t.has(n)||t.set(n,[]),i=t.get(n),i.push(r);return o=/* @__PURE__ */ new Map,a=this.isjunk,a&&t.forEach(function(e,n){if(a(n))return o.set(n,!0),t.delete(n)}),d=/* @__PURE__ */ new Map,l=e.length,this.autojunk&&l>=200&&(u=h(l/100)+1,t.forEach(function(e,n){if(e.length>u)return d.set(n,!0),t.delete(n)})),this.isbjunk=function(e){return o.has(e)},this.isbpopular=function(e){return d.has(e)}}findLongestMatch(e,t,n,r){var i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x;for([i,a,o,d]=[this.a,this.b,this.b2j,this.isbjunk],[s,c,l]=[e,n,0],p={},u=g=b=e,x=t;b<=x?g<x:g>x;u=b<=x?++g:--g){for(y={},m=[],o.has(i[u])&&(m=o.get(i[u])),v=0,_=m.length;v<_;v++)if(f=m[v],!(f<n)){if(f>=r)break;h=y[f]=(p[f-1]||0)+1,h>l&&([s,c,l]=[u-h+1,f-h+1,h])}p=y}for(;s>e&&c>n&&!d(a[c-1])&&i[s-1]===a[c-1];)[s,c,l]=[s-1,c-1,l+1];for(;s+l<t&&c+l<r&&!d(a[c+l])&&i[s+l]===a[c+l];)l++;for(;s>e&&c>n&&d(a[c-1])&&i[s-1]===a[c-1];)[s,c,l]=[s-1,c-1,l+1];for(;s+l<t&&c+l<r&&d(a[c+l])&&i[s+l]===a[c+l];)l++;return[s,c,l]}getMatchingBlocks(){var e,t,n,r,i,a,o,c,l,u,d,f,p,m,h,g,_,v,y,b,x;if(this.matchingBlocks)return this.matchingBlocks;for([h,g]=[this.a.length,this.b.length],b=[[0,h,0,g]],v=[];b.length;)[t,e,r,n]=b.pop(),[i,c,d]=x=this.findLongestMatch(t,e,r,n),d&&(v.push(x),t<i&&r<c&&b.push([t,i,r,c]),i+d<e&&c+d<n&&b.push([i+d,e,c+d,n]));for(v.sort(s),a=l=f=0,y=[],m=0,_=v.length;m<_;m++)[o,u,p]=v[m],a+f===o&&l+f===u?f+=p:(f&&y.push([a,l,f]),[a,l,f]=[o,u,p]);return f&&y.push([a,l,f]),y.push([h,g,0]),this.matchingBlocks=y}getOpcodes(){var e,t,n,r,i,a,o,s,c,l;if(this.opcodes)return this.opcodes;for(r=i=0,this.opcodes=t=[],s=this.getMatchingBlocks(),a=0,o=s.length;a<o;a++)[e,n,c]=s[a],l=``,r<e&&i<n?l=`replace`:r<e?l=`delete`:i<n&&(l=`insert`),l&&t.push([l,r,e,i,n]),[r,i]=[e+c,n+c],c&&t.push([`equal`,e,r,n,i]);return t}getGroupedOpcodes(e=3){var t=this.getOpcodes(),n,r,i,a,o,s,c,l,u,d;for(t.length||(t=[[`equal`,0,1,0,1]]),t[0][0]===`equal`&&([d,i,a,o,s]=t[0],t[0]=[d,_(i,a-e),a,_(o,s-e),s]),t[t.length-1][0]===`equal`&&([d,i,a,o,s]=t[t.length-1],t[t.length-1]=[d,i,v(a,i+e),o,v(s,o+e)]),u=e+e,r=[],n=[],c=0,l=t.length;c<l;c++)[d,i,a,o,s]=t[c],d===`equal`&&a-i>u&&(n.push([d,i,v(a,i+e),o,v(s,o+e)]),r.push(n),n=[],[i,o]=[_(i,a-e),_(o,s-e)]),n.push([d,i,a,o,s]);return n.length&&(n.length!==1||n[0][0]!==`equal`)&&r.push(n),r}ratio(){var e,t,n,r=0,i=this.getMatchingBlocks();for(e=0,t=i.length;e<t;e++)n=i[e],r+=n[2];return c(r,this.a.length+this.b.length)}quickRatio(){var e,t,n,r,i,a,o,s,l,u,d;if(!this.fullbcount)for(this.fullbcount=n={},u=this.b,r=0,i=u.length;r<i;r++)t=u[r],n[t]=(n[t]||0)+1;for(n=this.fullbcount,e={},s=0,d=this.a,o=0,a=d.length;o<a;o++)t=d[o],l=f(e,t)?e[t]:n[t]||0,e[t]=l-1,l>0&&s++;return c(s,this.a.length+this.b.length)}realQuickRatio(){var e,t;return[e,t]=[this.a.length,this.b.length],c(v(e,t),e+t)}},g=/* @__PURE__ */ j(function(e,t,r=3,i=.6){var o,c,l,u,d,f,p,m,h;if(!(r>0))throw Error(`n must be > 0: (${r})`);if(!(0<=i&&i<=1))throw Error(`cutoff must be in [0.0, 1.0]: (${i})`);for(d=[],p=new a,p.setSeq2(e),o=0,c=t.length;o<c;o++)h=t[o],p.setSeq1(h),p.realQuickRatio()>=i&&p.quickRatio()>=i&&p.ratio()>=i&&d.push([p.ratio(),h]);for(d=n.nlargest(d,r,s),f=[],u=0,l=d.length;u<l;u++)[m,h]=d[u],f.push(h);return f},`getCloseMatches`),l=/* @__PURE__ */ j(function(e,t){var n,r;for([n,r]=[0,e.length];n<r&&e[n]===t;)n++;return n},`_countLeading`),t=class{static{j(this,`Differ`)}constructor(e,t){this.linejunk=e,this.charjunk=t}compare(e,t){var n,r,i,o,s=new a(this.linejunk,e,t),c,l,u,d,f,p=[],m,h=s.getOpcodes(),g;for(l=0,u=h.length;l<u;l++){switch([g,r,n,o,i]=h[l],g){case`replace`:c=this._fancyReplace(e,r,n,t,o,i);break;case`delete`:c=this._dump(`-`,e,r,n);break;case`insert`:c=this._dump(`+`,t,o,i);break;case`equal`:c=this._dump(` `,e,r,n);break;default:throw Error(`unknow tag (${g})`)}for(m=0,d=c.length;m<d;m++)f=c[m],p.push(f)}return p}_dump(e,t,n,r){var i,a,o,s,c=[];for(i=a=o=n,s=r;o<=s?a<s:a>s;i=o<=s?++a:--a)c.push(`${e} ${t[i]}`);return c}_plainReplace(e,t,n,r,i,a){var o,s,c,l,u,d,f,m,h,g;for(p(t<n&&i<a),a-i<n-t?(o=this._dump(`+`,r,i,a),g=this._dump(`-`,e,t,n)):(o=this._dump(`-`,e,t,n),g=this._dump(`+`,r,i,a)),f=[],h=[o,g],c=0,l=h.length;c<l;c++)for(s=h[c],m=0,u=s.length;m<u;m++)d=s[m],f.push(d);return f}_fancyReplace(e,t,n,r,i,o){var s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,ee,te,C,w,T,ne,E,re,D,O,ie,ae,k,oe,se,ce,A,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,be;for([p,x]=[.74,.75],b=new a(this.charjunk),[S,ee]=[null,null],k=[],C=w=ue=i,de=o;ue<=de?w<de:w>de;C=ue<=de?++w:--w)for(g=r[C],b.setSeq2(g),te=oe=fe=t,pe=n;fe<=pe?oe<pe:oe>pe;te=fe<=pe?++oe:--oe){if(c=e[te],c===g){S===null&&([S,ee]=[te,C]);continue}b.setSeq1(c),b.realQuickRatio()>p&&b.quickRatio()>p&&b.ratio()>p&&([p,m,h]=[b.ratio(),te,C])}if(p<x){if(S===null){for(me=this._plainReplace(e,t,n,r,i,o),se=0,E=me.length;se<E;se++)ae=me[se],k.push(ae);return k}[m,h,p]=[S,ee,1]}else S=null;for(he=this._fancyHelper(e,t,m,r,i,h),ce=0,re=he.length;ce<re;ce++)ae=he[ce],k.push(ae);if([s,f]=[e[m],r[h]],S===null){for(d=y=``,b.setSeqs(s,f),ge=b.getOpcodes(),A=0,D=ge.length;A<D;A++)switch([be,l,u,_,v]=ge[A],[T,ne]=[u-l,v-_],be){case`replace`:d+=Array(T+1).join(`^`),y+=Array(ne+1).join(`^`);break;case`delete`:d+=Array(T+1).join(`-`);break;case`insert`:y+=Array(ne+1).join(`+`);break;case`equal`:d+=Array(T+1).join(` `),y+=Array(ne+1).join(` `);break;default:throw Error(`unknow tag (${be})`)}for(_e=this._qformat(s,f,d,y),le=0,O=_e.length;le<O;le++)ae=_e[le],k.push(ae)}else k.push(` `+s);for(ve=this._fancyHelper(e,m+1,n,r,h+1,o),ye=0,ie=ve.length;ye<ie;ye++)ae=ve[ye],k.push(ae);return k}_fancyHelper(e,t,n,r,i,a){var o=[];return t<n?o=i<a?this._fancyReplace(e,t,n,r,i,a):this._dump(`-`,e,t,n):i<a&&(o=this._dump(`+`,r,i,a)),o}_qformat(e,t,n,r){var i,a=[];return i=v(l(e,` `),l(t,` `)),i=v(i,l(n.slice(0,i),` `)),i=v(i,l(r.slice(0,i),` `)),n=n.slice(i).replace(/\s+$/,``),r=r.slice(i).replace(/\s+$/,``),a.push(`- `+e),n.length&&a.push(`? ${Array(i+1).join(` `)}${n}
|
|
3
3
|
`),a.push(`+ `+t),r.length&&a.push(`? ${Array(i+1).join(` `)}${r}
|
|
4
4
|
`),a}},i=/* @__PURE__ */ j(function(e,t=/^\s*#?\s*$/){return t.test(e)},`IS_LINE_JUNK`),r=/* @__PURE__ */ j(function(e,t=` `){return S.call(t,e)>=0},`IS_CHARACTER_JUNK`),d=/* @__PURE__ */ j(function(e,t){var n=e+1,r=t-e;return r===1?`${n}`:(r||n--,`${n},${r}`)},`_formatRangeUnified`),x=/* @__PURE__ */ j(function(e,t,{fromfile:n,tofile:r,fromfiledate:i,tofiledate:o,n:s,lineterm:c}={}){var l,u,f,p,m,h,g,_,v,y,b,x,S,ee,te,C,w,T,ne,E,re,D,O,ie,ae,k,oe,se,ce;for(n??=``,r??=``,i??=``,o??=``,s??=3,c??=`
|
|
5
5
|
`,T=[],oe=!1,O=new a(null,e,t).getGroupedOpcodes(),y=0,x=O.length;y<x;y++)for(m=O[y],oe||(oe=!0,p=i?` ${i}`:``,ce=o?` ${o}`:``,T.push(`--- ${n}${p}${c}`),T.push(`+++ ${r}${ce}${c}`)),[f,b]=[m[0],m[m.length-1]],l=d(f[1],b[2]),u=d(f[3],b[4]),T.push(`@@ -${l} +${u} @@${c}`),ne=0,S=m.length;ne<S;ne++){if([se,h,g,_,v]=m[ne],se===`equal`){for(ie=e.slice(h,g),E=0,ee=ie.length;E<ee;E++)w=ie[E],T.push(` `+w);continue}if(se===`replace`||se===`delete`)for(ae=e.slice(h,g),re=0,te=ae.length;re<te;re++)w=ae[re],T.push(`-`+w);if(se===`replace`||se===`insert`)for(k=t.slice(_,v),D=0,C=k.length;D<C;D++)w=k[D],T.push(`+`+w)}return T},`unifiedDiff`),u=/* @__PURE__ */ j(function(e,t){var n=e+1,r=t-e;return r||n--,r<=1?`${n}`:`${n},${n+r-1}`},`_formatRangeContext`),m=/* @__PURE__ */ j(function(e,t,{fromfile:n,tofile:r,fromfiledate:i,tofiledate:s,n:c,lineterm:l}={}){var d,f,p,m,h,g,_,v,y,b,x,S,ee,te,C,w,T,ne,E,re,D,O,ie,ae,k,oe,se,ce,A,le;for(n??=``,r??=``,i??=``,s??=``,c??=3,l??=`
|
|
@@ -347,7 +347,7 @@ ${Object.entries(a).map(([e,t])=>` ${n.cyan(e)} ${n.dim(v(t.type))}`).join(`
|
|
|
347
347
|
Parts of your Worker that depend on these bindings may not work correctly in the Preview. If this is not intentional, add Preview-safe values to the ${n.cyan(`previews`)} field.
|
|
348
348
|
|
|
349
349
|
Configuration: https://developers.cloudflare.com/workers/previews/configuration/
|
|
350
|
-
Resources: https://developers.cloudflare.com/workers/previews/resources/`)}j(hO,`logMissingPreviewsBindingsWarning`);async function gO(e,t,n,r){if(!(r||await Rt(`Worker "${n}" does not exist yet. Would you like to create it for this Preview?`,{defaultValue:!0,fallbackValue:!0})))throw new O(`Cannot create a Preview because the Worker "${n}" does not exist.`,{telemetryMessage:`preview command parent worker not created`});r||N.log(`\u{1F300} Creating new Worker "${n}"...`);let i=e.routes??(e.route?[e.route]:[]),{workers_dev:a,preview_urls:o}=Mr(e.workers_dev,e.preview_urls,i);await pD(e,t,n,a,o??a)}j(gO,`provisionParentWorker`);async function _O(e,t,n,r,i,a,o,s=!1,c=/* @__PURE__ */ new Map){let l;t.secretsFile&&(l=(await Ua(t.secretsFile))?.content);let u=t.name;if(!u&&(u=ED(),!u))throw new O(`Could not determine Preview name. No git branch detected. Please provide a Preview name using --name <preview-name>.`,{telemetryMessage:`preview command missing preview name`});let d=u,f=t.ignoreBaseConfig,p=!t.tag&&DD()?OD():void 0,m=!t.message&&DD()?kD():void 0,h=MD(),g=RD(),_=AD(),v=null;try{v=await mD(n,e,o,d)}catch(r){if(Dn(r))await gO(n,e,o,t.json??!1);else if(!(r instanceof Error&&`code`in r&&r.code===10025))throw r}let y=!v,b=qD(n),x;y?(x=await hD(n,e,o,{name:u,...b},{ignoreBaseConfig:f}),s&&b.tail_consumers!==void 0&&(x=await gD(n,e,o,d,{tail_consumers:b.tail_consumers}))):x=Object.keys(b).length>0?await gD(n,e,o,d,b):v;let{scopedContainerConfig:S,normalisedContainerConfig:ee}=await eO(n,o,x.slug,a,c),te=await sO(n,r,e,o,x.id,{message:t.message??m,tag:t.tag??p,repositoryUrl:h,pullRequest:g,commitSha:_,assetsOptions:i,secrets:l,cliVars:t.cliVars,isNewPreview:y}),C=await bD(n,e,o,x.id,te);for(let e of Object.values(C.env??{}))e.type===`secret_text`&&delete e.text;if(ee.length>0&&S&&a.deployPreviewContainers)try{await a.deployPreviewContainers(S,ee,C,e,{quiet:t.json===!0,localImageReferences:c})}catch(e){throw N.warn(`The preview "${x.name}" was created, but its containers did not come up. Its Durable Objects have no container backing them until the containers are applied successfully.`),e}if(t.json)N.log(JSON.stringify({preview:x,deployment:C},null,2));else{let t=a.productionBindingsExpectedInPreview??{};Object.keys(t).length>0&&hO(t,(await SD(n,e,o)).env,te.env??{}),N.log(lO(n,x,C,y,g)),mO(n,x,C)}return{preview:x,deployment:C,isNewPreview:y}}j(_O,`runPreview`);async function vO(e,t,n,r,i,a){return _O(e,t,n,r,i,a,zD(t,n))}j(vO,`preview`);async function yO(e,t,n,r){let{workerConfig:i,rootConfig:a,buildResult:o,assets:s}=n;if(JD(a),i.
|
|
350
|
+
Resources: https://developers.cloudflare.com/workers/previews/resources/`)}j(hO,`logMissingPreviewsBindingsWarning`);async function gO(e,t,n,r){if(!(r||await Rt(`Worker "${n}" does not exist yet. Would you like to create it for this Preview?`,{defaultValue:!0,fallbackValue:!0})))throw new O(`Cannot create a Preview because the Worker "${n}" does not exist.`,{telemetryMessage:`preview command parent worker not created`});r||N.log(`\u{1F300} Creating new Worker "${n}"...`);let i=e.routes??(e.route?[e.route]:[]),{workers_dev:a,preview_urls:o}=Mr(e.workers_dev,e.preview_urls,i);await pD(e,t,n,a,o??a)}j(gO,`provisionParentWorker`);async function _O(e,t,n,r,i,a,o,s=!1,c=/* @__PURE__ */ new Map){let l;t.secretsFile&&(l=(await Ua(t.secretsFile))?.content);let u=t.name;if(!u&&(u=ED(),!u))throw new O(`Could not determine Preview name. No git branch detected. Please provide a Preview name using --name <preview-name>.`,{telemetryMessage:`preview command missing preview name`});let d=u,f=t.ignoreBaseConfig,p=!t.tag&&DD()?OD():void 0,m=!t.message&&DD()?kD():void 0,h=MD(),g=RD(),_=AD(),v=null;try{v=await mD(n,e,o,d)}catch(r){if(Dn(r))await gO(n,e,o,t.json??!1);else if(!(r instanceof Error&&`code`in r&&r.code===10025))throw r}let y=!v,b=qD(n),x;y?(x=await hD(n,e,o,{name:u,...b},{ignoreBaseConfig:f}),s&&b.tail_consumers!==void 0&&(x=await gD(n,e,o,d,{tail_consumers:b.tail_consumers}))):x=Object.keys(b).length>0?await gD(n,e,o,d,b):v;let{scopedContainerConfig:S,normalisedContainerConfig:ee}=await eO(n,o,x.slug,a,c),te=await sO(n,r,e,o,x.id,{message:t.message??m,tag:t.tag??p,repositoryUrl:h,pullRequest:g,commitSha:_,assetsOptions:i,secrets:l,cliVars:t.cliVars,isNewPreview:y}),C=await bD(n,e,o,x.id,te);for(let e of Object.values(C.env??{}))e.type===`secret_text`&&delete e.text;if(ee.length>0&&S&&a.deployPreviewContainers)try{await a.deployPreviewContainers(S,ee,C,e,{quiet:t.json===!0,localImageReferences:c})}catch(e){throw N.warn(`The preview "${x.name}" was created, but its containers did not come up. Its Durable Objects have no container backing them until the containers are applied successfully.`),e}if(t.json)N.log(JSON.stringify({preview:x,deployment:C},null,2));else{let t=a.productionBindingsExpectedInPreview??{};Object.keys(t).length>0&&hO(t,(await SD(n,e,o)).env,te.env??{}),N.log(lO(n,x,C,y,g)),mO(n,x,C)}return{preview:x,deployment:C,isNewPreview:y}}j(_O,`runPreview`);async function vO(e,t,n,r,i,a){return _O(e,t,n,r,i,a,zD(t,n))}j(vO,`preview`);async function yO(e,t,n,r){let{workerConfig:i,rootConfig:a,buildResult:o,assets:s}=n;if(JD(a),i.triggers?.length)throw new O("Preview uploads from Build Output don't support the `triggers` field.",{telemetryMessage:`preview build output triggers not supported`});if(i.tailConsumers?.some(e=>e.streaming))throw new O(`Preview uploads from Build Output don't support streaming tail consumers.`,{telemetryMessage:`preview build output streaming tail consumer not supported`});if(i.unsafe?.capnp!==void 0||Object.keys(i.unsafe?.metadata??{}).length>0)throw new O(`Preview uploads from Build Output don't support unsafe metadata or Cap'n Proto schemas.`,{telemetryMessage:`preview build output unsafe settings not supported`});let{buildContext:c,...l}=a,{manifest:u,...d}=i,f=Ft({...l,worker:d,containers:[]}),p=ZD(n.containers,f.exports),m=XD(n.containers,p);if(p.length>0&&(r?.getNormalizedContainerOptions===void 0||r.deployPreviewContainers===void 0))throw new O(`Preview uploads from Build Output with Containers require container deployment callbacks.`,{telemetryMessage:`preview build output container callbacks missing`});let h=o&&{...o,mainModuleName:i.manifest?.mainModule},g=UD(f),_={...y,account_id:e,compliance_region:f.compliance_region,name:i.name,compatibility_date:f.compatibility_date,compatibility_flags:f.compatibility_flags??[],exports:f.exports??{},limits:f.limits,cache:f.cache,placement:f.placement,observability:f.observability,logpush:f.logpush,workers_dev:!1,preview_urls:!0,previews:{containers:p,tail_consumers:f.tail_consumers??(i.tailConsumers===void 0?void 0:[]),unsafe:{bindings:Object.entries(g).map(([e,t])=>({name:e,...t}))}},assets:f.assets},v=s&&{...s,_headers:s._headers??li(mt.join(s.directory,`_headers`)),_redirects:s._redirects??li(mt.join(s.directory,`_redirects`)),assetConfig:{html_handling:f.assets?.html_handling,not_found_handling:f.assets?.not_found_handling,base_path:f.assets?.base_path},run_worker_first:f.assets?.run_worker_first};return _O(e,{...t,ignoreBaseConfig:!1},_,h,v,r??{getNormalizedContainerOptions:void 0,deployPreviewContainers:void 0},i.name,!0,m)}j(yO,`previewBuildOutput`);async function bO(e,t,n){let r=zD(t,n),i=t.name;if(!i){if(i=ED(),!i)throw new O(`Could not determine Preview name. No git branch detected. Please provide a Preview name using --name <preview-name>.`,{telemetryMessage:`preview delete command missing preview name`});N.log(`Using git branch "${i}" as Preview name.`)}if(!t.skipConfirmation&&!await Rt(`Are you sure you want to delete the Preview "${i}" for Worker "${r}"?
|
|
351
351
|
This will delete all deployments associated with this Preview.`)){N.log(`Aborted.`);return}await _D(n,e,r,i),N.log(`
|
|
352
352
|
\u2728 Preview "${i}" deleted successfully.`)}j(bO,`previewDelete`);var xO={topLeft:`╭`,topRight:`╮`,bottomLeft:`╰`,bottomRight:`╯`,horizontal:`─`,vertical:`│`,bottomLeftWithConnector:`┬`,connectorRight:`┤`};function SO(e){return e.replace(/\x1b\[[0-9;]*m/g,``)}j(SO,`stripAnsi`);function CO(e){return SO(e).length}j(CO,`visibleLength`);function wO(e,t){let n=CO(e);return e+` `.repeat(Math.max(0,t-n))}j(wO,`padToVisibleWidth`);function TO(e,t={}){let n=[...e,...t.footerLines??[]],r=Math.max(...n.map(e=>CO(e)),0),i=r+4,a=xO.horizontal.repeat(i-2),o=`${xO.topLeft}${a}${xO.topRight}`,s=t.connectToChild?`${xO.bottomLeft}${xO.horizontal}${xO.bottomLeftWithConnector}${xO.horizontal.repeat(i-4)}${xO.bottomRight}`:`${xO.bottomLeft}${a}${xO.bottomRight}`;return[o,...n.map(e=>{let t=wO(e,r);return`${xO.vertical} ${t} ${xO.vertical}`}),s].join(`
|
|
353
353
|
`)}j(TO,`drawBox`);function EO(e,t={}){let n=t.indent??` `,r=[...e,...t.footerLines??[]],i=r.length>0?Math.max(...r.map(e=>CO(e))):0,a=i+4,o=xO.horizontal.repeat(a-2),s=`${xO.topLeft}${o}${xO.topRight}`,c=`${xO.bottomLeft}${o}${xO.bottomRight}`,l=r.map(e=>{let t=wO(e,i);return`${xO.vertical} ${t} ${xO.vertical}`}),u=t.connectorLineIndex??Math.floor(l.length/2),d=[];return d.push(`${n}${xO.vertical}`),d.push(`${n}${xO.vertical} ${s}`),l.forEach((e,t)=>{t===u?d.push(`${n}${xO.bottomLeft}${xO.horizontal}${xO.connectorRight}${e.slice(1)}`):t<u?d.push(`${n}${xO.vertical} ${e}`):d.push(`${n} ${e}`)}),d.push(`${n} ${c}`),d.join(`
|