cf 0.15.0 → 1.0.0-beta.1
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/LICENSE-APACHE +176 -0
- package/LICENSE-MIT +25 -0
- package/README.md +6 -7
- package/dist/_meta/commands.json +62 -6
- package/dist/_meta/hand-written-commands.json +31 -1
- package/dist/_meta/schemas.json +23 -1
- package/dist/{abuse-reports-BAQR1w79.mjs → abuse-reports-Dd6kJM7r.mjs} +1 -1
- package/dist/{access-C8KMplzp.mjs → access-C_2rEi0H.mjs} +1 -1
- package/dist/{account-B-KQSR0L.mjs → account-CZ9SPVdz.mjs} +1 -1
- package/dist/{account-tags-EncLJpLc.mjs → account-tags-DAf-hq1m.mjs} +1 -1
- package/dist/{accounts-BA4Mp3A_.mjs → accounts-BDIKjiG2.mjs} +1 -1
- package/dist/{acm-ByxUJcqF.mjs → acm-D-q1FVWJ.mjs} +1 -1
- package/dist/{addressing-C-ym0h0G.mjs → addressing-0w2U1NEy.mjs} +1 -1
- package/dist/{agent-memory-CkPSiZDI.mjs → agent-memory-Drumm4qd.mjs} +1 -1
- package/dist/{ai-DkE_Q64s.mjs → ai-ARwLeQ1O.mjs} +1 -1
- package/dist/{ai-audit-pPcjYWI5.mjs → ai-audit-CPrmohqf.mjs} +1 -1
- package/dist/{ai-gateway-DtrwF1lQ.mjs → ai-gateway-DNY4FPF2.mjs} +1 -1
- package/dist/{ai-search-DLD_kDS1.mjs → ai-search-B5l4IDSR.mjs} +1 -1
- package/dist/{ai-security-jyZcBl9g.mjs → ai-security-C7_IGDDl.mjs} +1 -1
- package/dist/{alerting-DOROjm8E.mjs → alerting-B6m1Rhf4.mjs} +1 -1
- package/dist/{analytics-rQ-h-plT.mjs → analytics-nnzFBB_7.mjs} +1 -1
- package/dist/{analytics_engine-Cg9gCAMt.mjs → analytics_engine-BvjKCwn1.mjs} +1 -1
- package/dist/{api-security-B8p8vp8u.mjs → api-security-B9IozS2a.mjs} +1 -1
- package/dist/{argo-g8SjUb_t.mjs → argo-C_QcqR6P.mjs} +1 -1
- package/dist/{artifacts-B1PaeF5h.mjs → artifacts-DDFNpYBz.mjs} +1 -1
- package/dist/{audit-logs-DmU_PHy_.mjs → audit-logs-cTzNV0DV.mjs} +1 -1
- package/dist/{auth-Cp7gT-AF.mjs → auth-DJhSjNNL.mjs} +1 -1
- package/dist/{auth-CZqics6E.mjs → auth-sAorfdWU.mjs} +1 -1
- package/dist/{billing-CvTbUg-H.mjs → billing-DU2X-q-x.mjs} +1 -1
- package/dist/{bot-management-z53tbcbH.mjs → bot-management-BHAAoZOh.mjs} +1 -1
- package/dist/{botnet-feed-CSBbJdr_.mjs → botnet-feed-DOOnGVVY.mjs} +1 -1
- package/dist/{brand-protection-DzV211IQ.mjs → brand-protection-C_DYa7IK.mjs} +1 -1
- package/dist/{browser-extension-C0Hi9CHX.mjs → browser-extension-C48pKh3t.mjs} +1 -1
- package/dist/{browser-run-DYQvMAyo.mjs → browser-run-Dw-vgWGR.mjs} +1 -1
- package/dist/build-1a8CiNIT.mjs +2 -0
- package/dist/build-Ca_drQY2.mjs +2 -0
- package/dist/{builds-CwKRqjQ5.mjs → builds-CO0MmSd3.mjs} +1 -1
- package/dist/{cache-CugNPPsJ.mjs → cache-XxusQxXe.mjs} +1 -1
- package/dist/{certificate-authorities-DaEnJYge.mjs → certificate-authorities-Dmxh7w-Z.mjs} +1 -1
- package/dist/{client-certificates-DZUIqBTB.mjs → client-certificates-CgaIc3zN.mjs} +1 -1
- package/dist/{client-side-security-Dk6F1ENG.mjs → client-side-security-D7NWV0YH.mjs} +1 -1
- package/dist/{cloud-connector-avpf86kG.mjs → cloud-connector-XMFOTNqT.mjs} +1 -1
- package/dist/{cloudforce-one-DNRhUD8z.mjs → cloudforce-one-Cew4MHvA.mjs} +1 -1
- package/dist/{command-B2Qe-WUa.mjs → command-CsZFRm3P.mjs} +1 -1
- package/dist/{command-DIvPLK8x.mjs → command-DBz8QiFk.mjs} +1 -1
- package/dist/command-RiZ_LYcm.mjs +2 -0
- package/dist/{connector-interrupts-BSztJ-Ko.mjs → connector-interrupts-BfQN_pm6.mjs} +1 -1
- package/dist/{connector-telemetry-events-_M8CCK6_.mjs → connector-telemetry-events-B7qLZsZJ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DySvmR9a.mjs → connector-telemetry-snapshots-Ckvg9BPc.mjs} +1 -1
- package/dist/{connectors-BSmhzNB7.mjs → connectors-BhvAP5fb.mjs} +1 -1
- package/dist/{containers-B5vDcFzo.mjs → containers-Bl3EY-cy.mjs} +1 -1
- package/dist/{containers-CFzvhmyz.mjs → containers-Cq1gtnq6.mjs} +1 -1
- package/dist/{content-scan-CeLZAcbT.mjs → content-scan-BYGe9fFj.mjs} +1 -1
- package/dist/{cps-BlI_Od72.mjs → cps-BWMDWeVq.mjs} +1 -1
- package/dist/{csamScanner-Cn7d0HWS.mjs → csamScanner-DMYGzLNi.mjs} +1 -1
- package/dist/{ct-alerting-lhgFPu-y.mjs → ct-alerting-Vq4l2s7n.mjs} +1 -1
- package/dist/{custom-certificates-Ba4Do5qt.mjs → custom-certificates-BDEHH0Ym.mjs} +1 -1
- package/dist/{custom-csrs-MNUIx8yX.mjs → custom-csrs-CHSkZNdX.mjs} +1 -1
- package/dist/{custom-hostnames-Dj1SBd0J.mjs → custom-hostnames-Bch3iQZC.mjs} +1 -1
- package/dist/{custom-nameservers-C7nzhNzV.mjs → custom-nameservers-Tdvu1-vr.mjs} +1 -1
- package/dist/{custom-pages-BgfhGksj.mjs → custom-pages-rFsiIXlr.mjs} +1 -1
- package/dist/{d1-P2kWbdID.mjs → d1-C1GK7DsW.mjs} +1 -1
- package/dist/{data-security-pBIozmRL.mjs → data-security-DDhPnX8Z.mjs} +1 -1
- package/dist/{dcv-delegation-Bpy9WnKZ.mjs → dcv-delegation-D6xiYj2l.mjs} +1 -1
- package/dist/{deploy-CVYdt3NK.mjs → deploy-D04Xvm0m.mjs} +1 -1
- package/dist/{deploy-input-DpOgndz4.mjs → deploy-input-COEKxOA1.mjs} +1 -1
- package/dist/{dev-PPUBjWcm.mjs → dev-CVD3BVUG.mjs} +1 -1
- package/dist/{diagnostics-C62habGQ.mjs → diagnostics-BZVAAguV.mjs} +1 -1
- package/dist/{dialog-C_ccBiZp.mjs → dialog--iw0F2s-.mjs} +1 -1
- package/dist/{dist-B4pQ4CXK.mjs → dist-CUUGKvjh.mjs} +1 -1
- package/dist/{dls-CpkcyQ8C.mjs → dls-BsnURYja.mjs} +1 -1
- package/dist/{dns-DG1X4Wap.mjs → dns-B_nTXhuM.mjs} +1 -1
- package/dist/{dns-firewall-B1gGHEDo.mjs → dns-firewall-DDsrdulo.mjs} +1 -1
- package/dist/{durable-objects-D214VhxH.mjs → durable-objects-8U8DpF9q.mjs} +1 -1
- package/dist/{email-auth-Ba4ONan2.mjs → email-auth-CzjtGH6g.mjs} +1 -1
- package/dist/{email-routing-BlqKnqNM.mjs → email-routing-B92fty1-.mjs} +1 -1
- package/dist/{email-security-Dl1E1Dko.mjs → email-security-keTqF0nJ.mjs} +1 -1
- package/dist/{email-sending-DIRSSRIz.mjs → email-sending-B7f95epu.mjs} +5 -5
- package/dist/error-sanitization-Cbd_oegl.mjs +2 -0
- package/dist/{error-sanitization-DOlqWkNu.mjs → error-sanitization-DwOlM3R7.mjs} +1 -1
- package/dist/{fieldExtractors-zqYKMCEn.mjs → fieldExtractors-DL_H1m7E.mjs} +1 -1
- package/dist/{firewall-DdsDh8GD.mjs → firewall-67qoXiqD.mjs} +1 -1
- package/dist/{flagship-CkUIVW7c.mjs → flagship-CjC3dF7L.mjs} +1 -1
- package/dist/{fraud-BUpZgvQT.mjs → fraud-DU_YCLC5.mjs} +1 -1
- package/dist/{google-tag-gateway-Bi1uLnEU.mjs → google-tag-gateway-xqN-QudN.mjs} +1 -1
- package/dist/{healthchecks-DjQWb3EM.mjs → healthchecks-COnq1YOx.mjs} +1 -1
- package/dist/{hostnames-ClBLPbct.mjs → hostnames-CxRAY_Pp.mjs} +1 -1
- package/dist/{hyperdrive-U54xZsWU.mjs → hyperdrive-DPWyiXpj.mjs} +1 -1
- package/dist/{iam-T-wWmOep.mjs → iam-CtX9NPCy.mjs} +1 -1
- package/dist/{images-ia5UG1GW.mjs → images-CuWFOsGw.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{intel-BhswZLMI.mjs → intel-BeGV3VXt.mjs} +1 -1
- package/dist/{ips-Dad_EvhM.mjs → ips-d6aoKAI4.mjs} +1 -1
- package/dist/{keyless-certificates-BhHaxLjM.mjs → keyless-certificates-Dvib4jhw.mjs} +1 -1
- package/dist/{keys-DjIPvqj4.mjs → keys-Fyf3vWcA.mjs} +1 -1
- package/dist/{kv-DzXVnK94.mjs → kv-CA4J7cCq.mjs} +1 -1
- package/dist/{leaked-credential-checks-B9G_ZTNH.mjs → leaked-credential-checks-B7ewx3W-.mjs} +1 -1
- package/dist/{load-balancers-3wGHPsYz.mjs → load-balancers-DHD4f2CT.mjs} +1 -1
- package/dist/{login-CEQbOgBM.mjs → login-CLW108XX.mjs} +1 -1
- package/dist/{login-DEWvGuaU.mjs → login-xgRjiyJa.mjs} +1 -1
- package/dist/{logo-matches-YGRPstPi.mjs → logo-matches-BAX8v3iL.mjs} +1 -1
- package/dist/{logos-BirufUgo.mjs → logos-BWBVGwU6.mjs} +1 -1
- package/dist/{logpush-BlNbUHyV.mjs → logpush-CZKR8DHO.mjs} +1 -1
- package/dist/{logs-DmFlVF9q.mjs → logs-CiDyrqEu.mjs} +1 -1
- package/dist/{magic-cloud-networking-B3Wj2dhJ.mjs → magic-cloud-networking-DttrBXqd.mjs} +1 -1
- package/dist/{magic-network-monitoring-ry63w2Rw.mjs → magic-network-monitoring-9VXDSYuL.mjs} +1 -1
- package/dist/{magic-transit-CBVOK2aa.mjs → magic-transit-Dsu_cSGM.mjs} +1 -1
- package/dist/{managed-defense-BdW6s483.mjs → managed-defense-SYreve4W.mjs} +1 -1
- package/dist/{managed-transforms-BIeiofIS.mjs → managed-transforms-CzSy_xPw.mjs} +1 -1
- package/dist/{matches-CAnwci0P.mjs → matches-qf7GReyu.mjs} +1 -1
- package/dist/{mcp-BfhOMGFE.mjs → mcp-DYSk5_gc.mjs} +1 -1
- package/dist/{mesh-CxUL2Wf-.mjs → mesh-DdY07OYt.mjs} +1 -1
- package/dist/{mtls-certificates-CzmTw4zs.mjs → mtls-certificates-LXlgdkf1.mjs} +1 -1
- package/dist/{network-C68psMbz.mjs → network-DpaZ5LJL.mjs} +1 -1
- package/dist/{network-interconnects-CLsMrTuk.mjs → network-interconnects-C4uUoeNa.mjs} +1 -1
- package/dist/{oauth-D4bkeMAw.mjs → oauth-Dzk6Gy-6.mjs} +1 -1
- package/dist/{oauth-clients-DbUmVE_5.mjs → oauth-clients-D7Ou7oAS.mjs} +1 -1
- package/dist/{oauth-DouM-qz0.mjs → oauth-nsTDJ0dF.mjs} +1 -1
- package/dist/{oauth-scopes-CQ18rwBg.mjs → oauth-scopes-BFoE82Mv.mjs} +1 -1
- package/dist/{observability-DpYxkFeZ.mjs → observability-smcOFbC1.mjs} +1 -1
- package/dist/{organization-Dg55Xfz7.mjs → organization-Dyf_0mq4.mjs} +1 -1
- package/dist/{organizations-QnyzGjB2.mjs → organizations-D7zGPLVm.mjs} +1 -1
- package/dist/{origin-ca-certificates-Co5lqIGL.mjs → origin-ca-certificates-DJrp29gv.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-Cz8JZamC.mjs → origin-post-quantum-encryption-BYj3kJiq.mjs} +1 -1
- package/dist/{origin-tls-client-auth-Dd0T1Kfv.mjs → origin-tls-client-auth-j0tGh6Fy.mjs} +1 -1
- package/dist/{page-rules--D3eXrCf.mjs → page-rules-CLzba_nr.mjs} +1 -1
- package/dist/{pages-Ce8DDgNr.mjs → pages-pah6dZBJ.mjs} +1 -1
- package/dist/{pay-per-crawl-CpkEbasz.mjs → pay-per-crawl-DbaTVI8V.mjs} +1 -1
- package/dist/{pay-per-use-fyM1DWgY.mjs → pay-per-use-BEvtoppJ.mjs} +1 -1
- package/dist/{pipelines-CAqCgBLh.mjs → pipelines-lps71uoA.mjs} +1 -1
- package/dist/{precursor-DBnn4Q35.mjs → precursor-DTTYLDEa.mjs} +1 -1
- package/dist/previews-B89cUmpr.mjs +4 -0
- package/dist/{progress-Bi02B6v4.mjs → progress-D_mL-Kcy.mjs} +1 -1
- package/dist/{prompt-Bx2PB-tt.mjs → prompt-sL_yMZbI.mjs} +1 -1
- package/dist/{queries-dg-CVXjf.mjs → queries-EJYlFw8m.mjs} +1 -1
- package/dist/{queues-C_ilLbRI.mjs → queues-CozKGaA4.mjs} +1 -1
- package/dist/{r2-hZAkra-l.mjs → r2-Chn_JQUM.mjs} +1 -1
- package/dist/{r2-data-catalog-DGv6aROr.mjs → r2-data-catalog-Bfn3AWzn.mjs} +1 -1
- package/dist/{radar-BO9b0aZy.mjs → radar-NmpdyMo5.mjs} +1 -1
- package/dist/{raw-fetch-DNTQkXbg.mjs → raw-fetch-lSVttVJF.mjs} +1 -1
- package/dist/{realtime-eSavuSeE.mjs → realtime-iWTz8WbH.mjs} +1 -1
- package/dist/{registrar-Ct30kOXZ.mjs → registrar-Cza1L8i_.mjs} +1 -1
- package/dist/{registrar-sandbox-Dmn9zGUk.mjs → registrar-sandbox-BP4GQg5s.mjs} +1 -1
- package/dist/{reporting-B-F5aWUJ.mjs → reporting-gvXX2MxY.mjs} +1 -1
- package/dist/{request-headers-Dnbzv6RZ.mjs → request-headers-POBKmu93.mjs} +1 -1
- package/dist/{request-tracers-CaubpUFV.mjs → request-tracers-F8a_aj32.mjs} +1 -1
- package/dist/{resource-sharing-6Snv-b69.mjs → resource-sharing-D6XWIDmb.mjs} +1 -1
- package/dist/{resource-tagging-W_LFiX2J.mjs → resource-tagging-c_z4VZt0.mjs} +1 -1
- package/dist/{rules-C26eyeA5.mjs → rules-_QDaG3U5.mjs} +1 -1
- package/dist/{rulesets-BKzIwVtJ.mjs → rulesets-Bc4ZuPG_.mjs} +1 -1
- package/dist/{rum-Xdw5hyWY.mjs → rum-ChPyfpM2.mjs} +1 -1
- package/dist/{run-BBBMrSrs.mjs → run-DtN51G2A.mjs} +1 -1
- package/dist/run-oACgYK8I.mjs +2 -0
- package/dist/{schema-DqtYndhB.mjs → schema-DZSSJaY0.mjs} +1 -1
- package/dist/{schema-flags-CebDI0f1.mjs → schema-flags-C9lbLgE-.mjs} +1 -1
- package/dist/{scim-odJTXiIe.mjs → scim-BjiswXbC.mjs} +1 -1
- package/dist/{sdk-CvIO3tWS.mjs → sdk-CsWOex96.mjs} +1 -1
- package/dist/{secrets-store-RYpWWzaw.mjs → secrets-store-Cn3D5a0d.mjs} +1 -1
- package/dist/{security-center-B3D95vCa.mjs → security-center-DP4GC1cG.mjs} +1 -1
- package/dist/{security-txt-BSytVv-9.mjs → security-txt-CaR5Idmz.mjs} +1 -1
- package/dist/shared-W9uoX1-W.mjs +2 -0
- package/dist/{smart-shield-C83Sfnf4.mjs → smart-shield-CphSzoh4.mjs} +1 -1
- package/dist/{snippets-B6oE9WIa.mjs → snippets-r-Mre0cE.mjs} +1 -1
- package/dist/{spawn-CKqJ9J4_.mjs → spawn-BWEuIO-w.mjs} +1 -1
- package/dist/{spectrum-CfxY--X_.mjs → spectrum-BhjCVFZk.mjs} +1 -1
- package/dist/{speed-DzK-kiWt.mjs → speed-CPgypY7n.mjs} +1 -1
- package/dist/{src-B3h6tKMt.mjs → src-Hw-TlVAO.mjs} +5 -5
- package/dist/{ssl-dnjzPcSB.mjs → ssl-DsMrXyqK.mjs} +1 -1
- package/dist/{stream-oFyhS4Wi.mjs → stream-L2NmGPby.mjs} +1 -1
- package/dist/{submit-4f-ravmC.mjs → submit-KN0Ul5fV.mjs} +1 -1
- package/dist/{tags-DrIP6Uiq.mjs → tags-CZMFKGdP.mjs} +1 -1
- package/dist/{telemetry-Ds4epd3D.mjs → telemetry-CSj_ezpk.mjs} +1 -1
- package/dist/telemetry-DAf9gLyH.mjs +2 -0
- package/dist/{tenant-C-gc3NWv.mjs → tenant-Cu4P-foo.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-DduTQIwh.mjs → tenant-custom-nameservers-Nx59Buv0.mjs} +1 -1
- package/dist/{tunnels-D0QYsskp.mjs → tunnels-C-mMZy4v.mjs} +1 -1
- package/dist/{turnstile-C6Q3spRB.mjs → turnstile-39JL9tMt.mjs} +1 -1
- package/dist/{update-check-CTLoakFV.mjs → update-check-BKQBD4MQ.mjs} +1 -1
- package/dist/update-check-CE9XB6gf.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-Cs0V89qq.mjs → url-info-7ikewAnp.mjs} +1 -1
- package/dist/{url-normalization-DaEQYy5h.mjs → url-normalization-B0D7Fhf3.mjs} +1 -1
- package/dist/{url-scanner-C4YVeQ4v.mjs → url-scanner-DpKIqkin.mjs} +1 -1
- package/dist/{user-BV1VY3Kl.mjs → user-BFq8UM1s.mjs} +1 -1
- package/dist/{values-qDS63E43.mjs → values-DnBYV1ZD.mjs} +1 -1
- package/dist/{vectorize-NFzD3mP5.mjs → vectorize-BpZ4UsUj.mjs} +1 -1
- package/dist/version-Bh3b9vTa.mjs +2 -0
- package/dist/{waiting-rooms-Y9YGj3ih.mjs → waiting-rooms-DJfqehy9.mjs} +1 -1
- package/dist/{web-assets-Gd6z8dbt.mjs → web-assets-CCSSW_JH.mjs} +1 -1
- package/dist/{web3-DCJx4NRp.mjs → web3-bbT1REPc.mjs} +1 -1
- package/dist/{workers-B-j-1ygi.mjs → workers-CXuyjZB8.mjs} +20 -20
- package/dist/{workers-builds-DPrNKjZW.mjs → workers-builds-TRF3K416.mjs} +1 -1
- package/dist/{workers-for-platforms-BjKAhMLA.mjs → workers-for-platforms-B57iKiSN.mjs} +1 -1
- package/dist/{workers-vpc-C5YoCnQK.mjs → workers-vpc-kgryQ48l.mjs} +1 -1
- package/dist/{workflows-C2KKIJjl.mjs → workflows-CKdPlIkK.mjs} +1 -1
- package/dist/{zaraz-CVLCs1IX.mjs → zaraz-BXFlEWSx.mjs} +1 -1
- package/dist/{zero-trust-BtJi4OXF.mjs → zero-trust-M08mBsYd.mjs} +1 -1
- package/dist/{zone-hKgt0WzO.mjs → zone-DHmrotGW.mjs} +1 -1
- package/dist/{zones-CCNyaD3J.mjs → zones-C0eKBTqG.mjs} +1 -1
- package/package.json +15 -3
- package/dist/build-BPIp8J5F.mjs +0 -2
- package/dist/build-OC77a1zq.mjs +0 -2
- package/dist/command-D45NW-R3.mjs +0 -2
- package/dist/error-sanitization-BkgUhGVc.mjs +0 -2
- package/dist/previews-y_nSqWK5.mjs +0 -4
- package/dist/run-BRucX7Rz.mjs +0 -2
- package/dist/shared-D67owd9x.mjs +0 -2
- package/dist/telemetry-mKEb8lYB.mjs +0 -2
- package/dist/update-check-BBS1K1jt.mjs +0 -2
- package/dist/version-W6_TN_kN.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{E as e}from"./dist-dc4E1u01.mjs";import{a as t}from"./ui-DH95w1Qk.mjs";import{t as n}from"./local-B6b2OIBW.mjs";import{h as r,m as i,v as a}from"./oauth-
|
|
2
|
+
import{E as e}from"./dist-dc4E1u01.mjs";import{a as t}from"./ui-DH95w1Qk.mjs";import{t as n}from"./local-B6b2OIBW.mjs";import{h as r,m as i,v as a}from"./oauth-Dzk6Gy-6.mjs";import{n as o}from"./request-headers-POBKmu93.mjs";import{i as s,r as c}from"./auth-DJhSjNNL.mjs";import{t as l}from"./output-Bia1u2k5.mjs";import{t as u}from"./dry-run-CLX6Pbtq.mjs";import{t as d}from"./progress-D_mL-Kcy.mjs";import{n as f,t as p}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as m,r as h,t as g}from"./body-parser-CUWbw_Tq.mjs";import{n as _}from"./input-validation-Ch4Vllrm.mjs";import{a as v,i as y,n as b}from"./prompt-sL_yMZbI.mjs";import{t as x}from"./cli-types-tt_LZMbn.mjs";import{D as S,T as C,_ as w,d as T,f as E,g as D,l as ee,m as te,o as O,w as k,x as A,y as j}from"./dist-CUUGKvjh.mjs";function M(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 N=f({command:`build <path>`,describe:`Build a Container image`,builder:M,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers build`.");let n={compliance_region:t.push?await r():`public`},a=t.push?await s():``,o=S(a);D({logger:o.logger,fetchResult:o.fetchResult,fetchPagedListResult:o.fetchPagedListResult}),t.push&&T(await i(),a,e(n)),await ee({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 P(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 F=f({command:`push`,describe:`Push a local image to the Cloudflare managed registry`,builder:P,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers push`.");let n=await s(),a=await i(),o={compliance_region:await r()},c=S(n);D({logger:c.logger,fetchResult:c.fetchResult,fetchPagedListResult:c.fetchPagedListResult}),T(a,n,e(o)),await A({TAG:t.tag,pathToDocker:t[`path-to-docker`]},a,o)}},{command:`containers push`,classification:{safeFlags:[],shortFlagAliases:{t:{canonical:`tag`,type:`value`}}}});function I(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(E).middleware(e=>{k(e)&&(e.quiet=!0)},!0).parserConfiguration({"populate--":!0,"unknown-options-as-args":!0,"parse-positional-numbers":!1})}const L={command:`ssh <id> [ssh-command..]`,describe:`SSH into a container`,builder:I,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers ssh`.");let n=await s(),a=await i(),c={compliance_region:await r()},l=S(n);D({logger:l.logger,fetchResult:l.fetchResult}),O.HEADERS=o(),T(a,n,e(c)),await C({...t,id:t.id,command:[...t[`ssh-command`]??[],...Array.isArray(t[`--`])?t[`--`].map(String):[]]})}},R=f(L,{command:`containers ssh`,recordArgs:!1});var z={...R,handler:async e=>{if(k(e)){let{markCommandReported:t}=await import(`./telemetry-CSj_ezpk.mjs`);return t(),L.handler(e)}return R.handler(e)}};function B(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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./chunk-DL5FNmn1.mjs";import{$ as r,A as i,B as a,C as o,D as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,M as h,N as g,P as _,Q as v,R as y,S as b,T as x,U as S,V as C,W as w,X as T,Y as E,Z as ee,at as D,b as O,d as te,et as k,f as ne,g as A,i as re,it as j,k as ie,l as ae,m as oe,n as se,p as ce,q as le,r as ue,rt as de,t as fe,tt as pe,u as me,w as he,y as ge,z as _e}from"./dist-dc4E1u01.mjs";import{t as M}from"./source-BR4_k2ad.mjs";import{t as ve}from"./undici-DTSBJHNS.mjs";import{a as ye,c as be,i as N,o as P,r as xe,s as Se,t as Ce}from"./chunk-QBZBEHZB-Byagrlop.mjs";import{A as we,C as Te,D as Ee,E as De,T as Oe,a as ke,b as Ae,f as je,g as Me,j as Ne,k as Pe,l as Fe,m as Ie,o as Le,p as Re,r as ze,w as Be,y as Ve}from"./interactive-B6woOLo-.mjs";import{C as He,E as Ue,S as We,a as Ge,b as Ke,g as qe,h as Je,i as Ye,n as Xe,p as Ze,r as Qe,s as $e,t as et,v as tt}from"./dist-B4pQ4CXK.mjs";import{a as nt}from"./build-BPIp8J5F.mjs";import{setTimeout as rt}from"node:timers/promises";import{createReadStream as it,mkdirSync as at,readFileSync as ot,writeFileSync as st}from"node:fs";import*as ct from"node:path";import lt,{extname as ut,isAbsolute as dt,resolve as ft,sep as pt}from"node:path";import F from"node:assert";import{isDeepStrictEqual as mt}from"node:util";import ht,{URLSearchParams as gt}from"node:url";import{Blob as _t}from"node:buffer";import{gzipSync as vt}from"node:zlib";import{createHash as yt}from"node:crypto";import{access as bt,readFile as xt,readdir as St,stat as Ct,writeFile as wt}from"node:fs/promises";import{execSync as Tt}from"node:child_process";import{getFreshSourceMapSupport as Et,getNodeCompat as Dt}from"miniflare";import Ot from"node:readline";import{hash as kt}from"blake3-wasm";import{convertToWranglerConfig as At}from"@cloudflare/config";var I,L,jt,Mt,Nt,Pt,Ft;function It(e){I=e.logger,L=e.fetchResult,jt=e.fetchListResult,Mt=e.fetchPagedListResult,e.fetchKVGetValue,Nt=e.confirm,Pt=e.prompt,Ft=e.select}P(It,`initDeployHelpersContext`);var Lt=n(((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)})),Rt=ve(),zt=t(Lt(),1),Bt=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};const Vt=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function Ht(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(Vt(o));return}if(o&&(c=()=>{l(Vt(o))},o.addEventListener(`abort`,c,{once:!0})),e.then(t,l),n===1/0)return;let u=new Bt;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 Ut(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 Wt=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=Ut(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}},Gt=class extends zt.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;#_=new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:Wt,...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=Ht(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 Kt=[`B`,`kB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],qt=[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`],Jt=[`b`,`kbit`,`Mbit`,`Gbit`,`Tbit`,`Pbit`,`Ebit`,`Zbit`,`Ybit`],Yt=[`b`,`kibit`,`Mibit`,`Gibit`,`Tibit`,`Pibit`,`Eibit`,`Zibit`,`Yibit`],Xt=(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 Zt(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?Yt:Jt:t.binary?qt:Kt,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+Xt(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=Xt(Number(e),t.locale,o),l=n[s];return a+c+r+l}var Qt=n(((e,t)=>{t.exports={name:`dotenv`,version:`16.3.1`,description:`Loads environment variables from .env file`,main:`lib/main.js`,types:`lib/main.d.ts`,exports:{".":{types:`./lib/main.d.ts`,require:`./lib/main.js`,default:`./lib/main.js`},"./config":`./config.js`,"./config.js":`./config.js`,"./lib/env-options":`./lib/env-options.js`,"./lib/env-options.js":`./lib/env-options.js`,"./lib/cli-options":`./lib/cli-options.js`,"./lib/cli-options.js":`./lib/cli-options.js`,"./package.json":`./package.json`},scripts:{"dts-check":`tsc --project tests/types/tsconfig.json`,lint:`standard`,"lint-readme":`standard-markdown`,pretest:`npm run lint && npm run dts-check`,test:`tap tests/*.js --100 -Rspec`,prerelease:`npm test`,release:`standard-version`},repository:{type:`git`,url:`git://github.com/motdotla/dotenv.git`},funding:`https://github.com/motdotla/dotenv?sponsor=1`,keywords:[`dotenv`,`env`,`.env`,`environment`,`variables`,`config`,`settings`],readmeFilename:`README.md`,license:`BSD-2-Clause`,devDependencies:{"@definitelytyped/dtslint":`^0.0.133`,"@types/node":`^18.11.3`,decache:`^4.6.1`,sinon:`^14.0.1`,standard:`^17.0.0`,"standard-markdown":`^7.1.0`,"standard-version":`^9.5.0`,tap:`^16.3.0`,tar:`^6.1.11`,typescript:`^4.8.4`},engines:{node:`>=12`},browser:{fs:!1}}})),$t=n(((t,n)=>{let r=e(`fs`),i=e(`path`),a=e(`os`),o=e(`crypto`),s=Qt().version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function l(e){let t={},n=e.toString();n=n.replace(/\r\n?/gm,`
|
|
2
|
+
import{n as e,r as t,t as n}from"./chunk-DL5FNmn1.mjs";import{$ as r,A as i,B as a,C as o,D as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,M as h,N as g,P as _,Q as v,R as y,S as b,T as x,U as S,V as C,W as w,X as T,Y as E,Z as ee,at as D,b as O,d as te,et as k,f as ne,g as A,i as re,it as j,k as ie,l as ae,m as oe,n as se,p as ce,q as le,r as ue,rt as de,t as fe,tt as pe,u as me,w as he,y as ge,z as _e}from"./dist-dc4E1u01.mjs";import{t as M}from"./source-BR4_k2ad.mjs";import{t as ve}from"./undici-DTSBJHNS.mjs";import{a as ye,c as be,i as N,o as P,r as xe,s as Se,t as Ce}from"./chunk-QBZBEHZB-Byagrlop.mjs";import{A as we,C as Te,D as Ee,E as De,T as Oe,a as ke,b as Ae,f as je,g as Me,j as Ne,k as Pe,l as Fe,m as Ie,o as Le,p as Re,r as ze,w as Be,y as Ve}from"./interactive-B6woOLo-.mjs";import{C as He,E as Ue,S as We,a as Ge,b as Ke,g as qe,h as Je,i as Ye,n as Xe,p as Ze,r as Qe,s as $e,t as et,v as tt}from"./dist-CUUGKvjh.mjs";import{s as nt}from"./build-1a8CiNIT.mjs";import{setTimeout as rt}from"node:timers/promises";import{createReadStream as it,mkdirSync as at,readFileSync as ot,writeFileSync as st}from"node:fs";import*as ct from"node:path";import lt,{extname as ut,isAbsolute as dt,resolve as ft,sep as pt}from"node:path";import F from"node:assert";import{isDeepStrictEqual as mt}from"node:util";import ht,{URLSearchParams as gt}from"node:url";import{Blob as _t}from"node:buffer";import{gzipSync as vt}from"node:zlib";import{createHash as yt}from"node:crypto";import{access as bt,readFile as xt,readdir as St,stat as Ct,writeFile as wt}from"node:fs/promises";import{execSync as Tt}from"node:child_process";import{getFreshSourceMapSupport as Et,getNodeCompat as Dt}from"miniflare";import Ot from"node:readline";import{hash as kt}from"blake3-wasm";import{convertToWranglerConfig as At}from"@cloudflare/config";var I,L,jt,Mt,Nt,Pt,Ft;function It(e){I=e.logger,L=e.fetchResult,jt=e.fetchListResult,Mt=e.fetchPagedListResult,e.fetchKVGetValue,Nt=e.confirm,Pt=e.prompt,Ft=e.select}P(It,`initDeployHelpersContext`);var Lt=n(((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)})),Rt=ve(),zt=t(Lt(),1),Bt=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};const Vt=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function Ht(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(Vt(o));return}if(o&&(c=()=>{l(Vt(o))},o.addEventListener(`abort`,c,{once:!0})),e.then(t,l),n===1/0)return;let u=new Bt;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 Ut(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 Wt=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=Ut(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}},Gt=class extends zt.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;#_=new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:Wt,...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=Ht(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 Kt=[`B`,`kB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],qt=[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`],Jt=[`b`,`kbit`,`Mbit`,`Gbit`,`Tbit`,`Pbit`,`Ebit`,`Zbit`,`Ybit`],Yt=[`b`,`kibit`,`Mibit`,`Gibit`,`Tibit`,`Pibit`,`Eibit`,`Zibit`,`Yibit`],Xt=(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 Zt(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?Yt:Jt:t.binary?qt:Kt,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+Xt(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=Xt(Number(e),t.locale,o),l=n[s];return a+c+r+l}var Qt=n(((e,t)=>{t.exports={name:`dotenv`,version:`16.3.1`,description:`Loads environment variables from .env file`,main:`lib/main.js`,types:`lib/main.d.ts`,exports:{".":{types:`./lib/main.d.ts`,require:`./lib/main.js`,default:`./lib/main.js`},"./config":`./config.js`,"./config.js":`./config.js`,"./lib/env-options":`./lib/env-options.js`,"./lib/env-options.js":`./lib/env-options.js`,"./lib/cli-options":`./lib/cli-options.js`,"./lib/cli-options.js":`./lib/cli-options.js`,"./package.json":`./package.json`},scripts:{"dts-check":`tsc --project tests/types/tsconfig.json`,lint:`standard`,"lint-readme":`standard-markdown`,pretest:`npm run lint && npm run dts-check`,test:`tap tests/*.js --100 -Rspec`,prerelease:`npm test`,release:`standard-version`},repository:{type:`git`,url:`git://github.com/motdotla/dotenv.git`},funding:`https://github.com/motdotla/dotenv?sponsor=1`,keywords:[`dotenv`,`env`,`.env`,`environment`,`variables`,`config`,`settings`],readmeFilename:`README.md`,license:`BSD-2-Clause`,devDependencies:{"@definitelytyped/dtslint":`^0.0.133`,"@types/node":`^18.11.3`,decache:`^4.6.1`,sinon:`^14.0.1`,standard:`^17.0.0`,"standard-markdown":`^7.1.0`,"standard-version":`^9.5.0`,tap:`^16.3.0`,tar:`^6.1.11`,typescript:`^4.8.4`},engines:{node:`>=12`},browser:{fs:!1}}})),$t=n(((t,n)=>{let r=e(`fs`),i=e(`path`),a=e(`os`),o=e(`crypto`),s=Qt().version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function l(e){let t={},n=e.toString();n=n.replace(/\r\n?/gm,`
|
|
3
3
|
`);let r;for(;(r=c.exec(n))!=null;){let e=r[1],n=r[2]||``;n=n.trim();let i=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,`$2`),i===`"`&&(n=n.replace(/\\n/g,`
|
|
4
4
|
`),n=n.replace(/\\r/g,`\r`)),t[e]=n}return t}function u(e){let t=g(e),n=C.configDotenv({path:t});if(!n.parsed)throw Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let r=m(e).split(`,`),i=r.length,a;for(let e=0;e<i;e++)try{let t=h(n,r[e].trim());a=C.decrypt(t.ciphertext,t.key);break}catch(t){if(e+1>=i)throw t}return C.parse(a)}function d(e){console.log(`[dotenv@${s}][INFO] ${e}`)}function f(e){console.log(`[dotenv@${s}][WARN] ${e}`)}function p(e){console.log(`[dotenv@${s}][DEBUG] ${e}`)}function m(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:``}function h(e,t){let n;try{n=new URL(t)}catch(e){throw e.code===`ERR_INVALID_URL`?Error(`INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development`):e}let r=n.password;if(!r)throw Error(`INVALID_DOTENV_KEY: Missing key part`);let i=n.searchParams.get(`environment`);if(!i)throw Error(`INVALID_DOTENV_KEY: Missing environment part`);let a=`DOTENV_VAULT_${i.toUpperCase()}`,o=e.parsed[a];if(!o)throw Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);return{ciphertext:o,key:r}}function g(e){let t=i.resolve(process.cwd(),`.env`);return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(`.vault`)?t:`${t}.vault`}function _(e){return e[0]===`~`?i.join(a.homedir(),e.slice(1)):e}function v(e){d(`Loading env from encrypted .env.vault`);let t=C._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),C.populate(n,t,e),{parsed:t}}function y(e){let t=i.resolve(process.cwd(),`.env`),n=`utf8`,a=!!(e&&e.debug);e&&(e.path!=null&&(t=_(e.path)),e.encoding!=null&&(n=e.encoding));try{let i=C.parse(r.readFileSync(t,{encoding:n})),a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),C.populate(a,i,e),{parsed:i}}catch(e){return a&&p(`Failed to load ${t} ${e.message}`),{error:e}}}function b(e){let t=g(e);return m(e).length===0?C.configDotenv(e):r.existsSync(t)?C._configVault(e):(f(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),C.configDotenv(e))}function x(e,t){let n=Buffer.from(t.slice(-64),`hex`),r=Buffer.from(e,`base64`),i=r.slice(0,12),a=r.slice(-16);r=r.slice(12,-16);try{let e=o.createDecipheriv(`aes-256-gcm`,n,i);return e.setAuthTag(a),`${e.update(r)}${e.final()}`}catch(e){let t=e instanceof RangeError,n=e.message===`Invalid key length`,r=e.message===`Unsupported state or unable to authenticate data`;throw t||n?Error(`INVALID_DOTENV_KEY: It must be 64 characters long (or more)`):r?Error(`DECRYPTION_FAILED: Please check your DOTENV_KEY`):(console.error(`Error: `,e.code),console.error(`Error: `,e.message),e)}}function S(e,t,n={}){let r=!!(n&&n.debug),i=!!(n&&n.override);if(typeof t!=`object`)throw Error(`OBJECT_REQUIRED: Please check the processEnv argument being passed to populate`);for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(i===!0&&(e[n]=t[n]),r&&p(i===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}let C={configDotenv:y,_configVault:v,_parseVault:u,config:b,decrypt:x,parse:l,populate:S};n.exports.configDotenv=C.configDotenv,n.exports._configVault=C._configVault,n.exports._parseVault=C._parseVault,n.exports.config=C.config,n.exports.decrypt=C.decrypt,n.exports.parse=C.parse,n.exports.populate=C.populate,n.exports=C}))(),en=N({"../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js"(e,t){function n(e){return Array.isArray(e)?e:[e]}P(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=P((e,t,n)=>Object.defineProperty(e,t,{value:n}),`define`),g=/([0-z])-([0-z])/g,_=P(()=>!1,`RETURN_FALSE`),v=P(e=>e.replace(g,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:r),`sanitizeRange`),y=P(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,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,P(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=Object.create(null),S=P((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`),C=P(e=>typeof e==`string`,`isString`),w=P(e=>e&&C(e)&&!o.test(e)&&!s.test(e)&&e.indexOf(`#`)!==0,`checkPattern`),T=P(e=>e.split(u),`splitPattern`),E=class{static{P(this,`IgnoreRule`)}constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}},ee=P((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 E(n,e,r,i)},`createRule`),D=P((e,t)=>{throw new t(e)},`throwError`),O=P((e,t,n)=>C(e)?e?O.isNotRelative(e)?n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),`checkPath`),te=P(e=>d.test(e),`isNotRelative`);O.isNotRelative=te,O.convert=e=>e;var k=class{static{P(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=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[m]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(w(e)){let t=ee(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(C(e)?T(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&&O.convert(e);return O(i,e,this._allowRelativePaths?_:D),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)}},ne=P(e=>new k(e),`factory`);if(ne.isPathValid=P(e=>O(e&&O.convert(e),e,_),`isPathValid`),ne.default=ne,t.exports=ne,typeof process<`u`&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform===`win32`)){O.convert=P(e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`),`makePosix`);let e=/^[a-z]:\//i;O.isNotRelative=t=>e.test(t)||te(t)}}}),tn=N({"../../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=P(function(e,t){return e<t?-1:+(e>t)},`defaultCmp`),u=P(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=P(function(e,t,n){return n??=r,e.push(t),h(e,0,e.length-1,n)},`heappush`),o=P(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=P(function(e,t,n){var i;return n??=r,i=e[0],e[0]=t,g(e,0,n),i},`heapreplace`),c=P(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=P(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=P(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=P(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=P(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=P(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=P(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 P(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)}}),nn=N({"../../node_modules/.pnpm/heap@0.2.7/node_modules/heap/index.js"(e,t){t.exports=tn()}}),rn=N({"../../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=nn(),p=Se(`assert`),c=P(function(e,t){return t?2*e/t:1},`_calculateRatio`),s=P(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=P(function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},`_has`),o=P(function(e){var t,n,r;for(n=0,r=e.length;n<r;n++)if(t=e[n],t)return!0;return!1},`_any`),a=class{static{P(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=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=new Map,a=this.isjunk,a&&t.forEach(function(e,n){if(a(n))return o.set(n,!0),t.delete(n)}),d=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=P(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=P(function(e,t){var n,r;for([n,r]=[0,e.length];n<r&&e[n]===t;)n++;return n},`_countLeading`),t=class{static{P(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,C,w,T,E,ee,D,O,te,k,ne,A,re,j,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,he,ge,_e,M,ve;for([p,x]=[.74,.75],b=new a(this.charjunk),[S,C]=[null,null],j=[],T=E=le=i,ue=o;le<=ue?E<ue:E>ue;T=le<=ue?++E:--E)for(g=r[T],b.setSeq2(g),w=ie=de=t,fe=n;de<=fe?ie<fe:ie>fe;w=de<=fe?++ie:--ie){if(c=e[w],c===g){S===null&&([S,C]=[w,T]);continue}b.setSeq1(c),b.realQuickRatio()>p&&b.quickRatio()>p&&b.ratio()>p&&([p,m,h]=[b.ratio(),w,T])}if(p<x){if(S===null){for(pe=this._plainReplace(e,t,n,r,i,o),ae=0,O=pe.length;ae<O;ae++)re=pe[ae],j.push(re);return j}[m,h,p]=[S,C,1]}else S=null;for(me=this._fancyHelper(e,t,m,r,i,h),oe=0,te=me.length;oe<te;oe++)re=me[oe],j.push(re);if([s,f]=[e[m],r[h]],S===null){for(d=y=``,b.setSeqs(s,f),he=b.getOpcodes(),se=0,k=he.length;se<k;se++)switch([ve,l,u,_,v]=he[se],[ee,D]=[u-l,v-_],ve){case`replace`:d+=Array(ee+1).join(`^`),y+=Array(D+1).join(`^`);break;case`delete`:d+=Array(ee+1).join(`-`);break;case`insert`:y+=Array(D+1).join(`+`);break;case`equal`:d+=Array(ee+1).join(` `),y+=Array(D+1).join(` `);break;default:throw Error(`unknow tag (${ve})`)}for(ge=this._qformat(s,f,d,y),ce=0,ne=ge.length;ce<ne;ce++)re=ge[ce],j.push(re)}else j.push(` `+s);for(_e=this._fancyHelper(e,m+1,n,r,h+1,o),M=0,A=_e.length;M<A;M++)re=_e[M],j.push(re);return j}_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}
|
|
5
5
|
`),a.push(`+ `+t),r.length&&a.push(`? ${Array(i+1).join(` `)}${r}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,i as u,n as d}from"./prompt-sL_yMZbI.mjs";function f(e){return e.usage(`$0 content-scan expressions create
|
|
3
3
|
|
|
4
4
|
Create one or more Content Scanning custom expressions, appending them to the existing list of the zone, and return the updated list. Each expression reaches content objects the scanner cannot find automatically, for example \`lookup_json_string(http.request.body.raw, "file")\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of Content Scanning custom expressions to create.`})}const p={command:`create`,describe:`Create Content Scanning custom expressions for a zone.`,builder:f,handler:async s=>a({command:`content-scan expressions create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf content-scan expressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await t(s),c=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.contentScan.expressions.create({body:e,zone_id:c})),{successLabel:`Created`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function m(e){return e.usage(`$0 content-scan expressions delete <expression-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./auth-
|
|
2
|
+
import{r as e}from"./auth-DJhSjNNL.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-D_mL-Kcy.mjs";import{t as i}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as a,t as o}from"./body-parser-CUWbw_Tq.mjs";import{n as s}from"./input-validation-Ch4Vllrm.mjs";function c(e){return e.usage(`$0 cps get
|
|
3
3
|
|
|
4
4
|
Retrieve the communication preferences for the authenticated user, including email verification status, marketing subscription opt-in/opt-out state, and language locale. Callers authenticate with standard Cloudflare API tokens or keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Get communication preferences`,builder:c,handler:async a=>i({command:`cps get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf cps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/communication_preferences`,pathParams:{},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.cps.get()),{successLabel:`Loaded`})})};function u(e){return e.usage(`$0 cps update
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";function l(e){return e.usage(`$0 csamScanner edit
|
|
3
3
|
|
|
4
4
|
Update the CSAM Scanner configuration for a zone. Allows enabling or disabling CSAM scanning, updating the notification email, and configuring scanning sources. When a new email is provided, email verification is triggered automatically. The \`enabled\` field is a toggle; the server may adjust it based on whether the notification email is verified. Returns 403 if the zone or account is locked by Trust & Safety.`).option(`id`,{type:`string`,description:`The feature identifier.`,choices:[`csam_scanner`]}).option(`value-email`,{type:`string`,description:`Notification email address for CSAM scan results. When changed,
|
|
5
5
|
email verification is triggered automatically.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";function c(e){return e.usage(`$0 ct-alerting get
|
|
3
3
|
|
|
4
4
|
Retrieve the Certificate Transparency alerting subscription settings for a zone. Returns whether CT monitoring is enabled and the list of email addresses that receive alerts, if any have been configured.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Get CT Alerting Subscription`,builder:c,handler:async o=>a({command:`ct-alerting get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf ct-alerting get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/ct/alerting`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.ctAlerting.get({zone_id:s})),{successLabel:`Loaded`})})};function u(e){return e.usage("$0 ct-alerting update\n\nCreate or update the Certificate Transparency alerting subscription for a zone. Enables or disables email notifications when certificates are issued for the zone's domains. The `enabled` field is required on every request and controls whether the subscription is active. The `emails` field is optional and, when provided, replaces the stored recipient list for the zone. When `emails` is omitted, the stored recipient list is preserved and only the enabled state is toggled. A maximum of 100 email addresses may be configured per zone. Requests that omit `enabled` are rejected with error code 1008. Subscribe and unsubscribe notification emails are only sent for recipients whose effective subscription state changes. Idempotent requests (no state change) send no notification email.").option(`emails`,{type:`string`,array:!0,description:`Email addresses that receive CT alert notifications for the zone. A maximum of 100 addresses may be configured. Each address must be a valid RFC 5322 email address and must not contain a comma.
|
|
5
5
|
`}).option(`enabled`,{type:`boolean`,description:`Whether CT alerting is enabled for the zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating CT alerting subscription settings.`})}const d={command:`update`,describe:`Update CT Alerting Subscription`,builder:u,handler:async c=>a({command:`ct-alerting update`,classification:{safeFlags:[`enabled`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf ct-alerting update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/ct/alerting`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({emails:c.emails,enabled:c.enabled}):o(c.body)});return}let a=await t(c),l=await e({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body);n(await i(`Updating`,async()=>a.ctAlerting.update({...e,zone_id:l})),{successLabel:`Updated`});return}if(c.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=s({emails:c.emails,enabled:c.enabled});n(await i(`Updating`,async()=>a.ctAlerting.update({...u,zone_id:l})),{successLabel:`Updated`})})},f={command:`ct-alerting`,describe:`ct-alerting`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u,n as d}from"./prompt-sL_yMZbI.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 custom-certificates create
|
|
3
3
|
|
|
4
4
|
Upload a new SSL certificate for a zone.`).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or certificate and the intermediate(s).`}).option(`custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`deploy`,{type:`string`,description:`The environment to deploy the certificate to, defaults to production.`,choices:[`staging`,`production`],default:`production`}).option(`geo-restrictions-label`,{type:`string`,description:`The geo_restrictions.label field`,choices:[`us`,`eu`,`highest_security`]}).option(`policy`,{type:`string`,description:`Specify the policy that determines the region where your private key will be held locally. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Any combination of countries, specified by their two letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) can be chosen, such as 'country: IN', as well as 'region: EU' which refers to the EU region. If there are too few data centers satisfying the policy, it will be rejected.
|
|
5
5
|
Note: The API accepts this field as either "policy" or "policy_restrictions" in requests. Responses return this field as "policy_restrictions".`}).option(`private-key`,{type:`string`,description:`The zone's private key. Not required if custom_csr_id is provided, in which case the private key is retrieved from the CSR record held by Cloudflare.`}).option(`type`,{type:`string`,description:`The type 'legacy_custom' enables support for legacy clients which do not include SNI in the TLS handshake.`,choices:[`legacy_custom`,`sni_custom`],default:`legacy_custom`}).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 m={command:`create`,describe:`Create SSL Configuration`,builder:p,handler:async s=>a({command:`custom-certificates create`,classification:{safeFlags:[`bundle-method`,`deploy`,`geo-restrictions-label`,`type`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf custom-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/custom_certificates`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({bundle_method:l(s[`bundle-method`],`bundle-method`,`text`),certificate:l(s.certificate,`certificate`,`text`),custom_csr_id:l(s[`custom-csr-id`],`custom-csr-id`,`text`),deploy:l(s.deploy,`deploy`,`text`),geo_restrictions:{label:l(s[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:l(s.policy,`policy`,`text`),private_key:l(s[`private-key`],`private-key`,`text`),type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await t(s),d=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.customCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The zone's SSL certificate or certificate and the intermediate(s).`));let f=c({bundle_method:l(s[`bundle-method`],`bundle-method`,`text`),certificate:l(s.certificate,`certificate`,`text`),custom_csr_id:l(s[`custom-csr-id`],`custom-csr-id`,`text`),deploy:l(s.deploy,`deploy`,`text`),geo_restrictions:{label:l(s[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:l(s.policy,`policy`,`text`),private_key:l(s[`private-key`],`private-key`,`text`),type:l(s.type,`type`,`text`)});n(await i(`Creating`,async()=>a.customCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 custom-certificates delete <custom-certificate-id>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 custom-csrs create
|
|
3
3
|
|
|
4
4
|
Generate a new custom Certificate Signing Request (CSR) for an account or zone. Cloudflare generates and securely stores the private key associated with the CSR.`).option(`common-name`,{type:`string`,description:`The common name (domain) for the CSR. Must be at most 64 characters.`}).option(`country`,{type:`string`,description:`Two-letter ISO 3166-1 alpha-2 country code.`}).option(`description`,{type:`string`,description:`Optional description for the CSR.`}).option(`key-type`,{type:`string`,description:`Key algorithm to use for the CSR. Defaults to rsa2048 if not specified.`,choices:[`rsa2048`,`p256v1`],default:`rsa2048`}).option(`locality`,{type:`string`,description:`City or locality name.`}).option(`name`,{type:`string`,description:`Human-readable name for the CSR.`}).option(`organization`,{type:`string`,description:`Organization name.`}).option(`organizational-unit`,{type:`string`,description:`Organizational unit name.`}).option(`sans`,{type:`string`,array:!0,description:`Subject Alternative Names for the CSR. At least one SAN is required.`}).option(`state`,{type:`string`,description:`State or province name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a custom CSR.`})}const g={command:`create`,describe:`Create Custom CSR`,builder:h,handler:async p=>c({command:`custom-csrs create`,classification:{safeFlags:[`key-type`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf custom-csrs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/custom_csrs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({common_name:d(p[`common-name`],`common-name`,`text`),country:d(p.country,`country`,`text`),description:d(p.description,`description`,`text`),key_type:d(p[`key-type`],`key-type`,`text`),locality:d(p.locality,`locality`,`text`),name:d(p.name,`name`,`text`),organization:d(p.organization,`organization`,`text`),organizational_unit:d(p[`organizational-unit`],`organizational-unit`,`text`),sans:p.sans,state:d(p.state,`state`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customCsrs.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}if(p[`common-name`]===void 0&&(p[`common-name`]=await f(`common-name`,`The common name (domain) for the CSR. Must be at most 64 characters.`)),p.country===void 0&&(p.country=await f(`country`,`Two-letter ISO 3166-1 alpha-2 country code.`)),p.locality===void 0&&(p.locality=await f(`locality`,`City or locality name.`)),p.organization===void 0&&(p.organization=await f(`organization`,`Organization name.`)),p.sans===void 0)throw Error(`--sans is required (or pass --body with this field set).`);p.state===void 0&&(p.state=await f(`state`,`State or province name.`));let g=u({common_name:d(p[`common-name`],`common-name`,`text`),country:d(p.country,`country`,`text`),description:d(p.description,`description`,`text`),key_type:d(p[`key-type`],`key-type`,`text`),locality:d(p.locality,`locality`,`text`),name:d(p.name,`name`,`text`),organization:d(p.organization,`organization`,`text`),organizational_unit:d(p[`organizational-unit`],`organizational-unit`,`text`),sans:p.sans,state:d(p.state,`state`,`text`)});a(await s(`Creating`,async()=>c.customCsrs.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 custom-csrs delete <custom-csr-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,n as u}from"./prompt-sL_yMZbI.mjs";import{t as d}from"./cli-types-tt_LZMbn.mjs";function f(e){return e.usage(`$0 custom-hostnames certificate-pack certificates delete <certificate-id>
|
|
3
3
|
|
|
4
4
|
Delete a single custom certificate from a certificate pack that contains two bundled certificates. Deletion is subject to the following constraints. You cannot delete a certificate if it is the only remaining certificate in the pack. At least one certificate must remain in the pack.`).positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Identifier.`,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 p={command:`delete <certificate-id>`,describe:`Delete Single Certificate And Key For Custom Hostname`,builder:f,handler:async o=>a({command:`custom-hostnames certificate-pack certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf custom-hostnames certificate-pack certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_hostnames/${o[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(o[`custom-hostname-id`]))}/certificate_pack/${o[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(o[`certificate-pack-id`]))}/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"custom-hostname-id":String(o[`custom-hostname-id`]??``),"certificate-pack-id":String(o[`certificate-pack-id`]??``),"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}n(await i(`Deleting`,async()=>a.customHostnames.certificatePack.certificates.delete({zone_id:s,custom_hostname_id:o[`custom-hostname-id`],certificate_pack_id:o[`certificate-pack-id`],certificate_id:o[`certificate-id`]})),{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 custom-hostnames certificate-pack certificates update <certificate-id>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-sL_yMZbI.mjs";function m(e){return e.usage(`$0 custom-nameservers create
|
|
3
3
|
|
|
4
4
|
Adds a custom nameserver to the account or zone for use as a vanity nameserver on zones.`).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,default:1}).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:`Add account or zone Custom Nameserver`,builder:m,handler:async p=>c({command:`custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/custom_ns`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({ns_name:d(p[`ns-name`],`ns-name`,`text`),ns_set:p[`ns-set`]}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customNameservers.create({body:e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`ns-name`]===void 0&&(p[`ns-name`]=await f(`ns-name`,`The FQDN of the name server.`));let g=u({ns_name:d(p[`ns-name`],`ns-name`,`text`),ns_set:p[`ns-set`]});a(await s(`Creating`,async()=>c.customNameservers.create({body:g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 custom-nameservers delete <custom-ns-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-sL_yMZbI.mjs";function h(e){return e.usage(`$0 custom-pages account-custom-pages preview-tokens create
|
|
3
3
|
|
|
4
4
|
Creates a signed JWT for previewing an account or zone-level custom page before it is published.`).option(`act`,{type:`string`,description:`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`}).option(`target`,{type:`string`,description:`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`}).option(`url`,{type:`string`,description:`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create a preview token`,builder:h,handler:async p=>c({command:`custom-pages account-custom-pages preview-tokens create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf custom-pages account-custom-pages preview-tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/custom_pages/preview_tokens`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({act:d(p.act,`act`,`text`),target:d(p.target,`target`,`text`),url:d(p.url,`url`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customPages.accountCustomPages.previewTokens.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p.act===void 0&&(p.act=await f(`act`,`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`)),p.target===void 0&&(p.target=await f(`target`,`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`)),p.url===void 0&&(p.url=await f(`url`,`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`));let g=u({act:d(p.act,`act`,`text`),target:d(p.target,`target`,`text`),url:d(p.url,`url`,`text`)});a(await s(`Creating`,async()=>c.customPages.accountCustomPages.previewTokens.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},_={command:`preview-tokens`,describe:`Preview tokens for account-level custom pages`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 custom-pages account-custom-pages update <identifier>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{n as t}from"./resolve-CUDKxUrW.mjs";import{m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{n as c,t as l}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,i as h,n as g,t as _}from"./prompt-Bx2PB-tt.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";import v from"node:fs";import y from"node:path";const te=(e,t,n)=>{let r=e instanceof RegExp?b(e,n):e,i=t instanceof RegExp?b(t,n):t,a=r!==null&&i!=null&&ne(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},b=(e,t)=>{let n=t.match(e);return n?n[0]:null},ne=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},x=`\0SLASH`+Math.random()+`\0`,S=`\0OPEN`+Math.random()+`\0`,C=`\0CLOSE`+Math.random()+`\0`,w=`\0COMMA`+Math.random()+`\0`,re=`\0PERIOD`+Math.random()+`\0`,ie=new RegExp(x,`g`),ae=new RegExp(S,`g`),oe=new RegExp(C,`g`),se=new RegExp(w,`g`),ce=new RegExp(re,`g`),le=/\\\\/g,ue=/\\{/g,de=/\\}/g,fe=/\\,/g,pe=/\\\./g;function T(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function me(e){return e.replace(le,x).replace(ue,S).replace(de,C).replace(fe,w).replace(pe,re)}function he(e){return e.replace(ie,`\\`).replace(ae,`{`).replace(oe,`}`).replace(se,`,`).replace(ce,`.`)}function ge(e){if(!e)return[``];let t=[],n=te(`{`,`}`,e);if(!n)return e.split(`,`);let{pre:r,body:i,post:a}=n,o=r.split(`,`);o[o.length-1]+=`{`+i+`}`;let s=ge(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),t.push.apply(t,o),t}function _e(e,t={}){if(!e)return[];let{max:n=1e5}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),E(me(e),n,!0).map(he)}function ve(e){return`{`+e+`}`}function ye(e){return/^-?0\d/.test(e)}function be(e,t){return e<=t}function xe(e,t){return e>=t}function E(e,t,n){let r=[],i=te(`{`,`}`,e);if(!i)return[e];let a=i.pre,o=i.post.length?E(i.post,t,!1):[``];if(/\$$/.test(i.pre))for(let e=0;e<o.length&&e<t;e++){let t=a+`{`+i.body+`}`+o[e];r.push(t)}else{let s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=s||c,u=i.body.indexOf(`,`)>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+C+i.post,E(e,t,!0)):[e];let d;if(l)d=i.body.split(/\.\./);else if(d=ge(i.body),d.length===1&&d[0]!==void 0&&(d=E(d[0],t,!1).map(ve),d.length===1))return o.map(e=>i.pre+d[0]+e);let f;if(l&&d[0]!==void 0&&d[1]!==void 0){let e=T(d[0]),n=T(d[1]),r=Math.max(d[0].length,d[1].length),i=d.length===3&&d[2]!==void 0?Math.max(Math.abs(T(d[2])),1):1,a=be;n<e&&(i*=-1,a=xe);let o=d.some(ye);f=[];for(let s=e;a(s,n)&&f.length<t;s+=i){let e;if(c)e=String.fromCharCode(s),e===`\\`&&(e=``);else if(e=String(s),o){let t=r-e.length;if(t>0){let n=Array(t+1).join(`0`);e=s<0?`-`+n+e.slice(1):n+e}}f.push(e)}}else{f=[];for(let e=0;e<d.length;e++)f.push.apply(f,E(d[e],t,!1))}for(let e=0;e<f.length;e++)for(let i=0;i<o.length&&r.length<t;i++){let t=a+f[e]+o[i];(!n||l||t)&&r.push(t)}}return r}const D=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},Se={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},O=e=>e.replace(/[[\]\\-]/g,`\\$&`),Ce=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),k=e=>e.join(``),we=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(Se))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(O(d)+`-`+O(t)):t===d&&r.push(O(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(O(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(O(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[Ce(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+k(r)+`]`,p=`[`+(l?``:`^`)+k(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},A=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`);var j;const Te=new Set([`!`,`?`,`+`,`*`,`@`]),M=e=>Te.has(e),Ee=e=>M(e.type),De=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),Oe=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),ke=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),Ae=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),N=`(?!\\.)`,je=new Set([`[`,`.`]),Me=new Set([`..`,`.`]),Ne=new Set(`().*{}+?[]^$\\!`),Pe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),P=`[^/]`,F=P+`*?`,I=P+`+?`;let Fe=0;var L=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++Fe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==``){if(typeof t!=`string`&&!(t instanceof j&&t.#i===this))throw Error(`invalid part: `+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#r[t];if(!(n instanceof j&&n.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new j(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,d+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;continue}else if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&M(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new j(n,t);u=j.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new j(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,p+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;continue}else if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}if(!r.noext&&M(n)&&e.charAt(u)===`(`&&(i<=a||t&&t.#h(n))){let a=t&&t.#h(n)?0:1;d.push(p),p=``;let o=new j(n,d);d.push(o),u=j.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new j(null,t);continue}if(n===`)`)return p===``&&t.#r.length===0&&(t.#u=!0),d.push(p),p=``,t.push(...f,d),u;p+=n}return t.type=null,t.#t=void 0,t.#r=[e.substring(n-1)],u}#p(e){return this.#m(e,Oe)}#m(e,t=De){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=ke){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new j(null,n,this.options);r.#r.push(``),n.push(r),this.#_(e,t)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!Ae.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=Ae.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new j(null,void 0,t);return j.#f(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&(this.#x(),this.#d()),!Ee(this)){let n=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),r=this.#r.map(t=>{let[r,i,a,o]=typeof t==`string`?j.#C(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),i=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&Me.has(this.#r[0]))){let n=je,a=t&&n.has(r.charAt(0))||r.startsWith(`\\.`)&&n.has(r.charAt(2))||r.startsWith(`\\.\\.`)&&n.has(r.charAt(4)),o=!t&&!e&&n.has(r.charAt(0));i=a?`(?!(?:^|/)\\.\\.?(?:$|/))`:o?N:``}let a=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(a=`(?:$|\\/)`),[i+r+a,A(r),this.#t=!!this.#t,this.#n]}let n=this.type===`*`||this.type===`+`,r=this.type===`!`?`(?:(?!(?:`:`(?:`,i=this.#S(t);if(this.isStart()&&this.isEnd()&&!i&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,A(this.toString()),!1,!1]}let a=!n||e||t?``:this.#S(!0);a===i&&(a=``),a&&(i=`(?:${i})(?:${a})*?`);let o=``;if(this.type===`!`&&this.#u)o=(this.isStart()&&!t?N:``)+I;else{let n=this.type===`!`?`))`+(this.isStart()&&!t&&!e?N:``)+F+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&a?`)`:this.type===`*`&&a?`)?`:`)${this.type}`;o=r+i+n}return[o,A(i),this.#t=!!this.#t,this.#n]}#x(){if(Ee(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r){r=!1,i+=(Ne.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?I:F,t=!0;continue}else o=!1;if(c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=we(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=P,t=!0;continue}i+=Pe(c)}return[i,A(e),!!t,a]}};j=L;const Ie=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),R=(e,t,n={})=>(D(t),!n.nocomment&&t.charAt(0)===`#`?!1:new q(t,n).match(e)),Le=/^\*+([^+@!?*[(]*)$/,Re=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),ze=e=>t=>t.endsWith(e),Be=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),Ve=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),He=/^\*+\.\*+$/,Ue=e=>!e.startsWith(`.`)&&e.includes(`.`),We=e=>e!==`.`&&e!==`..`&&e.includes(`.`),Ge=/^\.\*+$/,Ke=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),qe=/^\*+$/,Je=e=>e.length!==0&&!e.startsWith(`.`),Ye=e=>e.length!==0&&e!==`.`&&e!==`..`,Xe=/^\?+([^+@!?*[(]*)?$/,Ze=([e,t=``])=>{let n=z([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Qe=([e,t=``])=>{let n=B([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},$e=([e,t=``])=>{let n=B([e]);return t?e=>n(e)&&e.endsWith(t):n},et=([e,t=``])=>{let n=z([e]);return t?e=>n(e)&&e.endsWith(t):n},z=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},B=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},V=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,H={win32:{sep:`\\`},posix:{sep:`/`}};R.sep=V===`win32`?H.win32.sep:H.posix.sep;const U=Symbol(`globstar **`);R.GLOBSTAR=U,R.filter=(e,t={})=>n=>R(n,e,t);const W=(e,t={})=>Object.assign({},e,t);R.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return R;let t=R;return Object.assign((n,r,i={})=>t(n,r,W(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,W(e,n))}static defaults(n){return t.defaults(W(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,W(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,W(e,r))}},unescape:(n,r={})=>t.unescape(n,W(e,r)),escape:(n,r={})=>t.escape(n,W(e,r)),filter:(n,r={})=>t.filter(n,W(e,r)),defaults:n=>t.defaults(W(e,n)),makeRe:(n,r={})=>t.makeRe(n,W(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,W(e,r)),match:(n,r,i={})=>t.match(n,r,W(e,i)),sep:t.sep,GLOBSTAR:U})};const G=(e,t={})=>(D(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:_e(e,{max:t.braceExpandMax}));R.braceExpand=G,R.makeRe=(e,t={})=>new q(e,t).makeRe(),R.match=(e,t,n={})=>{let r=new q(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};const K=/[?*]|[+@!]\(.*?\)|\[|\]/,tt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var q=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){D(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||V,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!K.test(e[2]))&&!K.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),a=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),s=!o&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),c=a?3:n?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[n,a]=[e[c],t[l]];n.toLowerCase()===a.toLowerCase()&&(t[l]=n,i=l,r=c)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(U)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(U,i),o=t.lastIndexOf(U),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length,i+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===U?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===U)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return G(this.pattern,this.options)}parse(e){D(e);let t=this.options;if(e===`**`)return U;if(e===``)return``;let n,r=null;(n=e.match(qe))?r=t.dot?Ye:Je:(n=e.match(Le))?r=(t.nocase?t.dot?Ve:Be:t.dot?ze:Re)(n[1]):(n=e.match(Xe))?r=(t.nocase?t.dot?Qe:Ze:t.dot?$e:et)(n):(n=e.match(He))?r=t.dot?We:Ue:(n=e.match(Ge))&&(r=Ke);let i=L.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,`test`,{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?`[^/]*?`:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?tt(e):e===U?U:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e!==U||a===U||(a===void 0?i!==void 0&&i!==U?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==U&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=U))});let i=t.filter(e=>e!==U);if(this.partial&&i.length>=1){let e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return i.join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.partial&&(i=`^(?:\\/|`+a+i.slice(1,-1)+o+`)$`),this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e of i){let i=r;if(n.matchBase&&e.length===1&&(i=[a]),this.matchOne(i,e,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return R.defaults(e).Minimatch}};R.AST=L,R.Minimatch=q,R.escape=Ie,R.unescape=A;function J(e){let t=e.replace(/\\/g,`/`),n=y.posix.normalize(t);return n.endsWith(`/`)?n.slice(0,-1):n}function Y(e,t){if(t===`.`)return e;let n=`${t}/`;if(!e.startsWith(n))throw Error(`Expected migrations pattern ${JSON.stringify(e)} to start with ${JSON.stringify(n)}`);return e.slice(n.length)}function X(e){return`"${e.replace(/"/g,`""`)}"`}function nt(e){return`CREATE TABLE IF NOT EXISTS ${X(e)}(
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{n as t}from"./resolve-CUDKxUrW.mjs";import{m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{n as c,t as l}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,i as h,n as g,t as _}from"./prompt-sL_yMZbI.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";import v from"node:fs";import y from"node:path";const te=(e,t,n)=>{let r=e instanceof RegExp?b(e,n):e,i=t instanceof RegExp?b(t,n):t,a=r!==null&&i!=null&&ne(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},b=(e,t)=>{let n=t.match(e);return n?n[0]:null},ne=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},x=`\0SLASH`+Math.random()+`\0`,S=`\0OPEN`+Math.random()+`\0`,C=`\0CLOSE`+Math.random()+`\0`,w=`\0COMMA`+Math.random()+`\0`,re=`\0PERIOD`+Math.random()+`\0`,ie=new RegExp(x,`g`),ae=new RegExp(S,`g`),oe=new RegExp(C,`g`),se=new RegExp(w,`g`),ce=new RegExp(re,`g`),le=/\\\\/g,ue=/\\{/g,de=/\\}/g,fe=/\\,/g,pe=/\\\./g;function T(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function me(e){return e.replace(le,x).replace(ue,S).replace(de,C).replace(fe,w).replace(pe,re)}function he(e){return e.replace(ie,`\\`).replace(ae,`{`).replace(oe,`}`).replace(se,`,`).replace(ce,`.`)}function ge(e){if(!e)return[``];let t=[],n=te(`{`,`}`,e);if(!n)return e.split(`,`);let{pre:r,body:i,post:a}=n,o=r.split(`,`);o[o.length-1]+=`{`+i+`}`;let s=ge(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),t.push.apply(t,o),t}function _e(e,t={}){if(!e)return[];let{max:n=1e5}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),E(me(e),n,!0).map(he)}function ve(e){return`{`+e+`}`}function ye(e){return/^-?0\d/.test(e)}function be(e,t){return e<=t}function xe(e,t){return e>=t}function E(e,t,n){let r=[],i=te(`{`,`}`,e);if(!i)return[e];let a=i.pre,o=i.post.length?E(i.post,t,!1):[``];if(/\$$/.test(i.pre))for(let e=0;e<o.length&&e<t;e++){let t=a+`{`+i.body+`}`+o[e];r.push(t)}else{let s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=s||c,u=i.body.indexOf(`,`)>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+C+i.post,E(e,t,!0)):[e];let d;if(l)d=i.body.split(/\.\./);else if(d=ge(i.body),d.length===1&&d[0]!==void 0&&(d=E(d[0],t,!1).map(ve),d.length===1))return o.map(e=>i.pre+d[0]+e);let f;if(l&&d[0]!==void 0&&d[1]!==void 0){let e=T(d[0]),n=T(d[1]),r=Math.max(d[0].length,d[1].length),i=d.length===3&&d[2]!==void 0?Math.max(Math.abs(T(d[2])),1):1,a=be;n<e&&(i*=-1,a=xe);let o=d.some(ye);f=[];for(let s=e;a(s,n)&&f.length<t;s+=i){let e;if(c)e=String.fromCharCode(s),e===`\\`&&(e=``);else if(e=String(s),o){let t=r-e.length;if(t>0){let n=Array(t+1).join(`0`);e=s<0?`-`+n+e.slice(1):n+e}}f.push(e)}}else{f=[];for(let e=0;e<d.length;e++)f.push.apply(f,E(d[e],t,!1))}for(let e=0;e<f.length;e++)for(let i=0;i<o.length&&r.length<t;i++){let t=a+f[e]+o[i];(!n||l||t)&&r.push(t)}}return r}const D=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},Se={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},O=e=>e.replace(/[[\]\\-]/g,`\\$&`),Ce=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),k=e=>e.join(``),we=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(Se))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(O(d)+`-`+O(t)):t===d&&r.push(O(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(O(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(O(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[Ce(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+k(r)+`]`,p=`[`+(l?``:`^`)+k(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},A=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`);var j;const Te=new Set([`!`,`?`,`+`,`*`,`@`]),M=e=>Te.has(e),Ee=e=>M(e.type),De=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),Oe=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),ke=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),Ae=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),N=`(?!\\.)`,je=new Set([`[`,`.`]),Me=new Set([`..`,`.`]),Ne=new Set(`().*{}+?[]^$\\!`),Pe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),P=`[^/]`,F=P+`*?`,I=P+`+?`;let Fe=0;var L=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++Fe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==``){if(typeof t!=`string`&&!(t instanceof j&&t.#i===this))throw Error(`invalid part: `+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#r[t];if(!(n instanceof j&&n.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new j(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,d+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;continue}else if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&M(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new j(n,t);u=j.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new j(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,p+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;continue}else if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}if(!r.noext&&M(n)&&e.charAt(u)===`(`&&(i<=a||t&&t.#h(n))){let a=t&&t.#h(n)?0:1;d.push(p),p=``;let o=new j(n,d);d.push(o),u=j.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new j(null,t);continue}if(n===`)`)return p===``&&t.#r.length===0&&(t.#u=!0),d.push(p),p=``,t.push(...f,d),u;p+=n}return t.type=null,t.#t=void 0,t.#r=[e.substring(n-1)],u}#p(e){return this.#m(e,Oe)}#m(e,t=De){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=ke){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new j(null,n,this.options);r.#r.push(``),n.push(r),this.#_(e,t)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!Ae.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=Ae.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new j(null,void 0,t);return j.#f(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&(this.#x(),this.#d()),!Ee(this)){let n=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),r=this.#r.map(t=>{let[r,i,a,o]=typeof t==`string`?j.#C(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),i=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&Me.has(this.#r[0]))){let n=je,a=t&&n.has(r.charAt(0))||r.startsWith(`\\.`)&&n.has(r.charAt(2))||r.startsWith(`\\.\\.`)&&n.has(r.charAt(4)),o=!t&&!e&&n.has(r.charAt(0));i=a?`(?!(?:^|/)\\.\\.?(?:$|/))`:o?N:``}let a=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(a=`(?:$|\\/)`),[i+r+a,A(r),this.#t=!!this.#t,this.#n]}let n=this.type===`*`||this.type===`+`,r=this.type===`!`?`(?:(?!(?:`:`(?:`,i=this.#S(t);if(this.isStart()&&this.isEnd()&&!i&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,A(this.toString()),!1,!1]}let a=!n||e||t?``:this.#S(!0);a===i&&(a=``),a&&(i=`(?:${i})(?:${a})*?`);let o=``;if(this.type===`!`&&this.#u)o=(this.isStart()&&!t?N:``)+I;else{let n=this.type===`!`?`))`+(this.isStart()&&!t&&!e?N:``)+F+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&a?`)`:this.type===`*`&&a?`)?`:`)${this.type}`;o=r+i+n}return[o,A(i),this.#t=!!this.#t,this.#n]}#x(){if(Ee(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r){r=!1,i+=(Ne.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?I:F,t=!0;continue}else o=!1;if(c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=we(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=P,t=!0;continue}i+=Pe(c)}return[i,A(e),!!t,a]}};j=L;const Ie=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),R=(e,t,n={})=>(D(t),!n.nocomment&&t.charAt(0)===`#`?!1:new q(t,n).match(e)),Le=/^\*+([^+@!?*[(]*)$/,Re=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),ze=e=>t=>t.endsWith(e),Be=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),Ve=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),He=/^\*+\.\*+$/,Ue=e=>!e.startsWith(`.`)&&e.includes(`.`),We=e=>e!==`.`&&e!==`..`&&e.includes(`.`),Ge=/^\.\*+$/,Ke=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),qe=/^\*+$/,Je=e=>e.length!==0&&!e.startsWith(`.`),Ye=e=>e.length!==0&&e!==`.`&&e!==`..`,Xe=/^\?+([^+@!?*[(]*)?$/,Ze=([e,t=``])=>{let n=z([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Qe=([e,t=``])=>{let n=B([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},$e=([e,t=``])=>{let n=B([e]);return t?e=>n(e)&&e.endsWith(t):n},et=([e,t=``])=>{let n=z([e]);return t?e=>n(e)&&e.endsWith(t):n},z=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},B=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},V=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,H={win32:{sep:`\\`},posix:{sep:`/`}};R.sep=V===`win32`?H.win32.sep:H.posix.sep;const U=Symbol(`globstar **`);R.GLOBSTAR=U,R.filter=(e,t={})=>n=>R(n,e,t);const W=(e,t={})=>Object.assign({},e,t);R.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return R;let t=R;return Object.assign((n,r,i={})=>t(n,r,W(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,W(e,n))}static defaults(n){return t.defaults(W(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,W(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,W(e,r))}},unescape:(n,r={})=>t.unescape(n,W(e,r)),escape:(n,r={})=>t.escape(n,W(e,r)),filter:(n,r={})=>t.filter(n,W(e,r)),defaults:n=>t.defaults(W(e,n)),makeRe:(n,r={})=>t.makeRe(n,W(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,W(e,r)),match:(n,r,i={})=>t.match(n,r,W(e,i)),sep:t.sep,GLOBSTAR:U})};const G=(e,t={})=>(D(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:_e(e,{max:t.braceExpandMax}));R.braceExpand=G,R.makeRe=(e,t={})=>new q(e,t).makeRe(),R.match=(e,t,n={})=>{let r=new q(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};const K=/[?*]|[+@!]\(.*?\)|\[|\]/,tt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var q=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){D(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||V,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!K.test(e[2]))&&!K.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),a=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),s=!o&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),c=a?3:n?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[n,a]=[e[c],t[l]];n.toLowerCase()===a.toLowerCase()&&(t[l]=n,i=l,r=c)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(U)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(U,i),o=t.lastIndexOf(U),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length,i+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===U?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===U)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return G(this.pattern,this.options)}parse(e){D(e);let t=this.options;if(e===`**`)return U;if(e===``)return``;let n,r=null;(n=e.match(qe))?r=t.dot?Ye:Je:(n=e.match(Le))?r=(t.nocase?t.dot?Ve:Be:t.dot?ze:Re)(n[1]):(n=e.match(Xe))?r=(t.nocase?t.dot?Qe:Ze:t.dot?$e:et)(n):(n=e.match(He))?r=t.dot?We:Ue:(n=e.match(Ge))&&(r=Ke);let i=L.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,`test`,{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?`[^/]*?`:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?tt(e):e===U?U:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e!==U||a===U||(a===void 0?i!==void 0&&i!==U?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==U&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=U))});let i=t.filter(e=>e!==U);if(this.partial&&i.length>=1){let e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return i.join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.partial&&(i=`^(?:\\/|`+a+i.slice(1,-1)+o+`)$`),this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e of i){let i=r;if(n.matchBase&&e.length===1&&(i=[a]),this.matchOne(i,e,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return R.defaults(e).Minimatch}};R.AST=L,R.Minimatch=q,R.escape=Ie,R.unescape=A;function J(e){let t=e.replace(/\\/g,`/`),n=y.posix.normalize(t);return n.endsWith(`/`)?n.slice(0,-1):n}function Y(e,t){if(t===`.`)return e;let n=`${t}/`;if(!e.startsWith(n))throw Error(`Expected migrations pattern ${JSON.stringify(e)} to start with ${JSON.stringify(n)}`);return e.slice(n.length)}function X(e){return`"${e.replace(/"/g,`""`)}"`}function nt(e){return`CREATE TABLE IF NOT EXISTS ${X(e)}(
|
|
3
3
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
4
4
|
name TEXT UNIQUE,
|
|
5
5
|
applied_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-sL_yMZbI.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function g(e){return e.usage(`$0 data-security posture archive-finding-instance <finding-id>
|
|
3
3
|
|
|
4
4
|
Archive one or more finding instances.`).positional(`finding-id`,{type:`string`,description:`A base64-encoded ID identifying this Finding.`,demandOption:!0}).option(`check-instances`,{type:`string`,array:!0,description:`A list of finding instance IDs to pass along.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for bulk actions on finding instances.`})}const ee={command:`archive-finding-instance <finding-id>`,describe:`Archive a finding`,builder:g,handler:async l=>s({command:`data-security posture archive-finding-instance`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf data-security posture archive-finding-instance`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/data-security/posture/findings/${l[`finding-id`]==null?`<finding-id>`:encodeURIComponent(String(l[`finding-id`]))}/instances/archive`,pathParams:{"finding-id":String(l[`finding-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({check_instances:l[`check-instances`]}):c(l.body)});return}let s=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.dataSecurity.posture.archiveFindingInstance({body:e,account_id:d,finding_id:l[`finding-id`]})),{successLabel:`Created`});return}if(l[`check-instances`]===void 0)throw Error(`--check-instances is required (or pass --body with this field set).`);let f=u({check_instances:l[`check-instances`]});i(await o(`Creating`,async()=>s.dataSecurity.posture.archiveFindingInstance({body:f,account_id:d,finding_id:l[`finding-id`]})),{successLabel:`Created`})})};function te(e){return e.usage(`$0 data-security posture change-finding-severity <finding-id>
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function o(e){return e.usage(`$0 dcv-delegation get
|
|
3
3
|
|
|
4
4
|
Retrieve the account and zone specific unique identifier used as part of the CNAME target for DCV Delegation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Retrieve the DCV Delegation unique identifier.`,builder:o,handler:async o=>a({command:`dcv-delegation get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf dcv-delegation get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/dcv_delegation/uuid`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.dcvDelegation.get({zone_id:s})),{successLabel:`Loaded`})})},c={command:`dcv-delegation`,describe:`dcv-delegation`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,t}from"./shared-
|
|
2
|
+
import{n as e,t}from"./shared-W9uoX1-W.mjs";function n(t){return e(t).option(`dispatch-namespace`,{type:`string`,description:`Name of a dispatch namespace to deploy the Worker to (Workers for Platforms)`,requiresArg:!0}).option(`containers-rollout`,{description:`Rollout strategy for Container changes. Immediate rolls out to all instances in one step; none leaves deployed Containers unchanged.`,choices:[`immediate`,`gradual`,`none`]})}const r={command:`deploy`,describe:`Deploy a worker to Cloudflare`,builder:n,handler:async e=>{await t(e,{command:`Deploy`})}};export{r as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{s as e}from"./build-1a8CiNIT.mjs";import{existsSync as t,readFileSync as n,statSync as r}from"node:fs";import{dirname as i,join as a,sep as o}from"node:path";const s={esm:`esm`,cjs:`commonjs`,python:`python`,"python-requirement":`python-requirement`,wasm:`compiled-wasm`,text:`text`,data:`buffer`,json:`text`};function c(e,t,n,r,a){let o=process.cwd(),s=t.main??``;return{entry:{file:s,projectRoot:o,configPath:e.configPath,format:`modules`,moduleRoot:s?i(s):e.bundleDir??``,exports:[]},name:e.config.name,compatibilityDate:t.compatibility_date,compatibilityFlags:t.compatibility_flags??[],assetsDir:p(e,t),main:t.main??void 0,keepVars:t.keep_vars??!1,dryRun:r[`dry-run`],env:void 0,outfile:void 0,tag:r.tag,message:r.message,secretsFile:r[`secrets-file`],experimentalAutoCreate:!0,accountId:n,sendMetrics:!1,resourcesProvision:!0,skipProvisioningConfigWriteback:!0,skipLastDeployedFromApiCheck:!1,containers:a,cliVars:{},isWorkersSite:!1,useServiceEnvApiPath:!1}}function l(e,t,n,r,i){return{...c(e,t,n,r,i),command:`deploy`,containersRollout:r[`containers-rollout`],triggers:t.triggers?.crons,routes:f(t),logpush:t.logpush,dispatchNamespace:r[`dispatch-namespace`],strict:!0,legacyAssetPaths:void 0,oldAssetTtl:void 0}}function u(e,t,n,r,i){return{...c(e,t,n,r,i),command:`versions upload`,strict:!0,previewAlias:r[`preview-alias`]}}function d(e,t,n,r){return{config:t,accountId:n,scriptName:t.name??e.config.name,crons:t.triggers?.crons,routes:f(t),firstDeploy:!1,dryRun:r[`dry-run`],validated:!1}}function f(e){return e.routes?e.routes:e.route?[e.route]:[]}function p(t,n){let r=t.assetsDir;if(!r)return;let i=!!n.main,a=n.assets?.run_worker_first;if(!i&&a)throw new e(`assets.run_worker_first requires a Worker entrypoint, but no main module is configured.`);return{directory:r,binding:n.assets?.binding,directoryExists:!0}}function m(i,o){if(!o.manifest||!i.bundleDir)return{modules:[],sourceMaps:void 0,dependencies:{},resolvedEntryPointPath:``,bundleType:`esm`,content:``};let{mainModule:c,modules:l}=o.manifest;h(c,i.bundleDir);let u=a(i.bundleDir,c);if(!t(u))throw new e(`Main module not found: ${u}`);let d=l?.[c]?.type??`esm`;if(d===`sourcemap`)throw new e(`Main module "${c}" cannot be a sourcemap.`);let f=n(u,`utf8`),p=s[d],m=[],g=[],_={};if(_[u]={bytesInOutput:r(u).size},l)for(let[o,u]of Object.entries(l)){if(o===c)continue;h(o,i.bundleDir);let l=a(i.bundleDir,o);if(u.type===`sourcemap`){if(!t(l))throw new e(`Module not found: ${l}`);g.push({name:o,content:n(l,`utf8`)});continue}if(!t(l))throw new e(`Module not found: ${l}`);let d=u.type===`wasm`||u.type===`data`?n(l):n(l,`utf8`);m.push({name:`./${o}`,filePath:l,content:d,type:s[u.type]}),_[l]={bytesInOutput:r(l).size}}return{modules:m,sourceMaps:g.length>0?g:void 0,dependencies:_,resolvedEntryPointPath:u,bundleType:p,content:f}}function h(t,n){let r=a(n,t);if(r!==n&&!r.startsWith(n+o))throw new e(`Module path "${t}" escapes the bundle directory.`)}export{u as i,l as n,d as r,m as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./src-
|
|
2
|
+
import{t as e}from"./src-Hw-TlVAO.mjs";import{a as t}from"./theme-BiIYWOed.mjs";import"./ui-DH95w1Qk.mjs";import{a as n,i as r,n as i,r as a,t as o}from"./spawn-BWEuIO-w.mjs";import{t as s}from"./registry-vreNkX6u.mjs";const c={command:`dev [implArgs..]`,describe:`Run the project's Cloudflare dev server`,builder:e=>e.positional(`implArgs`,{type:`string`,array:!0,describe:`Arguments forwarded to the dev-server implementation`}).parserConfiguration({"unknown-options-as-args":!0,"camel-case-expansion":!1}).epilogue(`cf dev starts the appropriate development server for your project. It runs your framework's dev command when available, falling back to an installed Cloudflare dev server.
|
|
3
3
|
|
|
4
4
|
Only ${t.brand(`--mode`)} is forwarded to supported framework development servers. Other arguments are forwarded only to Cloudflare dev-server implementations.`),handler:async t=>{let c=process.cwd(),l=await a(c);l&&!l.configured&&await r(l);let u=(t.implArgs??[]).map(String),d=t.mode?[`--mode`,t.mode]:[];if(l?.devCommand){if(u.length>0)throw Error(`Arguments cannot currently be forwarded to the detected dev command \`${l.devCommand}\`. Run that command directly with the required arguments.`);if(t.mode&&!l.framework?.supportsMode)throw Error(`The detected command \`${l.devCommand}\` does not currently support \`--mode\`.`);let r=await n(l.devCommand,c,{env:{...l.env,...s()},args:d});throw new e(r.exitCode,{signal:r.signal})}let f=await o(i(c),`dev`,[...d,...u]);throw new e(f.exitCode,{signal:f.signal})}};export{c as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-sL_yMZbI.mjs";function m(e){return e.usage(`$0 diagnostics endpoint-healthchecks create
|
|
3
3
|
|
|
4
4
|
Create Endpoint Health Check.`).option(`check-type`,{type:`string`,description:`type of check to perform`,choices:[`icmp`],default:`icmp`}).option(`endpoint`,{type:`string`,description:`the IP address of the host to perform checks against`}).option(`name`,{type:`string`,description:`Optional name associated with this check`}).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:`Endpoint Health Check`,builder:m,handler:async p=>s({command:`diagnostics endpoint-healthchecks create`,classification:{safeFlags:[`check-type`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf diagnostics endpoint-healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/endpoint-healthchecks`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({check_type:u(p[`check-type`],`check-type`,`text`),endpoint:u(p.endpoint,`endpoint`,`text`),name:u(p.name,`name`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.diagnostics.endpointHealthchecks.create({body:e,account_id:m})),{successLabel:`Created`});return}p[`check-type`]===void 0&&(p[`check-type`]=await f(`check-type`,`type of check to perform`,[`icmp`])),p.endpoint===void 0&&(p.endpoint=await d(`endpoint`,`the IP address of the host to perform checks against`));let h=l({check_type:u(p[`check-type`],`check-type`,`text`),endpoint:u(p.endpoint,`endpoint`,`text`),name:u(p.name,`name`,`text`)});i(await o(`Creating`,async()=>s.diagnostics.endpointHealthchecks.create({body:h,account_id:m})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 diagnostics endpoint-healthchecks delete <id>
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./src-
|
|
2
|
+
import{t as e}from"./src-Hw-TlVAO.mjs";import{M as t,n}from"./interactive-B6woOLo-.mjs";import{i as r,o as i,t as a}from"./dist-BpadEMNY.mjs";async function o(r,i){if(n())return i.fallbackValue??!1;let o=await a({message:r,initialValue:i.defaultValue,output:i.output});if(t(o))throw new e(130,{cancelled:!0});return o}async function s(r,a={}){if(n()){if(a.fallbackValue===void 0)throw Error(a.fallbackError);return a.fallbackValue}for(;;){let n=await i({message:r,defaultValue:a.defaultValue,initialValue:a.initialValue,output:a.output});if(t(n))throw new e(130,{cancelled:!0});let o=await a.validate?.(n);if(o===void 0||o===!0)return n;console.error(o===!1?`Invalid value`:o)}}async function c(i,a){if(n()){let e=a.fallbackOption??a.defaultOption??0,t=a.choices[e]??a.choices[0];if(!t)throw Error(a.fallbackError??`select() called with no choices`);return t.value}let o=await r({message:i,options:a.choices.map(e=>({label:e.title,value:e.value,hint:e.description})),initialValue:a.choices[a.defaultOption??0]?.value,output:a.output});if(t(o))throw new e(130,{cancelled:!0});return o}export{s as n,c as r,o as t};
|