@rainhole/rain-code 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -0
- package/dist/chunk-06b2745w.js +3583 -0
- package/dist/chunk-06saje2v.js +39 -0
- package/dist/chunk-07069jq1.js +30 -0
- package/dist/chunk-0731m51q.js +8 -0
- package/dist/chunk-0bs2528v.js +192 -0
- package/dist/chunk-0fj1d707.js +313 -0
- package/dist/chunk-0gdkvtx4.js +117 -0
- package/dist/chunk-0jd8rpt4.js +34257 -0
- package/dist/chunk-0paqc2yw.js +15 -0
- package/dist/chunk-0pk0w4j1.js +332 -0
- package/dist/chunk-0rpb2bdp.js +8 -0
- package/dist/chunk-0rvwew67.js +9300 -0
- package/dist/chunk-0sa1g8jf.js +318 -0
- package/dist/chunk-0vkfrmqm.js +690 -0
- package/dist/chunk-0xgxxqhr.js +708 -0
- package/dist/chunk-0xjaqda8.js +1124 -0
- package/dist/chunk-0zep39v0.js +81 -0
- package/dist/chunk-1141xmr4.js +8 -0
- package/dist/chunk-12hn2mhy.js +17 -0
- package/dist/chunk-12rjry89.js +81 -0
- package/dist/chunk-168xb8v1.js +436 -0
- package/dist/chunk-1cwdhk7a.js +969 -0
- package/dist/chunk-1cx0fd76.js +132 -0
- package/dist/chunk-1erfksyp.js +107 -0
- package/dist/chunk-1h1tc4mw.js +126 -0
- package/dist/chunk-1h2famwb.js +49 -0
- package/dist/chunk-1jnbys9f.js +1811 -0
- package/dist/chunk-1k4fp6ft.js +389 -0
- package/dist/chunk-1mjn8xxc.js +22 -0
- package/dist/chunk-1mn6r4y2.js +747 -0
- package/dist/chunk-1p8myfza.js +1568 -0
- package/dist/chunk-1vthytca.js +79 -0
- package/dist/chunk-1y32rx73.js +145 -0
- package/dist/chunk-200781fd.js +64 -0
- package/dist/chunk-205mmm67.js +100 -0
- package/dist/chunk-209eh6ak.js +9381 -0
- package/dist/chunk-21mfpnva.js +85 -0
- package/dist/chunk-238g70xa.js +36 -0
- package/dist/chunk-24k6t9fa.js +151 -0
- package/dist/chunk-29gg6hx0.js +2992 -0
- package/dist/chunk-2a42s11t.js +412 -0
- package/dist/chunk-2ekjxh7d.js +289 -0
- package/dist/chunk-2eykm0j0.js +20 -0
- package/dist/chunk-2fwze72g.js +24 -0
- package/dist/chunk-2gzv8nrw.js +205 -0
- package/dist/chunk-2k995y2x.js +880 -0
- package/dist/chunk-2nayx6q1.js +63 -0
- package/dist/chunk-2pg9pmvc.js +182 -0
- package/dist/chunk-2qp2hc02.js +36 -0
- package/dist/chunk-2rj0dnps.js +436 -0
- package/dist/chunk-2t0xa4dt.js +145 -0
- package/dist/chunk-2ym6tnww.js +216 -0
- package/dist/chunk-30bpz5m2.js +34 -0
- package/dist/chunk-30rst83v.js +168 -0
- package/dist/chunk-36b2q5fg.js +1299 -0
- package/dist/chunk-3c25bcsw.js +17 -0
- package/dist/chunk-3ewzhjyb.js +207 -0
- package/dist/chunk-3h8a89gy.js +46 -0
- package/dist/chunk-3nk79af8.js +8 -0
- package/dist/chunk-3sfr7j85.js +884 -0
- package/dist/chunk-3w6s9m5w.js +16 -0
- package/dist/chunk-3x52v1wb.js +660 -0
- package/dist/chunk-404qm8xt.js +1715 -0
- package/dist/chunk-42fjay4q.js +141 -0
- package/dist/chunk-48649h96.js +8590 -0
- package/dist/chunk-495d85x1.js +8066 -0
- package/dist/chunk-4anj5saq.js +111 -0
- package/dist/chunk-4asynmj4.js +259 -0
- package/dist/chunk-4ck9wve9.js +225 -0
- package/dist/chunk-4cp6193g.js +9076 -0
- package/dist/chunk-4g3v8y12.js +23 -0
- package/dist/chunk-4geyher8.js +244 -0
- package/dist/chunk-4hv90qcz.js +8 -0
- package/dist/chunk-4jhr03e7.js +61 -0
- package/dist/chunk-4jm600zv.js +13 -0
- package/dist/chunk-4nspekjp.js +69 -0
- package/dist/chunk-4ptqcw4p.js +16 -0
- package/dist/chunk-4qj8cqbh.js +173 -0
- package/dist/chunk-4wxsg6a0.js +122 -0
- package/dist/chunk-4zfkzkt6.js +37 -0
- package/dist/chunk-54dckh8a.js +1169 -0
- package/dist/chunk-54y13759.js +650 -0
- package/dist/chunk-54yf6e8d.js +91 -0
- package/dist/chunk-57qz90z8.js +154 -0
- package/dist/chunk-59k0mjnc.js +120 -0
- package/dist/chunk-59p9jye4.js +104 -0
- package/dist/chunk-5c753bd4.js +64 -0
- package/dist/chunk-5cw6zwep.js +106 -0
- package/dist/chunk-5eaf3j24.js +133 -0
- package/dist/chunk-5me7398b.js +81 -0
- package/dist/chunk-5pevjsyw.js +118 -0
- package/dist/chunk-5q3c2rf4.js +107 -0
- package/dist/chunk-5xwtnq4g.js +146 -0
- package/dist/chunk-5z28bqne.js +6748 -0
- package/dist/chunk-613f6fbv.js +63 -0
- package/dist/chunk-641hawvm.js +95 -0
- package/dist/chunk-64c1avct.js +13 -0
- package/dist/chunk-64hks9ax.js +456 -0
- package/dist/chunk-677as3nh.js +15 -0
- package/dist/chunk-6bd8brc4.js +48 -0
- package/dist/chunk-6cs6mmez.js +112 -0
- package/dist/chunk-6dj5t602.js +341 -0
- package/dist/chunk-6e8vht4y.js +780 -0
- package/dist/chunk-6gr3c3w9.js +378 -0
- package/dist/chunk-6hkd32eh.js +83 -0
- package/dist/chunk-6jqxvef0.js +198 -0
- package/dist/chunk-6mh3vfa4.js +115 -0
- package/dist/chunk-6mpw9h55.js +1071 -0
- package/dist/chunk-6p4cyhb3.js +16 -0
- package/dist/chunk-6qvgnepd.js +26 -0
- package/dist/chunk-6r2bhsvt.js +6956 -0
- package/dist/chunk-6tq2v3rk.js +186 -0
- package/dist/chunk-7316m01k.js +125 -0
- package/dist/chunk-73rpbt04.js +1947 -0
- package/dist/chunk-75zk7zr1.js +309 -0
- package/dist/chunk-760252na.js +101 -0
- package/dist/chunk-764ec4ja.js +173 -0
- package/dist/chunk-76vgnv24.js +108 -0
- package/dist/chunk-7739pg2c.js +4261 -0
- package/dist/chunk-7a7hxy3d.js +167 -0
- package/dist/chunk-7aw745vx.js +40175 -0
- package/dist/chunk-7b6bg1r4.js +16128 -0
- package/dist/chunk-7ca4qskp.js +99 -0
- package/dist/chunk-7deph26x.js +311 -0
- package/dist/chunk-7ds8zqar.js +108 -0
- package/dist/chunk-7fqxw3d2.js +479 -0
- package/dist/chunk-7nysf9yd.js +266 -0
- package/dist/chunk-7tascxe2.js +90 -0
- package/dist/chunk-7wm5s02e.js +216 -0
- package/dist/chunk-7xmw2tcz.js +277 -0
- package/dist/chunk-7xyswgjh.js +8 -0
- package/dist/chunk-7zkhadkb.js +220 -0
- package/dist/chunk-8225arm6.js +6374 -0
- package/dist/chunk-83hfzbx3.js +10 -0
- package/dist/chunk-85tag8nv.js +1391 -0
- package/dist/chunk-8bd8q5xw.js +359 -0
- package/dist/chunk-8bwqtasa.js +213 -0
- package/dist/chunk-8g5pe1gr.js +37 -0
- package/dist/chunk-8g747a8x.js +26 -0
- package/dist/chunk-8h6sdj66.js +447 -0
- package/dist/chunk-8mm8b6dd.js +19 -0
- package/dist/chunk-8ndwn6st.js +120 -0
- package/dist/chunk-8pn8tvgg.js +637 -0
- package/dist/chunk-8tnn9kcb.js +131 -0
- package/dist/chunk-8tnsngw2.js +31 -0
- package/dist/chunk-8x5w267y.js +112 -0
- package/dist/chunk-8y12jxg8.js +10 -0
- package/dist/chunk-8ymf4e6z.js +48 -0
- package/dist/chunk-90mt0m1w.js +102 -0
- package/dist/chunk-90wp6wez.js +10510 -0
- package/dist/chunk-91ew1d6f.js +2689 -0
- package/dist/chunk-97jsc1kn.js +231 -0
- package/dist/chunk-993pnm45.js +4521 -0
- package/dist/chunk-9a0rsdre.js +46 -0
- package/dist/chunk-9d7fmqkw.js +41 -0
- package/dist/chunk-9dgaq0g4.js +667 -0
- package/dist/chunk-9f52phb8.js +138 -0
- package/dist/chunk-9fbpqghc.js +105 -0
- package/dist/chunk-9hzxd5q3.js +122 -0
- package/dist/chunk-9kyrssch.js +28 -0
- package/dist/chunk-9q93n4w6.js +308 -0
- package/dist/chunk-9s0xs06y.js +581 -0
- package/dist/chunk-9x5zgy22.js +12 -0
- package/dist/chunk-9zdcb9jy.js +105 -0
- package/dist/chunk-a136cvvz.js +27 -0
- package/dist/chunk-a4psxnr1.js +224 -0
- package/dist/chunk-a4twdmhf.js +45 -0
- package/dist/chunk-a7rhvq9b.js +106 -0
- package/dist/chunk-a8ejc632.js +3094 -0
- package/dist/chunk-a9vdeb6y.js +258 -0
- package/dist/chunk-a9zh40sj.js +48 -0
- package/dist/chunk-aawg48hh.js +4102 -0
- package/dist/chunk-ad2f3890.js +65 -0
- package/dist/chunk-ae7ar1jk.js +105 -0
- package/dist/chunk-ak3hdbe4.js +234 -0
- package/dist/chunk-as4e9g8f.js +298 -0
- package/dist/chunk-ase86y73.js +15 -0
- package/dist/chunk-awb4vc41.js +69 -0
- package/dist/chunk-b4bep0aq.js +5041 -0
- package/dist/chunk-b4wg70y1.js +54 -0
- package/dist/chunk-b81hd3m6.js +32 -0
- package/dist/chunk-b9knmzt0.js +106 -0
- package/dist/chunk-besmz4ym.js +32 -0
- package/dist/chunk-bgpkemkg.js +65 -0
- package/dist/chunk-bj8x29tz.js +54 -0
- package/dist/chunk-bkqsnwrq.js +239 -0
- package/dist/chunk-bnf662he.js +359 -0
- package/dist/chunk-bq00fcsd.js +165 -0
- package/dist/chunk-brz2c4cq.js +275 -0
- package/dist/chunk-bsa118r4.js +502 -0
- package/dist/chunk-bsengrbt.js +2737 -0
- package/dist/chunk-bt64sq5y.js +19 -0
- package/dist/chunk-bxcfz5gy.js +56 -0
- package/dist/chunk-bxs2a71m.js +213 -0
- package/dist/chunk-byv2p9hn.js +397 -0
- package/dist/chunk-c03am3es.js +29 -0
- package/dist/chunk-c2ahb7yg.js +105 -0
- package/dist/chunk-c2qm0t6p.js +111 -0
- package/dist/chunk-c42h9gzx.js +71 -0
- package/dist/chunk-c47xbxqw.js +38 -0
- package/dist/chunk-c5vkve4j.js +68 -0
- package/dist/chunk-c6sjhj89.js +1284 -0
- package/dist/chunk-ca147npg.js +27 -0
- package/dist/chunk-caxx597g.js +71 -0
- package/dist/chunk-cbrt5vsb.js +31 -0
- package/dist/chunk-ce0z23ct.js +443 -0
- package/dist/chunk-cefsp8h1.js +155 -0
- package/dist/chunk-cfv996bs.js +22 -0
- package/dist/chunk-cgfdkzhb.js +12 -0
- package/dist/chunk-chsyvavm.js +3435 -0
- package/dist/chunk-cmsknj6n.js +28228 -0
- package/dist/chunk-cn8bkmvj.js +264 -0
- package/dist/chunk-crmjpsqe.js +68 -0
- package/dist/chunk-cthpw4pj.js +849 -0
- package/dist/chunk-cwy9nj4y.js +134 -0
- package/dist/chunk-cyagce56.js +155 -0
- package/dist/chunk-cynewytp.js +227 -0
- package/dist/chunk-cznf6k4g.js +46 -0
- package/dist/chunk-d0954t9j.js +267 -0
- package/dist/chunk-d1qhftze.js +118 -0
- package/dist/chunk-d4mdda98.js +94 -0
- package/dist/chunk-d4rnqevg.js +41 -0
- package/dist/chunk-d7886r6a.js +13870 -0
- package/dist/chunk-dd1qvamk.js +678 -0
- package/dist/chunk-dg4je8qj.js +183 -0
- package/dist/chunk-dggvswz1.js +104 -0
- package/dist/chunk-dgqrcy74.js +48 -0
- package/dist/chunk-dm3n2qgd.js +24 -0
- package/dist/chunk-dnh7jtpb.js +37 -0
- package/dist/chunk-dsenyfax.js +105 -0
- package/dist/chunk-dtf0a7rr.js +655 -0
- package/dist/chunk-dxdb7bs1.js +60 -0
- package/dist/chunk-e0pth8g7.js +79 -0
- package/dist/chunk-e36y0q82.js +109 -0
- package/dist/chunk-ef55cwrv.js +267 -0
- package/dist/chunk-efh644hv.js +915 -0
- package/dist/chunk-ehtwnxpg.js +1591 -0
- package/dist/chunk-ejahyhd8.js +120 -0
- package/dist/chunk-ejk1bpzz.js +472 -0
- package/dist/chunk-emef71ea.js +202 -0
- package/dist/chunk-en7v028t.js +333 -0
- package/dist/chunk-eqp1rfft.js +17 -0
- package/dist/chunk-ewadzrm8.js +103 -0
- package/dist/chunk-exh7z6tv.js +132 -0
- package/dist/chunk-f0npbgyf.js +340 -0
- package/dist/chunk-f2qkc8ce.js +229 -0
- package/dist/chunk-f49sb3q7.js +40 -0
- package/dist/chunk-f5ma3nh5.js +3436 -0
- package/dist/chunk-fbv4apne.js +51 -0
- package/dist/chunk-fday7sfg.js +269 -0
- package/dist/chunk-feyzykye.js +10 -0
- package/dist/chunk-fgqwr70t.js +241 -0
- package/dist/chunk-fhy7zs1w.js +943 -0
- package/dist/chunk-fmw3f68k.js +432 -0
- package/dist/chunk-fmwqvpqm.js +506 -0
- package/dist/chunk-fn1apgre.js +66 -0
- package/dist/chunk-fpy4nam9.js +21933 -0
- package/dist/chunk-fqy0erkw.js +908 -0
- package/dist/chunk-ftqwza3a.js +43 -0
- package/dist/chunk-fyc5fepv.js +10 -0
- package/dist/chunk-fz0ch109.js +329 -0
- package/dist/chunk-fzhn8z8j.js +253 -0
- package/dist/chunk-g12brv6y.js +321 -0
- package/dist/chunk-g338npwr.js +1061 -0
- package/dist/chunk-g5tpks28.js +795 -0
- package/dist/chunk-g63tgj4f.js +58 -0
- package/dist/chunk-g827r0mk.js +266 -0
- package/dist/chunk-g8wzsxgc.js +2534 -0
- package/dist/chunk-gey7mwcw.js +36 -0
- package/dist/chunk-gghb9pks.js +120 -0
- package/dist/chunk-grdpaf1p.js +606 -0
- package/dist/chunk-gx8016vp.js +125 -0
- package/dist/chunk-h0qngp9w.js +157 -0
- package/dist/chunk-h0rbjg6x.js +55 -0
- package/dist/chunk-h1mr3371.js +121 -0
- package/dist/chunk-h3xwdgpd.js +68 -0
- package/dist/chunk-h4b85amj.js +2331 -0
- package/dist/chunk-h6d137aa.js +20 -0
- package/dist/chunk-h9n7z00d.js +95 -0
- package/dist/chunk-hakdhagh.js +16606 -0
- package/dist/chunk-hd8531ec.js +685 -0
- package/dist/chunk-heq3rn8t.js +33068 -0
- package/dist/chunk-hfvxc9fd.js +542 -0
- package/dist/chunk-hgpd0qmm.js +371 -0
- package/dist/chunk-hh7cmy4k.js +20 -0
- package/dist/chunk-hhjs87wh.js +1407 -0
- package/dist/chunk-hjtvdvgj.js +208 -0
- package/dist/chunk-hk9xz7gk.js +118 -0
- package/dist/chunk-hknbjky3.js +160798 -0
- package/dist/chunk-htsbqyf9.js +338 -0
- package/dist/chunk-htx7jmxk.js +78 -0
- package/dist/chunk-hzhe8ygc.js +547 -0
- package/dist/chunk-j2k4p94p.js +55 -0
- package/dist/chunk-j3a4p81y.js +184 -0
- package/dist/chunk-j46rb9m9.js +544 -0
- package/dist/chunk-j5bth84e.js +97 -0
- package/dist/chunk-j64ga6ta.js +8035 -0
- package/dist/chunk-j6jh72hw.js +140 -0
- package/dist/chunk-j9gxwbe3.js +349 -0
- package/dist/chunk-jaaxk89e.js +113 -0
- package/dist/chunk-jd32zbps.js +15 -0
- package/dist/chunk-jdgeec04.js +4249 -0
- package/dist/chunk-jk826edv.js +174 -0
- package/dist/chunk-jnhkref0.js +30 -0
- package/dist/chunk-jsx72hep.js +208 -0
- package/dist/chunk-jx817w05.js +11 -0
- package/dist/chunk-jzmz18nn.js +65 -0
- package/dist/chunk-k0p9w03v.js +4957 -0
- package/dist/chunk-k3s4yk22.js +477 -0
- package/dist/chunk-kfd89dsd.js +21 -0
- package/dist/chunk-kgfz4522.js +126 -0
- package/dist/chunk-kn6zg6bd.js +524 -0
- package/dist/chunk-kp9vkzj6.js +120 -0
- package/dist/chunk-kraf793v.js +118 -0
- package/dist/chunk-kw0r30h3.js +208 -0
- package/dist/chunk-kwekc97v.js +18 -0
- package/dist/chunk-m2bcpk8j.js +30 -0
- package/dist/chunk-m2kp5f7p.js +4389 -0
- package/dist/chunk-m74w3187.js +164 -0
- package/dist/chunk-m88q4jmb.js +61 -0
- package/dist/chunk-man6wb4n.js +1456 -0
- package/dist/chunk-mdk3xgya.js +42 -0
- package/dist/chunk-mf4g439x.js +82 -0
- package/dist/chunk-mg8g0xqs.js +71 -0
- package/dist/chunk-mkwzrqvf.js +38 -0
- package/dist/chunk-mn61mk4v.js +351 -0
- package/dist/chunk-ms09sxcj.js +908 -0
- package/dist/chunk-mtn1anwe.js +2351 -0
- package/dist/chunk-mv0zm0qj.js +65 -0
- package/dist/chunk-mx28h61f.js +1147 -0
- package/dist/chunk-mxbf8ajn.js +1067 -0
- package/dist/chunk-n0qaeaa5.js +256 -0
- package/dist/chunk-n34z5cw8.js +74 -0
- package/dist/chunk-n55ehz77.js +120 -0
- package/dist/chunk-n7ttdtk0.js +641 -0
- package/dist/chunk-n9ktjngj.js +336 -0
- package/dist/chunk-nb2ntesh.js +149 -0
- package/dist/chunk-netzwgv1.js +154 -0
- package/dist/chunk-nh3cd07f.js +14358 -0
- package/dist/chunk-nka1g8f4.js +773 -0
- package/dist/chunk-nm97cw83.js +458 -0
- package/dist/chunk-nq0fxyxh.js +752 -0
- package/dist/chunk-nt837qt9.js +21 -0
- package/dist/chunk-nx87c0vw.js +250 -0
- package/dist/chunk-nxw6y6xm.js +862 -0
- package/dist/chunk-nzt717xg.js +32 -0
- package/dist/chunk-p2816w9z.js +1486 -0
- package/dist/chunk-p2d5nh3g.js +342 -0
- package/dist/chunk-p9cdykwf.js +72 -0
- package/dist/chunk-paxw1ryd.js +227 -0
- package/dist/chunk-ph5g4d1j.js +109 -0
- package/dist/chunk-pp42p8y3.js +574 -0
- package/dist/chunk-ppdn71n4.js +400 -0
- package/dist/chunk-ppwjyveh.js +8 -0
- package/dist/chunk-ps49ymvj.js +43 -0
- package/dist/chunk-pshjyzq4.js +17656 -0
- package/dist/chunk-pw8nf9rt.js +126 -0
- package/dist/chunk-pwwa7s62.js +11 -0
- package/dist/chunk-py3zxq5j.js +129 -0
- package/dist/chunk-pyz1qswz.js +300 -0
- package/dist/chunk-q50q8mc5.js +157 -0
- package/dist/chunk-q7tpyeb3.js +39 -0
- package/dist/chunk-q82r31er.js +151 -0
- package/dist/chunk-qajrkk97.js +298 -0
- package/dist/chunk-qcpxnyeh.js +110 -0
- package/dist/chunk-qeabchwr.js +132 -0
- package/dist/chunk-qm7nbd10.js +755 -0
- package/dist/chunk-qm8j7kxr.js +280 -0
- package/dist/chunk-qmwgg5zy.js +136 -0
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/chunk-qp2qdcda.js +100 -0
- package/dist/chunk-qphaajd7.js +305 -0
- package/dist/chunk-qt21xxgm.js +419 -0
- package/dist/chunk-qy2z2p0b.js +122 -0
- package/dist/chunk-qyz8q0dj.js +689 -0
- package/dist/chunk-qz2x630m.js +49145 -0
- package/dist/chunk-qzq5n1yn.js +76 -0
- package/dist/chunk-r0ya57xw.js +170 -0
- package/dist/chunk-r7j395t6.js +122 -0
- package/dist/chunk-r7trcrs7.js +62 -0
- package/dist/chunk-re4yh70t.js +1095 -0
- package/dist/chunk-rhte1r8g.js +272 -0
- package/dist/chunk-rhw4ayb1.js +6851 -0
- package/dist/chunk-rn0v1hk8.js +34 -0
- package/dist/chunk-rphakhme.js +281 -0
- package/dist/chunk-rrtzz2pv.js +32 -0
- package/dist/chunk-rtnjk8ge.js +726 -0
- package/dist/chunk-rwhswkma.js +87 -0
- package/dist/chunk-rxd4kn2g.js +308 -0
- package/dist/chunk-s083x8ry.js +2840 -0
- package/dist/chunk-s16sn02n.js +365 -0
- package/dist/chunk-s1s8qfdh.js +182 -0
- package/dist/chunk-s2bwz69v.js +473 -0
- package/dist/chunk-s3pzvdss.js +50 -0
- package/dist/chunk-s9y6t0mt.js +291 -0
- package/dist/chunk-sd36yzx8.js +954 -0
- package/dist/chunk-se8xzw8h.js +87 -0
- package/dist/chunk-sg66v252.js +1648 -0
- package/dist/chunk-sg7gf3hj.js +1585 -0
- package/dist/chunk-spx24x6j.js +98 -0
- package/dist/chunk-sybxpy18.js +73 -0
- package/dist/chunk-szj5wvdy.js +28 -0
- package/dist/chunk-t0gb304x.js +182 -0
- package/dist/chunk-t3fr4skc.js +165 -0
- package/dist/chunk-t58wfamm.js +5368 -0
- package/dist/chunk-t6s2kkm3.js +104 -0
- package/dist/chunk-t8hv0x81.js +116 -0
- package/dist/chunk-tezak8rx.js +6157 -0
- package/dist/chunk-th5y3hj5.js +189 -0
- package/dist/chunk-tj0d3870.js +180 -0
- package/dist/chunk-tjgsawpx.js +40 -0
- package/dist/chunk-ts2p6bv1.js +224 -0
- package/dist/chunk-ttk5dzz8.js +25 -0
- package/dist/chunk-tv9pcdnz.js +51 -0
- package/dist/chunk-ty99rgvw.js +122 -0
- package/dist/chunk-tzgp8av2.js +61 -0
- package/dist/chunk-v1kzp02e.js +785 -0
- package/dist/chunk-v2c9dq7t.js +275 -0
- package/dist/chunk-v3aq3heg.js +620 -0
- package/dist/chunk-v78fj8by.js +145 -0
- package/dist/chunk-v9smspw2.js +4301 -0
- package/dist/chunk-var1et7e.js +66 -0
- package/dist/chunk-vchrkvet.js +120 -0
- package/dist/chunk-vest0y6x.js +3830 -0
- package/dist/chunk-vf5sd1nq.js +12 -0
- package/dist/chunk-vf612n57.js +472 -0
- package/dist/chunk-vgpy9md6.js +339 -0
- package/dist/chunk-vkzt82ry.js +644 -0
- package/dist/chunk-vsh80y0c.js +100 -0
- package/dist/chunk-vxkdxhyk.js +103 -0
- package/dist/chunk-vxt6ywm9.js +485 -0
- package/dist/chunk-vyjeh50y.js +2149 -0
- package/dist/chunk-vytdzvqs.js +1181 -0
- package/dist/chunk-w0qks2ja.js +1030 -0
- package/dist/chunk-wfz0qffj.js +3939 -0
- package/dist/chunk-wp1568nt.js +828 -0
- package/dist/chunk-wpckhx7b.js +66 -0
- package/dist/chunk-wpvkvwvc.js +41 -0
- package/dist/chunk-ws5d6qs4.js +655 -0
- package/dist/chunk-wsnxrrb5.js +986 -0
- package/dist/chunk-wyavftcj.js +103 -0
- package/dist/chunk-wybh0bvv.js +121 -0
- package/dist/chunk-wzpdet3m.js +843 -0
- package/dist/chunk-x2dp18yj.js +74 -0
- package/dist/chunk-x6r4v44b.js +8 -0
- package/dist/chunk-x7r5k0hf.js +423 -0
- package/dist/chunk-xahk20z8.js +877 -0
- package/dist/chunk-xajwdaxm.js +295 -0
- package/dist/chunk-xkt36p6r.js +61 -0
- package/dist/chunk-xnav6j8h.js +490 -0
- package/dist/chunk-xrj294jg.js +440 -0
- package/dist/chunk-xsq9ae7x.js +90 -0
- package/dist/chunk-xt9z9t7b.js +40 -0
- package/dist/chunk-xv3era3s.js +8 -0
- package/dist/chunk-y1784krc.js +19 -0
- package/dist/chunk-y289fz8y.js +116 -0
- package/dist/chunk-y3r7v9pq.js +336 -0
- package/dist/chunk-y98z50mm.js +158 -0
- package/dist/chunk-yhce3x0q.js +64 -0
- package/dist/chunk-yhhf6n9p.js +338 -0
- package/dist/chunk-ykr34msh.js +411 -0
- package/dist/chunk-yks9ggzn.js +103 -0
- package/dist/chunk-ym5r3jnk.js +2007 -0
- package/dist/chunk-ypa349qq.js +148 -0
- package/dist/chunk-yzx3mhfd.js +110 -0
- package/dist/chunk-z1bs6d7k.js +24 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z3k0k30d.js +882 -0
- package/dist/chunk-z42cqdtf.js +107 -0
- package/dist/chunk-z7asrz6j.js +259 -0
- package/dist/chunk-za09fhhh.js +716 -0
- package/dist/chunk-zae0t3p4.js +252 -0
- package/dist/chunk-zbsw794g.js +259 -0
- package/dist/chunk-ze6zvkg6.js +22820 -0
- package/dist/chunk-zejm280k.js +39 -0
- package/dist/chunk-zk2wsm7d.js +15 -0
- package/dist/chunk-znf2b75k.js +113 -0
- package/dist/chunk-zqpnvsdz.js +24 -0
- package/dist/chunk-zs2gdkj5.js +433 -0
- package/dist/chunk-zseb1639.js +37 -0
- package/dist/chunk-zsgha506.js +63 -0
- package/dist/chunk-zvsfgmq8.js +146 -0
- package/dist/chunk-zw5xd7m9.js +160 -0
- package/dist/chunk-zzm33q8x.js +8 -0
- package/dist/cli.js +97 -0
- package/dist/download-ripgrep.js +24821 -0
- package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
- package/package.json +178 -0
- package/scripts/download-ripgrep.ts +335 -0
- package/scripts/postinstall.cjs +319 -0
|
@@ -0,0 +1,1648 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
init_lazySchema,
|
|
4
|
+
lazySchema
|
|
5
|
+
} from "./chunk-64c1avct.js";
|
|
6
|
+
import {
|
|
7
|
+
init_v4
|
|
8
|
+
} from "./chunk-8g747a8x.js";
|
|
9
|
+
import {
|
|
10
|
+
exports_external
|
|
11
|
+
} from "./chunk-d7886r6a.js";
|
|
12
|
+
import {
|
|
13
|
+
init_memoize,
|
|
14
|
+
memoizeWithLRU
|
|
15
|
+
} from "./chunk-a7rhvq9b.js";
|
|
16
|
+
import {
|
|
17
|
+
init_log,
|
|
18
|
+
logError
|
|
19
|
+
} from "./chunk-y3r7v9pq.js";
|
|
20
|
+
import {
|
|
21
|
+
init_slowOperations,
|
|
22
|
+
jsonStringify
|
|
23
|
+
} from "./chunk-404qm8xt.js";
|
|
24
|
+
import {
|
|
25
|
+
__callDispose,
|
|
26
|
+
__esm,
|
|
27
|
+
__using
|
|
28
|
+
} from "./chunk-qp2qdcda.js";
|
|
29
|
+
|
|
30
|
+
// src/utils/jsonRead.ts
|
|
31
|
+
function stripBOM(content) {
|
|
32
|
+
return content.startsWith(UTF8_BOM) ? content.slice(1) : content;
|
|
33
|
+
}
|
|
34
|
+
var UTF8_BOM = "\uFEFF";
|
|
35
|
+
var init_jsonRead = () => {};
|
|
36
|
+
|
|
37
|
+
// node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
38
|
+
function createScanner(text, ignoreTrivia = false) {
|
|
39
|
+
const len = text.length;
|
|
40
|
+
let pos = 0, value = "", tokenOffset = 0, token = 16, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0;
|
|
41
|
+
function scanHexDigits(count, exact) {
|
|
42
|
+
let digits = 0;
|
|
43
|
+
let value2 = 0;
|
|
44
|
+
while (digits < count || !exact) {
|
|
45
|
+
let ch = text.charCodeAt(pos);
|
|
46
|
+
if (ch >= 48 && ch <= 57) {
|
|
47
|
+
value2 = value2 * 16 + ch - 48;
|
|
48
|
+
} else if (ch >= 65 && ch <= 70) {
|
|
49
|
+
value2 = value2 * 16 + ch - 65 + 10;
|
|
50
|
+
} else if (ch >= 97 && ch <= 102) {
|
|
51
|
+
value2 = value2 * 16 + ch - 97 + 10;
|
|
52
|
+
} else {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
pos++;
|
|
56
|
+
digits++;
|
|
57
|
+
}
|
|
58
|
+
if (digits < count) {
|
|
59
|
+
value2 = -1;
|
|
60
|
+
}
|
|
61
|
+
return value2;
|
|
62
|
+
}
|
|
63
|
+
function setPosition(newPosition) {
|
|
64
|
+
pos = newPosition;
|
|
65
|
+
value = "";
|
|
66
|
+
tokenOffset = 0;
|
|
67
|
+
token = 16;
|
|
68
|
+
scanError = 0;
|
|
69
|
+
}
|
|
70
|
+
function scanNumber() {
|
|
71
|
+
let start = pos;
|
|
72
|
+
if (text.charCodeAt(pos) === 48) {
|
|
73
|
+
pos++;
|
|
74
|
+
} else {
|
|
75
|
+
pos++;
|
|
76
|
+
while (pos < text.length && isDigit(text.charCodeAt(pos))) {
|
|
77
|
+
pos++;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (pos < text.length && text.charCodeAt(pos) === 46) {
|
|
81
|
+
pos++;
|
|
82
|
+
if (pos < text.length && isDigit(text.charCodeAt(pos))) {
|
|
83
|
+
pos++;
|
|
84
|
+
while (pos < text.length && isDigit(text.charCodeAt(pos))) {
|
|
85
|
+
pos++;
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
scanError = 3;
|
|
89
|
+
return text.substring(start, pos);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
let end = pos;
|
|
93
|
+
if (pos < text.length && (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101)) {
|
|
94
|
+
pos++;
|
|
95
|
+
if (pos < text.length && text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45) {
|
|
96
|
+
pos++;
|
|
97
|
+
}
|
|
98
|
+
if (pos < text.length && isDigit(text.charCodeAt(pos))) {
|
|
99
|
+
pos++;
|
|
100
|
+
while (pos < text.length && isDigit(text.charCodeAt(pos))) {
|
|
101
|
+
pos++;
|
|
102
|
+
}
|
|
103
|
+
end = pos;
|
|
104
|
+
} else {
|
|
105
|
+
scanError = 3;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return text.substring(start, end);
|
|
109
|
+
}
|
|
110
|
+
function scanString() {
|
|
111
|
+
let result = "", start = pos;
|
|
112
|
+
while (true) {
|
|
113
|
+
if (pos >= len) {
|
|
114
|
+
result += text.substring(start, pos);
|
|
115
|
+
scanError = 2;
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
const ch = text.charCodeAt(pos);
|
|
119
|
+
if (ch === 34) {
|
|
120
|
+
result += text.substring(start, pos);
|
|
121
|
+
pos++;
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
if (ch === 92) {
|
|
125
|
+
result += text.substring(start, pos);
|
|
126
|
+
pos++;
|
|
127
|
+
if (pos >= len) {
|
|
128
|
+
scanError = 2;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
const ch2 = text.charCodeAt(pos++);
|
|
132
|
+
switch (ch2) {
|
|
133
|
+
case 34:
|
|
134
|
+
result += '"';
|
|
135
|
+
break;
|
|
136
|
+
case 92:
|
|
137
|
+
result += "\\";
|
|
138
|
+
break;
|
|
139
|
+
case 47:
|
|
140
|
+
result += "/";
|
|
141
|
+
break;
|
|
142
|
+
case 98:
|
|
143
|
+
result += "\b";
|
|
144
|
+
break;
|
|
145
|
+
case 102:
|
|
146
|
+
result += "\f";
|
|
147
|
+
break;
|
|
148
|
+
case 110:
|
|
149
|
+
result += `
|
|
150
|
+
`;
|
|
151
|
+
break;
|
|
152
|
+
case 114:
|
|
153
|
+
result += "\r";
|
|
154
|
+
break;
|
|
155
|
+
case 116:
|
|
156
|
+
result += "\t";
|
|
157
|
+
break;
|
|
158
|
+
case 117:
|
|
159
|
+
const ch3 = scanHexDigits(4, true);
|
|
160
|
+
if (ch3 >= 0) {
|
|
161
|
+
result += String.fromCharCode(ch3);
|
|
162
|
+
} else {
|
|
163
|
+
scanError = 4;
|
|
164
|
+
}
|
|
165
|
+
break;
|
|
166
|
+
default:
|
|
167
|
+
scanError = 5;
|
|
168
|
+
}
|
|
169
|
+
start = pos;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (ch >= 0 && ch <= 31) {
|
|
173
|
+
if (isLineBreak(ch)) {
|
|
174
|
+
result += text.substring(start, pos);
|
|
175
|
+
scanError = 2;
|
|
176
|
+
break;
|
|
177
|
+
} else {
|
|
178
|
+
scanError = 6;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
pos++;
|
|
182
|
+
}
|
|
183
|
+
return result;
|
|
184
|
+
}
|
|
185
|
+
function scanNext() {
|
|
186
|
+
value = "";
|
|
187
|
+
scanError = 0;
|
|
188
|
+
tokenOffset = pos;
|
|
189
|
+
lineStartOffset = lineNumber;
|
|
190
|
+
prevTokenLineStartOffset = tokenLineStartOffset;
|
|
191
|
+
if (pos >= len) {
|
|
192
|
+
tokenOffset = len;
|
|
193
|
+
return token = 17;
|
|
194
|
+
}
|
|
195
|
+
let code = text.charCodeAt(pos);
|
|
196
|
+
if (isWhiteSpace(code)) {
|
|
197
|
+
do {
|
|
198
|
+
pos++;
|
|
199
|
+
value += String.fromCharCode(code);
|
|
200
|
+
code = text.charCodeAt(pos);
|
|
201
|
+
} while (isWhiteSpace(code));
|
|
202
|
+
return token = 15;
|
|
203
|
+
}
|
|
204
|
+
if (isLineBreak(code)) {
|
|
205
|
+
pos++;
|
|
206
|
+
value += String.fromCharCode(code);
|
|
207
|
+
if (code === 13 && text.charCodeAt(pos) === 10) {
|
|
208
|
+
pos++;
|
|
209
|
+
value += `
|
|
210
|
+
`;
|
|
211
|
+
}
|
|
212
|
+
lineNumber++;
|
|
213
|
+
tokenLineStartOffset = pos;
|
|
214
|
+
return token = 14;
|
|
215
|
+
}
|
|
216
|
+
switch (code) {
|
|
217
|
+
case 123:
|
|
218
|
+
pos++;
|
|
219
|
+
return token = 1;
|
|
220
|
+
case 125:
|
|
221
|
+
pos++;
|
|
222
|
+
return token = 2;
|
|
223
|
+
case 91:
|
|
224
|
+
pos++;
|
|
225
|
+
return token = 3;
|
|
226
|
+
case 93:
|
|
227
|
+
pos++;
|
|
228
|
+
return token = 4;
|
|
229
|
+
case 58:
|
|
230
|
+
pos++;
|
|
231
|
+
return token = 6;
|
|
232
|
+
case 44:
|
|
233
|
+
pos++;
|
|
234
|
+
return token = 5;
|
|
235
|
+
case 34:
|
|
236
|
+
pos++;
|
|
237
|
+
value = scanString();
|
|
238
|
+
return token = 10;
|
|
239
|
+
case 47:
|
|
240
|
+
const start = pos - 1;
|
|
241
|
+
if (text.charCodeAt(pos + 1) === 47) {
|
|
242
|
+
pos += 2;
|
|
243
|
+
while (pos < len) {
|
|
244
|
+
if (isLineBreak(text.charCodeAt(pos))) {
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
pos++;
|
|
248
|
+
}
|
|
249
|
+
value = text.substring(start, pos);
|
|
250
|
+
return token = 12;
|
|
251
|
+
}
|
|
252
|
+
if (text.charCodeAt(pos + 1) === 42) {
|
|
253
|
+
pos += 2;
|
|
254
|
+
const safeLength = len - 1;
|
|
255
|
+
let commentClosed = false;
|
|
256
|
+
while (pos < safeLength) {
|
|
257
|
+
const ch = text.charCodeAt(pos);
|
|
258
|
+
if (ch === 42 && text.charCodeAt(pos + 1) === 47) {
|
|
259
|
+
pos += 2;
|
|
260
|
+
commentClosed = true;
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
pos++;
|
|
264
|
+
if (isLineBreak(ch)) {
|
|
265
|
+
if (ch === 13 && text.charCodeAt(pos) === 10) {
|
|
266
|
+
pos++;
|
|
267
|
+
}
|
|
268
|
+
lineNumber++;
|
|
269
|
+
tokenLineStartOffset = pos;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
if (!commentClosed) {
|
|
273
|
+
pos++;
|
|
274
|
+
scanError = 1;
|
|
275
|
+
}
|
|
276
|
+
value = text.substring(start, pos);
|
|
277
|
+
return token = 13;
|
|
278
|
+
}
|
|
279
|
+
value += String.fromCharCode(code);
|
|
280
|
+
pos++;
|
|
281
|
+
return token = 16;
|
|
282
|
+
case 45:
|
|
283
|
+
value += String.fromCharCode(code);
|
|
284
|
+
pos++;
|
|
285
|
+
if (pos === len || !isDigit(text.charCodeAt(pos))) {
|
|
286
|
+
return token = 16;
|
|
287
|
+
}
|
|
288
|
+
case 48:
|
|
289
|
+
case 49:
|
|
290
|
+
case 50:
|
|
291
|
+
case 51:
|
|
292
|
+
case 52:
|
|
293
|
+
case 53:
|
|
294
|
+
case 54:
|
|
295
|
+
case 55:
|
|
296
|
+
case 56:
|
|
297
|
+
case 57:
|
|
298
|
+
value += scanNumber();
|
|
299
|
+
return token = 11;
|
|
300
|
+
default:
|
|
301
|
+
while (pos < len && isUnknownContentCharacter(code)) {
|
|
302
|
+
pos++;
|
|
303
|
+
code = text.charCodeAt(pos);
|
|
304
|
+
}
|
|
305
|
+
if (tokenOffset !== pos) {
|
|
306
|
+
value = text.substring(tokenOffset, pos);
|
|
307
|
+
switch (value) {
|
|
308
|
+
case "true":
|
|
309
|
+
return token = 8;
|
|
310
|
+
case "false":
|
|
311
|
+
return token = 9;
|
|
312
|
+
case "null":
|
|
313
|
+
return token = 7;
|
|
314
|
+
}
|
|
315
|
+
return token = 16;
|
|
316
|
+
}
|
|
317
|
+
value += String.fromCharCode(code);
|
|
318
|
+
pos++;
|
|
319
|
+
return token = 16;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function isUnknownContentCharacter(code) {
|
|
323
|
+
if (isWhiteSpace(code) || isLineBreak(code)) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
switch (code) {
|
|
327
|
+
case 125:
|
|
328
|
+
case 93:
|
|
329
|
+
case 123:
|
|
330
|
+
case 91:
|
|
331
|
+
case 34:
|
|
332
|
+
case 58:
|
|
333
|
+
case 44:
|
|
334
|
+
case 47:
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
return true;
|
|
338
|
+
}
|
|
339
|
+
function scanNextNonTrivia() {
|
|
340
|
+
let result;
|
|
341
|
+
do {
|
|
342
|
+
result = scanNext();
|
|
343
|
+
} while (result >= 12 && result <= 15);
|
|
344
|
+
return result;
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
setPosition,
|
|
348
|
+
getPosition: () => pos,
|
|
349
|
+
scan: ignoreTrivia ? scanNextNonTrivia : scanNext,
|
|
350
|
+
getToken: () => token,
|
|
351
|
+
getTokenValue: () => value,
|
|
352
|
+
getTokenOffset: () => tokenOffset,
|
|
353
|
+
getTokenLength: () => pos - tokenOffset,
|
|
354
|
+
getTokenStartLine: () => lineStartOffset,
|
|
355
|
+
getTokenStartCharacter: () => tokenOffset - prevTokenLineStartOffset,
|
|
356
|
+
getTokenError: () => scanError
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
function isWhiteSpace(ch) {
|
|
360
|
+
return ch === 32 || ch === 9;
|
|
361
|
+
}
|
|
362
|
+
function isLineBreak(ch) {
|
|
363
|
+
return ch === 10 || ch === 13;
|
|
364
|
+
}
|
|
365
|
+
function isDigit(ch) {
|
|
366
|
+
return ch >= 48 && ch <= 57;
|
|
367
|
+
}
|
|
368
|
+
var CharacterCodes;
|
|
369
|
+
var init_scanner = __esm(() => {
|
|
370
|
+
(function(CharacterCodes2) {
|
|
371
|
+
CharacterCodes2[CharacterCodes2["lineFeed"] = 10] = "lineFeed";
|
|
372
|
+
CharacterCodes2[CharacterCodes2["carriageReturn"] = 13] = "carriageReturn";
|
|
373
|
+
CharacterCodes2[CharacterCodes2["space"] = 32] = "space";
|
|
374
|
+
CharacterCodes2[CharacterCodes2["_0"] = 48] = "_0";
|
|
375
|
+
CharacterCodes2[CharacterCodes2["_1"] = 49] = "_1";
|
|
376
|
+
CharacterCodes2[CharacterCodes2["_2"] = 50] = "_2";
|
|
377
|
+
CharacterCodes2[CharacterCodes2["_3"] = 51] = "_3";
|
|
378
|
+
CharacterCodes2[CharacterCodes2["_4"] = 52] = "_4";
|
|
379
|
+
CharacterCodes2[CharacterCodes2["_5"] = 53] = "_5";
|
|
380
|
+
CharacterCodes2[CharacterCodes2["_6"] = 54] = "_6";
|
|
381
|
+
CharacterCodes2[CharacterCodes2["_7"] = 55] = "_7";
|
|
382
|
+
CharacterCodes2[CharacterCodes2["_8"] = 56] = "_8";
|
|
383
|
+
CharacterCodes2[CharacterCodes2["_9"] = 57] = "_9";
|
|
384
|
+
CharacterCodes2[CharacterCodes2["a"] = 97] = "a";
|
|
385
|
+
CharacterCodes2[CharacterCodes2["b"] = 98] = "b";
|
|
386
|
+
CharacterCodes2[CharacterCodes2["c"] = 99] = "c";
|
|
387
|
+
CharacterCodes2[CharacterCodes2["d"] = 100] = "d";
|
|
388
|
+
CharacterCodes2[CharacterCodes2["e"] = 101] = "e";
|
|
389
|
+
CharacterCodes2[CharacterCodes2["f"] = 102] = "f";
|
|
390
|
+
CharacterCodes2[CharacterCodes2["g"] = 103] = "g";
|
|
391
|
+
CharacterCodes2[CharacterCodes2["h"] = 104] = "h";
|
|
392
|
+
CharacterCodes2[CharacterCodes2["i"] = 105] = "i";
|
|
393
|
+
CharacterCodes2[CharacterCodes2["j"] = 106] = "j";
|
|
394
|
+
CharacterCodes2[CharacterCodes2["k"] = 107] = "k";
|
|
395
|
+
CharacterCodes2[CharacterCodes2["l"] = 108] = "l";
|
|
396
|
+
CharacterCodes2[CharacterCodes2["m"] = 109] = "m";
|
|
397
|
+
CharacterCodes2[CharacterCodes2["n"] = 110] = "n";
|
|
398
|
+
CharacterCodes2[CharacterCodes2["o"] = 111] = "o";
|
|
399
|
+
CharacterCodes2[CharacterCodes2["p"] = 112] = "p";
|
|
400
|
+
CharacterCodes2[CharacterCodes2["q"] = 113] = "q";
|
|
401
|
+
CharacterCodes2[CharacterCodes2["r"] = 114] = "r";
|
|
402
|
+
CharacterCodes2[CharacterCodes2["s"] = 115] = "s";
|
|
403
|
+
CharacterCodes2[CharacterCodes2["t"] = 116] = "t";
|
|
404
|
+
CharacterCodes2[CharacterCodes2["u"] = 117] = "u";
|
|
405
|
+
CharacterCodes2[CharacterCodes2["v"] = 118] = "v";
|
|
406
|
+
CharacterCodes2[CharacterCodes2["w"] = 119] = "w";
|
|
407
|
+
CharacterCodes2[CharacterCodes2["x"] = 120] = "x";
|
|
408
|
+
CharacterCodes2[CharacterCodes2["y"] = 121] = "y";
|
|
409
|
+
CharacterCodes2[CharacterCodes2["z"] = 122] = "z";
|
|
410
|
+
CharacterCodes2[CharacterCodes2["A"] = 65] = "A";
|
|
411
|
+
CharacterCodes2[CharacterCodes2["B"] = 66] = "B";
|
|
412
|
+
CharacterCodes2[CharacterCodes2["C"] = 67] = "C";
|
|
413
|
+
CharacterCodes2[CharacterCodes2["D"] = 68] = "D";
|
|
414
|
+
CharacterCodes2[CharacterCodes2["E"] = 69] = "E";
|
|
415
|
+
CharacterCodes2[CharacterCodes2["F"] = 70] = "F";
|
|
416
|
+
CharacterCodes2[CharacterCodes2["G"] = 71] = "G";
|
|
417
|
+
CharacterCodes2[CharacterCodes2["H"] = 72] = "H";
|
|
418
|
+
CharacterCodes2[CharacterCodes2["I"] = 73] = "I";
|
|
419
|
+
CharacterCodes2[CharacterCodes2["J"] = 74] = "J";
|
|
420
|
+
CharacterCodes2[CharacterCodes2["K"] = 75] = "K";
|
|
421
|
+
CharacterCodes2[CharacterCodes2["L"] = 76] = "L";
|
|
422
|
+
CharacterCodes2[CharacterCodes2["M"] = 77] = "M";
|
|
423
|
+
CharacterCodes2[CharacterCodes2["N"] = 78] = "N";
|
|
424
|
+
CharacterCodes2[CharacterCodes2["O"] = 79] = "O";
|
|
425
|
+
CharacterCodes2[CharacterCodes2["P"] = 80] = "P";
|
|
426
|
+
CharacterCodes2[CharacterCodes2["Q"] = 81] = "Q";
|
|
427
|
+
CharacterCodes2[CharacterCodes2["R"] = 82] = "R";
|
|
428
|
+
CharacterCodes2[CharacterCodes2["S"] = 83] = "S";
|
|
429
|
+
CharacterCodes2[CharacterCodes2["T"] = 84] = "T";
|
|
430
|
+
CharacterCodes2[CharacterCodes2["U"] = 85] = "U";
|
|
431
|
+
CharacterCodes2[CharacterCodes2["V"] = 86] = "V";
|
|
432
|
+
CharacterCodes2[CharacterCodes2["W"] = 87] = "W";
|
|
433
|
+
CharacterCodes2[CharacterCodes2["X"] = 88] = "X";
|
|
434
|
+
CharacterCodes2[CharacterCodes2["Y"] = 89] = "Y";
|
|
435
|
+
CharacterCodes2[CharacterCodes2["Z"] = 90] = "Z";
|
|
436
|
+
CharacterCodes2[CharacterCodes2["asterisk"] = 42] = "asterisk";
|
|
437
|
+
CharacterCodes2[CharacterCodes2["backslash"] = 92] = "backslash";
|
|
438
|
+
CharacterCodes2[CharacterCodes2["closeBrace"] = 125] = "closeBrace";
|
|
439
|
+
CharacterCodes2[CharacterCodes2["closeBracket"] = 93] = "closeBracket";
|
|
440
|
+
CharacterCodes2[CharacterCodes2["colon"] = 58] = "colon";
|
|
441
|
+
CharacterCodes2[CharacterCodes2["comma"] = 44] = "comma";
|
|
442
|
+
CharacterCodes2[CharacterCodes2["dot"] = 46] = "dot";
|
|
443
|
+
CharacterCodes2[CharacterCodes2["doubleQuote"] = 34] = "doubleQuote";
|
|
444
|
+
CharacterCodes2[CharacterCodes2["minus"] = 45] = "minus";
|
|
445
|
+
CharacterCodes2[CharacterCodes2["openBrace"] = 123] = "openBrace";
|
|
446
|
+
CharacterCodes2[CharacterCodes2["openBracket"] = 91] = "openBracket";
|
|
447
|
+
CharacterCodes2[CharacterCodes2["plus"] = 43] = "plus";
|
|
448
|
+
CharacterCodes2[CharacterCodes2["slash"] = 47] = "slash";
|
|
449
|
+
CharacterCodes2[CharacterCodes2["formFeed"] = 12] = "formFeed";
|
|
450
|
+
CharacterCodes2[CharacterCodes2["tab"] = 9] = "tab";
|
|
451
|
+
})(CharacterCodes || (CharacterCodes = {}));
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
// node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/string-intern.js
|
|
455
|
+
var cachedSpaces, maxCachedValues = 200, cachedBreakLinesWithSpaces, supportedEols;
|
|
456
|
+
var init_string_intern = __esm(() => {
|
|
457
|
+
cachedSpaces = new Array(20).fill(0).map((_, index) => {
|
|
458
|
+
return " ".repeat(index);
|
|
459
|
+
});
|
|
460
|
+
cachedBreakLinesWithSpaces = {
|
|
461
|
+
" ": {
|
|
462
|
+
"\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
463
|
+
return `
|
|
464
|
+
` + " ".repeat(index);
|
|
465
|
+
}),
|
|
466
|
+
"\r": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
467
|
+
return "\r" + " ".repeat(index);
|
|
468
|
+
}),
|
|
469
|
+
"\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
470
|
+
return `\r
|
|
471
|
+
` + " ".repeat(index);
|
|
472
|
+
})
|
|
473
|
+
},
|
|
474
|
+
"\t": {
|
|
475
|
+
"\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
476
|
+
return `
|
|
477
|
+
` + "\t".repeat(index);
|
|
478
|
+
}),
|
|
479
|
+
"\r": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
480
|
+
return "\r" + "\t".repeat(index);
|
|
481
|
+
}),
|
|
482
|
+
"\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
483
|
+
return `\r
|
|
484
|
+
` + "\t".repeat(index);
|
|
485
|
+
})
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
supportedEols = [`
|
|
489
|
+
`, "\r", `\r
|
|
490
|
+
`];
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
// node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/format.js
|
|
494
|
+
function format(documentText, range, options) {
|
|
495
|
+
let initialIndentLevel;
|
|
496
|
+
let formatText;
|
|
497
|
+
let formatTextStart;
|
|
498
|
+
let rangeStart;
|
|
499
|
+
let rangeEnd;
|
|
500
|
+
if (range) {
|
|
501
|
+
rangeStart = range.offset;
|
|
502
|
+
rangeEnd = rangeStart + range.length;
|
|
503
|
+
formatTextStart = rangeStart;
|
|
504
|
+
while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) {
|
|
505
|
+
formatTextStart--;
|
|
506
|
+
}
|
|
507
|
+
let endOffset = rangeEnd;
|
|
508
|
+
while (endOffset < documentText.length && !isEOL(documentText, endOffset)) {
|
|
509
|
+
endOffset++;
|
|
510
|
+
}
|
|
511
|
+
formatText = documentText.substring(formatTextStart, endOffset);
|
|
512
|
+
initialIndentLevel = computeIndentLevel(formatText, options);
|
|
513
|
+
} else {
|
|
514
|
+
formatText = documentText;
|
|
515
|
+
initialIndentLevel = 0;
|
|
516
|
+
formatTextStart = 0;
|
|
517
|
+
rangeStart = 0;
|
|
518
|
+
rangeEnd = documentText.length;
|
|
519
|
+
}
|
|
520
|
+
const eol = getEOL(options, documentText);
|
|
521
|
+
const eolFastPathSupported = supportedEols.includes(eol);
|
|
522
|
+
let numberLineBreaks = 0;
|
|
523
|
+
let indentLevel = 0;
|
|
524
|
+
let indentValue;
|
|
525
|
+
if (options.insertSpaces) {
|
|
526
|
+
indentValue = cachedSpaces[options.tabSize || 4] ?? repeat(cachedSpaces[1], options.tabSize || 4);
|
|
527
|
+
} else {
|
|
528
|
+
indentValue = "\t";
|
|
529
|
+
}
|
|
530
|
+
const indentType = indentValue === "\t" ? "\t" : " ";
|
|
531
|
+
let scanner = createScanner(formatText, false);
|
|
532
|
+
let hasError = false;
|
|
533
|
+
function newLinesAndIndent() {
|
|
534
|
+
if (numberLineBreaks > 1) {
|
|
535
|
+
return repeat(eol, numberLineBreaks) + repeat(indentValue, initialIndentLevel + indentLevel);
|
|
536
|
+
}
|
|
537
|
+
const amountOfSpaces = indentValue.length * (initialIndentLevel + indentLevel);
|
|
538
|
+
if (!eolFastPathSupported || amountOfSpaces > cachedBreakLinesWithSpaces[indentType][eol].length) {
|
|
539
|
+
return eol + repeat(indentValue, initialIndentLevel + indentLevel);
|
|
540
|
+
}
|
|
541
|
+
if (amountOfSpaces <= 0) {
|
|
542
|
+
return eol;
|
|
543
|
+
}
|
|
544
|
+
return cachedBreakLinesWithSpaces[indentType][eol][amountOfSpaces];
|
|
545
|
+
}
|
|
546
|
+
function scanNext() {
|
|
547
|
+
let token = scanner.scan();
|
|
548
|
+
numberLineBreaks = 0;
|
|
549
|
+
while (token === 15 || token === 14) {
|
|
550
|
+
if (token === 14 && options.keepLines) {
|
|
551
|
+
numberLineBreaks += 1;
|
|
552
|
+
} else if (token === 14) {
|
|
553
|
+
numberLineBreaks = 1;
|
|
554
|
+
}
|
|
555
|
+
token = scanner.scan();
|
|
556
|
+
}
|
|
557
|
+
hasError = token === 16 || scanner.getTokenError() !== 0;
|
|
558
|
+
return token;
|
|
559
|
+
}
|
|
560
|
+
const editOperations = [];
|
|
561
|
+
function addEdit(text, startOffset, endOffset) {
|
|
562
|
+
if (!hasError && (!range || startOffset < rangeEnd && endOffset > rangeStart) && documentText.substring(startOffset, endOffset) !== text) {
|
|
563
|
+
editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text });
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
let firstToken = scanNext();
|
|
567
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
568
|
+
addEdit(repeat(eol, numberLineBreaks), 0, 0);
|
|
569
|
+
}
|
|
570
|
+
if (firstToken !== 17) {
|
|
571
|
+
let firstTokenStart = scanner.getTokenOffset() + formatTextStart;
|
|
572
|
+
let initialIndent = indentValue.length * initialIndentLevel < 20 && options.insertSpaces ? cachedSpaces[indentValue.length * initialIndentLevel] : repeat(indentValue, initialIndentLevel);
|
|
573
|
+
addEdit(initialIndent, formatTextStart, firstTokenStart);
|
|
574
|
+
}
|
|
575
|
+
while (firstToken !== 17) {
|
|
576
|
+
let firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;
|
|
577
|
+
let secondToken = scanNext();
|
|
578
|
+
let replaceContent = "";
|
|
579
|
+
let needsLineBreak = false;
|
|
580
|
+
while (numberLineBreaks === 0 && (secondToken === 12 || secondToken === 13)) {
|
|
581
|
+
let commentTokenStart = scanner.getTokenOffset() + formatTextStart;
|
|
582
|
+
addEdit(cachedSpaces[1], firstTokenEnd, commentTokenStart);
|
|
583
|
+
firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;
|
|
584
|
+
needsLineBreak = secondToken === 12;
|
|
585
|
+
replaceContent = needsLineBreak ? newLinesAndIndent() : "";
|
|
586
|
+
secondToken = scanNext();
|
|
587
|
+
}
|
|
588
|
+
if (secondToken === 2) {
|
|
589
|
+
if (firstToken !== 1) {
|
|
590
|
+
indentLevel--;
|
|
591
|
+
}
|
|
592
|
+
if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 1) {
|
|
593
|
+
replaceContent = newLinesAndIndent();
|
|
594
|
+
} else if (options.keepLines) {
|
|
595
|
+
replaceContent = cachedSpaces[1];
|
|
596
|
+
}
|
|
597
|
+
} else if (secondToken === 4) {
|
|
598
|
+
if (firstToken !== 3) {
|
|
599
|
+
indentLevel--;
|
|
600
|
+
}
|
|
601
|
+
if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 3) {
|
|
602
|
+
replaceContent = newLinesAndIndent();
|
|
603
|
+
} else if (options.keepLines) {
|
|
604
|
+
replaceContent = cachedSpaces[1];
|
|
605
|
+
}
|
|
606
|
+
} else {
|
|
607
|
+
switch (firstToken) {
|
|
608
|
+
case 3:
|
|
609
|
+
case 1:
|
|
610
|
+
indentLevel++;
|
|
611
|
+
if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) {
|
|
612
|
+
replaceContent = newLinesAndIndent();
|
|
613
|
+
} else {
|
|
614
|
+
replaceContent = cachedSpaces[1];
|
|
615
|
+
}
|
|
616
|
+
break;
|
|
617
|
+
case 5:
|
|
618
|
+
if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) {
|
|
619
|
+
replaceContent = newLinesAndIndent();
|
|
620
|
+
} else {
|
|
621
|
+
replaceContent = cachedSpaces[1];
|
|
622
|
+
}
|
|
623
|
+
break;
|
|
624
|
+
case 12:
|
|
625
|
+
replaceContent = newLinesAndIndent();
|
|
626
|
+
break;
|
|
627
|
+
case 13:
|
|
628
|
+
if (numberLineBreaks > 0) {
|
|
629
|
+
replaceContent = newLinesAndIndent();
|
|
630
|
+
} else if (!needsLineBreak) {
|
|
631
|
+
replaceContent = cachedSpaces[1];
|
|
632
|
+
}
|
|
633
|
+
break;
|
|
634
|
+
case 6:
|
|
635
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
636
|
+
replaceContent = newLinesAndIndent();
|
|
637
|
+
} else if (!needsLineBreak) {
|
|
638
|
+
replaceContent = cachedSpaces[1];
|
|
639
|
+
}
|
|
640
|
+
break;
|
|
641
|
+
case 10:
|
|
642
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
643
|
+
replaceContent = newLinesAndIndent();
|
|
644
|
+
} else if (secondToken === 6 && !needsLineBreak) {
|
|
645
|
+
replaceContent = "";
|
|
646
|
+
}
|
|
647
|
+
break;
|
|
648
|
+
case 7:
|
|
649
|
+
case 8:
|
|
650
|
+
case 9:
|
|
651
|
+
case 11:
|
|
652
|
+
case 2:
|
|
653
|
+
case 4:
|
|
654
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
655
|
+
replaceContent = newLinesAndIndent();
|
|
656
|
+
} else {
|
|
657
|
+
if ((secondToken === 12 || secondToken === 13) && !needsLineBreak) {
|
|
658
|
+
replaceContent = cachedSpaces[1];
|
|
659
|
+
} else if (secondToken !== 5 && secondToken !== 17) {
|
|
660
|
+
hasError = true;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
break;
|
|
664
|
+
case 16:
|
|
665
|
+
hasError = true;
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
if (numberLineBreaks > 0 && (secondToken === 12 || secondToken === 13)) {
|
|
669
|
+
replaceContent = newLinesAndIndent();
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
if (secondToken === 17) {
|
|
673
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
674
|
+
replaceContent = newLinesAndIndent();
|
|
675
|
+
} else {
|
|
676
|
+
replaceContent = options.insertFinalNewline ? eol : "";
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
const secondTokenStart = scanner.getTokenOffset() + formatTextStart;
|
|
680
|
+
addEdit(replaceContent, firstTokenEnd, secondTokenStart);
|
|
681
|
+
firstToken = secondToken;
|
|
682
|
+
}
|
|
683
|
+
return editOperations;
|
|
684
|
+
}
|
|
685
|
+
function repeat(s, count) {
|
|
686
|
+
let result = "";
|
|
687
|
+
for (let i = 0;i < count; i++) {
|
|
688
|
+
result += s;
|
|
689
|
+
}
|
|
690
|
+
return result;
|
|
691
|
+
}
|
|
692
|
+
function computeIndentLevel(content, options) {
|
|
693
|
+
let i = 0;
|
|
694
|
+
let nChars = 0;
|
|
695
|
+
const tabSize = options.tabSize || 4;
|
|
696
|
+
while (i < content.length) {
|
|
697
|
+
let ch = content.charAt(i);
|
|
698
|
+
if (ch === cachedSpaces[1]) {
|
|
699
|
+
nChars++;
|
|
700
|
+
} else if (ch === "\t") {
|
|
701
|
+
nChars += tabSize;
|
|
702
|
+
} else {
|
|
703
|
+
break;
|
|
704
|
+
}
|
|
705
|
+
i++;
|
|
706
|
+
}
|
|
707
|
+
return Math.floor(nChars / tabSize);
|
|
708
|
+
}
|
|
709
|
+
function getEOL(options, text) {
|
|
710
|
+
for (let i = 0;i < text.length; i++) {
|
|
711
|
+
const ch = text.charAt(i);
|
|
712
|
+
if (ch === "\r") {
|
|
713
|
+
if (i + 1 < text.length && text.charAt(i + 1) === `
|
|
714
|
+
`) {
|
|
715
|
+
return `\r
|
|
716
|
+
`;
|
|
717
|
+
}
|
|
718
|
+
return "\r";
|
|
719
|
+
} else if (ch === `
|
|
720
|
+
`) {
|
|
721
|
+
return `
|
|
722
|
+
`;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
return options && options.eol || `
|
|
726
|
+
`;
|
|
727
|
+
}
|
|
728
|
+
function isEOL(text, offset) {
|
|
729
|
+
return `\r
|
|
730
|
+
`.indexOf(text.charAt(offset)) !== -1;
|
|
731
|
+
}
|
|
732
|
+
var init_format = __esm(() => {
|
|
733
|
+
init_scanner();
|
|
734
|
+
init_string_intern();
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
// node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/parser.js
|
|
738
|
+
function parse(text, errors = [], options = ParseOptions.DEFAULT) {
|
|
739
|
+
let currentProperty = null;
|
|
740
|
+
let currentParent = [];
|
|
741
|
+
const previousParents = [];
|
|
742
|
+
function onValue(value) {
|
|
743
|
+
if (Array.isArray(currentParent)) {
|
|
744
|
+
currentParent.push(value);
|
|
745
|
+
} else if (currentProperty !== null) {
|
|
746
|
+
currentParent[currentProperty] = value;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
const visitor = {
|
|
750
|
+
onObjectBegin: () => {
|
|
751
|
+
const object = {};
|
|
752
|
+
onValue(object);
|
|
753
|
+
previousParents.push(currentParent);
|
|
754
|
+
currentParent = object;
|
|
755
|
+
currentProperty = null;
|
|
756
|
+
},
|
|
757
|
+
onObjectProperty: (name) => {
|
|
758
|
+
currentProperty = name;
|
|
759
|
+
},
|
|
760
|
+
onObjectEnd: () => {
|
|
761
|
+
currentParent = previousParents.pop();
|
|
762
|
+
},
|
|
763
|
+
onArrayBegin: () => {
|
|
764
|
+
const array = [];
|
|
765
|
+
onValue(array);
|
|
766
|
+
previousParents.push(currentParent);
|
|
767
|
+
currentParent = array;
|
|
768
|
+
currentProperty = null;
|
|
769
|
+
},
|
|
770
|
+
onArrayEnd: () => {
|
|
771
|
+
currentParent = previousParents.pop();
|
|
772
|
+
},
|
|
773
|
+
onLiteralValue: onValue,
|
|
774
|
+
onError: (error, offset, length) => {
|
|
775
|
+
errors.push({ error, offset, length });
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
visit(text, visitor, options);
|
|
779
|
+
return currentParent[0];
|
|
780
|
+
}
|
|
781
|
+
function parseTree(text, errors = [], options = ParseOptions.DEFAULT) {
|
|
782
|
+
let currentParent = { type: "array", offset: -1, length: -1, children: [], parent: undefined };
|
|
783
|
+
function ensurePropertyComplete(endOffset) {
|
|
784
|
+
if (currentParent.type === "property") {
|
|
785
|
+
currentParent.length = endOffset - currentParent.offset;
|
|
786
|
+
currentParent = currentParent.parent;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
function onValue(valueNode) {
|
|
790
|
+
currentParent.children.push(valueNode);
|
|
791
|
+
return valueNode;
|
|
792
|
+
}
|
|
793
|
+
const visitor = {
|
|
794
|
+
onObjectBegin: (offset) => {
|
|
795
|
+
currentParent = onValue({ type: "object", offset, length: -1, parent: currentParent, children: [] });
|
|
796
|
+
},
|
|
797
|
+
onObjectProperty: (name, offset, length) => {
|
|
798
|
+
currentParent = onValue({ type: "property", offset, length: -1, parent: currentParent, children: [] });
|
|
799
|
+
currentParent.children.push({ type: "string", value: name, offset, length, parent: currentParent });
|
|
800
|
+
},
|
|
801
|
+
onObjectEnd: (offset, length) => {
|
|
802
|
+
ensurePropertyComplete(offset + length);
|
|
803
|
+
currentParent.length = offset + length - currentParent.offset;
|
|
804
|
+
currentParent = currentParent.parent;
|
|
805
|
+
ensurePropertyComplete(offset + length);
|
|
806
|
+
},
|
|
807
|
+
onArrayBegin: (offset, length) => {
|
|
808
|
+
currentParent = onValue({ type: "array", offset, length: -1, parent: currentParent, children: [] });
|
|
809
|
+
},
|
|
810
|
+
onArrayEnd: (offset, length) => {
|
|
811
|
+
currentParent.length = offset + length - currentParent.offset;
|
|
812
|
+
currentParent = currentParent.parent;
|
|
813
|
+
ensurePropertyComplete(offset + length);
|
|
814
|
+
},
|
|
815
|
+
onLiteralValue: (value, offset, length) => {
|
|
816
|
+
onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
|
|
817
|
+
ensurePropertyComplete(offset + length);
|
|
818
|
+
},
|
|
819
|
+
onSeparator: (sep, offset, length) => {
|
|
820
|
+
if (currentParent.type === "property") {
|
|
821
|
+
if (sep === ":") {
|
|
822
|
+
currentParent.colonOffset = offset;
|
|
823
|
+
} else if (sep === ",") {
|
|
824
|
+
ensurePropertyComplete(offset);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
onError: (error, offset, length) => {
|
|
829
|
+
errors.push({ error, offset, length });
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
visit(text, visitor, options);
|
|
833
|
+
const result = currentParent.children[0];
|
|
834
|
+
if (result) {
|
|
835
|
+
delete result.parent;
|
|
836
|
+
}
|
|
837
|
+
return result;
|
|
838
|
+
}
|
|
839
|
+
function findNodeAtLocation(root, path) {
|
|
840
|
+
if (!root) {
|
|
841
|
+
return;
|
|
842
|
+
}
|
|
843
|
+
let node = root;
|
|
844
|
+
for (let segment of path) {
|
|
845
|
+
if (typeof segment === "string") {
|
|
846
|
+
if (node.type !== "object" || !Array.isArray(node.children)) {
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
let found = false;
|
|
850
|
+
for (const propertyNode of node.children) {
|
|
851
|
+
if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment && propertyNode.children.length === 2) {
|
|
852
|
+
node = propertyNode.children[1];
|
|
853
|
+
found = true;
|
|
854
|
+
break;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
if (!found) {
|
|
858
|
+
return;
|
|
859
|
+
}
|
|
860
|
+
} else {
|
|
861
|
+
const index = segment;
|
|
862
|
+
if (node.type !== "array" || index < 0 || !Array.isArray(node.children) || index >= node.children.length) {
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
node = node.children[index];
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
return node;
|
|
869
|
+
}
|
|
870
|
+
function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
871
|
+
const _scanner = createScanner(text, false);
|
|
872
|
+
const _jsonPath = [];
|
|
873
|
+
let suppressedCallbacks = 0;
|
|
874
|
+
function toNoArgVisit(visitFunction) {
|
|
875
|
+
return visitFunction ? () => suppressedCallbacks === 0 && visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
|
|
876
|
+
}
|
|
877
|
+
function toOneArgVisit(visitFunction) {
|
|
878
|
+
return visitFunction ? (arg) => suppressedCallbacks === 0 && visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
|
|
879
|
+
}
|
|
880
|
+
function toOneArgVisitWithPath(visitFunction) {
|
|
881
|
+
return visitFunction ? (arg) => suppressedCallbacks === 0 && visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true;
|
|
882
|
+
}
|
|
883
|
+
function toBeginVisit(visitFunction) {
|
|
884
|
+
return visitFunction ? () => {
|
|
885
|
+
if (suppressedCallbacks > 0) {
|
|
886
|
+
suppressedCallbacks++;
|
|
887
|
+
} else {
|
|
888
|
+
let cbReturn = visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice());
|
|
889
|
+
if (cbReturn === false) {
|
|
890
|
+
suppressedCallbacks = 1;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
} : () => true;
|
|
894
|
+
}
|
|
895
|
+
function toEndVisit(visitFunction) {
|
|
896
|
+
return visitFunction ? () => {
|
|
897
|
+
if (suppressedCallbacks > 0) {
|
|
898
|
+
suppressedCallbacks--;
|
|
899
|
+
}
|
|
900
|
+
if (suppressedCallbacks === 0) {
|
|
901
|
+
visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter());
|
|
902
|
+
}
|
|
903
|
+
} : () => true;
|
|
904
|
+
}
|
|
905
|
+
const onObjectBegin = toBeginVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toEndVisit(visitor.onObjectEnd), onArrayBegin = toBeginVisit(visitor.onArrayBegin), onArrayEnd = toEndVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);
|
|
906
|
+
const disallowComments = options && options.disallowComments;
|
|
907
|
+
const allowTrailingComma = options && options.allowTrailingComma;
|
|
908
|
+
function scanNext() {
|
|
909
|
+
while (true) {
|
|
910
|
+
const token = _scanner.scan();
|
|
911
|
+
switch (_scanner.getTokenError()) {
|
|
912
|
+
case 4:
|
|
913
|
+
handleError(14);
|
|
914
|
+
break;
|
|
915
|
+
case 5:
|
|
916
|
+
handleError(15);
|
|
917
|
+
break;
|
|
918
|
+
case 3:
|
|
919
|
+
handleError(13);
|
|
920
|
+
break;
|
|
921
|
+
case 1:
|
|
922
|
+
if (!disallowComments) {
|
|
923
|
+
handleError(11);
|
|
924
|
+
}
|
|
925
|
+
break;
|
|
926
|
+
case 2:
|
|
927
|
+
handleError(12);
|
|
928
|
+
break;
|
|
929
|
+
case 6:
|
|
930
|
+
handleError(16);
|
|
931
|
+
break;
|
|
932
|
+
}
|
|
933
|
+
switch (token) {
|
|
934
|
+
case 12:
|
|
935
|
+
case 13:
|
|
936
|
+
if (disallowComments) {
|
|
937
|
+
handleError(10);
|
|
938
|
+
} else {
|
|
939
|
+
onComment();
|
|
940
|
+
}
|
|
941
|
+
break;
|
|
942
|
+
case 16:
|
|
943
|
+
handleError(1);
|
|
944
|
+
break;
|
|
945
|
+
case 15:
|
|
946
|
+
case 14:
|
|
947
|
+
break;
|
|
948
|
+
default:
|
|
949
|
+
return token;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
function handleError(error, skipUntilAfter = [], skipUntil = []) {
|
|
954
|
+
onError(error);
|
|
955
|
+
if (skipUntilAfter.length + skipUntil.length > 0) {
|
|
956
|
+
let token = _scanner.getToken();
|
|
957
|
+
while (token !== 17) {
|
|
958
|
+
if (skipUntilAfter.indexOf(token) !== -1) {
|
|
959
|
+
scanNext();
|
|
960
|
+
break;
|
|
961
|
+
} else if (skipUntil.indexOf(token) !== -1) {
|
|
962
|
+
break;
|
|
963
|
+
}
|
|
964
|
+
token = scanNext();
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
function parseString(isValue) {
|
|
969
|
+
const value = _scanner.getTokenValue();
|
|
970
|
+
if (isValue) {
|
|
971
|
+
onLiteralValue(value);
|
|
972
|
+
} else {
|
|
973
|
+
onObjectProperty(value);
|
|
974
|
+
_jsonPath.push(value);
|
|
975
|
+
}
|
|
976
|
+
scanNext();
|
|
977
|
+
return true;
|
|
978
|
+
}
|
|
979
|
+
function parseLiteral() {
|
|
980
|
+
switch (_scanner.getToken()) {
|
|
981
|
+
case 11:
|
|
982
|
+
const tokenValue = _scanner.getTokenValue();
|
|
983
|
+
let value = Number(tokenValue);
|
|
984
|
+
if (isNaN(value)) {
|
|
985
|
+
handleError(2);
|
|
986
|
+
value = 0;
|
|
987
|
+
}
|
|
988
|
+
onLiteralValue(value);
|
|
989
|
+
break;
|
|
990
|
+
case 7:
|
|
991
|
+
onLiteralValue(null);
|
|
992
|
+
break;
|
|
993
|
+
case 8:
|
|
994
|
+
onLiteralValue(true);
|
|
995
|
+
break;
|
|
996
|
+
case 9:
|
|
997
|
+
onLiteralValue(false);
|
|
998
|
+
break;
|
|
999
|
+
default:
|
|
1000
|
+
return false;
|
|
1001
|
+
}
|
|
1002
|
+
scanNext();
|
|
1003
|
+
return true;
|
|
1004
|
+
}
|
|
1005
|
+
function parseProperty() {
|
|
1006
|
+
if (_scanner.getToken() !== 10) {
|
|
1007
|
+
handleError(3, [], [2, 5]);
|
|
1008
|
+
return false;
|
|
1009
|
+
}
|
|
1010
|
+
parseString(false);
|
|
1011
|
+
if (_scanner.getToken() === 6) {
|
|
1012
|
+
onSeparator(":");
|
|
1013
|
+
scanNext();
|
|
1014
|
+
if (!parseValue()) {
|
|
1015
|
+
handleError(4, [], [2, 5]);
|
|
1016
|
+
}
|
|
1017
|
+
} else {
|
|
1018
|
+
handleError(5, [], [2, 5]);
|
|
1019
|
+
}
|
|
1020
|
+
_jsonPath.pop();
|
|
1021
|
+
return true;
|
|
1022
|
+
}
|
|
1023
|
+
function parseObject() {
|
|
1024
|
+
onObjectBegin();
|
|
1025
|
+
scanNext();
|
|
1026
|
+
let needsComma = false;
|
|
1027
|
+
while (_scanner.getToken() !== 2 && _scanner.getToken() !== 17) {
|
|
1028
|
+
if (_scanner.getToken() === 5) {
|
|
1029
|
+
if (!needsComma) {
|
|
1030
|
+
handleError(4, [], []);
|
|
1031
|
+
}
|
|
1032
|
+
onSeparator(",");
|
|
1033
|
+
scanNext();
|
|
1034
|
+
if (_scanner.getToken() === 2 && allowTrailingComma) {
|
|
1035
|
+
break;
|
|
1036
|
+
}
|
|
1037
|
+
} else if (needsComma) {
|
|
1038
|
+
handleError(6, [], []);
|
|
1039
|
+
}
|
|
1040
|
+
if (!parseProperty()) {
|
|
1041
|
+
handleError(4, [], [2, 5]);
|
|
1042
|
+
}
|
|
1043
|
+
needsComma = true;
|
|
1044
|
+
}
|
|
1045
|
+
onObjectEnd();
|
|
1046
|
+
if (_scanner.getToken() !== 2) {
|
|
1047
|
+
handleError(7, [2], []);
|
|
1048
|
+
} else {
|
|
1049
|
+
scanNext();
|
|
1050
|
+
}
|
|
1051
|
+
return true;
|
|
1052
|
+
}
|
|
1053
|
+
function parseArray() {
|
|
1054
|
+
onArrayBegin();
|
|
1055
|
+
scanNext();
|
|
1056
|
+
let isFirstElement = true;
|
|
1057
|
+
let needsComma = false;
|
|
1058
|
+
while (_scanner.getToken() !== 4 && _scanner.getToken() !== 17) {
|
|
1059
|
+
if (_scanner.getToken() === 5) {
|
|
1060
|
+
if (!needsComma) {
|
|
1061
|
+
handleError(4, [], []);
|
|
1062
|
+
}
|
|
1063
|
+
onSeparator(",");
|
|
1064
|
+
scanNext();
|
|
1065
|
+
if (_scanner.getToken() === 4 && allowTrailingComma) {
|
|
1066
|
+
break;
|
|
1067
|
+
}
|
|
1068
|
+
} else if (needsComma) {
|
|
1069
|
+
handleError(6, [], []);
|
|
1070
|
+
}
|
|
1071
|
+
if (isFirstElement) {
|
|
1072
|
+
_jsonPath.push(0);
|
|
1073
|
+
isFirstElement = false;
|
|
1074
|
+
} else {
|
|
1075
|
+
_jsonPath[_jsonPath.length - 1]++;
|
|
1076
|
+
}
|
|
1077
|
+
if (!parseValue()) {
|
|
1078
|
+
handleError(4, [], [4, 5]);
|
|
1079
|
+
}
|
|
1080
|
+
needsComma = true;
|
|
1081
|
+
}
|
|
1082
|
+
onArrayEnd();
|
|
1083
|
+
if (!isFirstElement) {
|
|
1084
|
+
_jsonPath.pop();
|
|
1085
|
+
}
|
|
1086
|
+
if (_scanner.getToken() !== 4) {
|
|
1087
|
+
handleError(8, [4], []);
|
|
1088
|
+
} else {
|
|
1089
|
+
scanNext();
|
|
1090
|
+
}
|
|
1091
|
+
return true;
|
|
1092
|
+
}
|
|
1093
|
+
function parseValue() {
|
|
1094
|
+
switch (_scanner.getToken()) {
|
|
1095
|
+
case 3:
|
|
1096
|
+
return parseArray();
|
|
1097
|
+
case 1:
|
|
1098
|
+
return parseObject();
|
|
1099
|
+
case 10:
|
|
1100
|
+
return parseString(true);
|
|
1101
|
+
default:
|
|
1102
|
+
return parseLiteral();
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
scanNext();
|
|
1106
|
+
if (_scanner.getToken() === 17) {
|
|
1107
|
+
if (options.allowEmptyContent) {
|
|
1108
|
+
return true;
|
|
1109
|
+
}
|
|
1110
|
+
handleError(4, [], []);
|
|
1111
|
+
return false;
|
|
1112
|
+
}
|
|
1113
|
+
if (!parseValue()) {
|
|
1114
|
+
handleError(4, [], []);
|
|
1115
|
+
return false;
|
|
1116
|
+
}
|
|
1117
|
+
if (_scanner.getToken() !== 17) {
|
|
1118
|
+
handleError(9, [], []);
|
|
1119
|
+
}
|
|
1120
|
+
return true;
|
|
1121
|
+
}
|
|
1122
|
+
function getNodeType(value) {
|
|
1123
|
+
switch (typeof value) {
|
|
1124
|
+
case "boolean":
|
|
1125
|
+
return "boolean";
|
|
1126
|
+
case "number":
|
|
1127
|
+
return "number";
|
|
1128
|
+
case "string":
|
|
1129
|
+
return "string";
|
|
1130
|
+
case "object": {
|
|
1131
|
+
if (!value) {
|
|
1132
|
+
return "null";
|
|
1133
|
+
} else if (Array.isArray(value)) {
|
|
1134
|
+
return "array";
|
|
1135
|
+
}
|
|
1136
|
+
return "object";
|
|
1137
|
+
}
|
|
1138
|
+
default:
|
|
1139
|
+
return "null";
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
var ParseOptions;
|
|
1143
|
+
var init_parser = __esm(() => {
|
|
1144
|
+
init_scanner();
|
|
1145
|
+
(function(ParseOptions2) {
|
|
1146
|
+
ParseOptions2.DEFAULT = {
|
|
1147
|
+
allowTrailingComma: false
|
|
1148
|
+
};
|
|
1149
|
+
})(ParseOptions || (ParseOptions = {}));
|
|
1150
|
+
});
|
|
1151
|
+
|
|
1152
|
+
// node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
1153
|
+
function setProperty(text, originalPath, value, options) {
|
|
1154
|
+
const path = originalPath.slice();
|
|
1155
|
+
const errors = [];
|
|
1156
|
+
const root = parseTree(text, errors);
|
|
1157
|
+
let parent = undefined;
|
|
1158
|
+
let lastSegment = undefined;
|
|
1159
|
+
while (path.length > 0) {
|
|
1160
|
+
lastSegment = path.pop();
|
|
1161
|
+
parent = findNodeAtLocation(root, path);
|
|
1162
|
+
if (parent === undefined && value !== undefined) {
|
|
1163
|
+
if (typeof lastSegment === "string") {
|
|
1164
|
+
value = { [lastSegment]: value };
|
|
1165
|
+
} else {
|
|
1166
|
+
value = [value];
|
|
1167
|
+
}
|
|
1168
|
+
} else {
|
|
1169
|
+
break;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
if (!parent) {
|
|
1173
|
+
if (value === undefined) {
|
|
1174
|
+
throw new Error("Can not delete in empty document");
|
|
1175
|
+
}
|
|
1176
|
+
return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options);
|
|
1177
|
+
} else if (parent.type === "object" && typeof lastSegment === "string" && Array.isArray(parent.children)) {
|
|
1178
|
+
const existing = findNodeAtLocation(parent, [lastSegment]);
|
|
1179
|
+
if (existing !== undefined) {
|
|
1180
|
+
if (value === undefined) {
|
|
1181
|
+
if (!existing.parent) {
|
|
1182
|
+
throw new Error("Malformed AST");
|
|
1183
|
+
}
|
|
1184
|
+
const propertyIndex = parent.children.indexOf(existing.parent);
|
|
1185
|
+
let removeBegin;
|
|
1186
|
+
let removeEnd = existing.parent.offset + existing.parent.length;
|
|
1187
|
+
if (propertyIndex > 0) {
|
|
1188
|
+
let previous = parent.children[propertyIndex - 1];
|
|
1189
|
+
removeBegin = previous.offset + previous.length;
|
|
1190
|
+
} else {
|
|
1191
|
+
removeBegin = parent.offset + 1;
|
|
1192
|
+
if (parent.children.length > 1) {
|
|
1193
|
+
let next = parent.children[1];
|
|
1194
|
+
removeEnd = next.offset;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: "" }, options);
|
|
1198
|
+
} else {
|
|
1199
|
+
return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options);
|
|
1200
|
+
}
|
|
1201
|
+
} else {
|
|
1202
|
+
if (value === undefined) {
|
|
1203
|
+
return [];
|
|
1204
|
+
}
|
|
1205
|
+
const newProperty = `${JSON.stringify(lastSegment)}: ${JSON.stringify(value)}`;
|
|
1206
|
+
const index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map((p) => p.children[0].value)) : parent.children.length;
|
|
1207
|
+
let edit;
|
|
1208
|
+
if (index > 0) {
|
|
1209
|
+
let previous = parent.children[index - 1];
|
|
1210
|
+
edit = { offset: previous.offset + previous.length, length: 0, content: "," + newProperty };
|
|
1211
|
+
} else if (parent.children.length === 0) {
|
|
1212
|
+
edit = { offset: parent.offset + 1, length: 0, content: newProperty };
|
|
1213
|
+
} else {
|
|
1214
|
+
edit = { offset: parent.offset + 1, length: 0, content: newProperty + "," };
|
|
1215
|
+
}
|
|
1216
|
+
return withFormatting(text, edit, options);
|
|
1217
|
+
}
|
|
1218
|
+
} else if (parent.type === "array" && typeof lastSegment === "number" && Array.isArray(parent.children)) {
|
|
1219
|
+
const insertIndex = lastSegment;
|
|
1220
|
+
if (insertIndex === -1) {
|
|
1221
|
+
const newProperty = `${JSON.stringify(value)}`;
|
|
1222
|
+
let edit;
|
|
1223
|
+
if (parent.children.length === 0) {
|
|
1224
|
+
edit = { offset: parent.offset + 1, length: 0, content: newProperty };
|
|
1225
|
+
} else {
|
|
1226
|
+
const previous = parent.children[parent.children.length - 1];
|
|
1227
|
+
edit = { offset: previous.offset + previous.length, length: 0, content: "," + newProperty };
|
|
1228
|
+
}
|
|
1229
|
+
return withFormatting(text, edit, options);
|
|
1230
|
+
} else if (value === undefined && parent.children.length >= 0) {
|
|
1231
|
+
const removalIndex = lastSegment;
|
|
1232
|
+
const toRemove = parent.children[removalIndex];
|
|
1233
|
+
let edit;
|
|
1234
|
+
if (parent.children.length === 1) {
|
|
1235
|
+
edit = { offset: parent.offset + 1, length: parent.length - 2, content: "" };
|
|
1236
|
+
} else if (parent.children.length - 1 === removalIndex) {
|
|
1237
|
+
let previous = parent.children[removalIndex - 1];
|
|
1238
|
+
let offset = previous.offset + previous.length;
|
|
1239
|
+
let parentEndOffset = parent.offset + parent.length;
|
|
1240
|
+
edit = { offset, length: parentEndOffset - 2 - offset, content: "" };
|
|
1241
|
+
} else {
|
|
1242
|
+
edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: "" };
|
|
1243
|
+
}
|
|
1244
|
+
return withFormatting(text, edit, options);
|
|
1245
|
+
} else if (value !== undefined) {
|
|
1246
|
+
let edit;
|
|
1247
|
+
const newProperty = `${JSON.stringify(value)}`;
|
|
1248
|
+
if (!options.isArrayInsertion && parent.children.length > lastSegment) {
|
|
1249
|
+
const toModify = parent.children[lastSegment];
|
|
1250
|
+
edit = { offset: toModify.offset, length: toModify.length, content: newProperty };
|
|
1251
|
+
} else if (parent.children.length === 0 || lastSegment === 0) {
|
|
1252
|
+
edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + "," };
|
|
1253
|
+
} else {
|
|
1254
|
+
const index = lastSegment > parent.children.length ? parent.children.length : lastSegment;
|
|
1255
|
+
const previous = parent.children[index - 1];
|
|
1256
|
+
edit = { offset: previous.offset + previous.length, length: 0, content: "," + newProperty };
|
|
1257
|
+
}
|
|
1258
|
+
return withFormatting(text, edit, options);
|
|
1259
|
+
} else {
|
|
1260
|
+
throw new Error(`Can not ${value === undefined ? "remove" : options.isArrayInsertion ? "insert" : "modify"} Array index ${insertIndex} as length is not sufficient`);
|
|
1261
|
+
}
|
|
1262
|
+
} else {
|
|
1263
|
+
throw new Error(`Can not add ${typeof lastSegment !== "number" ? "index" : "property"} to parent of type ${parent.type}`);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
function withFormatting(text, edit, options) {
|
|
1267
|
+
if (!options.formattingOptions) {
|
|
1268
|
+
return [edit];
|
|
1269
|
+
}
|
|
1270
|
+
let newText = applyEdit(text, edit);
|
|
1271
|
+
let begin = edit.offset;
|
|
1272
|
+
let end = edit.offset + edit.content.length;
|
|
1273
|
+
if (edit.length === 0 || edit.content.length === 0) {
|
|
1274
|
+
while (begin > 0 && !isEOL(newText, begin - 1)) {
|
|
1275
|
+
begin--;
|
|
1276
|
+
}
|
|
1277
|
+
while (end < newText.length && !isEOL(newText, end)) {
|
|
1278
|
+
end++;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
const edits = format(newText, { offset: begin, length: end - begin }, { ...options.formattingOptions, keepLines: false });
|
|
1282
|
+
for (let i = edits.length - 1;i >= 0; i--) {
|
|
1283
|
+
const edit2 = edits[i];
|
|
1284
|
+
newText = applyEdit(newText, edit2);
|
|
1285
|
+
begin = Math.min(begin, edit2.offset);
|
|
1286
|
+
end = Math.max(end, edit2.offset + edit2.length);
|
|
1287
|
+
end += edit2.content.length - edit2.length;
|
|
1288
|
+
}
|
|
1289
|
+
const editLength = text.length - (newText.length - end) - begin;
|
|
1290
|
+
return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }];
|
|
1291
|
+
}
|
|
1292
|
+
function applyEdit(text, edit) {
|
|
1293
|
+
return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length);
|
|
1294
|
+
}
|
|
1295
|
+
var init_edit = __esm(() => {
|
|
1296
|
+
init_format();
|
|
1297
|
+
init_parser();
|
|
1298
|
+
});
|
|
1299
|
+
|
|
1300
|
+
// node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/main.js
|
|
1301
|
+
function modify(text, path, value, options) {
|
|
1302
|
+
return setProperty(text, path, value, options);
|
|
1303
|
+
}
|
|
1304
|
+
function applyEdits(text, edits) {
|
|
1305
|
+
let sortedEdits = edits.slice(0).sort((a, b) => {
|
|
1306
|
+
const diff = a.offset - b.offset;
|
|
1307
|
+
if (diff === 0) {
|
|
1308
|
+
return a.length - b.length;
|
|
1309
|
+
}
|
|
1310
|
+
return diff;
|
|
1311
|
+
});
|
|
1312
|
+
let lastModifiedOffset = text.length;
|
|
1313
|
+
for (let i = sortedEdits.length - 1;i >= 0; i--) {
|
|
1314
|
+
let e = sortedEdits[i];
|
|
1315
|
+
if (e.offset + e.length <= lastModifiedOffset) {
|
|
1316
|
+
text = applyEdit(text, e);
|
|
1317
|
+
} else {
|
|
1318
|
+
throw new Error("Overlapping edit");
|
|
1319
|
+
}
|
|
1320
|
+
lastModifiedOffset = e.offset;
|
|
1321
|
+
}
|
|
1322
|
+
return text;
|
|
1323
|
+
}
|
|
1324
|
+
var ScanError, SyntaxKind, parse2, ParseErrorCode;
|
|
1325
|
+
var init_main = __esm(() => {
|
|
1326
|
+
init_format();
|
|
1327
|
+
init_edit();
|
|
1328
|
+
init_scanner();
|
|
1329
|
+
init_parser();
|
|
1330
|
+
(function(ScanError2) {
|
|
1331
|
+
ScanError2[ScanError2["None"] = 0] = "None";
|
|
1332
|
+
ScanError2[ScanError2["UnexpectedEndOfComment"] = 1] = "UnexpectedEndOfComment";
|
|
1333
|
+
ScanError2[ScanError2["UnexpectedEndOfString"] = 2] = "UnexpectedEndOfString";
|
|
1334
|
+
ScanError2[ScanError2["UnexpectedEndOfNumber"] = 3] = "UnexpectedEndOfNumber";
|
|
1335
|
+
ScanError2[ScanError2["InvalidUnicode"] = 4] = "InvalidUnicode";
|
|
1336
|
+
ScanError2[ScanError2["InvalidEscapeCharacter"] = 5] = "InvalidEscapeCharacter";
|
|
1337
|
+
ScanError2[ScanError2["InvalidCharacter"] = 6] = "InvalidCharacter";
|
|
1338
|
+
})(ScanError || (ScanError = {}));
|
|
1339
|
+
(function(SyntaxKind2) {
|
|
1340
|
+
SyntaxKind2[SyntaxKind2["OpenBraceToken"] = 1] = "OpenBraceToken";
|
|
1341
|
+
SyntaxKind2[SyntaxKind2["CloseBraceToken"] = 2] = "CloseBraceToken";
|
|
1342
|
+
SyntaxKind2[SyntaxKind2["OpenBracketToken"] = 3] = "OpenBracketToken";
|
|
1343
|
+
SyntaxKind2[SyntaxKind2["CloseBracketToken"] = 4] = "CloseBracketToken";
|
|
1344
|
+
SyntaxKind2[SyntaxKind2["CommaToken"] = 5] = "CommaToken";
|
|
1345
|
+
SyntaxKind2[SyntaxKind2["ColonToken"] = 6] = "ColonToken";
|
|
1346
|
+
SyntaxKind2[SyntaxKind2["NullKeyword"] = 7] = "NullKeyword";
|
|
1347
|
+
SyntaxKind2[SyntaxKind2["TrueKeyword"] = 8] = "TrueKeyword";
|
|
1348
|
+
SyntaxKind2[SyntaxKind2["FalseKeyword"] = 9] = "FalseKeyword";
|
|
1349
|
+
SyntaxKind2[SyntaxKind2["StringLiteral"] = 10] = "StringLiteral";
|
|
1350
|
+
SyntaxKind2[SyntaxKind2["NumericLiteral"] = 11] = "NumericLiteral";
|
|
1351
|
+
SyntaxKind2[SyntaxKind2["LineCommentTrivia"] = 12] = "LineCommentTrivia";
|
|
1352
|
+
SyntaxKind2[SyntaxKind2["BlockCommentTrivia"] = 13] = "BlockCommentTrivia";
|
|
1353
|
+
SyntaxKind2[SyntaxKind2["LineBreakTrivia"] = 14] = "LineBreakTrivia";
|
|
1354
|
+
SyntaxKind2[SyntaxKind2["Trivia"] = 15] = "Trivia";
|
|
1355
|
+
SyntaxKind2[SyntaxKind2["Unknown"] = 16] = "Unknown";
|
|
1356
|
+
SyntaxKind2[SyntaxKind2["EOF"] = 17] = "EOF";
|
|
1357
|
+
})(SyntaxKind || (SyntaxKind = {}));
|
|
1358
|
+
parse2 = parse;
|
|
1359
|
+
(function(ParseErrorCode2) {
|
|
1360
|
+
ParseErrorCode2[ParseErrorCode2["InvalidSymbol"] = 1] = "InvalidSymbol";
|
|
1361
|
+
ParseErrorCode2[ParseErrorCode2["InvalidNumberFormat"] = 2] = "InvalidNumberFormat";
|
|
1362
|
+
ParseErrorCode2[ParseErrorCode2["PropertyNameExpected"] = 3] = "PropertyNameExpected";
|
|
1363
|
+
ParseErrorCode2[ParseErrorCode2["ValueExpected"] = 4] = "ValueExpected";
|
|
1364
|
+
ParseErrorCode2[ParseErrorCode2["ColonExpected"] = 5] = "ColonExpected";
|
|
1365
|
+
ParseErrorCode2[ParseErrorCode2["CommaExpected"] = 6] = "CommaExpected";
|
|
1366
|
+
ParseErrorCode2[ParseErrorCode2["CloseBraceExpected"] = 7] = "CloseBraceExpected";
|
|
1367
|
+
ParseErrorCode2[ParseErrorCode2["CloseBracketExpected"] = 8] = "CloseBracketExpected";
|
|
1368
|
+
ParseErrorCode2[ParseErrorCode2["EndOfFileExpected"] = 9] = "EndOfFileExpected";
|
|
1369
|
+
ParseErrorCode2[ParseErrorCode2["InvalidCommentToken"] = 10] = "InvalidCommentToken";
|
|
1370
|
+
ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfComment"] = 11] = "UnexpectedEndOfComment";
|
|
1371
|
+
ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfString"] = 12] = "UnexpectedEndOfString";
|
|
1372
|
+
ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfNumber"] = 13] = "UnexpectedEndOfNumber";
|
|
1373
|
+
ParseErrorCode2[ParseErrorCode2["InvalidUnicode"] = 14] = "InvalidUnicode";
|
|
1374
|
+
ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
|
|
1375
|
+
ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
|
|
1376
|
+
})(ParseErrorCode || (ParseErrorCode = {}));
|
|
1377
|
+
});
|
|
1378
|
+
|
|
1379
|
+
// src/utils/json.ts
|
|
1380
|
+
import { open, readFile, stat } from "fs/promises";
|
|
1381
|
+
function parseJSONUncached(json, shouldLogError) {
|
|
1382
|
+
try {
|
|
1383
|
+
return { ok: true, value: JSON.parse(stripBOM(json)) };
|
|
1384
|
+
} catch (e) {
|
|
1385
|
+
if (shouldLogError) {
|
|
1386
|
+
logError(e);
|
|
1387
|
+
}
|
|
1388
|
+
return { ok: false };
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
function safeParseJSONC(json) {
|
|
1392
|
+
if (!json) {
|
|
1393
|
+
return null;
|
|
1394
|
+
}
|
|
1395
|
+
try {
|
|
1396
|
+
return parse2(stripBOM(json));
|
|
1397
|
+
} catch (e) {
|
|
1398
|
+
logError(e);
|
|
1399
|
+
return null;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
function parseJSONLBun(data) {
|
|
1403
|
+
const parse3 = bunJSONLParse;
|
|
1404
|
+
const len = data.length;
|
|
1405
|
+
const result = parse3(data);
|
|
1406
|
+
if (!result.error || result.done || result.read >= len) {
|
|
1407
|
+
return result.values;
|
|
1408
|
+
}
|
|
1409
|
+
let values = result.values;
|
|
1410
|
+
let offset = result.read;
|
|
1411
|
+
while (offset < len) {
|
|
1412
|
+
const newlineIndex = typeof data === "string" ? data.indexOf(`
|
|
1413
|
+
`, offset) : data.indexOf(10, offset);
|
|
1414
|
+
if (newlineIndex === -1)
|
|
1415
|
+
break;
|
|
1416
|
+
offset = newlineIndex + 1;
|
|
1417
|
+
const next = parse3(data, offset);
|
|
1418
|
+
if (next.values.length > 0) {
|
|
1419
|
+
values = values.concat(next.values);
|
|
1420
|
+
}
|
|
1421
|
+
if (!next.error || next.done || next.read >= len)
|
|
1422
|
+
break;
|
|
1423
|
+
offset = next.read;
|
|
1424
|
+
}
|
|
1425
|
+
return values;
|
|
1426
|
+
}
|
|
1427
|
+
function parseJSONLBuffer(buf) {
|
|
1428
|
+
const bufLen = buf.length;
|
|
1429
|
+
let start = 0;
|
|
1430
|
+
if (buf[0] === 239 && buf[1] === 187 && buf[2] === 191) {
|
|
1431
|
+
start = 3;
|
|
1432
|
+
}
|
|
1433
|
+
const results = [];
|
|
1434
|
+
while (start < bufLen) {
|
|
1435
|
+
let end = buf.indexOf(10, start);
|
|
1436
|
+
if (end === -1)
|
|
1437
|
+
end = bufLen;
|
|
1438
|
+
const line = buf.toString("utf8", start, end).trim();
|
|
1439
|
+
start = end + 1;
|
|
1440
|
+
if (!line)
|
|
1441
|
+
continue;
|
|
1442
|
+
try {
|
|
1443
|
+
results.push(JSON.parse(line));
|
|
1444
|
+
} catch {}
|
|
1445
|
+
}
|
|
1446
|
+
return results;
|
|
1447
|
+
}
|
|
1448
|
+
function parseJSONLString(data) {
|
|
1449
|
+
const stripped = stripBOM(data);
|
|
1450
|
+
const len = stripped.length;
|
|
1451
|
+
let start = 0;
|
|
1452
|
+
const results = [];
|
|
1453
|
+
while (start < len) {
|
|
1454
|
+
let end = stripped.indexOf(`
|
|
1455
|
+
`, start);
|
|
1456
|
+
if (end === -1)
|
|
1457
|
+
end = len;
|
|
1458
|
+
const line = stripped.substring(start, end).trim();
|
|
1459
|
+
start = end + 1;
|
|
1460
|
+
if (!line)
|
|
1461
|
+
continue;
|
|
1462
|
+
try {
|
|
1463
|
+
results.push(JSON.parse(line));
|
|
1464
|
+
} catch {}
|
|
1465
|
+
}
|
|
1466
|
+
return results;
|
|
1467
|
+
}
|
|
1468
|
+
function parseJSONL(data) {
|
|
1469
|
+
if (bunJSONLParse) {
|
|
1470
|
+
return parseJSONLBun(data);
|
|
1471
|
+
}
|
|
1472
|
+
if (typeof data === "string") {
|
|
1473
|
+
return parseJSONLString(data);
|
|
1474
|
+
}
|
|
1475
|
+
return parseJSONLBuffer(data);
|
|
1476
|
+
}
|
|
1477
|
+
async function readJSONLFile(filePath) {
|
|
1478
|
+
let __stack = [];
|
|
1479
|
+
try {
|
|
1480
|
+
const { size } = await stat(filePath);
|
|
1481
|
+
if (size <= MAX_JSONL_READ_BYTES) {
|
|
1482
|
+
return parseJSONL(await readFile(filePath));
|
|
1483
|
+
}
|
|
1484
|
+
const fd = __using(__stack, await open(filePath, "r"), 1);
|
|
1485
|
+
const buf = Buffer.allocUnsafe(MAX_JSONL_READ_BYTES);
|
|
1486
|
+
let totalRead = 0;
|
|
1487
|
+
const fileOffset = size - MAX_JSONL_READ_BYTES;
|
|
1488
|
+
while (totalRead < MAX_JSONL_READ_BYTES) {
|
|
1489
|
+
const { bytesRead } = await fd.read(buf, totalRead, MAX_JSONL_READ_BYTES - totalRead, fileOffset + totalRead);
|
|
1490
|
+
if (bytesRead === 0)
|
|
1491
|
+
break;
|
|
1492
|
+
totalRead += bytesRead;
|
|
1493
|
+
}
|
|
1494
|
+
const newlineIndex = buf.indexOf(10);
|
|
1495
|
+
if (newlineIndex !== -1 && newlineIndex < totalRead - 1) {
|
|
1496
|
+
return parseJSONL(buf.subarray(newlineIndex + 1, totalRead));
|
|
1497
|
+
}
|
|
1498
|
+
return parseJSONL(buf.subarray(0, totalRead));
|
|
1499
|
+
} catch (_catch) {
|
|
1500
|
+
var _err = _catch, _hasErr = 1;
|
|
1501
|
+
} finally {
|
|
1502
|
+
var _promise = __callDispose(__stack, _err, _hasErr);
|
|
1503
|
+
_promise && await _promise;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
function addItemToJSONCArray(content, newItem) {
|
|
1507
|
+
try {
|
|
1508
|
+
if (!content || content.trim() === "") {
|
|
1509
|
+
return jsonStringify([newItem], null, 4);
|
|
1510
|
+
}
|
|
1511
|
+
const cleanContent = stripBOM(content);
|
|
1512
|
+
const parsedContent = parse2(cleanContent);
|
|
1513
|
+
if (Array.isArray(parsedContent)) {
|
|
1514
|
+
const arrayLength = parsedContent.length;
|
|
1515
|
+
const isEmpty = arrayLength === 0;
|
|
1516
|
+
const insertPath = isEmpty ? [0] : [arrayLength];
|
|
1517
|
+
const edits = modify(cleanContent, insertPath, newItem, {
|
|
1518
|
+
formattingOptions: { insertSpaces: true, tabSize: 4 },
|
|
1519
|
+
isArrayInsertion: true
|
|
1520
|
+
});
|
|
1521
|
+
if (!edits || edits.length === 0) {
|
|
1522
|
+
const copy = [...parsedContent, newItem];
|
|
1523
|
+
return jsonStringify(copy, null, 4);
|
|
1524
|
+
}
|
|
1525
|
+
return applyEdits(cleanContent, edits);
|
|
1526
|
+
} else {
|
|
1527
|
+
return jsonStringify([newItem], null, 4);
|
|
1528
|
+
}
|
|
1529
|
+
} catch (e) {
|
|
1530
|
+
logError(e);
|
|
1531
|
+
return jsonStringify([newItem], null, 4);
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
var PARSE_CACHE_MAX_KEY_BYTES, parseJSONCached, safeParseJSON, bunJSONLParse, MAX_JSONL_READ_BYTES;
|
|
1535
|
+
var init_json = __esm(() => {
|
|
1536
|
+
init_main();
|
|
1537
|
+
init_jsonRead();
|
|
1538
|
+
init_log();
|
|
1539
|
+
init_memoize();
|
|
1540
|
+
init_slowOperations();
|
|
1541
|
+
PARSE_CACHE_MAX_KEY_BYTES = 8 * 1024;
|
|
1542
|
+
parseJSONCached = memoizeWithLRU(parseJSONUncached, (json) => json, 50);
|
|
1543
|
+
safeParseJSON = Object.assign(function safeParseJSON2(json, shouldLogError = true) {
|
|
1544
|
+
if (!json)
|
|
1545
|
+
return null;
|
|
1546
|
+
const result = json.length > PARSE_CACHE_MAX_KEY_BYTES ? parseJSONUncached(json, shouldLogError) : parseJSONCached(json, shouldLogError);
|
|
1547
|
+
return result.ok ? result.value : null;
|
|
1548
|
+
}, { cache: parseJSONCached.cache });
|
|
1549
|
+
bunJSONLParse = (() => {
|
|
1550
|
+
if (typeof Bun === "undefined")
|
|
1551
|
+
return false;
|
|
1552
|
+
const b = Bun;
|
|
1553
|
+
const jsonl = b.JSONL;
|
|
1554
|
+
if (!jsonl?.parseChunk)
|
|
1555
|
+
return false;
|
|
1556
|
+
return jsonl.parseChunk;
|
|
1557
|
+
})();
|
|
1558
|
+
MAX_JSONL_READ_BYTES = 100 * 1024 * 1024;
|
|
1559
|
+
});
|
|
1560
|
+
|
|
1561
|
+
// src/services/mcp/types.ts
|
|
1562
|
+
var ConfigScopeSchema, TransportSchema, McpStdioServerConfigSchema, McpXaaConfigSchema, McpOAuthConfigSchema, McpSSEServerConfigSchema, McpSSEIDEServerConfigSchema, McpWebSocketIDEServerConfigSchema, McpHTTPServerConfigSchema, McpWebSocketServerConfigSchema, McpSdkServerConfigSchema, McpClaudeAIProxyServerConfigSchema, McpServerConfigSchema, McpJsonConfigSchema;
|
|
1563
|
+
var init_types = __esm(() => {
|
|
1564
|
+
init_v4();
|
|
1565
|
+
init_lazySchema();
|
|
1566
|
+
ConfigScopeSchema = lazySchema(() => exports_external.enum([
|
|
1567
|
+
"local",
|
|
1568
|
+
"user",
|
|
1569
|
+
"project",
|
|
1570
|
+
"dynamic",
|
|
1571
|
+
"enterprise",
|
|
1572
|
+
"claudeai",
|
|
1573
|
+
"managed"
|
|
1574
|
+
]));
|
|
1575
|
+
TransportSchema = lazySchema(() => exports_external.enum(["stdio", "sse", "sse-ide", "http", "ws", "sdk"]));
|
|
1576
|
+
McpStdioServerConfigSchema = lazySchema(() => exports_external.object({
|
|
1577
|
+
type: exports_external.literal("stdio").optional(),
|
|
1578
|
+
command: exports_external.string().min(1, "Command cannot be empty"),
|
|
1579
|
+
args: exports_external.array(exports_external.string()).default([]),
|
|
1580
|
+
env: exports_external.record(exports_external.string(), exports_external.string()).optional()
|
|
1581
|
+
}));
|
|
1582
|
+
McpXaaConfigSchema = lazySchema(() => exports_external.boolean());
|
|
1583
|
+
McpOAuthConfigSchema = lazySchema(() => exports_external.object({
|
|
1584
|
+
clientId: exports_external.string().optional(),
|
|
1585
|
+
callbackPort: exports_external.number().int().positive().optional(),
|
|
1586
|
+
authServerMetadataUrl: exports_external.string().url().startsWith("https://", {
|
|
1587
|
+
message: "authServerMetadataUrl must use https://"
|
|
1588
|
+
}).optional(),
|
|
1589
|
+
xaa: McpXaaConfigSchema().optional()
|
|
1590
|
+
}));
|
|
1591
|
+
McpSSEServerConfigSchema = lazySchema(() => exports_external.object({
|
|
1592
|
+
type: exports_external.literal("sse"),
|
|
1593
|
+
url: exports_external.string(),
|
|
1594
|
+
headers: exports_external.record(exports_external.string(), exports_external.string()).optional(),
|
|
1595
|
+
headersHelper: exports_external.string().optional(),
|
|
1596
|
+
oauth: McpOAuthConfigSchema().optional()
|
|
1597
|
+
}));
|
|
1598
|
+
McpSSEIDEServerConfigSchema = lazySchema(() => exports_external.object({
|
|
1599
|
+
type: exports_external.literal("sse-ide"),
|
|
1600
|
+
url: exports_external.string(),
|
|
1601
|
+
ideName: exports_external.string(),
|
|
1602
|
+
ideRunningInWindows: exports_external.boolean().optional()
|
|
1603
|
+
}));
|
|
1604
|
+
McpWebSocketIDEServerConfigSchema = lazySchema(() => exports_external.object({
|
|
1605
|
+
type: exports_external.literal("ws-ide"),
|
|
1606
|
+
url: exports_external.string(),
|
|
1607
|
+
ideName: exports_external.string(),
|
|
1608
|
+
authToken: exports_external.string().optional(),
|
|
1609
|
+
ideRunningInWindows: exports_external.boolean().optional()
|
|
1610
|
+
}));
|
|
1611
|
+
McpHTTPServerConfigSchema = lazySchema(() => exports_external.object({
|
|
1612
|
+
type: exports_external.literal("http"),
|
|
1613
|
+
url: exports_external.string(),
|
|
1614
|
+
headers: exports_external.record(exports_external.string(), exports_external.string()).optional(),
|
|
1615
|
+
headersHelper: exports_external.string().optional(),
|
|
1616
|
+
oauth: McpOAuthConfigSchema().optional()
|
|
1617
|
+
}));
|
|
1618
|
+
McpWebSocketServerConfigSchema = lazySchema(() => exports_external.object({
|
|
1619
|
+
type: exports_external.literal("ws"),
|
|
1620
|
+
url: exports_external.string(),
|
|
1621
|
+
headers: exports_external.record(exports_external.string(), exports_external.string()).optional(),
|
|
1622
|
+
headersHelper: exports_external.string().optional()
|
|
1623
|
+
}));
|
|
1624
|
+
McpSdkServerConfigSchema = lazySchema(() => exports_external.object({
|
|
1625
|
+
type: exports_external.literal("sdk"),
|
|
1626
|
+
name: exports_external.string()
|
|
1627
|
+
}));
|
|
1628
|
+
McpClaudeAIProxyServerConfigSchema = lazySchema(() => exports_external.object({
|
|
1629
|
+
type: exports_external.literal("claudeai-proxy"),
|
|
1630
|
+
url: exports_external.string(),
|
|
1631
|
+
id: exports_external.string()
|
|
1632
|
+
}));
|
|
1633
|
+
McpServerConfigSchema = lazySchema(() => exports_external.union([
|
|
1634
|
+
McpStdioServerConfigSchema(),
|
|
1635
|
+
McpSSEServerConfigSchema(),
|
|
1636
|
+
McpSSEIDEServerConfigSchema(),
|
|
1637
|
+
McpWebSocketIDEServerConfigSchema(),
|
|
1638
|
+
McpHTTPServerConfigSchema(),
|
|
1639
|
+
McpWebSocketServerConfigSchema(),
|
|
1640
|
+
McpSdkServerConfigSchema(),
|
|
1641
|
+
McpClaudeAIProxyServerConfigSchema()
|
|
1642
|
+
]));
|
|
1643
|
+
McpJsonConfigSchema = lazySchema(() => exports_external.object({
|
|
1644
|
+
mcpServers: exports_external.record(exports_external.string(), McpServerConfigSchema())
|
|
1645
|
+
}));
|
|
1646
|
+
});
|
|
1647
|
+
|
|
1648
|
+
export { stripBOM, init_jsonRead, safeParseJSON, safeParseJSONC, parseJSONL, readJSONLFile, addItemToJSONCArray, init_json, ConfigScopeSchema, McpStdioServerConfigSchema, McpServerConfigSchema, McpJsonConfigSchema, init_types };
|