powerlines 0.27.0 → 0.29.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/dist/{api-CHbGX3BG.d.ts → api-DE9Ixr0u.d.cts} +2 -2
- package/dist/{api-DGMQopJ5.d.cts → api-S471id5Y.d.ts} +2 -2
- package/dist/api.cjs +3 -3
- package/dist/api.d.cts +6 -2
- package/dist/api.d.ts +6 -2
- package/dist/api.js +2 -2
- package/dist/astro.cjs +5 -5
- package/dist/astro.d.cts +5 -1
- package/dist/astro.d.ts +5 -1
- package/dist/astro.js +4 -4
- package/dist/{chunk-RCYXXBJ3.cjs → chunk-246ZHDQL.cjs} +667 -231
- package/dist/{chunk-FZ6J2GMT.js → chunk-575Z57QD.js} +2 -2
- package/dist/{chunk-CF7B5HOG.cjs → chunk-57GCROWS.cjs} +4 -4
- package/dist/{chunk-KW66GUWJ.cjs → chunk-AGFJZWS3.cjs} +4 -4
- package/dist/{chunk-BH4JSKPK.js → chunk-FCZMWEL7.js} +3 -3
- package/dist/chunk-LRZLY3R7.cjs +12 -0
- package/dist/{chunk-PYID3NKT.js → chunk-M7SQJLGB.js} +6 -5
- package/dist/{chunk-HG7JY6AQ.cjs → chunk-N6UOEGTC.cjs} +7 -6
- package/dist/{chunk-ISPXQBOL.js → chunk-O5PLPU55.js} +3 -3
- package/dist/{chunk-2DWFEC7G.js → chunk-Q4ZLKJS2.js} +668 -232
- package/dist/{chunk-ON3LABX3.cjs → chunk-SALASTMK.cjs} +2 -2
- package/dist/{chunk-CSJMUAPJ.js → chunk-TARQ5ZEQ.js} +3 -3
- package/dist/chunk-X56DYZYO.js +9 -0
- package/dist/chunk-YEBH46ZU.cjs +12 -0
- package/dist/{chunk-YULFP33E.cjs → chunk-YFKHICPO.cjs} +2 -2
- package/dist/{chunk-P647W2BA.js → chunk-ZFMDBIE2.js} +2 -2
- package/dist/{context-BjOICcQB.d.cts → context-BwnxICfB.d.cts} +100 -25
- package/dist/{context-BqTYt9FC.d.ts → context-p7xgIm3D.d.ts} +100 -25
- package/dist/esbuild.cjs +7 -7
- package/dist/esbuild.d.cts +5 -1
- package/dist/esbuild.d.ts +5 -1
- package/dist/esbuild.js +4 -4
- package/dist/farm.cjs +4 -4
- package/dist/farm.d.cts +5 -1
- package/dist/farm.d.ts +5 -1
- package/dist/farm.js +3 -3
- package/dist/index.cjs +21 -21
- package/dist/index.d.cts +17 -5
- package/dist/index.d.ts +17 -5
- package/dist/index.js +10 -7
- package/dist/lib/{api-Cxmk8sFc.d.ts → api-1xCU-974.d.ts} +2 -2
- package/dist/lib/{api-_rRpguWX.d.cts → api-BvkhY-MU.d.cts} +2 -2
- package/dist/lib/build/esbuild.cjs +9 -6
- package/dist/lib/build/esbuild.cjs.map +1 -0
- package/dist/lib/build/esbuild.d.cts +6 -2
- package/dist/lib/build/esbuild.d.ts +6 -2
- package/dist/lib/build/esbuild.js +6 -3
- package/dist/lib/build/esbuild.js.map +1 -0
- package/dist/lib/build/index.cjs +47 -27
- package/dist/lib/build/index.cjs.map +1 -0
- package/dist/lib/build/index.d.cts +9 -4
- package/dist/lib/build/index.d.ts +9 -4
- package/dist/lib/build/index.js +15 -11
- package/dist/lib/build/index.js.map +1 -0
- package/dist/lib/build/rolldown.cjs +6 -4
- package/dist/lib/build/rolldown.cjs.map +1 -0
- package/dist/lib/build/rolldown.d.cts +6 -2
- package/dist/lib/build/rolldown.d.ts +6 -2
- package/dist/lib/build/rolldown.js +5 -3
- package/dist/lib/build/rolldown.js.map +1 -0
- package/dist/lib/build/rollup.cjs +6 -4
- package/dist/lib/build/rollup.cjs.map +1 -0
- package/dist/lib/build/rollup.d.cts +6 -2
- package/dist/lib/build/rollup.d.ts +6 -2
- package/dist/lib/build/rollup.js +4 -2
- package/dist/lib/build/rollup.js.map +1 -0
- package/dist/lib/build/rspack.cjs +5 -3
- package/dist/lib/build/rspack.cjs.map +1 -0
- package/dist/lib/build/rspack.d.cts +6 -2
- package/dist/lib/build/rspack.d.ts +6 -2
- package/dist/lib/build/rspack.js +4 -2
- package/dist/lib/build/rspack.js.map +1 -0
- package/dist/lib/build/tsdown.cjs +25 -0
- package/dist/lib/build/tsdown.cjs.map +1 -0
- package/dist/lib/build/tsdown.d.cts +60 -0
- package/dist/lib/build/tsdown.d.ts +60 -0
- package/dist/lib/build/tsdown.js +4 -0
- package/dist/lib/build/tsdown.js.map +1 -0
- package/dist/lib/build/tsup.cjs +10 -7
- package/dist/lib/build/tsup.cjs.map +1 -0
- package/dist/lib/build/tsup.d.cts +6 -2
- package/dist/lib/build/tsup.d.ts +6 -2
- package/dist/lib/build/tsup.js +7 -4
- package/dist/lib/build/tsup.js.map +1 -0
- package/dist/lib/build/unbuild.cjs +9 -7
- package/dist/lib/build/unbuild.cjs.map +1 -0
- package/dist/lib/build/unbuild.d.cts +8 -4
- package/dist/lib/build/unbuild.d.ts +8 -4
- package/dist/lib/build/unbuild.js +6 -4
- package/dist/lib/build/unbuild.js.map +1 -0
- package/dist/lib/build/vite.cjs +9 -6
- package/dist/lib/build/vite.cjs.map +1 -0
- package/dist/lib/build/vite.d.cts +6 -2
- package/dist/lib/build/vite.d.ts +6 -2
- package/dist/lib/build/vite.js +7 -4
- package/dist/lib/build/vite.js.map +1 -0
- package/dist/lib/build/webpack.cjs +5 -3
- package/dist/lib/build/webpack.cjs.map +1 -0
- package/dist/lib/build/webpack.d.cts +6 -2
- package/dist/lib/build/webpack.d.ts +6 -2
- package/dist/lib/build/webpack.js +4 -2
- package/dist/lib/build/webpack.js.map +1 -0
- package/dist/lib/{chunk-UNUP4XMO.cjs → chunk-23BFL3LB.cjs} +6 -4
- package/dist/lib/chunk-23BFL3LB.cjs.map +1 -0
- package/dist/lib/{chunk-26M3IUSK.js → chunk-26JHNKA7.js} +3 -1
- package/dist/lib/chunk-26JHNKA7.js.map +1 -0
- package/dist/lib/{chunk-4V5OI73E.cjs → chunk-2HAOX4Q2.cjs} +205 -124
- package/dist/lib/chunk-2HAOX4Q2.cjs.map +1 -0
- package/dist/lib/{chunk-2RHE4SGK.js → chunk-2IXO6SBG.js} +3 -1
- package/dist/lib/chunk-2IXO6SBG.js.map +1 -0
- package/dist/lib/{chunk-K3NBD5LL.cjs → chunk-2JR645O3.cjs} +5 -3
- package/dist/lib/chunk-2JR645O3.cjs.map +1 -0
- package/dist/lib/{chunk-Z5JKSYRP.cjs → chunk-2OMOKN7Y.cjs} +236 -73
- package/dist/lib/chunk-2OMOKN7Y.cjs.map +1 -0
- package/dist/lib/{chunk-ENRLU4UR.js → chunk-35EO5Y7R.js} +3 -1
- package/dist/lib/chunk-35EO5Y7R.js.map +1 -0
- package/dist/lib/{chunk-NDYKRNPQ.js → chunk-367E23MI.js} +3 -1
- package/dist/lib/chunk-367E23MI.js.map +1 -0
- package/dist/lib/{chunk-I76RI47U.cjs → chunk-3DKBH67A.cjs} +19 -15
- package/dist/lib/chunk-3DKBH67A.cjs.map +1 -0
- package/dist/lib/chunk-3GMJQ5G3.cjs +4 -0
- package/dist/lib/chunk-3GMJQ5G3.cjs.map +1 -0
- package/dist/lib/{chunk-OEF6EHQV.js → chunk-45D4XIOK.js} +3 -1
- package/dist/lib/chunk-45D4XIOK.js.map +1 -0
- package/dist/lib/chunk-4BPHC6QQ.js +3 -0
- package/dist/lib/chunk-4BPHC6QQ.js.map +1 -0
- package/dist/lib/{chunk-Q4D2L67H.cjs → chunk-4NBEK7BB.cjs} +8 -7
- package/dist/lib/chunk-4NBEK7BB.cjs.map +1 -0
- package/dist/lib/{chunk-AJDYMANR.cjs → chunk-4UN7FLKQ.cjs} +6 -4
- package/dist/lib/chunk-4UN7FLKQ.cjs.map +1 -0
- package/dist/lib/{chunk-QR2N3DPP.js → chunk-5QJRVWP3.js} +4 -2
- package/dist/lib/chunk-5QJRVWP3.js.map +1 -0
- package/dist/lib/{chunk-ONETLSPO.js → chunk-5QMQ5G73.js} +4 -2
- package/dist/lib/chunk-5QMQ5G73.js.map +1 -0
- package/dist/lib/{chunk-H7A5QVLY.cjs → chunk-62ZJYXT3.cjs} +7 -5
- package/dist/lib/chunk-62ZJYXT3.cjs.map +1 -0
- package/dist/lib/{chunk-JA4HSQRN.cjs → chunk-632PWWU7.cjs} +5 -3
- package/dist/lib/chunk-632PWWU7.cjs.map +1 -0
- package/dist/lib/{chunk-PIFNMTKN.cjs → chunk-63DAS6TJ.cjs} +6 -4
- package/dist/lib/chunk-63DAS6TJ.cjs.map +1 -0
- package/dist/lib/{chunk-OL35IC6Z.js → chunk-6OGQTUXF.js} +3 -1
- package/dist/lib/chunk-6OGQTUXF.js.map +1 -0
- package/dist/lib/{chunk-HE6HOGLS.js → chunk-7CDTHZ3R.js} +200 -37
- package/dist/lib/chunk-7CDTHZ3R.js.map +1 -0
- package/dist/lib/{chunk-QDRITYHV.cjs → chunk-7OO4SKFN.cjs} +6 -4
- package/dist/lib/chunk-7OO4SKFN.cjs.map +1 -0
- package/dist/lib/{chunk-SHUYVCID.js → chunk-7QVYU63E.js} +2 -0
- package/dist/lib/chunk-7QVYU63E.js.map +1 -0
- package/dist/lib/{chunk-GANVMM73.js → chunk-7R23HVGQ.js} +3 -1
- package/dist/lib/chunk-7R23HVGQ.js.map +1 -0
- package/dist/lib/chunk-A4RSMLXW.cjs +13 -0
- package/dist/lib/chunk-A4RSMLXW.cjs.map +1 -0
- package/dist/lib/{chunk-6OYSDQXE.cjs → chunk-AQNUFK3L.cjs} +47 -9
- package/dist/lib/chunk-AQNUFK3L.cjs.map +1 -0
- package/dist/lib/{chunk-HRRI4KOM.cjs → chunk-BJGMF356.cjs} +8 -6
- package/dist/lib/chunk-BJGMF356.cjs.map +1 -0
- package/dist/lib/{chunk-GLFOKUTH.cjs → chunk-BQA4H72F.cjs} +12 -10
- package/dist/lib/chunk-BQA4H72F.cjs.map +1 -0
- package/dist/lib/chunk-CLOW34EQ.js +3 -0
- package/dist/lib/chunk-CLOW34EQ.js.map +1 -0
- package/dist/lib/{chunk-VHCBD2IS.js → chunk-CTMPQSK7.js} +54 -1
- package/dist/lib/chunk-CTMPQSK7.js.map +1 -0
- package/dist/lib/{chunk-M263EZ4F.js → chunk-D55ZAZCX.js} +3 -1
- package/dist/lib/chunk-D55ZAZCX.js.map +1 -0
- package/dist/lib/{chunk-7GCAHOJK.js → chunk-D5IEZABI.js} +4 -2
- package/dist/lib/chunk-D5IEZABI.js.map +1 -0
- package/dist/lib/chunk-DQJCGJ5P.js +3 -0
- package/dist/lib/chunk-DQJCGJ5P.js.map +1 -0
- package/dist/lib/{chunk-KFDNKOXM.js → chunk-EBBGE5FN.js} +20 -2
- package/dist/lib/chunk-EBBGE5FN.js.map +1 -0
- package/dist/lib/chunk-FFATMOAQ.js +14 -0
- package/dist/lib/chunk-FFATMOAQ.js.map +1 -0
- package/dist/lib/chunk-FJMP4CXA.js +3 -0
- package/dist/lib/chunk-FJMP4CXA.js.map +1 -0
- package/dist/lib/{chunk-4PTER5EV.js → chunk-FKPVNUDU.js} +3 -1
- package/dist/lib/chunk-FKPVNUDU.js.map +1 -0
- package/dist/lib/{chunk-ZGMEHSNN.js → chunk-FPFPUYXS.js} +3 -1
- package/dist/lib/chunk-FPFPUYXS.js.map +1 -0
- package/dist/lib/{chunk-N5XEKCVW.cjs → chunk-FQZQA4EJ.cjs} +13 -20
- package/dist/lib/chunk-FQZQA4EJ.cjs.map +1 -0
- package/dist/lib/{chunk-3T56KQ7U.cjs → chunk-GDODHF3Y.cjs} +6 -4
- package/dist/lib/chunk-GDODHF3Y.cjs.map +1 -0
- package/dist/lib/chunk-GTNYRHTO.js +3 -0
- package/dist/lib/chunk-GTNYRHTO.js.map +1 -0
- package/dist/lib/chunk-HCJQJ2NV.cjs +203 -0
- package/dist/lib/chunk-HCJQJ2NV.cjs.map +1 -0
- package/dist/lib/{chunk-32Q2PG5D.js → chunk-HDUSUF6L.js} +3 -1
- package/dist/lib/chunk-HDUSUF6L.js.map +1 -0
- package/dist/lib/{chunk-TANQDHYY.js → chunk-HQ6TGY34.js} +3 -1
- package/dist/lib/chunk-HQ6TGY34.js.map +1 -0
- package/dist/lib/{chunk-JG4IL7XL.cjs → chunk-HYQXPNVP.cjs} +4 -2
- package/dist/lib/chunk-HYQXPNVP.cjs.map +1 -0
- package/dist/lib/{chunk-KJDASLW3.js → chunk-JEB4OVD5.js} +70 -14
- package/dist/lib/chunk-JEB4OVD5.js.map +1 -0
- package/dist/lib/{chunk-GK75G3OD.cjs → chunk-JSU4O5TH.cjs} +7 -5
- package/dist/lib/chunk-JSU4O5TH.cjs.map +1 -0
- package/dist/lib/chunk-K3FDM5F3.cjs +4 -0
- package/dist/lib/chunk-K3FDM5F3.cjs.map +1 -0
- package/dist/lib/{chunk-ZDBHX3VV.cjs → chunk-K7EXK3ZX.cjs} +142 -85
- package/dist/lib/chunk-K7EXK3ZX.cjs.map +1 -0
- package/dist/lib/{chunk-N5YLKWC2.js → chunk-KLU5DWCZ.js} +5 -11
- package/dist/lib/chunk-KLU5DWCZ.js.map +1 -0
- package/dist/lib/{chunk-R3E56AJ4.cjs → chunk-LIZRGQES.cjs} +7 -5
- package/dist/lib/chunk-LIZRGQES.cjs.map +1 -0
- package/dist/lib/{chunk-UJYCAW2D.cjs → chunk-LQMUXGB5.cjs} +37 -10
- package/dist/lib/chunk-LQMUXGB5.cjs.map +1 -0
- package/dist/lib/{chunk-CU23POMD.js → chunk-LSSLZECF.js} +4 -2
- package/dist/lib/chunk-LSSLZECF.js.map +1 -0
- package/dist/lib/{chunk-4NHFXDTQ.cjs → chunk-MFC7UJHT.cjs} +5 -3
- package/dist/lib/chunk-MFC7UJHT.cjs.map +1 -0
- package/dist/lib/{chunk-6RLV3FIS.js → chunk-MJ6WN3XA.js} +4 -2
- package/dist/lib/chunk-MJ6WN3XA.js.map +1 -0
- package/dist/lib/{chunk-HM52GHX3.js → chunk-MZ3GS5X3.js} +31 -4
- package/dist/lib/chunk-MZ3GS5X3.js.map +1 -0
- package/dist/lib/{chunk-T6KEXFRH.cjs → chunk-NPSC73QO.cjs} +10 -8
- package/dist/lib/chunk-NPSC73QO.cjs.map +1 -0
- package/dist/lib/{chunk-NST5TNW6.js → chunk-OC2AD37X.js} +3 -1
- package/dist/lib/chunk-OC2AD37X.js.map +1 -0
- package/dist/lib/{chunk-WUE7NTBW.cjs → chunk-OGEFARN2.cjs} +12 -10
- package/dist/lib/chunk-OGEFARN2.cjs.map +1 -0
- package/dist/lib/{chunk-3OCI4TH7.cjs → chunk-OXOTWH3L.cjs} +6 -4
- package/dist/lib/chunk-OXOTWH3L.cjs.map +1 -0
- package/dist/{plugin-utils/chunk-USNT2KNT.cjs → lib/chunk-PK6SKIKE.cjs} +2 -0
- package/dist/lib/chunk-PK6SKIKE.cjs.map +1 -0
- package/dist/lib/{chunk-XBM7FHNK.js → chunk-Q25ZPXA7.js} +3 -1
- package/dist/lib/chunk-Q25ZPXA7.js.map +1 -0
- package/dist/lib/{chunk-XUYQYUWZ.cjs → chunk-QBE4SZN6.cjs} +6 -4
- package/dist/lib/chunk-QBE4SZN6.cjs.map +1 -0
- package/dist/lib/{chunk-GA3RXX4R.cjs → chunk-QHTL2U3L.cjs} +10 -8
- package/dist/lib/chunk-QHTL2U3L.cjs.map +1 -0
- package/dist/lib/chunk-QMKA57N4.cjs +4 -0
- package/dist/lib/chunk-QMKA57N4.cjs.map +1 -0
- package/dist/lib/{chunk-MRAGQ33T.js → chunk-RHADQ6HA.js} +4 -2
- package/dist/lib/chunk-RHADQ6HA.js.map +1 -0
- package/dist/lib/{chunk-4SULM54S.js → chunk-RNSQODBR.js} +190 -109
- package/dist/lib/chunk-RNSQODBR.js.map +1 -0
- package/dist/lib/{chunk-2NZADVP5.cjs → chunk-RQICHHZM.cjs} +4 -2
- package/dist/lib/chunk-RQICHHZM.cjs.map +1 -0
- package/dist/lib/{chunk-YGSXCTX2.js → chunk-RTFLBGJI.js} +4 -3
- package/dist/lib/chunk-RTFLBGJI.js.map +1 -0
- package/dist/lib/chunk-SIYSGNDD.js +100 -0
- package/dist/lib/chunk-SIYSGNDD.js.map +1 -0
- package/dist/lib/chunk-SP5FOE5B.cjs +109 -0
- package/dist/lib/chunk-SP5FOE5B.cjs.map +1 -0
- package/dist/lib/{chunk-67DW5UDQ.js → chunk-SUABYS33.js} +5 -3
- package/dist/lib/chunk-SUABYS33.js.map +1 -0
- package/dist/lib/{chunk-CP77I6WM.js → chunk-US6LDIXH.js} +100 -43
- package/dist/lib/chunk-US6LDIXH.js.map +1 -0
- package/dist/lib/chunk-UYDY7RRQ.cjs +4 -0
- package/dist/lib/chunk-UYDY7RRQ.cjs.map +1 -0
- package/dist/lib/{chunk-AHK7GRPM.js → chunk-W2KADD56.js} +4 -2
- package/dist/lib/chunk-W2KADD56.js.map +1 -0
- package/dist/lib/chunk-XBOHJTOI.cjs +4 -0
- package/dist/lib/chunk-XBOHJTOI.cjs.map +1 -0
- package/dist/lib/{chunk-XLHFUATD.cjs → chunk-Y5KONJVR.cjs} +55 -2
- package/dist/lib/chunk-Y5KONJVR.cjs.map +1 -0
- package/dist/lib/chunk-YF57WETC.cjs +16 -0
- package/dist/lib/chunk-YF57WETC.cjs.map +1 -0
- package/dist/lib/{chunk-AFLI3CLM.js → chunk-YFB6OGXJ.js} +4 -2
- package/dist/lib/chunk-YFB6OGXJ.js.map +1 -0
- package/dist/lib/{chunk-L56XA427.js → chunk-YJEZASNU.js} +41 -3
- package/dist/lib/chunk-YJEZASNU.js.map +1 -0
- package/dist/lib/{chunk-A2NW7WAN.js → chunk-YMEXAI6M.js} +3 -1
- package/dist/lib/chunk-YMEXAI6M.js.map +1 -0
- package/dist/lib/{chunk-YYEAV24J.cjs → chunk-YYG2XJQN.cjs} +30 -11
- package/dist/lib/chunk-YYG2XJQN.cjs.map +1 -0
- package/dist/lib/{chunk-NDC5BKCD.cjs → chunk-YZ2NKI4K.cjs} +4 -2
- package/dist/lib/chunk-YZ2NKI4K.cjs.map +1 -0
- package/dist/lib/{chunk-YYN6TKSY.cjs → chunk-ZFOPHCGK.cjs} +4 -2
- package/dist/lib/chunk-ZFOPHCGK.cjs.map +1 -0
- package/dist/lib/{chunk-HL4KTZDB.cjs → chunk-ZGTXKPKZ.cjs} +5 -3
- package/dist/lib/chunk-ZGTXKPKZ.cjs.map +1 -0
- package/dist/lib/{chunk-4W6WV35V.js → chunk-ZLWW2MXD.js} +21 -15
- package/dist/lib/chunk-ZLWW2MXD.js.map +1 -0
- package/dist/lib/{chunk-YB54H3SQ.js → chunk-ZVZFMMNL.js} +10 -6
- package/dist/lib/chunk-ZVZFMMNL.js.map +1 -0
- package/dist/lib/{chunk-D6MI2V6R.cjs → chunk-ZWLSNYIN.cjs} +23 -17
- package/dist/lib/chunk-ZWLSNYIN.cjs.map +1 -0
- package/dist/lib/{config-DMXVnKGF.d.cts → config-CFT-8XXu.d.cts} +104 -21
- package/dist/lib/{config-B2q8Me0M.d.ts → config-CwebNcAh.d.ts} +104 -21
- package/dist/lib/config-file.cjs +6 -4
- package/dist/lib/config-file.cjs.map +1 -0
- package/dist/lib/config-file.d.cts +6 -2
- package/dist/lib/config-file.d.ts +6 -2
- package/dist/lib/config-file.js +4 -2
- package/dist/lib/config-file.js.map +1 -0
- package/dist/lib/contexts/api-context.cjs +20 -17
- package/dist/lib/contexts/api-context.cjs.map +1 -0
- package/dist/lib/contexts/api-context.d.cts +29 -6
- package/dist/lib/contexts/api-context.d.ts +29 -6
- package/dist/lib/contexts/api-context.js +19 -16
- package/dist/lib/contexts/api-context.js.map +1 -0
- package/dist/lib/contexts/context.cjs +17 -14
- package/dist/lib/contexts/context.cjs.map +1 -0
- package/dist/lib/contexts/context.d.cts +78 -11
- package/dist/lib/contexts/context.d.ts +78 -11
- package/dist/lib/contexts/context.js +16 -13
- package/dist/lib/contexts/context.js.map +1 -0
- package/dist/lib/contexts/environment-context.cjs +19 -16
- package/dist/lib/contexts/environment-context.cjs.map +1 -0
- package/dist/lib/contexts/environment-context.d.cts +10 -5
- package/dist/lib/contexts/environment-context.d.ts +10 -5
- package/dist/lib/contexts/environment-context.js +18 -15
- package/dist/lib/contexts/environment-context.js.map +1 -0
- package/dist/lib/contexts/index.cjs +24 -21
- package/dist/lib/contexts/index.cjs.map +1 -0
- package/dist/lib/contexts/index.d.cts +9 -4
- package/dist/lib/contexts/index.d.ts +9 -4
- package/dist/lib/contexts/index.js +20 -17
- package/dist/lib/contexts/index.js.map +1 -0
- package/dist/lib/contexts/plugin-context.cjs +5 -3
- package/dist/lib/contexts/plugin-context.cjs.map +1 -0
- package/dist/lib/contexts/plugin-context.d.cts +8 -4
- package/dist/lib/contexts/plugin-context.d.ts +8 -4
- package/dist/lib/contexts/plugin-context.js +4 -2
- package/dist/lib/contexts/plugin-context.js.map +1 -0
- package/dist/lib/entry.cjs +13 -10
- package/dist/lib/entry.cjs.map +1 -0
- package/dist/lib/entry.d.cts +6 -2
- package/dist/lib/entry.d.ts +6 -2
- package/dist/lib/entry.js +5 -2
- package/dist/lib/entry.js.map +1 -0
- package/dist/lib/fs/helpers.cjs +18 -12
- package/dist/lib/fs/helpers.cjs.map +1 -0
- package/dist/lib/fs/helpers.d.cts +10 -1
- package/dist/lib/fs/helpers.d.ts +10 -1
- package/dist/lib/fs/helpers.js +4 -2
- package/dist/lib/fs/helpers.js.map +1 -0
- package/dist/lib/fs/index.cjs +12 -9
- package/dist/lib/fs/index.cjs.map +1 -0
- package/dist/lib/fs/index.d.cts +7 -3
- package/dist/lib/fs/index.d.ts +7 -3
- package/dist/lib/fs/index.js +11 -8
- package/dist/lib/fs/index.js.map +1 -0
- package/dist/lib/fs/storage/base.cjs +5 -3
- package/dist/lib/fs/storage/base.cjs.map +1 -0
- package/dist/lib/fs/storage/base.d.cts +42 -1
- package/dist/lib/fs/storage/base.d.ts +42 -1
- package/dist/lib/fs/storage/base.js +4 -2
- package/dist/lib/fs/storage/base.js.map +1 -0
- package/dist/lib/fs/storage/file-system.cjs +7 -5
- package/dist/lib/fs/storage/file-system.cjs.map +1 -0
- package/dist/lib/fs/storage/file-system.d.cts +34 -2
- package/dist/lib/fs/storage/file-system.d.ts +34 -2
- package/dist/lib/fs/storage/file-system.js +6 -4
- package/dist/lib/fs/storage/file-system.js.map +1 -0
- package/dist/lib/fs/storage/index.cjs +10 -8
- package/dist/lib/fs/storage/index.cjs.map +1 -0
- package/dist/lib/fs/storage/index.d.cts +4 -2
- package/dist/lib/fs/storage/index.d.ts +4 -2
- package/dist/lib/fs/storage/index.js +7 -5
- package/dist/lib/fs/storage/index.js.map +1 -0
- package/dist/lib/fs/storage/virtual.cjs +6 -4
- package/dist/lib/fs/storage/virtual.cjs.map +1 -0
- package/dist/lib/fs/storage/virtual.d.cts +2 -1
- package/dist/lib/fs/storage/virtual.d.ts +2 -1
- package/dist/lib/fs/storage/virtual.js +5 -3
- package/dist/lib/fs/storage/virtual.js.map +1 -0
- package/dist/lib/fs/vfs.cjs +11 -8
- package/dist/lib/fs/vfs.cjs.map +1 -0
- package/dist/lib/fs/vfs.d.cts +51 -7
- package/dist/lib/fs/vfs.d.ts +51 -7
- package/dist/lib/fs/vfs.js +10 -7
- package/dist/lib/fs/vfs.js.map +1 -0
- package/dist/lib/{fs-Dg-aTfiN.d.cts → fs-abWbkR69.d.cts} +85 -4
- package/dist/lib/{fs-Dg-aTfiN.d.ts → fs-abWbkR69.d.ts} +85 -4
- package/dist/lib/index.cjs +98 -95
- package/dist/lib/index.cjs.map +1 -0
- package/dist/lib/index.d.cts +10 -6
- package/dist/lib/index.d.ts +10 -6
- package/dist/lib/index.js +38 -35
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/{internal-CfIJWv8T.d.cts → internal-BavTJeC5.d.cts} +2 -2
- package/dist/lib/{internal-CGIi3MOX.d.ts → internal-DxQ28691.d.ts} +2 -2
- package/dist/lib/logger.cjs +6 -4
- package/dist/lib/logger.cjs.map +1 -0
- package/dist/lib/logger.d.cts +6 -2
- package/dist/lib/logger.d.ts +6 -2
- package/dist/lib/logger.js +4 -2
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/typescript/import-transformer.cjs +5 -3
- package/dist/lib/typescript/import-transformer.cjs.map +1 -0
- package/dist/lib/typescript/import-transformer.d.cts +6 -2
- package/dist/lib/typescript/import-transformer.d.ts +6 -2
- package/dist/lib/typescript/import-transformer.js +4 -2
- package/dist/lib/typescript/import-transformer.js.map +1 -0
- package/dist/lib/typescript/index.cjs +21 -19
- package/dist/lib/typescript/index.cjs.map +1 -0
- package/dist/lib/typescript/index.d.cts +6 -2
- package/dist/lib/typescript/index.d.ts +6 -2
- package/dist/lib/typescript/index.js +8 -6
- package/dist/lib/typescript/index.js.map +1 -0
- package/dist/lib/typescript/isolated-decl.cjs +5 -3
- package/dist/lib/typescript/isolated-decl.cjs.map +1 -0
- package/dist/lib/typescript/isolated-decl.js +4 -2
- package/dist/lib/typescript/isolated-decl.js.map +1 -0
- package/dist/lib/typescript/ts-morph.cjs +6 -4
- package/dist/lib/typescript/ts-morph.cjs.map +1 -0
- package/dist/lib/typescript/ts-morph.d.cts +8 -4
- package/dist/lib/typescript/ts-morph.d.ts +8 -4
- package/dist/lib/typescript/ts-morph.js +4 -2
- package/dist/lib/typescript/ts-morph.js.map +1 -0
- package/dist/lib/typescript/tsconfig.cjs +11 -9
- package/dist/lib/typescript/tsconfig.cjs.map +1 -0
- package/dist/lib/typescript/tsconfig.js +4 -2
- package/dist/lib/typescript/tsconfig.js.map +1 -0
- package/dist/lib/unplugin/factory.cjs +23 -21
- package/dist/lib/unplugin/factory.cjs.map +1 -0
- package/dist/lib/unplugin/factory.d.cts +8 -4
- package/dist/lib/unplugin/factory.d.ts +8 -4
- package/dist/lib/unplugin/factory.js +22 -20
- package/dist/lib/unplugin/factory.js.map +1 -0
- package/dist/lib/unplugin/helpers.cjs +5 -3
- package/dist/lib/unplugin/helpers.cjs.map +1 -0
- package/dist/lib/unplugin/helpers.d.cts +6 -2
- package/dist/lib/unplugin/helpers.d.ts +6 -2
- package/dist/lib/unplugin/helpers.js +4 -2
- package/dist/lib/unplugin/helpers.js.map +1 -0
- package/dist/lib/unplugin/index.cjs +28 -26
- package/dist/lib/unplugin/index.cjs.map +1 -0
- package/dist/lib/unplugin/index.d.cts +9 -5
- package/dist/lib/unplugin/index.d.ts +9 -5
- package/dist/lib/unplugin/index.js +25 -23
- package/dist/lib/unplugin/index.js.map +1 -0
- package/dist/lib/unplugin/plugin.cjs +8 -6
- package/dist/lib/unplugin/plugin.cjs.map +1 -0
- package/dist/lib/unplugin/plugin.d.cts +10 -19
- package/dist/lib/unplugin/plugin.d.ts +10 -19
- package/dist/lib/unplugin/plugin.js +7 -5
- package/dist/lib/unplugin/plugin.js.map +1 -0
- package/dist/lib/{unplugin-Da9GAj4a.d.ts → unplugin-CpYxomBB.d.ts} +2 -2
- package/dist/lib/{unplugin-B_F1TZK4.d.cts → unplugin-DVAN82cd.d.cts} +2 -2
- package/dist/lib/utilities/bundle.cjs +8 -5
- package/dist/lib/utilities/bundle.cjs.map +1 -0
- package/dist/lib/utilities/bundle.d.cts +6 -2
- package/dist/lib/utilities/bundle.d.ts +6 -2
- package/dist/lib/utilities/bundle.js +7 -4
- package/dist/lib/utilities/bundle.js.map +1 -0
- package/dist/lib/utilities/cache.cjs +7 -5
- package/dist/lib/utilities/cache.cjs.map +1 -0
- package/dist/lib/utilities/cache.d.cts +6 -2
- package/dist/lib/utilities/cache.d.ts +6 -2
- package/dist/lib/utilities/cache.js +5 -3
- package/dist/lib/utilities/cache.js.map +1 -0
- package/dist/lib/utilities/file-header.cjs +6 -4
- package/dist/lib/utilities/file-header.cjs.map +1 -0
- package/dist/lib/utilities/file-header.d.cts +6 -2
- package/dist/lib/utilities/file-header.d.ts +6 -2
- package/dist/lib/utilities/file-header.js +4 -2
- package/dist/lib/utilities/file-header.js.map +1 -0
- package/dist/lib/utilities/index.cjs +45 -42
- package/dist/lib/utilities/index.cjs.map +1 -0
- package/dist/lib/utilities/index.d.cts +6 -2
- package/dist/lib/utilities/index.d.ts +6 -2
- package/dist/lib/utilities/index.js +17 -14
- package/dist/lib/utilities/index.js.map +1 -0
- package/dist/lib/utilities/meta.cjs +10 -8
- package/dist/lib/utilities/meta.cjs.map +1 -0
- package/dist/lib/utilities/meta.d.cts +6 -2
- package/dist/lib/utilities/meta.d.ts +6 -2
- package/dist/lib/utilities/meta.js +4 -2
- package/dist/lib/utilities/meta.js.map +1 -0
- package/dist/lib/utilities/resolve.cjs +9 -6
- package/dist/lib/utilities/resolve.cjs.map +1 -0
- package/dist/lib/utilities/resolve.d.cts +6 -2
- package/dist/lib/utilities/resolve.d.ts +6 -2
- package/dist/lib/utilities/resolve.js +8 -5
- package/dist/lib/utilities/resolve.js.map +1 -0
- package/dist/lib/utilities/source-file.cjs +7 -5
- package/dist/lib/utilities/source-file.cjs.map +1 -0
- package/dist/lib/utilities/source-file.d.cts +6 -2
- package/dist/lib/utilities/source-file.d.ts +6 -2
- package/dist/lib/utilities/source-file.js +4 -2
- package/dist/lib/utilities/source-file.js.map +1 -0
- package/dist/lib/utilities/source-map.cjs +5 -3
- package/dist/lib/utilities/source-map.cjs.map +1 -0
- package/dist/lib/utilities/source-map.d.cts +6 -2
- package/dist/lib/utilities/source-map.d.ts +6 -2
- package/dist/lib/utilities/source-map.js +4 -2
- package/dist/lib/utilities/source-map.js.map +1 -0
- package/dist/lib/utilities/worker.cjs +7 -5
- package/dist/lib/utilities/worker.cjs.map +1 -0
- package/dist/lib/utilities/worker.d.cts +6 -2
- package/dist/lib/utilities/worker.d.ts +6 -2
- package/dist/lib/utilities/worker.js +5 -3
- package/dist/lib/utilities/worker.js.map +1 -0
- package/dist/lib/utilities/write-file.cjs +5 -3
- package/dist/lib/utilities/write-file.cjs.map +1 -0
- package/dist/lib/utilities/write-file.d.cts +6 -2
- package/dist/lib/utilities/write-file.d.ts +6 -2
- package/dist/lib/utilities/write-file.js +4 -2
- package/dist/lib/utilities/write-file.js.map +1 -0
- package/dist/next.cjs +5 -5
- package/dist/next.js +4 -4
- package/dist/nuxt.cjs +7 -7
- package/dist/nuxt.js +5 -5
- package/dist/plugin-utils/{chunk-GV7O3E7P.js → chunk-36OM2X4L.js} +4 -2
- package/dist/plugin-utils/chunk-36OM2X4L.js.map +1 -0
- package/dist/plugin-utils/{chunk-SHUYVCID.js → chunk-7QVYU63E.js} +2 -0
- package/dist/plugin-utils/chunk-7QVYU63E.js.map +1 -0
- package/dist/plugin-utils/{chunk-XIXI67PY.js → chunk-7YN6UEMJ.js} +4 -2
- package/dist/plugin-utils/chunk-7YN6UEMJ.js.map +1 -0
- package/dist/plugin-utils/{chunk-DZZPNO5H.cjs → chunk-B2V5OVYF.cjs} +6 -4
- package/dist/plugin-utils/chunk-B2V5OVYF.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-NFXNZFMN.cjs → chunk-DUIPLC7F.cjs} +5 -3
- package/dist/plugin-utils/chunk-DUIPLC7F.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-SEH3RVMF.js → chunk-G32M72GJ.js} +3 -1
- package/dist/plugin-utils/chunk-G32M72GJ.js.map +1 -0
- package/dist/plugin-utils/{chunk-5MO4BCOW.cjs → chunk-GH7PPING.cjs} +4 -2
- package/dist/plugin-utils/chunk-GH7PPING.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-CYVV2MB7.js → chunk-H7GJUBNY.js} +3 -1
- package/dist/plugin-utils/chunk-H7GJUBNY.js.map +1 -0
- package/dist/plugin-utils/{chunk-ECFS7DPV.cjs → chunk-ID47RJFS.cjs} +9 -7
- package/dist/plugin-utils/chunk-ID47RJFS.cjs.map +1 -0
- package/dist/plugin-utils/chunk-NRJ5QYX2.js +14 -0
- package/dist/plugin-utils/chunk-NRJ5QYX2.js.map +1 -0
- package/dist/{lib/chunk-USNT2KNT.cjs → plugin-utils/chunk-PK6SKIKE.cjs} +2 -0
- package/dist/plugin-utils/chunk-PK6SKIKE.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-QKMG6ZAU.js → chunk-QQ63YK2G.js} +4 -2
- package/dist/plugin-utils/chunk-QQ63YK2G.js.map +1 -0
- package/dist/plugin-utils/chunk-RBMEE2JC.cjs +16 -0
- package/dist/plugin-utils/chunk-RBMEE2JC.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-UNAGYQRB.cjs → chunk-UXLKUCEY.cjs} +9 -7
- package/dist/plugin-utils/chunk-UXLKUCEY.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-F65J5WOX.cjs → chunk-VJGI676W.cjs} +16 -14
- package/dist/plugin-utils/chunk-VJGI676W.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-L277XSSN.js → chunk-X4BI25Z5.js} +3 -1
- package/dist/plugin-utils/chunk-X4BI25Z5.js.map +1 -0
- package/dist/plugin-utils/{context-y3G_SQPM.d.cts → context-BwokDIBz.d.cts} +167 -10
- package/dist/plugin-utils/{context-y3G_SQPM.d.ts → context-BwokDIBz.d.ts} +167 -10
- package/dist/plugin-utils/context-helpers.cjs +6 -4
- package/dist/plugin-utils/context-helpers.cjs.map +1 -0
- package/dist/plugin-utils/context-helpers.d.cts +4 -1
- package/dist/plugin-utils/context-helpers.d.ts +4 -1
- package/dist/plugin-utils/context-helpers.js +4 -2
- package/dist/plugin-utils/context-helpers.js.map +1 -0
- package/dist/plugin-utils/enforce.cjs +8 -6
- package/dist/plugin-utils/enforce.cjs.map +1 -0
- package/dist/plugin-utils/enforce.d.cts +4 -1
- package/dist/plugin-utils/enforce.d.ts +4 -1
- package/dist/plugin-utils/enforce.js +7 -5
- package/dist/plugin-utils/enforce.js.map +1 -0
- package/dist/plugin-utils/extend.cjs +7 -5
- package/dist/plugin-utils/extend.cjs.map +1 -0
- package/dist/plugin-utils/extend.d.cts +4 -1
- package/dist/plugin-utils/extend.d.ts +4 -1
- package/dist/plugin-utils/extend.js +6 -4
- package/dist/plugin-utils/extend.js.map +1 -0
- package/dist/plugin-utils/get-config-path.cjs +5 -3
- package/dist/plugin-utils/get-config-path.cjs.map +1 -0
- package/dist/plugin-utils/get-config-path.d.cts +4 -1
- package/dist/plugin-utils/get-config-path.d.ts +4 -1
- package/dist/plugin-utils/get-config-path.js +4 -2
- package/dist/plugin-utils/get-config-path.js.map +1 -0
- package/dist/plugin-utils/helpers.cjs +17 -15
- package/dist/plugin-utils/helpers.cjs.map +1 -0
- package/dist/plugin-utils/helpers.d.cts +14 -11
- package/dist/plugin-utils/helpers.d.ts +14 -11
- package/dist/plugin-utils/helpers.js +4 -2
- package/dist/plugin-utils/helpers.js.map +1 -0
- package/dist/plugin-utils/index.cjs +30 -28
- package/dist/plugin-utils/index.cjs.map +1 -0
- package/dist/plugin-utils/index.d.cts +4 -1
- package/dist/plugin-utils/index.d.ts +4 -1
- package/dist/plugin-utils/index.js +10 -8
- package/dist/plugin-utils/index.js.map +1 -0
- package/dist/plugin-utils/merge.cjs +6 -4
- package/dist/plugin-utils/merge.cjs.map +1 -0
- package/dist/plugin-utils/merge.d.cts +4 -1
- package/dist/plugin-utils/merge.d.ts +4 -1
- package/dist/plugin-utils/merge.js +5 -3
- package/dist/plugin-utils/merge.js.map +1 -0
- package/dist/plugin-utils/paths.cjs +5 -3
- package/dist/plugin-utils/paths.cjs.map +1 -0
- package/dist/plugin-utils/paths.d.cts +5 -1
- package/dist/plugin-utils/paths.d.ts +5 -1
- package/dist/plugin-utils/paths.js +4 -2
- package/dist/plugin-utils/paths.js.map +1 -0
- package/dist/rolldown.cjs +17 -9
- package/dist/rolldown.d.cts +5 -1
- package/dist/rolldown.d.ts +5 -1
- package/dist/rolldown.js +4 -9
- package/dist/rollup.cjs +4 -4
- package/dist/rollup.d.cts +5 -1
- package/dist/rollup.d.ts +5 -1
- package/dist/rollup.js +3 -3
- package/dist/rspack.cjs +4 -4
- package/dist/rspack.d.cts +5 -1
- package/dist/rspack.d.ts +5 -1
- package/dist/rspack.js +3 -3
- package/dist/tsdown.cjs +114 -0
- package/dist/tsdown.d.cts +28 -0
- package/dist/tsdown.d.ts +28 -0
- package/dist/tsdown.js +108 -0
- package/dist/tsup.cjs +5 -5
- package/dist/tsup.js +4 -4
- package/dist/types/api.d.cts +6 -2
- package/dist/types/api.d.ts +6 -2
- package/dist/types/babel.d.cts +5 -1
- package/dist/types/babel.d.ts +5 -1
- package/dist/types/build.d.cts +11 -10
- package/dist/types/build.d.ts +11 -10
- package/dist/types/commands.d.cts +5 -1
- package/dist/types/commands.d.ts +5 -1
- package/dist/types/config.d.cts +5 -1
- package/dist/types/config.d.ts +5 -1
- package/dist/types/context.cjs +2 -2
- package/dist/types/context.d.cts +5 -1
- package/dist/types/context.d.ts +5 -1
- package/dist/types/context.js +1 -1
- package/dist/types/fs.cjs +4 -4
- package/dist/types/fs.d.cts +85 -4
- package/dist/types/fs.d.ts +85 -4
- package/dist/types/fs.js +1 -1
- package/dist/types/hooks.d.cts +5 -1
- package/dist/types/hooks.d.ts +5 -1
- package/dist/types/index.cjs +6 -6
- package/dist/types/index.d.cts +7 -3
- package/dist/types/index.d.ts +7 -3
- package/dist/types/index.js +2 -2
- package/dist/types/internal.d.cts +6 -2
- package/dist/types/internal.d.ts +6 -2
- package/dist/types/plugin.d.cts +5 -1
- package/dist/types/plugin.d.ts +5 -1
- package/dist/types/resolved.d.cts +5 -1
- package/dist/types/resolved.d.ts +5 -1
- package/dist/types/unplugin.d.cts +6 -2
- package/dist/types/unplugin.d.ts +6 -2
- package/dist/unloader.cjs +4 -4
- package/dist/unloader.d.cts +5 -1
- package/dist/unloader.d.ts +5 -1
- package/dist/unloader.js +3 -3
- package/dist/unplugin.cjs +10 -8
- package/dist/unplugin.d.cts +8 -17
- package/dist/unplugin.d.ts +8 -17
- package/dist/unplugin.js +8 -6
- package/dist/vite.cjs +7 -7
- package/dist/vite.d.cts +5 -1
- package/dist/vite.d.ts +5 -1
- package/dist/vite.js +4 -4
- package/dist/webpack.cjs +7 -7
- package/dist/webpack.d.cts +5 -1
- package/dist/webpack.d.ts +5 -1
- package/dist/webpack.js +4 -4
- package/package.json +72 -48
- package/dist/chunk-GBIIAZH5.cjs +0 -13
- package/dist/chunk-QXHINXRM.js +0 -11
- package/dist/chunk-UWLQNNZE.cjs +0 -12
- package/dist/config.cjs +0 -13
- package/dist/config.d.cts +0 -45
- package/dist/config.d.ts +0 -45
- package/dist/config.js +0 -4
- package/dist/lib/chunk-35FGUJFD.cjs +0 -2
- package/dist/lib/chunk-DX2VAXZB.cjs +0 -11
- package/dist/lib/chunk-FFT4PWRM.js +0 -1
- package/dist/lib/chunk-GKCWJVF7.cjs +0 -147
- package/dist/lib/chunk-H5JWMXTZ.js +0 -1
- package/dist/lib/chunk-I2DQRMX3.js +0 -1
- package/dist/lib/chunk-K2SFTPN3.cjs +0 -2
- package/dist/lib/chunk-MVIKYHBX.cjs +0 -2
- package/dist/lib/chunk-NQAHFTUW.js +0 -1
- package/dist/lib/chunk-NYNHNTHT.js +0 -1
- package/dist/lib/chunk-VVSEE3JE.cjs +0 -2
- package/dist/lib/chunk-YK4PYVLM.cjs +0 -2
- package/dist/plugin-utils/chunk-K2GWRZPV.js +0 -12
- package/dist/plugin-utils/chunk-VWFJOPKC.cjs +0 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
|
|
4
4
|
var exists = require('@stryke/fs/exists');
|
|
5
5
|
var json = require('@stryke/fs/json');
|
|
6
6
|
var append = require('@stryke/path/append');
|
|
@@ -31,7 +31,7 @@ function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
|
|
|
31
31
|
}
|
|
32
32
|
return tsconfigFilePath;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
chunkPK6SKIKE_cjs.__name(getTsconfigFilePath, "getTsconfigFilePath");
|
|
35
35
|
function tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
|
|
36
36
|
let tsconfigFilePath = tsconfig;
|
|
37
37
|
if (!exists.existsSync(tsconfigFilePath)) {
|
|
@@ -45,7 +45,7 @@ function tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
|
|
|
45
45
|
}
|
|
46
46
|
return tsconfigFilePath;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
chunkPK6SKIKE_cjs.__name(tryTsconfigFilePath, "tryTsconfigFilePath");
|
|
49
49
|
function findMatch(tsconfigType, types, extensions = [
|
|
50
50
|
".ts",
|
|
51
51
|
".tsx",
|
|
@@ -53,7 +53,7 @@ function findMatch(tsconfigType, types, extensions = [
|
|
|
53
53
|
]) {
|
|
54
54
|
return types.find((type) => tsconfigType?.toString().toLowerCase() === type?.toString().toLowerCase() || tsconfigType?.toString().toLowerCase() === `./${type?.toString().toLowerCase()}` || `./${tsconfigType?.toString().toLowerCase()}` === type?.toString().toLowerCase() || extensions.some((ext) => `${tsconfigType?.toString().toLowerCase()}${ext}` === type?.toString().toLowerCase() || `${tsconfigType?.toString().toLowerCase()}${ext}` === `./${type?.toString().toLowerCase()}` || `${type?.toString().toLowerCase()}${ext}` === `./${tsconfigType?.toString().toLowerCase()}` || tsconfigType?.toString().toLowerCase() === `${type?.toString().toLowerCase()}${ext}` || tsconfigType?.toString().toLowerCase() === `./${type?.toString().toLowerCase()}${ext}` || type?.toString().toLowerCase() === `./${tsconfigType?.toString().toLowerCase()}${ext}`));
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
chunkPK6SKIKE_cjs.__name(findMatch, "findMatch");
|
|
57
57
|
function findIncludeMatch(tsconfigType, types) {
|
|
58
58
|
return findMatch(tsconfigType, types, [
|
|
59
59
|
".ts",
|
|
@@ -85,15 +85,15 @@ function findIncludeMatch(tsconfigType, types) {
|
|
|
85
85
|
"/**/*.cts"
|
|
86
86
|
]);
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
chunkPK6SKIKE_cjs.__name(findIncludeMatch, "findIncludeMatch");
|
|
89
89
|
function isMatchFound(tsconfigType, types) {
|
|
90
90
|
return findMatch(tsconfigType, types) !== void 0;
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
chunkPK6SKIKE_cjs.__name(isMatchFound, "isMatchFound");
|
|
93
93
|
function isIncludeMatchFound(tsconfigType, types) {
|
|
94
94
|
return findIncludeMatch(tsconfigType, types) !== void 0;
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
chunkPK6SKIKE_cjs.__name(isIncludeMatchFound, "isIncludeMatchFound");
|
|
97
97
|
function getParsedTypeScriptConfig(workspaceRoot, projectRoot, tsconfig, tsconfigRaw = {}, originalTsconfigJson, host = ts__default.default.sys) {
|
|
98
98
|
const tsconfigFilePath = getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig);
|
|
99
99
|
const tsconfigJson = json.readJsonFileSync(tsconfigFilePath);
|
|
@@ -114,7 +114,7 @@ ${parsedCommandLine.errors.map((error) => `- ${(error.category !== void 0 && err
|
|
|
114
114
|
tsconfigFilePath
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
chunkPK6SKIKE_cjs.__name(getParsedTypeScriptConfig, "getParsedTypeScriptConfig");
|
|
118
118
|
|
|
119
119
|
exports.findIncludeMatch = findIncludeMatch;
|
|
120
120
|
exports.findMatch = findMatch;
|
|
@@ -123,3 +123,5 @@ exports.getTsconfigFilePath = getTsconfigFilePath;
|
|
|
123
123
|
exports.isIncludeMatchFound = isIncludeMatchFound;
|
|
124
124
|
exports.isMatchFound = isMatchFound;
|
|
125
125
|
exports.tryTsconfigFilePath = tryTsconfigFilePath;
|
|
126
|
+
//# sourceMappingURL=chunk-QHTL2U3L.cjs.map
|
|
127
|
+
//# sourceMappingURL=chunk-QHTL2U3L.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/typescript/tsconfig.ts"],"names":["getTsconfigFilePath","workspaceRoot","projectRoot","tsconfig","tsconfigFilePath","tryTsconfigFilePath","Error","existsSync","appendPath","undefined","findMatch","tsconfigType","types","extensions","find","type","toString","toLowerCase","some","ext","findIncludeMatch","isMatchFound","isIncludeMatchFound","getParsedTypeScriptConfig","tsconfigRaw","originalTsconfigJson","host","ts","sys","tsconfigJson","readJsonFileSync","joinPaths","parsedCommandLine","parseJsonConfigFileContent","defu","errors","length","errorMessage","map","error","category","code","messageText","join"],"mappings":";;;;;;;;;;;;;;;AAqCO,SAASA,mBAAAA,CACdC,aAAAA,EACAC,WAAAA,EACAC,QAAAA,EAAiB;AAEjB,EAAA,IAAIC,gBAAAA;AACJ,EAAA,IAAID,QAAAA,EAAU;AACZC,IAAAA,gBAAAA,GAAmBC,mBAAAA,CACjBJ,aAAAA,EACAC,WAAAA,EACAC,QAAAA,CAAAA;EAEJ,CAAA,MAAO;AACLC,IAAAA,gBAAAA,GAAmBC,mBAAAA,CACjBJ,aAAAA,EACAC,WAAAA,EACA,mBAAA,CAAA;AAEF,IAAA,IAAI,CAACE,gBAAAA,EAAkB;AACrBA,MAAAA,gBAAAA,GAAmBC,mBAAAA,CACjBJ,aAAAA,EACAC,WAAAA,EACA,mBAAA,CAAA;AAEF,MAAA,IAAI,CAACE,gBAAAA,EAAkB;AACrBA,QAAAA,gBAAAA,GAAmBC,mBAAAA,CACjBJ,aAAAA,EACAC,WAAAA,EACA,eAAA,CAAA;AAEJ,MAAA;AACF,IAAA;AACF,EAAA;AAEA,EAAA,IAAI,CAACE,gBAAAA,EAAkB;AACrB,IAAA,MAAM,IAAIE,KAAAA,CACR,CAAA,wEAAA,EACEJ,WAAAA,CAAAA,CAAAA,CACC,CAAA;AAEP,EAAA;AAEA,EAAA,OAAOE,gBAAAA;AACT;AA3CgBJ,wBAAAA,CAAAA,mBAAAA,EAAAA,qBAAAA,CAAAA;AAsDT,SAASK,mBAAAA,CACdJ,aAAAA,EACAC,WAAAA,EACAC,QAAAA,EAAgB;AAEhB,EAAA,IAAIC,gBAAAA,GAAmBD,QAAAA;AACvB,EAAA,IAAI,CAACI,iBAAAA,CAAWH,gBAAAA,CAAAA,EAAmB;AACjCA,IAAAA,gBAAAA,GAAmBI,iBAAAA,CAAWL,UAAUD,WAAAA,CAAAA;AACxC,IAAA,IAAI,CAACK,iBAAAA,CAAWH,gBAAAA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GK,YAAAA,CAAAA,EACxBH,IAAAA,EACAlB,iBAAAA,CAAWN,WAAAA,EAAaD,aAAAA,CAAAA,CAAAA;AAE1B,EAAA,IAAI+B,iBAAAA,CAAkBG,MAAAA,CAAOC,MAAAA,GAAS,CAAA,EAAG;AACvC,IAAA,MAAMC,YAAAA,GAAe,CAAA;EACvBL,iBAAAA,CAAkBG,MAAAA,CACjBG,GAAAA,CACCC,CAAAA,KAAAA,KACE,CAAA,EAAA,EAAA,CACGA,KAAAA,CAAMC,QAAAA,KAAa/B,MAAAA,IAAa8B,KAAAA,CAAME,IAAAA,GACnC,CAAA,CAAA,EAAIF,KAAAA,CAAMC,QAAQ,IAAID,KAAAA,CAAME,IAAI,CAAA,GAAA,CAAA,GAChC,EAAA,IAAMF,KAAAA,CAAMG,WAAAA,CAAY1B,QAAAA,EAAQ,CAAA,CACpC,CAAA,CAEL2B,IAAAA,CAAK,IAAA,CAAA;;AAGJ,IAAA,MAAM,IAAIrC,MAAM+B,YAAAA,CAAAA;AAClB,EAAA;AAEA,EAAA,OAAO;IACL,GAAGL,iBAAAA;AACHP,IAAAA,oBAAAA,EAAuBA,oBAAAA,IACrBI,YAAAA;AACFA,IAAAA,YAAAA;AACAzB,IAAAA;AACF,GAAA;AACF;AApDgBmB,wBAAAA,CAAAA,yBAAAA,EAAAA,2BAAAA,CAAAA","file":"chunk-QHTL2U3L.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFileSync } from \"@stryke/fs/json\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { FilterPattern } from \"@stryke/types/file\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport ts from \"typescript\";\nimport { ParsedTypeScriptConfig, TSConfig } from \"../../types/tsconfig\";\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function getTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string\n): string {\n let tsconfigFilePath: string | undefined;\n if (tsconfig) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n } else {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.app.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.lib.json\"\n );\n if (!tsconfigFilePath) {\n tsconfigFilePath = tryTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n \"tsconfig.json\"\n );\n }\n }\n }\n\n if (!tsconfigFilePath) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file for the project at ${\n projectRoot\n }.`\n );\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Get the path to the tsconfig.json file.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @returns The absolute path to the tsconfig.json file.\n * @throws If the tsconfig.json file does not exist.\n */\nexport function tryTsconfigFilePath(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig: string\n): string | undefined {\n let tsconfigFilePath = tsconfig;\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(tsconfig, projectRoot);\n if (!existsSync(tsconfigFilePath)) {\n tsconfigFilePath = appendPath(\n tsconfig,\n appendPath(projectRoot, workspaceRoot)\n );\n if (!existsSync(tsconfigFilePath)) {\n return undefined;\n }\n }\n }\n\n return tsconfigFilePath;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[],\n extensions: string[] = [\".ts\", \".tsx\", \".d.ts\"]\n): string | RegExp | null | undefined {\n return types.find(\n type =>\n tsconfigType?.toString().toLowerCase() ===\n type?.toString().toLowerCase() ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}` ||\n `./${tsconfigType?.toString().toLowerCase()}` ===\n type?.toString().toLowerCase() ||\n extensions.some(\n ext =>\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n type?.toString().toLowerCase() ||\n `${tsconfigType?.toString().toLowerCase()}${ext}` ===\n `./${type?.toString().toLowerCase()}` ||\n `${type?.toString().toLowerCase()}${ext}` ===\n `./${tsconfigType?.toString().toLowerCase()}` ||\n tsconfigType?.toString().toLowerCase() ===\n `${type?.toString().toLowerCase()}${ext}` ||\n tsconfigType?.toString().toLowerCase() ===\n `./${type?.toString().toLowerCase()}${ext}` ||\n type?.toString().toLowerCase() ===\n `./${tsconfigType?.toString().toLowerCase()}${ext}`\n )\n );\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function findIncludeMatch(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): string | RegExp | null | undefined {\n return findMatch(tsconfigType, types, [\n \".ts\",\n \".tsx\",\n \".d.ts\",\n \".js\",\n \".jsx\",\n \".mjs\",\n \".cjs\",\n \".mts\",\n \".cts\",\n \"/*.ts\",\n \"/*.tsx\",\n \"/*.d.ts\",\n \"/*.js\",\n \"/*.jsx\",\n \"/*.mjs\",\n \"/*.cjs\",\n \"/*.mts\",\n \"/*.cts\",\n \"/**/*.ts\",\n \"/**/*.tsx\",\n \"/**/*.d.ts\",\n \"/**/*.js\",\n \"/**/*.jsx\",\n \"/**/*.mjs\",\n \"/**/*.cjs\",\n \"/**/*.mts\",\n \"/**/*.cts\"\n ]);\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isMatchFound(\n tsconfigType: string | RegExp | null,\n types: (string | RegExp | null)[]\n): boolean {\n return findMatch(tsconfigType, types) !== undefined;\n}\n\n/**\n * Check if the TypeScript configuration type matches any of the provided types.\n *\n * @param tsconfigType - The type from the TypeScript configuration.\n * @param types - An array of type names to check against.\n * @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.\n */\nexport function isIncludeMatchFound(\n tsconfigType: FilterPattern,\n types: FilterPattern[]\n): boolean {\n return (\n findIncludeMatch(\n tsconfigType as string | RegExp | null,\n types as (string | RegExp | null)[]\n ) !== undefined\n );\n}\n\n/**\n * Get the parsed TypeScript configuration.\n *\n * @param workspaceRoot - The root directory of the workspace.\n * @param projectRoot - The root directory of the project.\n * @param tsconfig - The path to the tsconfig.json file.\n * @param tsconfigRaw - The raw tsconfig.json content.\n * @param originalTsconfigJson - The original tsconfig.json content.\n * @param host - The TypeScript parse config host.\n * @returns The resolved TypeScript configuration.\n */\nexport function getParsedTypeScriptConfig(\n workspaceRoot: string,\n projectRoot: string,\n tsconfig?: string,\n tsconfigRaw: TSConfig = {},\n originalTsconfigJson?: TSConfig,\n host: ts.ParseConfigHost = ts.sys\n): ParsedTypeScriptConfig {\n const tsconfigFilePath = getTsconfigFilePath(\n workspaceRoot,\n projectRoot,\n tsconfig\n );\n const tsconfigJson = readJsonFileSync<TSConfig>(tsconfigFilePath);\n if (!tsconfigJson) {\n throw new Error(\n `Cannot find the \\`tsconfig.json\\` configuration file at ${joinPaths(\n projectRoot,\n tsconfig ?? \"tsconfig.json\"\n )}`\n );\n }\n\n const parsedCommandLine = ts.parseJsonConfigFileContent(\n defu(tsconfigRaw ?? {}, tsconfigJson),\n host,\n appendPath(projectRoot, workspaceRoot)\n );\n if (parsedCommandLine.errors.length > 0) {\n const errorMessage = `Cannot parse the TypeScript compiler options. Please investigate the following issues:\n${parsedCommandLine.errors\n .map(\n error =>\n `- ${\n (error.category !== undefined && error.code\n ? `[${error.category}-${error.code}]: `\n : \"\") + error.messageText.toString()\n }`\n )\n .join(\"\\n\")}\n `;\n\n throw new Error(errorMessage);\n }\n\n return {\n ...parsedCommandLine,\n originalTsconfigJson: (originalTsconfigJson ??\n tsconfigJson) as TsConfigJson,\n tsconfigJson,\n tsconfigFilePath\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-QMKA57N4.cjs"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createLog } from './chunk-
|
|
2
|
-
import { __name } from './chunk-
|
|
1
|
+
import { createLog } from './chunk-35EO5Y7R.js';
|
|
2
|
+
import { __name } from './chunk-7QVYU63E.js';
|
|
3
3
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
4
4
|
import { findFileName } from '@stryke/path/file-path-fns';
|
|
5
5
|
import { defu } from 'defu';
|
|
@@ -164,3 +164,5 @@ function createWorker(workerPath, exposedMethods, numWorkers = 1) {
|
|
|
164
164
|
__name(createWorker, "createWorker");
|
|
165
165
|
|
|
166
166
|
export { Worker, createWorker };
|
|
167
|
+
//# sourceMappingURL=chunk-RHADQ6HA.js.map
|
|
168
|
+
//# sourceMappingURL=chunk-RHADQ6HA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utilities/worker.ts"],"names":["RESTARTED","Symbol","cleanupWorkers","worker","curWorker","_workerPool","_workers","_child","kill","Worker","workerPath","options","timeout","onRestart","name","context","farmOptions","createLog","restartPromise","resolveRestartPromise","activeTasks","undefined","process","on","close","createWorker","JestWorker","forkOptions","env","maxRetries","Promise","resolve","enableWorkerThreads","code","signal","LogLevelLabel","ERROR","exit","data","type","onActivity","aborted","onActivityAbort","abortActivityStreamOnLog","Transform","transform","_chunk","_encoding","callback","getStdout","pipe","getStderr","stdout","stderr","onHanging","WARN","end","then","hangingTimer","clearTimeout","setTimeout","method","exposedMethods","startsWith","args","attempts","params","defu","length","result","race","bind","Error","numWorkers","findFileName","withExtension"],"mappings":";;;;;;;;AAuCA,IAAMA,SAAAA,GAAYC,OAAO,WAAA,CAAA;AAEzB,IAAMC,cAAAA,2BAAkBC,MAAAA,KAAAA;AACtB,EAAA,KAAA,MAAWC,SAAAA,IAAeD,MAAAA,CAAeE,WAAAA,EAAaC,QAAAA,IAAY,EAAA,EAE7D;AACHF,IAAAA,SAAAA,CAAUG,MAAAA,EAAQC,KAAK,QAAA,CAAA;AACzB,EAAA;AACF,CAAA,EANuB,gBAAA,CAAA;AAQhB,IAAMC,SAAN,MAAMA;EAjDb;;;;;AAkDE,EAAA,OAAA;AAEA,EAAA,IAAA;AAEA,EAAA,WAAA,CACYC,YACAC,OAAAA,EACV;SAFUD,UAAAA,GAAAA,UAAAA;SACAC,OAAAA,GAAAA,OAAAA;AAEV,IAAA,MAAM,EAAEC,SAASC,SAAAA,EAAWC,IAAAA,EAAMC,SAAS,GAAGC,WAAAA,KAAgB,IAAA,CAAKL,OAAAA;AAEnE,IAAA,IAAA,CAAK,IAAA,GAAOM,SAAAA,CAAUH,IAAAA,IAAQJ,UAAAA,CAAAA;AAE9B,IAAA,IAAIQ,cAAAA;AACJ,IAAA,IAAIC,qBAAAA;AACJ,IAAA,IAAIC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AG;AACnB,EAAA;;;;EAKOhC,KAAAA,GAAc;AACnB,IAAA,IAAI,KAAK,OAAA,EAAS;AAChBtB,MAAAA,cAAAA,CAAe,KAAK,OAAO,CAAA;AAC3B,MAAA,KAAK,IAAA,CAAK,QAAQsD,GAAAA,EAAG;AACvB,IAAA;AACF,EAAA;AACF;AAEO,SAAS/B,YAAAA,CAGdf,UAAAA,EACAoD,cAAAA,EACAW,UAAAA,GAAa,CAAA,EAAC;AAEd,EAAA,OAAO,IAAIhE,OAAOC,UAAAA,EAAY;AAC5BI,IAAAA,IAAAA,EAAM4D,aAAahE,UAAAA,EAAY;MAC7BiE,aAAAA,EAAe;KACjB,CAAA;AACAb,IAAAA,cAAAA;AACAW,IAAAA;GACF,CAAA;AACF;AAdgBhD,MAAAA,CAAAA,YAAAA,EAAAA,cAAAA,CAAAA","file":"chunk-RHADQ6HA.js","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { findFileName } from \"@stryke/path/file-path-fns\";\nimport { defu } from \"defu\";\nimport { Worker as JestWorker } from \"jest-worker\";\nimport type { ChildProcess } from \"node:child_process\";\nimport { Transform } from \"node:stream\";\nimport { LogFn } from \"../../types/config\";\nimport { WorkerProcess } from \"../../types/context\";\nimport { createLog } from \"../logger\";\n\nexport type WorkerOptions = ConstructorParameters<typeof JestWorker>[1] & {\n name?: string;\n timeout?: number;\n onActivity?: () => void;\n onActivityAbort?: () => void;\n onRestart?: (method: string, args: any[], attempts: number) => void;\n exposedMethods: ReadonlyArray<string>;\n enableWorkerThreads?: boolean;\n context?: Record<string, any>;\n};\n\nconst RESTARTED = Symbol(\"restarted\");\n\nconst cleanupWorkers = (worker: JestWorker) => {\n for (const curWorker of ((worker as any)._workerPool?._workers || []) as {\n _child?: ChildProcess;\n }[]) {\n curWorker._child?.kill(\"SIGINT\");\n }\n};\n\nexport class Worker {\n #worker: JestWorker | undefined;\n\n #log: LogFn;\n\n public constructor(\n protected workerPath: string,\n protected options: WorkerOptions\n ) {\n const { timeout, onRestart, name, context, ...farmOptions } = this.options;\n\n this.#log = createLog(name || workerPath);\n\n let restartPromise: Promise<typeof RESTARTED>;\n let resolveRestartPromise: (arg: typeof RESTARTED) => void;\n let activeTasks = 0;\n\n this.#worker = undefined;\n\n // ensure we end workers if they weren't before exit\n process.on(\"exit\", () => {\n this.close();\n });\n\n const createWorker = () => {\n this.#worker = new JestWorker(workerPath, {\n ...farmOptions,\n forkOptions: {\n ...farmOptions.forkOptions,\n env: {\n ...((farmOptions.forkOptions?.env ?? {}) as any),\n ...(process.env ?? {})\n }\n },\n maxRetries: 0\n });\n restartPromise = new Promise(resolve => {\n resolveRestartPromise = resolve;\n });\n\n /**\n * Jest Worker has two worker types, ChildProcessWorker (uses child_process) and NodeThreadWorker (uses worker_threads)\n * Powerlines uses ChildProcessWorker by default, but it can be switched to NodeThreadWorker with an experimental flag\n *\n * We only want to handle ChildProcessWorker's orphan process issue, so we access the private property \"_child\":\n * https://github.com/facebook/jest/blob/b38d7d345a81d97d1dc3b68b8458b1837fbf19be/packages/jest-worker/src/workers/ChildProcessWorker.ts\n *\n * But this property is not available in NodeThreadWorker, so we need to check if we are using ChildProcessWorker\n */\n if (!farmOptions.enableWorkerThreads) {\n for (const worker of ((this.#worker as any)._workerPool?._workers ||\n []) as {\n _child?: ChildProcess;\n }[]) {\n worker._child?.on(\"exit\", (code, signal) => {\n if ((code || (signal && signal !== \"SIGINT\")) && this.#worker) {\n this.#log(\n LogLevelLabel.ERROR,\n `${this.options.name} worker exited with code: ${code} and signal: ${signal}`\n );\n\n // if a child process doesn't exit gracefully, we want to bubble up the exit code to the parent process\n process.exit(code ?? 1);\n }\n });\n\n // if a child process emits a particular message, we track that as activity\n // so the parent process can keep track of progress\n worker._child?.on(\"message\", ([, data]: [number, unknown]) => {\n if (\n data &&\n typeof data === \"object\" &&\n \"type\" in data &&\n data.type === \"activity\"\n ) {\n // eslint-disable-next-line ts/no-use-before-define\n onActivity();\n }\n });\n }\n }\n\n let aborted = false;\n const onActivityAbort = () => {\n if (!aborted) {\n this.options.onActivityAbort?.();\n aborted = true;\n }\n };\n\n // Listen to the worker's stdout and stderr, if there's any thing logged, abort the activity first\n const abortActivityStreamOnLog = new Transform({\n transform(_chunk, _encoding, callback) {\n onActivityAbort();\n callback();\n }\n });\n // Stop the activity if there's any output from the worker\n this.#worker.getStdout().pipe(abortActivityStreamOnLog);\n this.#worker.getStderr().pipe(abortActivityStreamOnLog);\n\n // Pipe the worker's stdout and stderr to the parent process\n this.#worker.getStdout().pipe(process.stdout);\n this.#worker.getStderr().pipe(process.stderr);\n };\n createWorker();\n\n const onHanging = () => {\n const worker = this.#worker;\n if (!worker) {\n return;\n }\n\n const resolve = resolveRestartPromise;\n createWorker();\n\n this.#log(\n LogLevelLabel.WARN,\n `Sending SIGTERM signal to static worker due to timeout${\n timeout ? ` of ${timeout / 1000} seconds` : \"\"\n }. Subsequent errors may be a result of the worker exiting.`\n );\n\n void worker.end().then(() => {\n resolve(RESTARTED);\n });\n };\n\n let hangingTimer: NodeJS.Timeout | false = false;\n\n const onActivity = () => {\n if (hangingTimer) {\n clearTimeout(hangingTimer);\n }\n if (this.options.onActivity) {\n this.options.onActivity();\n }\n\n hangingTimer = activeTasks > 0 && setTimeout(onHanging, timeout);\n };\n\n for (const method of farmOptions.exposedMethods) {\n if (method.startsWith(\"_\")) {\n continue;\n }\n\n (this as any)[method] = timeout\n ? async (...args: any[]) => {\n activeTasks++;\n try {\n let attempts = 0;\n for (;;) {\n onActivity();\n\n const params = defu(\n args.length > 0 && args[0] ? args[0] : {},\n context ?? {}\n );\n\n const result = await Promise.race([\n // eslint-disable-next-line ts/no-unsafe-call\n (this.#worker as any)[method](...params),\n restartPromise\n ]);\n if (result !== RESTARTED) {\n return result;\n }\n if (onRestart) {\n onRestart(method, args, ++attempts);\n }\n }\n } finally {\n activeTasks--;\n onActivity();\n }\n }\n : // eslint-disable-next-line ts/no-unsafe-call\n (this.#worker as any)[method].bind(this.#worker);\n }\n }\n\n public async end(): ReturnType<JestWorker[\"end\"]> {\n const worker = this.#worker;\n if (!worker) {\n throw new Error(\"Farm is ended, no more calls can be done to it\");\n }\n\n cleanupWorkers(worker);\n this.#worker = undefined;\n return worker.end();\n }\n\n /**\n * Quietly end the worker if it exists\n */\n public close(): void {\n if (this.#worker) {\n cleanupWorkers(this.#worker);\n void this.#worker.end();\n }\n }\n}\n\nexport function createWorker<\n TExposedMethods extends ReadonlyArray<string> = ReadonlyArray<string>\n>(\n workerPath: string,\n exposedMethods: TExposedMethods,\n numWorkers = 1\n): WorkerProcess<TExposedMethods> {\n return new Worker(workerPath, {\n name: findFileName(workerPath, {\n withExtension: false\n }),\n exposedMethods,\n numWorkers\n }) as WorkerProcess<TExposedMethods>;\n}\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FileSystemStorageAdapter } from './chunk-
|
|
2
|
-
import { VirtualStorageAdapter } from './chunk-
|
|
3
|
-
import { normalizeId, normalizePath,
|
|
4
|
-
import { extendLog } from './chunk-
|
|
5
|
-
import {
|
|
1
|
+
import { FileSystemStorageAdapter } from './chunk-YJEZASNU.js';
|
|
2
|
+
import { VirtualStorageAdapter } from './chunk-5QMQ5G73.js';
|
|
3
|
+
import { normalizeId, normalizePath, normalizeGlobPatterns } from './chunk-EBBGE5FN.js';
|
|
4
|
+
import { extendLog } from './chunk-35EO5Y7R.js';
|
|
5
|
+
import { replacePathTokens } from './chunk-FFATMOAQ.js';
|
|
6
|
+
import { __name } from './chunk-7QVYU63E.js';
|
|
6
7
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
7
8
|
import * as $ from '@stryke/capnp';
|
|
8
9
|
import { toArray } from '@stryke/convert/to-array';
|
|
@@ -10,8 +11,8 @@ import { readFileBuffer, readFileBufferSync, writeFileBuffer } from '@stryke/fs/
|
|
|
10
11
|
import { existsSync } from '@stryke/fs/exists';
|
|
11
12
|
import { getResolutionCombinations, resolve, resolveSync } from '@stryke/fs/resolve';
|
|
12
13
|
import { murmurhash } from '@stryke/hash/murmurhash';
|
|
14
|
+
import { getUnique } from '@stryke/helpers/get-unique';
|
|
13
15
|
import { appendPath } from '@stryke/path/append';
|
|
14
|
-
import { toAbsolutePath } from '@stryke/path/correct-path';
|
|
15
16
|
import { hasFileExtension, findFilePath, findFileName } from '@stryke/path/file-path-fns';
|
|
16
17
|
import { isParentPath } from '@stryke/path/is-parent-path';
|
|
17
18
|
import { isAbsolutePath } from '@stryke/path/is-type';
|
|
@@ -19,8 +20,11 @@ import { joinPaths } from '@stryke/path/join-paths';
|
|
|
19
20
|
import { replacePath } from '@stryke/path/replace';
|
|
20
21
|
import { prettyBytes } from '@stryke/string-format/pretty-bytes';
|
|
21
22
|
import { isSetObject } from '@stryke/type-checks/is-set-object';
|
|
23
|
+
import { isSetString } from '@stryke/type-checks/is-set-string';
|
|
24
|
+
import { isString } from '@stryke/type-checks/is-string';
|
|
22
25
|
import { create } from 'flat-cache';
|
|
23
26
|
import { Blob } from 'node:buffer';
|
|
27
|
+
import { fileURLToPath } from 'node:url';
|
|
24
28
|
import { resolveConfig, format } from 'prettier';
|
|
25
29
|
|
|
26
30
|
BigInt("0xa56c61324b9d6e49");
|
|
@@ -302,7 +306,11 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
302
306
|
* @returns The normalized module id.
|
|
303
307
|
*/
|
|
304
308
|
#normalizeId(id) {
|
|
305
|
-
|
|
309
|
+
let normalized = id;
|
|
310
|
+
if (isParentPath(normalized, this.#context.builtinsPath)) {
|
|
311
|
+
normalized = replacePath(normalized, this.#context.builtinsPath);
|
|
312
|
+
}
|
|
313
|
+
return normalizeId(normalized, this.#context.config.output.builtinPrefix);
|
|
306
314
|
}
|
|
307
315
|
/**
|
|
308
316
|
* Normalizes a given path by resolving it against the project root, workspace root, and built-ins path.
|
|
@@ -311,7 +319,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
311
319
|
* @returns The normalized path.
|
|
312
320
|
*/
|
|
313
321
|
#normalizePath(path) {
|
|
314
|
-
return normalizePath(path, this.#context.builtinsPath, this.#context.config.output.builtinPrefix);
|
|
322
|
+
return normalizePath(path.includes("{") || path.includes("}") ? replacePathTokens(this.#context, path) : path, this.#context.builtinsPath, this.#context.config.output.builtinPrefix);
|
|
315
323
|
}
|
|
316
324
|
/**
|
|
317
325
|
* Builds a regular expression from a string pattern for path matching.
|
|
@@ -538,26 +546,65 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
538
546
|
return this.#getStorage(resolved)?.adapter?.name === "virtual";
|
|
539
547
|
}
|
|
540
548
|
/**
|
|
549
|
+
* Checks if a path is a directory in the virtual file system (VFS).
|
|
550
|
+
*
|
|
551
|
+
* @param path - The path to check.
|
|
552
|
+
* @returns `true` if the path is a directory, otherwise `false`.
|
|
553
|
+
*/
|
|
554
|
+
isDirectorySync(path) {
|
|
555
|
+
const resolved = this.resolveSync(path);
|
|
556
|
+
if (!resolved) {
|
|
557
|
+
return false;
|
|
558
|
+
}
|
|
559
|
+
return !!(this.existsSync(resolved) && this.#getStorage(resolved)?.adapter?.isDirectorySync(resolved));
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Checks if a path is a directory in the virtual file system (VFS).
|
|
563
|
+
*
|
|
564
|
+
* @param path - The path to check.
|
|
565
|
+
* @returns `true` if the path is a directory, otherwise `false`.
|
|
566
|
+
*/
|
|
567
|
+
async isDirectory(path) {
|
|
568
|
+
const resolved = await this.resolve(path);
|
|
569
|
+
if (!resolved) {
|
|
570
|
+
return false;
|
|
571
|
+
}
|
|
572
|
+
return !!(await this.exists(resolved) && await this.#getStorage(resolved)?.adapter?.isDirectory(resolved));
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Checks if a path is a file in the virtual file system (VFS).
|
|
576
|
+
*
|
|
577
|
+
* @param path - The path to check.
|
|
578
|
+
* @returns `true` if the path is a file, otherwise `false`.
|
|
579
|
+
*/
|
|
580
|
+
isFileSync(path) {
|
|
581
|
+
const resolved = this.resolveSync(path);
|
|
582
|
+
if (!resolved) {
|
|
583
|
+
return false;
|
|
584
|
+
}
|
|
585
|
+
return this.#getStorage(resolved)?.adapter?.isFileSync(resolved) ?? false;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Checks if a path is a file in the virtual file system (VFS).
|
|
589
|
+
*
|
|
590
|
+
* @param path - The path to check.
|
|
591
|
+
* @returns `true` if the path is a file, otherwise `false`.
|
|
592
|
+
*/
|
|
593
|
+
async isFile(path) {
|
|
594
|
+
const resolved = await this.resolve(path);
|
|
595
|
+
if (!resolved) {
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
return await this.#getStorage(resolved)?.adapter?.isFile(resolved) ?? false;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
541
601
|
* Lists files in a given path.
|
|
542
602
|
*
|
|
543
603
|
* @param path - The path to list files from.
|
|
544
604
|
* @returns An array of file names in the specified path.
|
|
545
605
|
*/
|
|
546
606
|
listSync(path) {
|
|
547
|
-
|
|
548
|
-
const allKeys = [];
|
|
549
|
-
for (const storage of this.#getStorages(path, true)) {
|
|
550
|
-
for (const key of storage.adapter.listSync(storage.relativeBase)) {
|
|
551
|
-
if (!maskedMounts.some((p) => `${storage.base}${normalizeKey(key)}`.startsWith(p))) {
|
|
552
|
-
allKeys.push(`${storage.base}${normalizeKey(key)}`);
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
maskedMounts = [
|
|
556
|
-
storage.base,
|
|
557
|
-
...maskedMounts.filter((p) => !p.startsWith(storage.base))
|
|
558
|
-
];
|
|
559
|
-
}
|
|
560
|
-
return allKeys.filter((key) => filterKeyByBase(key, path));
|
|
607
|
+
return getUnique(this.#getStorages(path, true).map((storage) => storage.adapter.listSync(storage.relativeBase ? storage.base ? appendPath(storage.relativeBase, storage.base) : storage.relativeBase : storage.base)).flat());
|
|
561
608
|
}
|
|
562
609
|
/**
|
|
563
610
|
* Lists files in a given path.
|
|
@@ -566,20 +613,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
566
613
|
* @returns An array of file names in the specified path.
|
|
567
614
|
*/
|
|
568
615
|
async list(path) {
|
|
569
|
-
|
|
570
|
-
const allKeys = [];
|
|
571
|
-
for (const storage of this.#getStorages(path, true)) {
|
|
572
|
-
for (const key of await storage.adapter.list(storage.relativeBase)) {
|
|
573
|
-
if (!maskedMounts.some((p) => `${storage.base}${normalizeKey(key)}`.startsWith(p))) {
|
|
574
|
-
allKeys.push(`${storage.base}${normalizeKey(key)}`);
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
maskedMounts = [
|
|
578
|
-
storage.base,
|
|
579
|
-
...maskedMounts.filter((p) => !p.startsWith(storage.base))
|
|
580
|
-
];
|
|
581
|
-
}
|
|
582
|
-
return allKeys.filter((key) => filterKeyByBase(key, path));
|
|
616
|
+
return getUnique((await Promise.all(this.#getStorages(path, true).map(async (storage) => storage.adapter.list(storage.relativeBase ? storage.base ? appendPath(storage.relativeBase, storage.base) : storage.relativeBase : storage.base)))).flat());
|
|
583
617
|
}
|
|
584
618
|
/**
|
|
585
619
|
* Removes a file in the virtual file system (VFS).
|
|
@@ -631,12 +665,16 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
631
665
|
*/
|
|
632
666
|
async glob(patterns) {
|
|
633
667
|
const results = [];
|
|
634
|
-
for (const pattern of
|
|
668
|
+
for (const pattern of normalizeGlobPatterns(this.#context.workspaceConfig.workspaceRoot, patterns)) {
|
|
635
669
|
const normalized = this.#normalizePath(pattern);
|
|
636
670
|
if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("**")) {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
671
|
+
if (this.isDirectorySync(normalized)) {
|
|
672
|
+
results.push(...await this.list(normalized));
|
|
673
|
+
} else {
|
|
674
|
+
const resolved = await this.resolve(normalized);
|
|
675
|
+
if (resolved && !results.includes(resolved)) {
|
|
676
|
+
results.push(resolved);
|
|
677
|
+
}
|
|
640
678
|
}
|
|
641
679
|
continue;
|
|
642
680
|
}
|
|
@@ -662,12 +700,16 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
662
700
|
*/
|
|
663
701
|
globSync(patterns) {
|
|
664
702
|
const results = [];
|
|
665
|
-
for (const pattern of
|
|
703
|
+
for (const pattern of normalizeGlobPatterns(this.#context.workspaceConfig.workspaceRoot, patterns)) {
|
|
666
704
|
const normalized = this.#normalizePath(pattern);
|
|
667
705
|
if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("**")) {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
706
|
+
if (this.isDirectorySync(normalized)) {
|
|
707
|
+
results.push(...this.listSync(normalized));
|
|
708
|
+
} else {
|
|
709
|
+
const resolved = this.resolveSync(normalized);
|
|
710
|
+
if (resolved && !results.includes(resolved)) {
|
|
711
|
+
results.push(resolved);
|
|
712
|
+
}
|
|
671
713
|
}
|
|
672
714
|
continue;
|
|
673
715
|
}
|
|
@@ -693,20 +735,27 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
693
735
|
* @param destPath - The destination path to copy to
|
|
694
736
|
*/
|
|
695
737
|
async copy(srcPath, destPath) {
|
|
696
|
-
|
|
697
|
-
|
|
738
|
+
const src = srcPath instanceof URL ? fileURLToPath(srcPath) : srcPath;
|
|
739
|
+
const dest = destPath instanceof URL ? fileURLToPath(destPath) : destPath;
|
|
740
|
+
if (!isSetString(src) && (!isSetObject(src) || !isSetString(src.input)) || !isSetString(dest)) {
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
const sourceStr = isString(src) ? src : src.input ? src.input : this.#context.workspaceConfig.workspaceRoot;
|
|
744
|
+
const source = await this.resolve(sourceStr);
|
|
745
|
+
if (!source) {
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
if (this.isDirectorySync(source) || isSetString(src) && src.includes("*") || isSetObject(src) && isSetString(src.glob)) {
|
|
749
|
+
await Promise.all((await this.glob(src)).map(async (file) => {
|
|
750
|
+
return this.copy(file, appendPath(replacePath(file, sourceStr), dest));
|
|
751
|
+
}));
|
|
752
|
+
} else {
|
|
753
|
+
const content = await this.read(source);
|
|
698
754
|
if (content !== void 0) {
|
|
699
|
-
await this.write(
|
|
755
|
+
await this.write(this.#normalizePath(dest), content, {
|
|
756
|
+
skipFormat: true
|
|
757
|
+
});
|
|
700
758
|
}
|
|
701
|
-
} else {
|
|
702
|
-
await Promise.all((await this.list(srcPath)).map(async (file) => {
|
|
703
|
-
const relativePath = file.replace(this.#normalizePath(srcPath), "");
|
|
704
|
-
const destinationPath = this.#normalizePath(appendPath(destPath, relativePath));
|
|
705
|
-
const content = await this.read(file);
|
|
706
|
-
if (content !== void 0) {
|
|
707
|
-
await this.write(destinationPath, content);
|
|
708
|
-
}
|
|
709
|
-
}));
|
|
710
759
|
}
|
|
711
760
|
}
|
|
712
761
|
/**
|
|
@@ -716,20 +765,27 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
716
765
|
* @param destPath - The destination path to copy to
|
|
717
766
|
*/
|
|
718
767
|
copySync(srcPath, destPath) {
|
|
719
|
-
|
|
720
|
-
|
|
768
|
+
const src = srcPath instanceof URL ? fileURLToPath(srcPath) : srcPath;
|
|
769
|
+
const dest = destPath instanceof URL ? fileURLToPath(destPath) : destPath;
|
|
770
|
+
if (!isSetString(src) && (!isSetObject(src) || !isSetString(src.input)) || !isSetString(dest)) {
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
const sourceStr = isString(src) ? src : src.input ? src.input : this.#context.workspaceConfig.workspaceRoot;
|
|
774
|
+
const source = this.resolveSync(sourceStr);
|
|
775
|
+
if (!source) {
|
|
776
|
+
return;
|
|
777
|
+
}
|
|
778
|
+
if (this.isDirectorySync(source) || isSetString(src) && src.includes("*") || isSetObject(src) && isSetString(src.glob)) {
|
|
779
|
+
this.globSync(src).map((file) => {
|
|
780
|
+
return this.copySync(file, appendPath(findFilePath(replacePath(file, sourceStr)), dest));
|
|
781
|
+
});
|
|
782
|
+
} else {
|
|
783
|
+
const content = this.readSync(source);
|
|
721
784
|
if (content !== void 0) {
|
|
722
|
-
this.writeSync(hasFileExtension(
|
|
785
|
+
this.writeSync(this.#normalizePath(hasFileExtension(dest) ? dest : appendPath(findFileName(source), dest)), content, {
|
|
786
|
+
skipFormat: true
|
|
787
|
+
});
|
|
723
788
|
}
|
|
724
|
-
} else {
|
|
725
|
-
this.listSync(srcPath).forEach((file) => {
|
|
726
|
-
const relativePath = file.replace(this.#normalizePath(srcPath), "");
|
|
727
|
-
const destinationPath = this.#normalizePath(appendPath(destPath, relativePath));
|
|
728
|
-
const content = this.readSync(file);
|
|
729
|
-
if (content !== void 0) {
|
|
730
|
-
this.writeSync(destinationPath, content);
|
|
731
|
-
}
|
|
732
|
-
});
|
|
733
789
|
}
|
|
734
790
|
}
|
|
735
791
|
/**
|
|
@@ -816,15 +872,15 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
816
872
|
}
|
|
817
873
|
}
|
|
818
874
|
const { relativeKey, adapter } = this.#getStorage(path);
|
|
819
|
-
this.#log(LogLevelLabel.TRACE, `Writing ${this.#normalizePath(
|
|
820
|
-
const id = options?.meta?.id || this.#normalizeId(
|
|
875
|
+
this.#log(LogLevelLabel.TRACE, `Writing ${this.#normalizePath(relativeKey)} to ${adapter.name === "virtual" ? "the virtual file system" : adapter.name === "file-system" ? "the local file system" : adapter.name} (size: ${prettyBytes(new Blob(toArray(code)).size)})`);
|
|
876
|
+
const id = options?.meta?.id || this.#normalizeId(relativeKey);
|
|
821
877
|
this.#metadata[id] = {
|
|
822
878
|
variant: "normal",
|
|
823
879
|
timestamp: Date.now(),
|
|
824
880
|
...options.meta ?? {}
|
|
825
881
|
};
|
|
826
|
-
this.#paths[id] = this.#normalizePath(
|
|
827
|
-
this.#ids[this.#normalizePath(
|
|
882
|
+
this.#paths[id] = this.#normalizePath(relativeKey);
|
|
883
|
+
this.#ids[this.#normalizePath(relativeKey)] = id;
|
|
828
884
|
return adapter.set(relativeKey, code);
|
|
829
885
|
}
|
|
830
886
|
/**
|
|
@@ -836,18 +892,34 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
836
892
|
*/
|
|
837
893
|
writeSync(path, data = "", options = {}) {
|
|
838
894
|
const { relativeKey, adapter } = this.#getStorage(path);
|
|
839
|
-
this.#log(LogLevelLabel.TRACE, `Writing ${this.#normalizePath(
|
|
840
|
-
const id = options?.meta?.id || this.#normalizeId(
|
|
895
|
+
this.#log(LogLevelLabel.TRACE, `Writing ${this.#normalizePath(relativeKey)} file to ${adapter.name === "virtual" ? "the virtual file system" : adapter.name === "file-system" ? "the local file system" : adapter.name} (size: ${prettyBytes(new Blob(toArray(data)).size)})`);
|
|
896
|
+
const id = options?.meta?.id || this.#normalizeId(relativeKey);
|
|
841
897
|
this.#metadata[id] = {
|
|
842
898
|
variant: "normal",
|
|
843
899
|
timestamp: Date.now(),
|
|
844
900
|
...options.meta ?? {}
|
|
845
901
|
};
|
|
846
|
-
this.#paths[id] = this.#normalizePath(
|
|
847
|
-
this.#ids[this.#normalizePath(
|
|
902
|
+
this.#paths[id] = this.#normalizePath(relativeKey);
|
|
903
|
+
this.#ids[this.#normalizePath(relativeKey)] = id;
|
|
848
904
|
return adapter.setSync(relativeKey, data);
|
|
849
905
|
}
|
|
850
906
|
/**
|
|
907
|
+
* Synchronously creates a directory at the specified path.
|
|
908
|
+
*
|
|
909
|
+
* @param dirPath - The path of the directory to create.
|
|
910
|
+
*/
|
|
911
|
+
mkdirSync(dirPath) {
|
|
912
|
+
return this.#getStorage(dirPath)?.adapter?.mkdirSync(dirPath);
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Creates a directory at the specified path.
|
|
916
|
+
*
|
|
917
|
+
* @param path - The path of the directory to create.
|
|
918
|
+
*/
|
|
919
|
+
async mkdir(path) {
|
|
920
|
+
return this.#getStorage(path)?.adapter?.mkdir(path);
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
851
923
|
* Retrieves the metadata of a file in the virtual file system (VFS).
|
|
852
924
|
*
|
|
853
925
|
* @param pathOrId - The path or ID of the file to retrieve metadata for.
|
|
@@ -877,11 +949,15 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
877
949
|
* @returns A promise that resolves to the resolved module path.
|
|
878
950
|
*/
|
|
879
951
|
async resolve(id, importer, options = {}) {
|
|
880
|
-
|
|
881
|
-
|
|
952
|
+
let path = id;
|
|
953
|
+
if (path.includes("{") || path.includes("}")) {
|
|
954
|
+
path = replacePathTokens(this.#context, path);
|
|
955
|
+
}
|
|
956
|
+
if (isAbsolutePath(path)) {
|
|
957
|
+
return path;
|
|
882
958
|
}
|
|
883
959
|
const resolverCacheKey = murmurhash({
|
|
884
|
-
|
|
960
|
+
path: this.#normalizeId(path),
|
|
885
961
|
importer,
|
|
886
962
|
options
|
|
887
963
|
});
|
|
@@ -892,7 +968,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
892
968
|
return result;
|
|
893
969
|
}
|
|
894
970
|
}
|
|
895
|
-
result = this.paths[this.#normalizeId(
|
|
971
|
+
result = this.paths[this.#normalizeId(path)];
|
|
896
972
|
if (!result) {
|
|
897
973
|
const paths = options.paths ?? [];
|
|
898
974
|
if (importer && !paths.includes(importer)) {
|
|
@@ -901,8 +977,8 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
901
977
|
paths.push(this.#context.workspaceConfig.workspaceRoot);
|
|
902
978
|
paths.push(appendPath(this.#context.config.projectRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
903
979
|
paths.push(appendPath(this.#context.config.sourceRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
904
|
-
paths.push(...Object.keys(this.#context.tsconfig
|
|
905
|
-
for (const combination of getResolutionCombinations(
|
|
980
|
+
paths.push(...Object.keys(this.#context.tsconfig?.options?.paths ?? {}).filter((tsconfigPath) => path.startsWith(tsconfigPath.replace(/\*$/, ""))).map((tsconfigPath) => this.#context.tsconfig?.options?.paths?.[tsconfigPath]).flat().filter(Boolean).map((tsconfigPath) => appendPath(tsconfigPath, this.#context.workspaceConfig.workspaceRoot)));
|
|
981
|
+
for (const combination of getResolutionCombinations(path, {
|
|
906
982
|
paths
|
|
907
983
|
})) {
|
|
908
984
|
const { relativeKey, adapter } = this.#getStorage(combination);
|
|
@@ -911,19 +987,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
911
987
|
break;
|
|
912
988
|
}
|
|
913
989
|
}
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
990
|
+
if (!result) {
|
|
991
|
+
try {
|
|
992
|
+
result = await resolve(path, {
|
|
993
|
+
...options,
|
|
994
|
+
paths
|
|
995
|
+
});
|
|
996
|
+
} catch {
|
|
997
|
+
}
|
|
920
998
|
}
|
|
921
999
|
}
|
|
922
|
-
if (result) {
|
|
923
|
-
|
|
924
|
-
if (!this.#context.config.skipCache) {
|
|
925
|
-
this.resolverCache.set(resolverCacheKey, result);
|
|
926
|
-
}
|
|
1000
|
+
if (result && !this.#context.config.skipCache) {
|
|
1001
|
+
this.resolverCache.set(resolverCacheKey, result);
|
|
927
1002
|
}
|
|
928
1003
|
return result;
|
|
929
1004
|
}
|
|
@@ -944,17 +1019,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
944
1019
|
* @returns The resolved module path.
|
|
945
1020
|
*/
|
|
946
1021
|
resolveSync(id, importer, options = {}) {
|
|
947
|
-
|
|
948
|
-
|
|
1022
|
+
let path = id;
|
|
1023
|
+
if (path.includes("{") || path.includes("}")) {
|
|
1024
|
+
path = replacePathTokens(this.#context, path);
|
|
1025
|
+
}
|
|
1026
|
+
if (isAbsolutePath(path)) {
|
|
1027
|
+
return path;
|
|
949
1028
|
}
|
|
950
1029
|
let result;
|
|
951
1030
|
if (!this.#context.config.skipCache) {
|
|
952
|
-
result = this.resolverCache.get(this.#normalizeId(
|
|
1031
|
+
result = this.resolverCache.get(this.#normalizeId(path));
|
|
953
1032
|
if (result) {
|
|
954
1033
|
return result;
|
|
955
1034
|
}
|
|
956
1035
|
}
|
|
957
|
-
result = this.paths[this.#normalizeId(
|
|
1036
|
+
result = this.paths[this.#normalizeId(path)];
|
|
958
1037
|
if (!result) {
|
|
959
1038
|
const paths = options.paths ?? [];
|
|
960
1039
|
if (importer && !paths.includes(importer)) {
|
|
@@ -963,8 +1042,8 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
963
1042
|
paths.push(this.#context.workspaceConfig.workspaceRoot);
|
|
964
1043
|
paths.push(appendPath(this.#context.config.projectRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
965
1044
|
paths.push(appendPath(this.#context.config.sourceRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
966
|
-
paths.push(...Object.keys(this.#context.tsconfig
|
|
967
|
-
for (const combination of getResolutionCombinations(
|
|
1045
|
+
paths.push(...Object.keys(this.#context.tsconfig?.options?.paths ?? {}).filter((tsconfigPath) => path.startsWith(tsconfigPath.replace(/\*$/, ""))).map((tsconfigPath) => this.#context.tsconfig?.options?.paths?.[tsconfigPath]).flat().filter(Boolean).map((tsconfigPath) => appendPath(tsconfigPath, this.#context.workspaceConfig.workspaceRoot)));
|
|
1046
|
+
for (const combination of getResolutionCombinations(path, {
|
|
968
1047
|
paths
|
|
969
1048
|
})) {
|
|
970
1049
|
const { relativeKey, adapter } = this.#getStorage(combination);
|
|
@@ -973,18 +1052,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
973
1052
|
break;
|
|
974
1053
|
}
|
|
975
1054
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1055
|
+
if (!result) {
|
|
1056
|
+
try {
|
|
1057
|
+
result = resolveSync(path, {
|
|
1058
|
+
...options,
|
|
1059
|
+
paths
|
|
1060
|
+
});
|
|
1061
|
+
} catch {
|
|
1062
|
+
}
|
|
981
1063
|
}
|
|
982
1064
|
}
|
|
983
|
-
if (result) {
|
|
984
|
-
|
|
985
|
-
if (!this.#context.config.skipCache) {
|
|
986
|
-
this.resolverCache.set(this.#normalizeId(id), result);
|
|
987
|
-
}
|
|
1065
|
+
if (result && !this.#context.config.skipCache) {
|
|
1066
|
+
this.resolverCache.set(this.#normalizeId(path), result);
|
|
988
1067
|
}
|
|
989
1068
|
return result;
|
|
990
1069
|
}
|
|
@@ -1064,3 +1143,5 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1064
1143
|
};
|
|
1065
1144
|
|
|
1066
1145
|
export { VirtualFileSystem };
|
|
1146
|
+
//# sourceMappingURL=chunk-RNSQODBR.js.map
|
|
1147
|
+
//# sourceMappingURL=chunk-RNSQODBR.js.map
|