powerlines 0.24.8 → 0.25.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-C32Buv5_.d.ts → api-BTK8aYwE.d.cts} +1 -1
- package/dist/{api-wzd5AREv.d.cts → api-eyrYBmQh.d.ts} +1 -1
- package/dist/api.cjs +8 -6
- package/dist/api.d.cts +20 -22
- package/dist/api.d.ts +20 -22
- package/dist/api.js +7 -5
- package/dist/astro.cjs +12 -10
- package/dist/astro.d.cts +19 -21
- package/dist/astro.d.ts +19 -21
- package/dist/astro.js +10 -8
- package/dist/{chunk-JKBJF3UI.js → chunk-2MYPFASJ.js} +2 -0
- package/dist/chunk-2VIXD2XB.js +3 -0
- package/dist/{chunk-OB7MYWHE.js → chunk-44PO64SX.js} +4 -2
- package/dist/chunk-4JCNAKOE.cjs +4 -0
- package/dist/{chunk-QH4TS5V4.cjs → chunk-6MFZ436T.cjs} +978 -1032
- package/dist/chunk-6ZGIV2SU.cjs +4 -0
- package/dist/chunk-7BZQBW77.cjs +4 -0
- package/dist/{chunk-JQCWV4DT.js → chunk-7LKYXMB3.js} +2 -0
- package/dist/{chunk-SHUYVCID.js → chunk-7QVYU63E.js} +2 -0
- package/dist/chunk-AFJCY3R6.js +3 -0
- package/dist/chunk-AXIRZAL7.js +3 -0
- package/dist/chunk-BTNHSS2P.cjs +13 -0
- package/dist/{chunk-FQXHIKCM.cjs → chunk-C2U4ATHO.cjs} +9 -7
- package/dist/chunk-DFLNRC3B.cjs +4 -0
- package/dist/chunk-DS7OM4NX.cjs +4 -0
- package/dist/{chunk-W5X3ZEZ5.js → chunk-EBXVKPUX.js} +2 -0
- package/dist/{chunk-X74SYWFL.cjs → chunk-G2EHTXK6.cjs} +9 -7
- package/dist/chunk-GIE6OE3X.js +3 -0
- package/dist/chunk-HJW7OH6E.js +3 -0
- package/dist/{chunk-MOXO6WJO.js → chunk-HSIMIWOH.js} +3 -1
- package/dist/{chunk-5IBA5HC2.cjs → chunk-HTJKPEWU.cjs} +6 -4
- package/dist/chunk-IHUNA3MO.cjs +4 -0
- package/dist/chunk-JU2HWIWS.js +12 -0
- package/dist/{chunk-BCHFSOQ4.js → chunk-LQXE5JHF.js} +906 -957
- package/dist/chunk-MBBNZS6K.cjs +16 -0
- package/dist/{chunk-3TNZWTLG.js → chunk-NNADGQRN.js} +5 -3
- package/dist/chunk-OYASPHNL.js +3 -0
- package/dist/chunk-PCCFAZML.js +3 -0
- package/dist/{chunk-USNT2KNT.cjs → chunk-PK6SKIKE.cjs} +2 -0
- package/dist/{chunk-ETKZMGLN.cjs → chunk-PSTCR335.cjs} +2 -0
- package/dist/chunk-Q7EJVZVI.cjs +4 -0
- package/dist/{chunk-CJSGAITR.js → chunk-S7MXT5A2.js} +3 -1
- package/dist/{chunk-7RWEBVQC.cjs → chunk-SDVEUTY2.cjs} +13 -11
- package/dist/{chunk-OLCL34MI.js → chunk-SYDUPBME.js} +6 -4
- package/dist/chunk-TLHFXGYV.js +3 -0
- package/dist/chunk-TP5MEMLG.cjs +12 -0
- package/dist/chunk-VNRXLY2T.js +3 -0
- package/dist/chunk-VQCQRLGM.cjs +4 -0
- package/dist/chunk-XZO6ZJQP.cjs +4 -0
- package/dist/{chunk-XP7OML7S.cjs → chunk-YUX7LOBU.cjs} +2 -0
- package/dist/chunk-YZZUOOPS.cjs +4 -0
- package/dist/chunk-Z5H7LD6W.js +3 -0
- package/dist/{chunk-VBR53KGY.js → chunk-Z5UEYORO.js} +5 -3
- package/dist/{chunk-PAMSESZV.cjs → chunk-Z6ARQDHR.cjs} +2 -0
- package/dist/config.cjs +5 -3
- package/dist/config.d.cts +19 -21
- package/dist/config.d.ts +19 -21
- package/dist/config.js +4 -2
- package/dist/{resolved-CSqGKlA5.d.cts → context-TizkCfOv.d.cts} +848 -849
- package/dist/{resolved-BABoCnXm.d.ts → context-jhcT1Vi1.d.ts} +848 -849
- package/dist/esbuild.cjs +13 -11
- package/dist/esbuild.d.cts +19 -21
- package/dist/esbuild.d.ts +19 -21
- package/dist/esbuild.js +10 -8
- package/dist/farm.cjs +9 -7
- package/dist/farm.d.cts +19 -21
- package/dist/farm.d.ts +19 -21
- package/dist/farm.js +8 -6
- package/dist/index.cjs +39 -41
- package/dist/index.d.cts +30 -55
- package/dist/index.d.ts +30 -55
- package/dist/index.js +20 -18
- package/dist/lib/{api-CDUN9en8.d.ts → api-CCOhyMZo.d.cts} +1 -1
- package/dist/lib/{api-BRMITKt-.d.cts → api-CpJJXdtL.d.ts} +1 -1
- package/dist/lib/build/esbuild.cjs +5 -5
- package/dist/lib/build/esbuild.d.cts +2 -2
- package/dist/lib/build/esbuild.d.ts +2 -2
- package/dist/lib/build/esbuild.js +2 -2
- package/dist/lib/build/index.cjs +25 -25
- package/dist/lib/build/index.d.cts +4 -4
- package/dist/lib/build/index.d.ts +4 -4
- package/dist/lib/build/index.js +9 -9
- package/dist/lib/build/rolldown.cjs +3 -3
- package/dist/lib/build/rolldown.d.cts +2 -2
- package/dist/lib/build/rolldown.d.ts +2 -2
- package/dist/lib/build/rolldown.js +2 -2
- package/dist/lib/build/rollup.cjs +3 -3
- package/dist/lib/build/rollup.d.cts +2 -2
- package/dist/lib/build/rollup.d.ts +2 -2
- package/dist/lib/build/rollup.js +1 -1
- package/dist/lib/build/rspack.cjs +2 -2
- package/dist/lib/build/rspack.d.cts +2 -2
- package/dist/lib/build/rspack.d.ts +2 -2
- package/dist/lib/build/rspack.js +1 -1
- package/dist/lib/build/tsup.cjs +6 -6
- package/dist/lib/build/tsup.d.cts +2 -2
- package/dist/lib/build/tsup.d.ts +2 -2
- package/dist/lib/build/tsup.js +3 -3
- package/dist/lib/build/unbuild.cjs +5 -5
- package/dist/lib/build/unbuild.d.cts +4 -4
- package/dist/lib/build/unbuild.d.ts +4 -4
- package/dist/lib/build/unbuild.js +2 -2
- package/dist/lib/build/vite.cjs +5 -5
- package/dist/lib/build/vite.d.cts +2 -2
- package/dist/lib/build/vite.d.ts +2 -2
- package/dist/lib/build/vite.js +3 -3
- package/dist/lib/build/webpack.cjs +2 -2
- package/dist/lib/build/webpack.d.cts +2 -2
- package/dist/lib/build/webpack.d.ts +2 -2
- package/dist/lib/build/webpack.js +1 -1
- package/dist/lib/chunk-3T56KQ7U.cjs +49 -0
- package/dist/lib/{chunk-PZLO6FZW.js → chunk-3W53W5J2.js} +2 -2
- package/dist/lib/chunk-4W6WV35V.js +108 -0
- package/dist/lib/chunk-6OYSDQXE.cjs +139 -0
- package/dist/lib/{chunk-EV357RFB.cjs → chunk-7MHUTBEC.cjs} +1 -3
- package/dist/lib/{chunk-A2NFSQ5K.js → chunk-7OVZZWGY.js} +1 -1
- package/dist/lib/chunk-A2NW7WAN.js +47 -0
- package/dist/lib/chunk-D6MI2V6R.cjs +115 -0
- package/dist/lib/{chunk-VHLINWXG.js → chunk-DLVVEHMU.js} +1 -1
- package/dist/lib/{chunk-XLYMVIVD.cjs → chunk-DNQBXFNE.cjs} +10 -10
- package/dist/lib/{chunk-UGVHYKKN.js → chunk-DYLE5FD3.js} +39 -2
- package/dist/lib/{chunk-AKBAX4FH.js → chunk-EN52JYUK.js} +1 -1
- package/dist/lib/{chunk-JYDGFQIV.cjs → chunk-F2CXZUSB.cjs} +1 -1
- package/dist/lib/{chunk-7VJ42H2I.cjs → chunk-HRRI4KOM.cjs} +1 -3
- package/dist/lib/{chunk-LPRZ3HD4.cjs → chunk-IXTLRVAK.cjs} +3 -3
- package/dist/lib/{chunk-SYF7QG2J.js → chunk-J3BW52BU.js} +1 -1
- package/dist/lib/chunk-KFDNKOXM.js +56 -0
- package/dist/lib/chunk-L56XA427.js +137 -0
- package/dist/lib/{chunk-6PPZCPME.cjs → chunk-LOW2TIQ6.cjs} +2 -2
- package/dist/lib/{chunk-TMZCGC5U.js → chunk-MI55FDCZ.js} +1 -1
- package/dist/lib/{chunk-DUZJ7ZF2.cjs → chunk-MKKWFHGE.cjs} +2 -2
- package/dist/lib/{chunk-ISBHXSDH.cjs → chunk-N5XEKCVW.cjs} +1 -1
- package/dist/lib/{chunk-XZFEHPYE.js → chunk-N5YLKWC2.js} +1 -1
- package/dist/lib/chunk-NIRFKQAD.js +845 -0
- package/dist/lib/{chunk-YMHOAMCU.cjs → chunk-NLJR4WIX.cjs} +41 -4
- package/dist/lib/{chunk-L3HESXYF.cjs → chunk-NUE5DIH3.cjs} +3 -3
- package/dist/lib/chunk-OBA5U4Y2.js +1059 -0
- package/dist/lib/{chunk-FQLZZYYO.js → chunk-OEF6EHQV.js} +1 -3
- package/dist/lib/{chunk-WTTBXYFQ.js → chunk-OFXWRM3U.js} +2 -2
- package/dist/lib/chunk-ONETLSPO.js +85 -0
- package/dist/lib/{chunk-2OV26JXJ.cjs → chunk-PQRWG64T.cjs} +3 -3
- package/dist/lib/chunk-R33US3PV.cjs +1081 -0
- package/dist/lib/{chunk-OA7OL7HF.cjs → chunk-SFEEJZLK.cjs} +38 -66
- package/dist/lib/{chunk-H6EOZSIZ.js → chunk-TAVG226Z.js} +1 -1
- package/dist/lib/{chunk-DALRRHB4.cjs → chunk-TSFG3WEA.cjs} +1 -1
- package/dist/lib/{chunk-RMA2PMP7.cjs → chunk-TZCC5IWH.cjs} +3 -3
- package/dist/lib/chunk-VHCBD2IS.js +149 -0
- package/dist/lib/{chunk-HY6DNFCT.js → chunk-VODWHWD6.js} +2 -2
- package/dist/lib/{chunk-2X5DUDNT.js → chunk-W6GWSJ22.js} +2 -2
- package/dist/lib/chunk-WBSA6OG6.cjs +860 -0
- package/dist/lib/{chunk-TOCNXURI.cjs → chunk-WCXA5WFX.cjs} +4 -4
- package/dist/lib/{chunk-6I5PL7H2.js → chunk-WGSZ4X6N.js} +1 -3
- package/dist/lib/{chunk-T2KQZC5K.js → chunk-WLDQUTFD.js} +27 -54
- package/dist/lib/{chunk-AOHJEL2Q.js → chunk-WOKPJMGJ.js} +3 -3
- package/dist/lib/{chunk-TDJNFAOV.cjs → chunk-X6JDYLWM.cjs} +1 -1
- package/dist/lib/chunk-XLHFUATD.cjs +151 -0
- package/dist/lib/chunk-XUYQYUWZ.cjs +87 -0
- package/dist/lib/chunk-YYEAV24J.cjs +67 -0
- package/dist/lib/{config-D8KrE7SZ.d.cts → config-Cqxh4V21.d.cts} +58 -475
- package/dist/lib/{config-DBIFdRoq.d.ts → config-D-WwQL-4.d.ts} +58 -475
- package/dist/lib/config-file.d.cts +2 -2
- package/dist/lib/config-file.d.ts +2 -2
- package/dist/lib/contexts/api-context.cjs +12 -7
- package/dist/lib/contexts/api-context.d.cts +27 -4
- package/dist/lib/contexts/api-context.d.ts +27 -4
- package/dist/lib/contexts/api-context.js +11 -6
- package/dist/lib/contexts/context.cjs +10 -5
- package/dist/lib/contexts/context.d.cts +7 -7
- package/dist/lib/contexts/context.d.ts +7 -7
- package/dist/lib/contexts/context.js +9 -4
- package/dist/lib/contexts/environment-context.cjs +11 -6
- package/dist/lib/contexts/environment-context.d.cts +4 -4
- package/dist/lib/contexts/environment-context.d.ts +4 -4
- package/dist/lib/contexts/environment-context.js +10 -5
- package/dist/lib/contexts/index.cjs +14 -9
- package/dist/lib/contexts/index.d.cts +4 -4
- package/dist/lib/contexts/index.d.ts +4 -4
- package/dist/lib/contexts/index.js +11 -6
- package/dist/lib/contexts/plugin-context.d.cts +4 -4
- package/dist/lib/contexts/plugin-context.d.ts +4 -4
- package/dist/lib/entry.cjs +9 -9
- package/dist/lib/entry.d.cts +2 -2
- package/dist/lib/entry.d.ts +2 -2
- package/dist/lib/entry.js +1 -1
- package/dist/lib/fs/helpers.cjs +47 -0
- package/dist/lib/fs/helpers.d.cts +74 -0
- package/dist/lib/fs/helpers.d.ts +74 -0
- package/dist/lib/fs/helpers.js +2 -0
- package/dist/lib/fs/index.cjs +17 -0
- package/dist/lib/fs/index.d.cts +33 -0
- package/dist/lib/fs/index.d.ts +33 -0
- package/dist/lib/fs/index.js +8 -0
- package/dist/lib/fs/storage/base.cjs +11 -0
- package/dist/lib/fs/storage/base.d.cts +138 -0
- package/dist/lib/fs/storage/base.d.ts +138 -0
- package/dist/lib/fs/storage/base.js +2 -0
- package/dist/lib/fs/storage/file-system.cjs +13 -0
- package/dist/lib/fs/storage/file-system.d.cts +90 -0
- package/dist/lib/fs/storage/file-system.d.ts +90 -0
- package/dist/lib/fs/storage/file-system.js +4 -0
- package/dist/lib/fs/storage/index.cjs +22 -0
- package/dist/lib/fs/storage/index.d.cts +6 -0
- package/dist/lib/fs/storage/index.d.ts +6 -0
- package/dist/lib/fs/storage/index.js +5 -0
- package/dist/lib/fs/storage/virtual.cjs +12 -0
- package/dist/lib/fs/storage/virtual.d.cts +66 -0
- package/dist/lib/fs/storage/virtual.d.ts +66 -0
- package/dist/lib/fs/storage/virtual.js +3 -0
- package/dist/lib/fs/vfs.cjs +16 -0
- package/dist/lib/fs/vfs.d.cts +247 -0
- package/dist/lib/fs/vfs.d.ts +247 -0
- package/dist/lib/fs/vfs.js +7 -0
- package/dist/lib/fs-Dg-aTfiN.d.cts +378 -0
- package/dist/lib/fs-Dg-aTfiN.d.ts +378 -0
- package/dist/lib/index.cjs +62 -68
- package/dist/lib/index.d.cts +18 -356
- package/dist/lib/index.d.ts +18 -356
- package/dist/lib/index.js +19 -13
- package/dist/lib/{internal-CaGANOWK.d.cts → internal-Cl7s1iAA.d.cts} +2 -2
- package/dist/lib/{internal-1qCyw7bA.d.ts → internal-W5pvS6e9.d.ts} +2 -2
- package/dist/lib/logger.d.cts +2 -2
- package/dist/lib/logger.d.ts +2 -2
- package/dist/lib/typescript/import-transformer.cjs +7 -45
- package/dist/lib/typescript/import-transformer.d.cts +2 -2
- package/dist/lib/typescript/import-transformer.d.ts +2 -2
- package/dist/lib/typescript/import-transformer.js +2 -47
- package/dist/lib/typescript/index.cjs +10 -22
- package/dist/lib/typescript/index.d.cts +4 -4
- package/dist/lib/typescript/index.d.ts +4 -4
- package/dist/lib/typescript/index.js +2 -2
- package/dist/lib/typescript/ts-morph.cjs +6 -2
- package/dist/lib/typescript/ts-morph.d.cts +28 -4
- package/dist/lib/typescript/ts-morph.d.ts +28 -4
- package/dist/lib/typescript/ts-morph.js +1 -1
- package/dist/lib/unplugin/factory.cjs +14 -9
- package/dist/lib/unplugin/factory.d.cts +4 -4
- package/dist/lib/unplugin/factory.d.ts +4 -4
- package/dist/lib/unplugin/factory.js +13 -8
- package/dist/lib/unplugin/helpers.d.cts +2 -2
- package/dist/lib/unplugin/helpers.d.ts +2 -2
- package/dist/lib/unplugin/index.cjs +16 -11
- package/dist/lib/unplugin/index.d.cts +4 -4
- package/dist/lib/unplugin/index.d.ts +4 -4
- package/dist/lib/unplugin/index.js +14 -9
- package/dist/lib/unplugin/plugin.cjs +2 -2
- package/dist/lib/unplugin/plugin.d.cts +4 -4
- package/dist/lib/unplugin/plugin.d.ts +4 -4
- package/dist/lib/unplugin/plugin.js +1 -1
- package/dist/lib/{unplugin-CEeJqADD.d.ts → unplugin-Cg2NoKj0.d.ts} +2 -2
- package/dist/lib/{unplugin-bUSyjd0S.d.cts → unplugin-trF-VLnO.d.cts} +2 -2
- package/dist/lib/utilities/bundle.cjs +4 -4
- package/dist/lib/utilities/bundle.d.cts +2 -2
- package/dist/lib/utilities/bundle.d.ts +2 -2
- package/dist/lib/utilities/bundle.js +3 -3
- package/dist/lib/utilities/cache.d.cts +2 -2
- package/dist/lib/utilities/cache.d.ts +2 -2
- package/dist/lib/utilities/file-header.d.cts +2 -2
- package/dist/lib/utilities/file-header.d.ts +2 -2
- package/dist/lib/utilities/index.cjs +22 -22
- package/dist/lib/utilities/index.d.cts +2 -2
- package/dist/lib/utilities/index.d.ts +2 -2
- package/dist/lib/utilities/index.js +6 -6
- package/dist/lib/utilities/meta.cjs +7 -7
- package/dist/lib/utilities/meta.d.cts +2 -2
- package/dist/lib/utilities/meta.d.ts +2 -2
- package/dist/lib/utilities/meta.js +1 -1
- package/dist/lib/utilities/resolve.cjs +5 -5
- package/dist/lib/utilities/resolve.d.cts +2 -2
- package/dist/lib/utilities/resolve.d.ts +2 -2
- package/dist/lib/utilities/resolve.js +4 -4
- package/dist/lib/utilities/source-file.d.cts +2 -2
- package/dist/lib/utilities/source-file.d.ts +2 -2
- package/dist/lib/utilities/source-map.d.cts +2 -2
- package/dist/lib/utilities/source-map.d.ts +2 -2
- package/dist/lib/utilities/worker.d.cts +2 -2
- package/dist/lib/utilities/worker.d.ts +2 -2
- package/dist/lib/utilities/write-file.d.cts +2 -2
- package/dist/lib/utilities/write-file.d.ts +2 -2
- package/dist/next.cjs +11 -9
- package/dist/next.js +9 -7
- package/dist/nuxt.cjs +13 -11
- package/dist/nuxt.js +11 -9
- package/dist/plugin-utils/{chunk-JHTLGE4X.js → chunk-K2GWRZPV.js} +1 -1
- package/dist/plugin-utils/{chunk-HSYQWNIH.cjs → chunk-VWFJOPKC.cjs} +1 -1
- package/dist/plugin-utils/{context-BITGF5LZ.d.cts → context-PtfEjz3_.d.cts} +187 -230
- package/dist/plugin-utils/{context-BITGF5LZ.d.ts → context-PtfEjz3_.d.ts} +187 -230
- package/dist/plugin-utils/context-helpers.d.cts +1 -2
- package/dist/plugin-utils/context-helpers.d.ts +1 -2
- package/dist/plugin-utils/enforce.d.cts +1 -2
- package/dist/plugin-utils/enforce.d.ts +1 -2
- package/dist/plugin-utils/extend.d.cts +1 -2
- package/dist/plugin-utils/extend.d.ts +1 -2
- package/dist/plugin-utils/get-config-path.d.cts +1 -2
- package/dist/plugin-utils/get-config-path.d.ts +1 -2
- package/dist/plugin-utils/helpers.d.cts +1 -2
- package/dist/plugin-utils/helpers.d.ts +1 -2
- package/dist/plugin-utils/index.cjs +2 -2
- package/dist/plugin-utils/index.d.cts +1 -2
- package/dist/plugin-utils/index.d.ts +1 -2
- package/dist/plugin-utils/index.js +1 -1
- package/dist/plugin-utils/merge.d.cts +1 -2
- package/dist/plugin-utils/merge.d.ts +1 -2
- package/dist/plugin-utils/paths.cjs +2 -2
- package/dist/plugin-utils/paths.d.cts +2 -3
- package/dist/plugin-utils/paths.d.ts +2 -3
- package/dist/plugin-utils/paths.js +1 -1
- package/dist/rolldown.cjs +9 -7
- package/dist/rolldown.d.cts +19 -21
- package/dist/rolldown.d.ts +19 -21
- package/dist/rolldown.js +8 -6
- package/dist/rollup.cjs +9 -7
- package/dist/rollup.d.cts +19 -21
- package/dist/rollup.d.ts +19 -21
- package/dist/rollup.js +8 -6
- package/dist/rspack.cjs +9 -7
- package/dist/rspack.d.cts +18 -20
- package/dist/rspack.d.ts +18 -20
- package/dist/rspack.js +8 -6
- package/dist/tsup.cjs +12 -10
- package/dist/tsup.js +10 -8
- package/dist/types/api.cjs +3 -1
- package/dist/types/api.cjs.map +1 -0
- package/dist/types/api.d.cts +20 -22
- package/dist/types/api.d.ts +20 -22
- package/dist/types/api.js +3 -1
- package/dist/types/api.js.map +1 -0
- package/dist/types/babel.cjs +3 -1
- package/dist/types/babel.cjs.map +1 -0
- package/dist/types/babel.d.cts +17 -19
- package/dist/types/babel.d.ts +17 -19
- package/dist/types/babel.js +3 -1
- package/dist/types/babel.js.map +1 -0
- package/dist/types/build.cjs +3 -1
- package/dist/types/build.cjs.map +1 -0
- package/dist/types/build.js +3 -1
- package/dist/types/build.js.map +1 -0
- package/dist/types/commands.cjs +5 -3
- package/dist/types/commands.cjs.map +1 -0
- package/dist/types/commands.d.cts +18 -20
- package/dist/types/commands.d.ts +18 -20
- package/dist/types/commands.js +4 -2
- package/dist/types/commands.js.map +1 -0
- package/dist/types/config.cjs +3 -1
- package/dist/types/config.cjs.map +1 -0
- package/dist/types/config.d.cts +2 -4
- package/dist/types/config.d.ts +2 -4
- package/dist/types/config.js +3 -1
- package/dist/types/config.js.map +1 -0
- package/dist/types/context.cjs +5 -3
- package/dist/types/context.cjs.map +1 -0
- package/dist/types/context.d.cts +8 -10
- package/dist/types/context.d.ts +8 -10
- package/dist/types/context.js +4 -2
- package/dist/types/context.js.map +1 -0
- package/dist/types/fs.cjs +10 -4
- package/dist/types/fs.cjs.map +1 -0
- package/dist/types/fs.d.cts +138 -184
- package/dist/types/fs.d.ts +138 -184
- package/dist/types/fs.js +4 -2
- package/dist/types/fs.js.map +1 -0
- package/dist/types/hooks.cjs +3 -1
- package/dist/types/hooks.cjs.map +1 -0
- package/dist/types/hooks.d.cts +19 -21
- package/dist/types/hooks.d.ts +19 -21
- package/dist/types/hooks.js +3 -1
- package/dist/types/hooks.js.map +1 -0
- package/dist/types/index.cjs +26 -20
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +13 -15
- package/dist/types/index.d.ts +13 -15
- package/dist/types/index.js +17 -15
- package/dist/types/index.js.map +1 -0
- package/dist/types/internal.cjs +2 -0
- package/dist/types/internal.cjs.map +1 -0
- package/dist/types/internal.d.cts +20 -22
- package/dist/types/internal.d.ts +20 -22
- package/dist/types/internal.js +2 -0
- package/dist/types/internal.js.map +1 -0
- package/dist/types/plugin.cjs +5 -3
- package/dist/types/plugin.cjs.map +1 -0
- package/dist/types/plugin.d.cts +9 -11
- package/dist/types/plugin.d.ts +9 -11
- package/dist/types/plugin.js +4 -2
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/resolved.cjs +3 -1
- package/dist/types/resolved.cjs.map +1 -0
- package/dist/types/resolved.d.cts +7 -9
- package/dist/types/resolved.d.ts +7 -9
- package/dist/types/resolved.js +3 -1
- package/dist/types/resolved.js.map +1 -0
- package/dist/types/tsconfig.cjs +3 -1
- package/dist/types/tsconfig.cjs.map +1 -0
- package/dist/types/tsconfig.js +3 -1
- package/dist/types/tsconfig.js.map +1 -0
- package/dist/types/typedoc.cjs +3 -1
- package/dist/types/typedoc.cjs.map +1 -0
- package/dist/types/typedoc.js +3 -1
- package/dist/types/typedoc.js.map +1 -0
- package/dist/types/unplugin.cjs +3 -1
- package/dist/types/unplugin.cjs.map +1 -0
- package/dist/types/unplugin.d.cts +11 -13
- package/dist/types/unplugin.d.ts +11 -13
- package/dist/types/unplugin.js +3 -1
- package/dist/types/unplugin.js.map +1 -0
- package/dist/unloader.cjs +9 -7
- package/dist/unloader.d.cts +19 -21
- package/dist/unloader.d.ts +19 -21
- package/dist/unloader.js +8 -6
- package/dist/unplugin.cjs +20 -20
- package/dist/unplugin.d.cts +19 -21
- package/dist/unplugin.d.ts +19 -21
- package/dist/unplugin.js +10 -10
- package/dist/vite.cjs +13 -11
- package/dist/vite.d.cts +19 -21
- package/dist/vite.d.ts +19 -21
- package/dist/vite.js +10 -8
- package/dist/webpack.cjs +12 -10
- package/dist/webpack.d.cts +19 -21
- package/dist/webpack.d.ts +19 -21
- package/dist/webpack.js +9 -7
- package/package.json +72 -19
- package/schemas/fs.capnp +4 -59
- package/dist/chunk-2NO7N5OW.cjs +0 -2
- package/dist/chunk-7GYTTM4M.cjs +0 -2
- package/dist/chunk-AENPRFWJ.cjs +0 -2
- package/dist/chunk-AYKZK666.cjs +0 -8
- package/dist/chunk-BUR2JQ6G.cjs +0 -11
- package/dist/chunk-DRXFQCNC.js +0 -1
- package/dist/chunk-FNZDWE4L.js +0 -1
- package/dist/chunk-GHJU2KGP.cjs +0 -2
- package/dist/chunk-GRU7B3QM.cjs +0 -2
- package/dist/chunk-HQFZ64VC.cjs +0 -2
- package/dist/chunk-J4BQZHTQ.js +0 -1
- package/dist/chunk-JGB5YQ2U.js +0 -1
- package/dist/chunk-KALR2O2F.cjs +0 -2
- package/dist/chunk-LOUZXJFY.cjs +0 -10
- package/dist/chunk-OO3YXM72.js +0 -1
- package/dist/chunk-QE3WGMAP.js +0 -1
- package/dist/chunk-SMNKPH4T.js +0 -1
- package/dist/chunk-T2P533I5.js +0 -1
- package/dist/chunk-V3MLQDZQ.js +0 -1
- package/dist/chunk-VT7NVLLU.js +0 -5
- package/dist/chunk-YRJ4MLVL.cjs +0 -2
- package/dist/chunk-ZC43PZXS.cjs +0 -2
- package/dist/lib/chunk-3MZQ4MQX.cjs +0 -2360
- package/dist/lib/chunk-5JAFU45Z.js +0 -2324
- package/dist/lib/chunk-HAXL7QE7.js +0 -154
- package/dist/lib/chunk-SAS5EPBD.cjs +0 -107
- package/dist/lib/chunk-WUYK74EH.cjs +0 -165
- package/dist/lib/chunk-YQ3ODCHV.js +0 -105
- package/dist/lib/typescript/compiler-host.cjs +0 -164
- package/dist/lib/typescript/compiler-host.d.cts +0 -63
- package/dist/lib/typescript/compiler-host.d.ts +0 -63
- package/dist/lib/typescript/compiler-host.js +0 -156
- package/dist/lib/typescript/program.cjs +0 -27
- package/dist/lib/typescript/program.d.cts +0 -68
- package/dist/lib/typescript/program.d.ts +0 -68
- package/dist/lib/typescript/program.js +0 -2
- /package/dist/{chunk-2NCILNCH.cjs → lib/chunk-K2SFTPN3.cjs} +0 -0
- /package/dist/{chunk-BLNT5INX.js → lib/chunk-NQAHFTUW.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkN5XEKCVW_cjs = require('./chunk-N5XEKCVW.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var omit = require('@stryke/helpers/omit');
|
|
6
6
|
var joinPaths = require('@stryke/path/join-paths');
|
|
@@ -31,7 +31,7 @@ function resolveESBuildEntry(context, entryPoints = []) {
|
|
|
31
31
|
if (isString.isString(entry)) {
|
|
32
32
|
ret[replace.replaceExtension(replace.replacePath(entry, context.config.sourceRoot || context.config.projectRoot))] = replace.replacePath(entry, context.config.sourceRoot || context.config.projectRoot);
|
|
33
33
|
} else {
|
|
34
|
-
ret[entry.output ||
|
|
34
|
+
ret[entry.output || chunkN5XEKCVW_cjs.resolveEntryOutput(context, entry.input || entry)] = chunkN5XEKCVW_cjs.resolveEntryInputFile(context, entry.input || entry);
|
|
35
35
|
}
|
|
36
36
|
return ret;
|
|
37
37
|
}, {});
|
|
@@ -40,7 +40,7 @@ chunkUSNT2KNT_cjs.__name(resolveESBuildEntry, "resolveESBuildEntry");
|
|
|
40
40
|
function extractESBuildConfig(context) {
|
|
41
41
|
const inject = context.config.build.override.inject ?? context.config.build.inject;
|
|
42
42
|
if (inject && Object.keys(inject).length > 0) {
|
|
43
|
-
context.fs.
|
|
43
|
+
context.fs.writeSync(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js"), Object.entries(inject).map(([key, value]) => {
|
|
44
44
|
if (value) {
|
|
45
45
|
if (Array.isArray(value)) {
|
|
46
46
|
if (camelCase.camelCase(key) !== key) {
|
|
@@ -109,7 +109,7 @@ export { ${key} };`;
|
|
|
109
109
|
format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
|
|
110
110
|
platform: context.config.build.platform,
|
|
111
111
|
treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
|
|
112
|
-
outdir: context.config.output.
|
|
112
|
+
outdir: context.config.output.buildPath,
|
|
113
113
|
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
114
114
|
tsconfigRaw: context.tsconfig.tsconfigJson
|
|
115
115
|
}, context.config.build.variant === "esbuild" ? omit.omit(context.config.build, [
|
|
@@ -61,9 +61,7 @@ function createUnplugin(context, _options = {}) {
|
|
|
61
61
|
${ctx.config.build.polyfill.map((p) => `import "${p}";`).join("\n")}
|
|
62
62
|
|
|
63
63
|
export * from "${isString(resolved) ? resolved : resolved.id}";
|
|
64
|
-
`, entry.file
|
|
65
|
-
mode: "virtual"
|
|
66
|
-
});
|
|
64
|
+
`, entry.file);
|
|
67
65
|
return entry.file;
|
|
68
66
|
}
|
|
69
67
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { writeFile } from './chunk-TANQDHYY.js';
|
|
2
1
|
import { getFileHeader } from './chunk-GANVMM73.js';
|
|
3
|
-
import {
|
|
2
|
+
import { writeFile } from './chunk-TANQDHYY.js';
|
|
3
|
+
import { PowerlinesAPIContext } from './chunk-DYLE5FD3.js';
|
|
4
4
|
import { callHook } from './chunk-KFJCWNVG.js';
|
|
5
|
-
import { isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-
|
|
6
|
-
import { writeMetaFile } from './chunk-
|
|
5
|
+
import { isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-NIRFKQAD.js';
|
|
6
|
+
import { writeMetaFile } from './chunk-OEF6EHQV.js';
|
|
7
|
+
import { createProgram } from './chunk-4W6WV35V.js';
|
|
7
8
|
import { getParsedTypeScriptConfig, getTsconfigFilePath, isIncludeMatchFound } from './chunk-ZGMEHSNN.js';
|
|
8
9
|
import { createLog } from './chunk-ENRLU4UR.js';
|
|
9
10
|
import { getString } from './chunk-M263EZ4F.js';
|
|
@@ -14,6 +15,7 @@ import { transformAsync } from '@babel/core';
|
|
|
14
15
|
import { formatLogMessage } from '@storm-software/config-tools/logger/console';
|
|
15
16
|
import { toArray } from '@stryke/convert/to-array';
|
|
16
17
|
import { copyFiles } from '@stryke/fs/copy-file';
|
|
18
|
+
import { createDirectory } from '@stryke/fs/helpers';
|
|
17
19
|
import { install } from '@stryke/fs/install';
|
|
18
20
|
import { listFiles } from '@stryke/fs/list-files';
|
|
19
21
|
import { isPackageExists, isPackageListed, doesPackageMatch, getPackageListing } from '@stryke/fs/package-fns';
|
|
@@ -32,13 +34,12 @@ import chalk2 from 'chalk';
|
|
|
32
34
|
import Handlebars from 'handlebars';
|
|
33
35
|
import { declare } from '@babel/helper-plugin-utils';
|
|
34
36
|
import * as t from '@babel/types';
|
|
35
|
-
import
|
|
37
|
+
import { flattenDiagnosticMessageText } from 'typescript';
|
|
36
38
|
import { getPackageName, hasPackageVersion, getPackageVersion } from '@stryke/string-format/package';
|
|
37
39
|
import { getObjectDiff } from '@donedeal0/superdiff';
|
|
38
40
|
import { readJsonFile } from '@stryke/fs/json';
|
|
39
41
|
import { StormJSON } from '@stryke/json/storm-json';
|
|
40
|
-
import {
|
|
41
|
-
import { isParentPath } from '@stryke/path/is-parent-path';
|
|
42
|
+
import { relativePath, findFilePath, findFileName } from '@stryke/path/file-path-fns';
|
|
42
43
|
import { titleCase } from '@stryke/string-format/title-case';
|
|
43
44
|
|
|
44
45
|
function resolveModulePath(nodePath, state) {
|
|
@@ -152,8 +153,11 @@ function formatTypes(code) {
|
|
|
152
153
|
__name(formatTypes, "formatTypes");
|
|
153
154
|
async function emitTypes(context, files) {
|
|
154
155
|
context.log(LogLevelLabel.TRACE, `Running the TypeScript compiler for ${files.length} generated runtime files.`);
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
const program = createProgram(context, {
|
|
157
|
+
skipAddingFilesFromTsConfig: true
|
|
158
|
+
});
|
|
159
|
+
program.addSourceFilesAtPaths(files);
|
|
160
|
+
const result = program.emitToMemory({
|
|
157
161
|
emitOnlyDtsFiles: true
|
|
158
162
|
});
|
|
159
163
|
let builtinModules = "";
|
|
@@ -244,15 +248,10 @@ async function resolveTsconfigChanges(context) {
|
|
|
244
248
|
const tsconfigJson = await readJsonFile(tsconfigFilePath);
|
|
245
249
|
tsconfigJson.compilerOptions ??= {};
|
|
246
250
|
if (context.config.output.dts !== false) {
|
|
247
|
-
|
|
248
|
-
if (findFileExtension(context.config.output.dts) !== "d.ts" && findFileExtension(context.config.output.dts) !== "d.cts" && findFileExtension(context.config.output.dts) !== "d.mts") {
|
|
249
|
-
context.config.output.dts = joinPaths(context.config.output.dts, "powerlines.d.ts");
|
|
250
|
-
}
|
|
251
|
-
const dtsRelativePath = joinPaths(relativePath(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot), findFilePath(context.config.output.dts)), findFileName(context.config.output.dts));
|
|
251
|
+
const dtsRelativePath = joinPaths(relativePath(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot), findFilePath(context.dtsPath)), findFileName(context.dtsPath));
|
|
252
252
|
if (!tsconfigJson.include?.some((filePattern) => isIncludeMatchFound(filePattern, [
|
|
253
|
-
|
|
254
|
-
dtsRelativePath
|
|
255
|
-
"storm.d.ts"
|
|
253
|
+
context.dtsPath,
|
|
254
|
+
dtsRelativePath
|
|
256
255
|
]))) {
|
|
257
256
|
tsconfigJson.include ??= [];
|
|
258
257
|
tsconfigJson.include.push(dtsRelativePath.startsWith("./") ? dtsRelativePath.slice(2) : dtsRelativePath);
|
|
@@ -267,24 +266,6 @@ async function resolveTsconfigChanges(context) {
|
|
|
267
266
|
tsconfigJson.compilerOptions.lib ??= [];
|
|
268
267
|
tsconfigJson.compilerOptions.lib.push("esnext");
|
|
269
268
|
}
|
|
270
|
-
if (tsconfig.options.module !== ts.ModuleKind.ESNext) {
|
|
271
|
-
tsconfigJson.compilerOptions.module = "ESNext";
|
|
272
|
-
}
|
|
273
|
-
if (!tsconfig.options.target || ![
|
|
274
|
-
ts.ScriptTarget.ESNext,
|
|
275
|
-
ts.ScriptTarget.ES2024,
|
|
276
|
-
ts.ScriptTarget.ES2023,
|
|
277
|
-
ts.ScriptTarget.ES2022,
|
|
278
|
-
ts.ScriptTarget.ES2021
|
|
279
|
-
].includes(tsconfig.options.target)) {
|
|
280
|
-
tsconfigJson.compilerOptions.target = "ESNext";
|
|
281
|
-
}
|
|
282
|
-
if (tsconfig.options.moduleResolution !== ts.ModuleResolutionKind.Bundler) {
|
|
283
|
-
tsconfigJson.compilerOptions.moduleResolution = "Bundler";
|
|
284
|
-
}
|
|
285
|
-
if (tsconfig.options.moduleDetection !== ts.ModuleDetectionKind.Force) {
|
|
286
|
-
tsconfigJson.compilerOptions.moduleDetection = "force";
|
|
287
|
-
}
|
|
288
269
|
if (tsconfig.options.esModuleInterop !== true) {
|
|
289
270
|
tsconfigJson.compilerOptions.esModuleInterop = true;
|
|
290
271
|
}
|
|
@@ -309,9 +290,7 @@ async function initializeTsconfig(context) {
|
|
|
309
290
|
context.tsconfig.originalTsconfigJson = await readJsonFile(tsconfigFilePath);
|
|
310
291
|
context.tsconfig.tsconfigJson = await resolveTsconfigChanges(context);
|
|
311
292
|
context.log(LogLevelLabel.TRACE, "Writing updated TypeScript configuration (tsconfig.json) file to disk.");
|
|
312
|
-
await context.
|
|
313
|
-
mode: "fs"
|
|
314
|
-
});
|
|
293
|
+
await writeFile(context.log, tsconfigFilePath, StormJSON.stringify(context.tsconfig.tsconfigJson));
|
|
315
294
|
context.tsconfig = getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig, context.config.tsconfigRaw, context.tsconfig.originalTsconfigJson);
|
|
316
295
|
}
|
|
317
296
|
__name(initializeTsconfig, "initializeTsconfig");
|
|
@@ -444,21 +423,17 @@ ${formatLogMessage(context.config)}`);
|
|
|
444
423
|
await writeMetaFile(context);
|
|
445
424
|
context.persistedMeta = context.meta;
|
|
446
425
|
if (!context.fs.existsSync(context.cachePath)) {
|
|
447
|
-
await
|
|
448
|
-
mode: "fs"
|
|
449
|
-
});
|
|
426
|
+
await createDirectory(context.cachePath);
|
|
450
427
|
}
|
|
451
428
|
if (!context.fs.existsSync(context.dataPath)) {
|
|
452
|
-
await
|
|
453
|
-
mode: "fs"
|
|
454
|
-
});
|
|
429
|
+
await createDirectory(context.dataPath);
|
|
455
430
|
}
|
|
456
431
|
await this.callPreHook(context, "prepare");
|
|
457
432
|
await this.callNormalHook(context, "prepare");
|
|
458
433
|
if (context.config.output.dts !== false) {
|
|
459
434
|
context.log(LogLevelLabel.TRACE, `Preparing the TypeScript definitions for the Powerlines project.`);
|
|
460
435
|
if (context.fs.existsSync(context.dtsPath)) {
|
|
461
|
-
await context.fs.
|
|
436
|
+
await context.fs.remove(context.dtsPath);
|
|
462
437
|
}
|
|
463
438
|
context.log(LogLevelLabel.TRACE, "Transforming built-ins runtime modules files.");
|
|
464
439
|
const builtinFilePaths = await Promise.all((await context.getBuiltins()).map(async (file) => {
|
|
@@ -545,7 +520,7 @@ ${formatLogMessage(context.config)}`);
|
|
|
545
520
|
generatedTypes = result;
|
|
546
521
|
}
|
|
547
522
|
}
|
|
548
|
-
await context.fs.
|
|
523
|
+
await context.fs.write(context.dtsPath, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
|
|
549
524
|
|
|
550
525
|
` : ""}${getFileHeader(context, {
|
|
551
526
|
directive: null,
|
|
@@ -553,9 +528,7 @@ ${formatLogMessage(context.config)}`);
|
|
|
553
528
|
})}
|
|
554
529
|
|
|
555
530
|
${formatTypes(generatedTypes)}
|
|
556
|
-
|
|
557
|
-
mode: "fs"
|
|
558
|
-
});
|
|
531
|
+
`);
|
|
559
532
|
}
|
|
560
533
|
context.tsconfig = getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig);
|
|
561
534
|
if (!context.tsconfig) {
|
|
@@ -623,8 +596,8 @@ ${formatTypes(generatedTypes)}
|
|
|
623
596
|
await this.prepare(inlineConfig);
|
|
624
597
|
await this.#executeEnvironments(async (context) => {
|
|
625
598
|
this.context.log(LogLevelLabel.TRACE, "Cleaning the project's dist and artifacts directories.");
|
|
626
|
-
await context.fs.
|
|
627
|
-
await context.fs.
|
|
599
|
+
await context.fs.remove(joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath));
|
|
600
|
+
await context.fs.remove(joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.artifactsPath));
|
|
628
601
|
await callHook(context, "clean", {
|
|
629
602
|
sequential: true
|
|
630
603
|
});
|
|
@@ -666,11 +639,11 @@ ${formatTypes(generatedTypes)}
|
|
|
666
639
|
await this.#executeEnvironments(async (context) => {
|
|
667
640
|
await this.callPreHook(context, "build");
|
|
668
641
|
await this.callNormalHook(context, "build");
|
|
669
|
-
if (context.config.output.
|
|
670
|
-
const sourcePath = appendPath(context.config.output.
|
|
642
|
+
if (context.config.output.buildPath !== context.config.output.outputPath) {
|
|
643
|
+
const sourcePath = appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot);
|
|
671
644
|
const destinationPath = joinPaths(appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot), "dist");
|
|
672
645
|
if (sourcePath !== destinationPath) {
|
|
673
|
-
context.log(LogLevelLabel.INFO, `Copying build output files from project's build directory (${context.config.output.
|
|
646
|
+
context.log(LogLevelLabel.INFO, `Copying build output files from project's build directory (${context.config.output.buildPath}) to the workspace's output directory (${context.config.output.outputPath}).`);
|
|
674
647
|
await copyFiles({
|
|
675
648
|
input: sourcePath,
|
|
676
649
|
glob: "**/*"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveEntryInputFile, resolveEntryOutput } from './chunk-
|
|
1
|
+
import { resolveEntryInputFile, resolveEntryOutput } from './chunk-N5YLKWC2.js';
|
|
2
2
|
import { __name } from './chunk-SHUYVCID.js';
|
|
3
3
|
import { omit } from '@stryke/helpers/omit';
|
|
4
4
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
@@ -34,7 +34,7 @@ __name(resolveESBuildEntry, "resolveESBuildEntry");
|
|
|
34
34
|
function extractESBuildConfig(context) {
|
|
35
35
|
const inject = context.config.build.override.inject ?? context.config.build.inject;
|
|
36
36
|
if (inject && Object.keys(inject).length > 0) {
|
|
37
|
-
context.fs.
|
|
37
|
+
context.fs.writeSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js"), Object.entries(inject).map(([key, value]) => {
|
|
38
38
|
if (value) {
|
|
39
39
|
if (Array.isArray(value)) {
|
|
40
40
|
if (camelCase(key) !== key) {
|
|
@@ -103,7 +103,7 @@ export { ${key} };`;
|
|
|
103
103
|
format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
|
|
104
104
|
platform: context.config.build.platform,
|
|
105
105
|
treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
|
|
106
|
-
outdir: context.config.output.
|
|
106
|
+
outdir: context.config.output.buildPath,
|
|
107
107
|
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
108
108
|
tsconfigRaw: context.tsconfig.tsconfigJson
|
|
109
109
|
}, context.config.build.variant === "esbuild" ? omit(context.config.build, [
|
|
@@ -25,7 +25,7 @@ function extractRspackConfig(context) {
|
|
|
25
25
|
skipNodeModulesBundle: context.config.build.skipNodeModulesBundle
|
|
26
26
|
}, {
|
|
27
27
|
output: {
|
|
28
|
-
path: joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.
|
|
28
|
+
path: joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath)
|
|
29
29
|
},
|
|
30
30
|
name: context.config.name,
|
|
31
31
|
node: context.config.build.platform === "node" ? {
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
+
var append = require('@stryke/path/append');
|
|
5
|
+
var correctPath = require('@stryke/path/correct-path');
|
|
6
|
+
var join = require('@stryke/path/join');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
|
|
9
|
+
var BaseStorageAdapter = class {
|
|
10
|
+
static {
|
|
11
|
+
chunkUSNT2KNT_cjs.__name(this, "BaseStorageAdapter");
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether the storage adapter has been disposed.
|
|
15
|
+
*/
|
|
16
|
+
#isDisposed = false;
|
|
17
|
+
/**
|
|
18
|
+
* Configuration options for the storage adapter.
|
|
19
|
+
*/
|
|
20
|
+
options;
|
|
21
|
+
/**
|
|
22
|
+
* Constructor for the BaseStorageAdapter.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Configuration options for the storage adapter.
|
|
25
|
+
*/
|
|
26
|
+
constructor(options = {
|
|
27
|
+
base: "/"
|
|
28
|
+
}) {
|
|
29
|
+
this.options = options;
|
|
30
|
+
this.options.base = path.resolve(options.base);
|
|
31
|
+
this.options.isReadOnly = !!options.isReadOnly;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Asynchronously checks if a key exists in the storage.
|
|
35
|
+
*
|
|
36
|
+
* @param key - The key to check for existence.
|
|
37
|
+
* @returns A promise that resolves to `true` if the key exists, otherwise `false`.
|
|
38
|
+
*/
|
|
39
|
+
async exists(key) {
|
|
40
|
+
return this.existsSync(key);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Asynchronously retrieves the value associated with a given key.
|
|
44
|
+
*
|
|
45
|
+
* @param key - The key whose value is to be retrieved.
|
|
46
|
+
* @returns A promise that resolves to the value associated with the key, or `null` if the key does not exist.
|
|
47
|
+
*/
|
|
48
|
+
async get(key) {
|
|
49
|
+
return this.getSync(key);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Asynchronously sets the value for a given key.
|
|
53
|
+
*
|
|
54
|
+
* @param key - The key to set the value for.
|
|
55
|
+
* @param value - The value to set.
|
|
56
|
+
*/
|
|
57
|
+
async set(key, value) {
|
|
58
|
+
if (!this.options.isReadOnly) {
|
|
59
|
+
this.setSync(key, value);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Asynchronously removes a key from the storage.
|
|
64
|
+
*
|
|
65
|
+
* @param key - The key to remove.
|
|
66
|
+
*/
|
|
67
|
+
async remove(key) {
|
|
68
|
+
if (!this.options.isReadOnly) {
|
|
69
|
+
this.removeSync(key);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Synchronously removes all entries from the storage that match the provided base path.
|
|
74
|
+
*
|
|
75
|
+
* @param base - The base path to clear keys from.
|
|
76
|
+
*/
|
|
77
|
+
clearSync(base) {
|
|
78
|
+
if (!this.options.isReadOnly) {
|
|
79
|
+
const keys = this.listSync(base || this.options.base);
|
|
80
|
+
if (!keys.length) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
keys.map((key) => this.removeSync(base && !key.startsWith(base) ? join.joinPaths(base, key) : key));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Asynchronously removes all entries from the storage that match the provided base path.
|
|
88
|
+
*
|
|
89
|
+
* @param base - The base path to clear keys from.
|
|
90
|
+
* @returns A promise that resolves when the operation is complete.
|
|
91
|
+
*/
|
|
92
|
+
async clear(base) {
|
|
93
|
+
if (!this.options.isReadOnly) {
|
|
94
|
+
const keys = await this.list(base || this.options.base);
|
|
95
|
+
if (!keys.length) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
await Promise.all(keys.map(async (key) => this.remove(base && !key.startsWith(base) ? join.joinPaths(base, key) : key)));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Asynchronously lists all keys under a given base path.
|
|
103
|
+
*
|
|
104
|
+
* @param base - The base path to list keys from.
|
|
105
|
+
* @returns A promise that resolves to an array of keys under the specified base path.
|
|
106
|
+
*/
|
|
107
|
+
async list(base) {
|
|
108
|
+
return this.listSync(base);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Disposes of the storage adapter, releasing any held resources.
|
|
112
|
+
*
|
|
113
|
+
* @returns A promise that resolves when the disposal is complete.
|
|
114
|
+
*/
|
|
115
|
+
dispose() {
|
|
116
|
+
return Promise.resolve();
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Async dispose method to clean up resources.
|
|
120
|
+
*
|
|
121
|
+
* @returns A promise that resolves when disposal is complete.
|
|
122
|
+
*/
|
|
123
|
+
async [Symbol.asyncDispose]() {
|
|
124
|
+
return this._dispose();
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Resolves a given key to its full path within the storage adapter.
|
|
128
|
+
*
|
|
129
|
+
* @param key - The key to resolve.
|
|
130
|
+
* @returns The resolved full path for the key.
|
|
131
|
+
*/
|
|
132
|
+
resolve(key = this.options.base) {
|
|
133
|
+
if (/\.\.:|\.\.$/.test(key)) {
|
|
134
|
+
throw new Error(`[${this.name}]: Invalid key: ${JSON.stringify(key)} provided to storage adapter.`);
|
|
135
|
+
}
|
|
136
|
+
return append.appendPath(correctPath.correctPath(key).replace(/:/g, "/"), this.options.base);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Disposes of the storage adapter, releasing any held resources.
|
|
140
|
+
*
|
|
141
|
+
* @returns A promise that resolves when the disposal is complete.
|
|
142
|
+
*/
|
|
143
|
+
async _dispose() {
|
|
144
|
+
if (!this.#isDisposed) {
|
|
145
|
+
await Promise.resolve(this.dispose());
|
|
146
|
+
this.#isDisposed = true;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
exports.BaseStorageAdapter = BaseStorageAdapter;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkXLHFUATD_cjs = require('./chunk-XLHFUATD.cjs');
|
|
4
|
+
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
|
+
var isParentPath = require('@stryke/path/is-parent-path');
|
|
6
|
+
|
|
7
|
+
var VirtualStorageAdapter = class extends chunkXLHFUATD_cjs.BaseStorageAdapter {
|
|
8
|
+
static {
|
|
9
|
+
chunkUSNT2KNT_cjs.__name(this, "VirtualStorageAdapter");
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A name identifying the storage adapter type.
|
|
13
|
+
*/
|
|
14
|
+
name = "virtual";
|
|
15
|
+
/**
|
|
16
|
+
* In-memory data storage.
|
|
17
|
+
*/
|
|
18
|
+
data = /* @__PURE__ */ new Map();
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for the VirtualStorageAdapter.
|
|
21
|
+
*
|
|
22
|
+
* @param options - Configuration options for the storage adapter.
|
|
23
|
+
*/
|
|
24
|
+
constructor(options) {
|
|
25
|
+
super(options);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Synchronously checks if a key exists in the storage.
|
|
29
|
+
*
|
|
30
|
+
* @param key - The key to check for existence.
|
|
31
|
+
* @returns Returns `true` if the key exists, otherwise `false`.
|
|
32
|
+
*/
|
|
33
|
+
existsSync(key) {
|
|
34
|
+
return this.data.has(this.resolve(key));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Synchronously retrieves the value associated with a given key.
|
|
38
|
+
*
|
|
39
|
+
* @param key - The key whose value is to be retrieved.
|
|
40
|
+
* @returns The value associated with the key, or `null` if the key does not exist.
|
|
41
|
+
*/
|
|
42
|
+
getSync(key) {
|
|
43
|
+
return this.data.get(this.resolve(key)) ?? null;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Synchronously sets the value for a given key.
|
|
47
|
+
*
|
|
48
|
+
* @param key - The key to set the value for.
|
|
49
|
+
* @param value - The value to set.
|
|
50
|
+
*/
|
|
51
|
+
setSync(key, value) {
|
|
52
|
+
if (!this.options.isReadOnly) {
|
|
53
|
+
this.data.set(this.resolve(key), value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Synchronously removes a key from the storage.
|
|
58
|
+
*
|
|
59
|
+
* @param key - The key to remove.
|
|
60
|
+
*/
|
|
61
|
+
removeSync(key) {
|
|
62
|
+
if (!this.options.isReadOnly) {
|
|
63
|
+
this.data.delete(this.resolve(key));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Lists all keys under a given base path synchronously.
|
|
68
|
+
*
|
|
69
|
+
* @param base - The base path to list keys from.
|
|
70
|
+
* @returns An array of keys under the specified base path.
|
|
71
|
+
*/
|
|
72
|
+
listSync(base) {
|
|
73
|
+
return [
|
|
74
|
+
...this.data.keys().filter((key) => !base ? true : isParentPath.isParentPath(key, this.resolve(base)))
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Disposes of the storage adapter, releasing any held resources.
|
|
79
|
+
*
|
|
80
|
+
* @returns A promise that resolves when the disposal is complete.
|
|
81
|
+
*/
|
|
82
|
+
async dispose() {
|
|
83
|
+
return this.clear();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
exports.VirtualStorageAdapter = VirtualStorageAdapter;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
+
var correctPath = require('@stryke/path/correct-path');
|
|
5
|
+
var filePathFns = require('@stryke/path/file-path-fns');
|
|
6
|
+
var isType = require('@stryke/path/is-type');
|
|
7
|
+
var slash = require('@stryke/path/slash');
|
|
8
|
+
var isError = require('@stryke/type-checks/is-error');
|
|
9
|
+
|
|
10
|
+
function isFileError(err) {
|
|
11
|
+
return isError.isError(err) && "code" in err && err.code;
|
|
12
|
+
}
|
|
13
|
+
chunkUSNT2KNT_cjs.__name(isFileError, "isFileError");
|
|
14
|
+
function ignoreNotfound(err) {
|
|
15
|
+
return isFileError(err) && (err.code === "ENOENT" || err.code === "EISDIR" ? null : err);
|
|
16
|
+
}
|
|
17
|
+
chunkUSNT2KNT_cjs.__name(ignoreNotfound, "ignoreNotfound");
|
|
18
|
+
function ignoreExists(err) {
|
|
19
|
+
return isFileError(err) && err.code === "EEXIST" ? null : err;
|
|
20
|
+
}
|
|
21
|
+
chunkUSNT2KNT_cjs.__name(ignoreExists, "ignoreExists");
|
|
22
|
+
function toFilePath(path) {
|
|
23
|
+
return correctPath.correctPath(slash.slash(path?.toString() || ".").replace(/^file:\/\//, ""));
|
|
24
|
+
}
|
|
25
|
+
chunkUSNT2KNT_cjs.__name(toFilePath, "toFilePath");
|
|
26
|
+
function isValidId(id, prefix = "powerlines") {
|
|
27
|
+
return id.replace(/^\\0/, "").startsWith(`${prefix.replace(/:$/, "")}`);
|
|
28
|
+
}
|
|
29
|
+
chunkUSNT2KNT_cjs.__name(isValidId, "isValidId");
|
|
30
|
+
function normalizeId(id, prefix = "powerlines") {
|
|
31
|
+
return `${prefix.replace(/:$/, "")}:${toFilePath(id).replace(new RegExp(`^${prefix.replace(/:$/, "")}:`), "").replace(/^\\0/, "").replace(filePathFns.findFileDotExtensionSafe(toFilePath(id)), "")}`;
|
|
32
|
+
}
|
|
33
|
+
chunkUSNT2KNT_cjs.__name(normalizeId, "normalizeId");
|
|
34
|
+
function normalizePath(path, builtinsPath, prefix = "powerlines") {
|
|
35
|
+
return isType.isAbsolutePath(path) ? path : isValidId(toFilePath(path), prefix) ? normalizeId(toFilePath(path), prefix).replace(new RegExp(`^${prefix.replace(/:$/, "")}:`), builtinsPath) : toFilePath(path);
|
|
36
|
+
}
|
|
37
|
+
chunkUSNT2KNT_cjs.__name(normalizePath, "normalizePath");
|
|
38
|
+
function normalizeKey(key, sep = ":") {
|
|
39
|
+
if (!key) {
|
|
40
|
+
return "";
|
|
41
|
+
}
|
|
42
|
+
return key.replace(/[:/\\]/g, sep).replace(/^[:/\\]|[:/\\]$/g, "");
|
|
43
|
+
}
|
|
44
|
+
chunkUSNT2KNT_cjs.__name(normalizeKey, "normalizeKey");
|
|
45
|
+
function normalizeBaseKey(base) {
|
|
46
|
+
base = normalizeKey(base);
|
|
47
|
+
return base ? `${base}:` : "";
|
|
48
|
+
}
|
|
49
|
+
chunkUSNT2KNT_cjs.__name(normalizeBaseKey, "normalizeBaseKey");
|
|
50
|
+
function filterKeyByBase(key, base) {
|
|
51
|
+
if (base) {
|
|
52
|
+
return key.startsWith(base) && key[key.length - 1] !== "$";
|
|
53
|
+
}
|
|
54
|
+
return key[key.length - 1] !== "$";
|
|
55
|
+
}
|
|
56
|
+
chunkUSNT2KNT_cjs.__name(filterKeyByBase, "filterKeyByBase");
|
|
57
|
+
|
|
58
|
+
exports.filterKeyByBase = filterKeyByBase;
|
|
59
|
+
exports.ignoreExists = ignoreExists;
|
|
60
|
+
exports.ignoreNotfound = ignoreNotfound;
|
|
61
|
+
exports.isFileError = isFileError;
|
|
62
|
+
exports.isValidId = isValidId;
|
|
63
|
+
exports.normalizeBaseKey = normalizeBaseKey;
|
|
64
|
+
exports.normalizeId = normalizeId;
|
|
65
|
+
exports.normalizeKey = normalizeKey;
|
|
66
|
+
exports.normalizePath = normalizePath;
|
|
67
|
+
exports.toFilePath = toFilePath;
|