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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
+
import { isCallExpression, SyntaxKind, visitNode, isImportDeclaration, isExportDeclaration, isImportTypeNode, isLiteralTypeNode, isStringLiteral, visitEachChild } from 'typescript';
|
|
3
|
+
|
|
4
|
+
function isDynamicImport(node) {
|
|
5
|
+
return isCallExpression(node) && node.expression.kind === SyntaxKind.ImportKeyword;
|
|
6
|
+
}
|
|
7
|
+
__name(isDynamicImport, "isDynamicImport");
|
|
8
|
+
function createImportTransformer(context) {
|
|
9
|
+
return (ctx) => {
|
|
10
|
+
return (sourceFile) => {
|
|
11
|
+
const visitor = /* @__PURE__ */ __name((node) => {
|
|
12
|
+
let importPath;
|
|
13
|
+
if ((isImportDeclaration(node) || isExportDeclaration(node)) && node.moduleSpecifier) {
|
|
14
|
+
const importPathWithQuotes = node.moduleSpecifier.getText(sourceFile);
|
|
15
|
+
importPath = importPathWithQuotes.substr(1, importPathWithQuotes.length - 2);
|
|
16
|
+
} else if (isDynamicImport(node)) {
|
|
17
|
+
const importPathWithQuotes = node.arguments[0].getText(sourceFile);
|
|
18
|
+
importPath = importPathWithQuotes.substr(1, importPathWithQuotes.length - 2);
|
|
19
|
+
} else if (isImportTypeNode(node) && isLiteralTypeNode(node.argument) && isStringLiteral(node.argument.literal)) {
|
|
20
|
+
importPath = node.argument.literal.text;
|
|
21
|
+
}
|
|
22
|
+
if (importPath) {
|
|
23
|
+
const resolvedImportPath = context.fs.resolveSync(importPath) || importPath;
|
|
24
|
+
if (resolvedImportPath !== importPath) {
|
|
25
|
+
if (isImportDeclaration(node)) {
|
|
26
|
+
return ctx.factory.updateImportDeclaration(node, node.modifiers, node.importClause, ctx.factory.createStringLiteral(resolvedImportPath), node.attributes);
|
|
27
|
+
} else if (isExportDeclaration(node)) {
|
|
28
|
+
return ctx.factory.updateExportDeclaration(node, node.modifiers, node.isTypeOnly, node.exportClause, ctx.factory.createStringLiteral(resolvedImportPath), node.attributes);
|
|
29
|
+
} else if (isDynamicImport(node)) {
|
|
30
|
+
return ctx.factory.updateCallExpression(node, node.expression, node.typeArguments, ctx.factory.createNodeArray([
|
|
31
|
+
ctx.factory.createStringLiteral(resolvedImportPath)
|
|
32
|
+
]));
|
|
33
|
+
} else if (isImportTypeNode(node)) {
|
|
34
|
+
return ctx.factory.updateImportTypeNode(node, ctx.factory.createLiteralTypeNode(ctx.factory.createStringLiteral(resolvedImportPath)), node.attributes, node.qualifier, node.typeArguments, node.isTypeOf);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return node;
|
|
38
|
+
}
|
|
39
|
+
return visitEachChild(node, visitor, ctx);
|
|
40
|
+
}, "visitor");
|
|
41
|
+
return visitNode(sourceFile, visitor);
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
__name(createImportTransformer, "createImportTransformer");
|
|
46
|
+
|
|
47
|
+
export { createImportTransformer };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
+
var types = require('@storm-software/config-tools/types');
|
|
5
|
+
var join = require('@stryke/path/join');
|
|
6
|
+
var defu = require('defu');
|
|
7
|
+
var tsMorph = require('ts-morph');
|
|
8
|
+
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
12
|
+
|
|
13
|
+
var VirtualFileSystemHost = class extends tsMorph.InMemoryFileSystemHost {
|
|
14
|
+
static {
|
|
15
|
+
chunkUSNT2KNT_cjs.__name(this, "VirtualFileSystemHost");
|
|
16
|
+
}
|
|
17
|
+
#context;
|
|
18
|
+
constructor(context) {
|
|
19
|
+
super();
|
|
20
|
+
this.#context = context;
|
|
21
|
+
}
|
|
22
|
+
deleteSync(path) {
|
|
23
|
+
this.#context.fs.removeSync(path);
|
|
24
|
+
}
|
|
25
|
+
readDirSync(dirPath) {
|
|
26
|
+
return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {
|
|
27
|
+
const fullPath = this.#context.fs.resolveSync(join.joinPaths(dirPath, entry));
|
|
28
|
+
if (fullPath) {
|
|
29
|
+
ret.push({
|
|
30
|
+
name: entry,
|
|
31
|
+
isDirectory: this.#context.fs.existsSync(fullPath),
|
|
32
|
+
isFile: this.#context.fs.existsSync(fullPath),
|
|
33
|
+
isSymlink: false
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return ret;
|
|
37
|
+
}, []);
|
|
38
|
+
}
|
|
39
|
+
async readFile(filePath) {
|
|
40
|
+
if (!this.#context.fs.existsSync(filePath)) {
|
|
41
|
+
throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
|
|
42
|
+
}
|
|
43
|
+
return await this.#context.fs.read(filePath);
|
|
44
|
+
}
|
|
45
|
+
readFileSync(filePath) {
|
|
46
|
+
if (!this.#context.fs.existsSync(filePath)) {
|
|
47
|
+
throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
|
|
48
|
+
}
|
|
49
|
+
return this.#context.fs.readSync(filePath);
|
|
50
|
+
}
|
|
51
|
+
async writeFile(filePath, fileText) {
|
|
52
|
+
return this.#context.fs.write(filePath, fileText);
|
|
53
|
+
}
|
|
54
|
+
writeFileSync(filePath, fileText) {
|
|
55
|
+
this.#context.fs.writeSync(filePath, fileText);
|
|
56
|
+
}
|
|
57
|
+
async mkdir(_dirPath) {
|
|
58
|
+
}
|
|
59
|
+
mkdirSync(_dirPath) {
|
|
60
|
+
}
|
|
61
|
+
async move(srcPath, destPath) {
|
|
62
|
+
await this.#context.fs.move(srcPath, destPath);
|
|
63
|
+
}
|
|
64
|
+
moveSync(srcPath, destPath) {
|
|
65
|
+
this.#context.fs.moveSync(srcPath, destPath);
|
|
66
|
+
}
|
|
67
|
+
async copy(srcPath, destPath) {
|
|
68
|
+
await this.#context.fs.copy(srcPath, destPath);
|
|
69
|
+
}
|
|
70
|
+
copySync(srcPath, destPath) {
|
|
71
|
+
this.#context.fs.copySync(srcPath, destPath);
|
|
72
|
+
}
|
|
73
|
+
async fileExists(filePath) {
|
|
74
|
+
return this.#context.fs.exists(filePath);
|
|
75
|
+
}
|
|
76
|
+
fileExistsSync(filePath) {
|
|
77
|
+
return this.#context.fs.existsSync(filePath);
|
|
78
|
+
}
|
|
79
|
+
async directoryExists(dirPath) {
|
|
80
|
+
return this.#context.fs.exists(dirPath);
|
|
81
|
+
}
|
|
82
|
+
directoryExistsSync(dirPath) {
|
|
83
|
+
return this.#context.fs.existsSync(dirPath);
|
|
84
|
+
}
|
|
85
|
+
realpathSync(path) {
|
|
86
|
+
return this.#context.fs.resolveSync(path) || path;
|
|
87
|
+
}
|
|
88
|
+
getCurrentDirectory() {
|
|
89
|
+
return this.#context.workspaceConfig.workspaceRoot;
|
|
90
|
+
}
|
|
91
|
+
async glob(patterns) {
|
|
92
|
+
return this.#context.fs.glob(patterns);
|
|
93
|
+
}
|
|
94
|
+
globSync(patterns) {
|
|
95
|
+
return this.#context.fs.globSync(patterns);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
function createProgram(context, override) {
|
|
99
|
+
context.log(types.LogLevelLabel.TRACE, `Creating ts-morph Project instance with configuration from: ${context.tsconfig.tsconfigFilePath}.`);
|
|
100
|
+
const project = new tsMorph.Project(defu__default.default(override ?? {}, {
|
|
101
|
+
skipAddingFilesFromTsConfig: false,
|
|
102
|
+
tsConfigFilePath: context.tsconfig.tsconfigFilePath,
|
|
103
|
+
fileSystem: new VirtualFileSystemHost(context),
|
|
104
|
+
compilerOptions: defu__default.default(context.tsconfig.options ?? {}, {
|
|
105
|
+
lib: [
|
|
106
|
+
"lib.esnext.full.d.ts"
|
|
107
|
+
]
|
|
108
|
+
})
|
|
109
|
+
}));
|
|
110
|
+
return project;
|
|
111
|
+
}
|
|
112
|
+
chunkUSNT2KNT_cjs.__name(createProgram, "createProgram");
|
|
113
|
+
|
|
114
|
+
exports.VirtualFileSystemHost = VirtualFileSystemHost;
|
|
115
|
+
exports.createProgram = createProgram;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractESBuildConfig } from './chunk-
|
|
1
|
+
import { extractESBuildConfig } from './chunk-WOKPJMGJ.js';
|
|
2
2
|
import { __name } from './chunk-SHUYVCID.js';
|
|
3
3
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
4
4
|
import { build } from 'esbuild';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkB3EE3VHZ_cjs = require('./chunk-B3EE3VHZ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkWBSA6OG6_cjs = require('./chunk-WBSA6OG6.cjs');
|
|
5
5
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
var resolve = require('@stryke/fs/resolve');
|
|
7
7
|
var isFunction = require('@stryke/type-checks/is-function');
|
|
@@ -17,7 +17,7 @@ var PLUGIN_NON_HOOK_FIELDS = [
|
|
|
17
17
|
];
|
|
18
18
|
|
|
19
19
|
// src/lib/contexts/environment-context.ts
|
|
20
|
-
var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends
|
|
20
|
+
var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends chunkWBSA6OG6_cjs.PowerlinesContext {
|
|
21
21
|
static {
|
|
22
22
|
chunkUSNT2KNT_cjs.__name(this, "PowerlinesEnvironmentContext");
|
|
23
23
|
}
|
|
@@ -65,7 +65,7 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
|
|
|
65
65
|
if (!result || isObject.isObject(result) && Object.keys(result).length === 0) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
resolvedPlugin =
|
|
68
|
+
resolvedPlugin = chunkWBSA6OG6_cjs.isPlugin(result) ? result : plugin;
|
|
69
69
|
}
|
|
70
70
|
const context = chunkB3EE3VHZ_cjs.createPluginContext(resolvedPlugin, this);
|
|
71
71
|
this.plugins.push({
|
|
@@ -75,28 +75,28 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
|
|
|
75
75
|
this.#hooks = Object.keys(resolvedPlugin).filter((key) => !PLUGIN_NON_HOOK_FIELDS.includes(key)).reduce((ret, key) => {
|
|
76
76
|
const hook = key;
|
|
77
77
|
const pluginHook = resolvedPlugin[hook];
|
|
78
|
-
if (!
|
|
78
|
+
if (!chunkWBSA6OG6_cjs.isPluginHook(pluginHook)) {
|
|
79
79
|
return ret;
|
|
80
80
|
}
|
|
81
|
-
if (!
|
|
81
|
+
if (!chunkWBSA6OG6_cjs.isHookExternal(hook)) {
|
|
82
82
|
ret[hook] ??= {};
|
|
83
83
|
if (resolvedPlugin.enforce) {
|
|
84
84
|
ret[hook][`${resolvedPlugin.enforce}Enforced`] ??= [];
|
|
85
|
-
|
|
85
|
+
chunkWBSA6OG6_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${resolvedPlugin.enforce}Enforced`]);
|
|
86
86
|
return ret;
|
|
87
87
|
}
|
|
88
88
|
if (isFunction.isFunction(pluginHook) || !pluginHook.order) {
|
|
89
89
|
ret[hook].normal ??= [];
|
|
90
|
-
|
|
90
|
+
chunkWBSA6OG6_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook].normal);
|
|
91
91
|
return ret;
|
|
92
92
|
}
|
|
93
93
|
ret[hook][`${pluginHook.order}Ordered`] ??= [];
|
|
94
|
-
|
|
94
|
+
chunkWBSA6OG6_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${pluginHook.order}Ordered`]);
|
|
95
95
|
} else {
|
|
96
96
|
ret[hook] ??= [];
|
|
97
97
|
ret[hook].push({
|
|
98
98
|
plugin: resolvedPlugin,
|
|
99
|
-
hook:
|
|
99
|
+
hook: chunkWBSA6OG6_cjs.getHookHandler(pluginHook).bind(context)
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
return ret;
|
|
@@ -108,7 +108,7 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
|
|
|
108
108
|
selectHooks(hook, options) {
|
|
109
109
|
const handlers = [];
|
|
110
110
|
if (this.hooks[hook]) {
|
|
111
|
-
if (!
|
|
111
|
+
if (!chunkWBSA6OG6_cjs.isHookExternal(hook)) {
|
|
112
112
|
const hooks = this.hooks[hook];
|
|
113
113
|
if (options?.order) {
|
|
114
114
|
if (options?.order === "pre") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PowerlinesEnvironmentContext } from './chunk-
|
|
2
|
-
import { PowerlinesContext } from './chunk-
|
|
1
|
+
import { PowerlinesEnvironmentContext } from './chunk-J3BW52BU.js';
|
|
2
|
+
import { PowerlinesContext } from './chunk-NIRFKQAD.js';
|
|
3
3
|
import { loadWorkspaceConfig } from './chunk-XBM7FHNK.js';
|
|
4
4
|
import { __name } from './chunk-SHUYVCID.js';
|
|
5
5
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
@@ -132,12 +132,49 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
132
132
|
}
|
|
133
133
|
return context;
|
|
134
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Update the context using a new user configuration options
|
|
137
|
+
*
|
|
138
|
+
* @param userConfig - The new user configuration options.
|
|
139
|
+
*/
|
|
140
|
+
async withUserConfig(userConfig, options = {
|
|
141
|
+
isHighPriority: true
|
|
142
|
+
}) {
|
|
143
|
+
await super.withUserConfig(userConfig, options);
|
|
144
|
+
await Promise.all(Object.keys(this.#environments).map(async (name) => {
|
|
145
|
+
await this.#environments[name].withUserConfig(userConfig, options);
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Update the context using a new inline configuration options
|
|
150
|
+
*
|
|
151
|
+
* @param inlineConfig - The new inline configuration options.
|
|
152
|
+
*/
|
|
153
|
+
async withInlineConfig(inlineConfig, options = {
|
|
154
|
+
isHighPriority: true
|
|
155
|
+
}) {
|
|
156
|
+
await super.withInlineConfig(inlineConfig, options);
|
|
157
|
+
await Promise.all(Object.keys(this.#environments).map(async (name) => {
|
|
158
|
+
await this.#environments[name].withInlineConfig(inlineConfig, options);
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Add a plugin to the API context and all environments
|
|
163
|
+
*
|
|
164
|
+
* @param plugin - The plugin to add.
|
|
165
|
+
*/
|
|
135
166
|
async addPlugin(plugin) {
|
|
136
167
|
this.plugins.push(plugin);
|
|
137
168
|
await Promise.all(Object.keys(this.environments).map(async (name) => {
|
|
138
169
|
await this.environments[name].addPlugin(plugin);
|
|
139
170
|
}));
|
|
140
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Get an environment by name, or the default environment if no name is provided
|
|
174
|
+
*
|
|
175
|
+
* @param name - The name of the environment to retrieve.
|
|
176
|
+
* @returns The requested environment context.
|
|
177
|
+
*/
|
|
141
178
|
async getEnvironment(name) {
|
|
142
179
|
let environment;
|
|
143
180
|
if (name) {
|
|
@@ -22,7 +22,7 @@ function extractWebpackConfig(context) {
|
|
|
22
22
|
}
|
|
23
23
|
}, context.config.build.variant === "webpack" ? context.config.build.override : {}, {
|
|
24
24
|
output: {
|
|
25
|
-
path: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.
|
|
25
|
+
path: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath)
|
|
26
26
|
},
|
|
27
27
|
name: context.config.name,
|
|
28
28
|
node: context.config.build.platform === "node" ? {
|
|
@@ -28,7 +28,7 @@ function extractWebpackConfig(context) {
|
|
|
28
28
|
}
|
|
29
29
|
}, context.config.build.variant === "webpack" ? context.config.build.override : {}, {
|
|
30
30
|
output: {
|
|
31
|
-
path: joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.
|
|
31
|
+
path: joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath)
|
|
32
32
|
},
|
|
33
33
|
name: context.config.name,
|
|
34
34
|
node: context.config.build.platform === "node" ? {
|
|
@@ -59,9 +59,7 @@ chunkUSNT2KNT_cjs.__name(getPersistedMeta, "getPersistedMeta");
|
|
|
59
59
|
async function writeMetaFile(context) {
|
|
60
60
|
const metaFilePath = joinPaths.joinPaths(context.dataPath, "meta.json");
|
|
61
61
|
context.log(types.LogLevelLabel.DEBUG, `Writing runtime metadata to ${metaFilePath}`);
|
|
62
|
-
await context.fs.
|
|
63
|
-
mode: "fs"
|
|
64
|
-
});
|
|
62
|
+
await context.fs.write(metaFilePath, JSON.stringify(context.meta, null, 2));
|
|
65
63
|
}
|
|
66
64
|
chunkUSNT2KNT_cjs.__name(writeMetaFile, "writeMetaFile");
|
|
67
65
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWCXA5WFX_cjs = require('./chunk-WCXA5WFX.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var constants = require('@storm-software/tsup/constants');
|
|
6
6
|
var defu = require('defu');
|
|
@@ -28,7 +28,7 @@ var DEFAULT_TSUP_CONFIG = {
|
|
|
28
28
|
banner: {}
|
|
29
29
|
};
|
|
30
30
|
function resolveTsupEntry(context, entryPoints) {
|
|
31
|
-
return
|
|
31
|
+
return chunkWCXA5WFX_cjs.resolveESBuildEntry(context, entryPoints);
|
|
32
32
|
}
|
|
33
33
|
chunkUSNT2KNT_cjs.__name(resolveTsupEntry, "resolveTsupEntry");
|
|
34
34
|
function extractTsupConfig(context) {
|
|
@@ -57,7 +57,7 @@ function extractTsupConfig(context) {
|
|
|
57
57
|
name: context.config.name,
|
|
58
58
|
assets: context.config.output.assets,
|
|
59
59
|
resolveExtensions: context.config.build.extensions,
|
|
60
|
-
outputPath: context.config.output.
|
|
60
|
+
outputPath: context.config.output.buildPath,
|
|
61
61
|
projectRoot: context.config.projectRoot,
|
|
62
62
|
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
63
63
|
tsconfigRaw: context.tsconfig.tsconfigJson,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createPluginContext } from './chunk-KFJCWNVG.js';
|
|
2
|
-
import { PowerlinesContext, isPlugin, isPluginHook, isHookExternal, addPluginHook, getHookHandler } from './chunk-
|
|
2
|
+
import { PowerlinesContext, isPlugin, isPluginHook, isHookExternal, addPluginHook, getHookHandler } from './chunk-NIRFKQAD.js';
|
|
3
3
|
import { __name } from './chunk-SHUYVCID.js';
|
|
4
4
|
import { resolvePackage } from '@stryke/fs/resolve';
|
|
5
5
|
import { isFunction } from '@stryke/type-checks/is-function';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
+
import { correctPath } from '@stryke/path/correct-path';
|
|
3
|
+
import { findFileDotExtensionSafe } from '@stryke/path/file-path-fns';
|
|
4
|
+
import { isAbsolutePath } from '@stryke/path/is-type';
|
|
5
|
+
import { slash } from '@stryke/path/slash';
|
|
6
|
+
import { isError } from '@stryke/type-checks/is-error';
|
|
7
|
+
|
|
8
|
+
function isFileError(err) {
|
|
9
|
+
return isError(err) && "code" in err && err.code;
|
|
10
|
+
}
|
|
11
|
+
__name(isFileError, "isFileError");
|
|
12
|
+
function ignoreNotfound(err) {
|
|
13
|
+
return isFileError(err) && (err.code === "ENOENT" || err.code === "EISDIR" ? null : err);
|
|
14
|
+
}
|
|
15
|
+
__name(ignoreNotfound, "ignoreNotfound");
|
|
16
|
+
function ignoreExists(err) {
|
|
17
|
+
return isFileError(err) && err.code === "EEXIST" ? null : err;
|
|
18
|
+
}
|
|
19
|
+
__name(ignoreExists, "ignoreExists");
|
|
20
|
+
function toFilePath(path) {
|
|
21
|
+
return correctPath(slash(path?.toString() || ".").replace(/^file:\/\//, ""));
|
|
22
|
+
}
|
|
23
|
+
__name(toFilePath, "toFilePath");
|
|
24
|
+
function isValidId(id, prefix = "powerlines") {
|
|
25
|
+
return id.replace(/^\\0/, "").startsWith(`${prefix.replace(/:$/, "")}`);
|
|
26
|
+
}
|
|
27
|
+
__name(isValidId, "isValidId");
|
|
28
|
+
function normalizeId(id, prefix = "powerlines") {
|
|
29
|
+
return `${prefix.replace(/:$/, "")}:${toFilePath(id).replace(new RegExp(`^${prefix.replace(/:$/, "")}:`), "").replace(/^\\0/, "").replace(findFileDotExtensionSafe(toFilePath(id)), "")}`;
|
|
30
|
+
}
|
|
31
|
+
__name(normalizeId, "normalizeId");
|
|
32
|
+
function normalizePath(path, builtinsPath, prefix = "powerlines") {
|
|
33
|
+
return isAbsolutePath(path) ? path : isValidId(toFilePath(path), prefix) ? normalizeId(toFilePath(path), prefix).replace(new RegExp(`^${prefix.replace(/:$/, "")}:`), builtinsPath) : toFilePath(path);
|
|
34
|
+
}
|
|
35
|
+
__name(normalizePath, "normalizePath");
|
|
36
|
+
function normalizeKey(key, sep = ":") {
|
|
37
|
+
if (!key) {
|
|
38
|
+
return "";
|
|
39
|
+
}
|
|
40
|
+
return key.replace(/[:/\\]/g, sep).replace(/^[:/\\]|[:/\\]$/g, "");
|
|
41
|
+
}
|
|
42
|
+
__name(normalizeKey, "normalizeKey");
|
|
43
|
+
function normalizeBaseKey(base) {
|
|
44
|
+
base = normalizeKey(base);
|
|
45
|
+
return base ? `${base}:` : "";
|
|
46
|
+
}
|
|
47
|
+
__name(normalizeBaseKey, "normalizeBaseKey");
|
|
48
|
+
function filterKeyByBase(key, base) {
|
|
49
|
+
if (base) {
|
|
50
|
+
return key.startsWith(base) && key[key.length - 1] !== "$";
|
|
51
|
+
}
|
|
52
|
+
return key[key.length - 1] !== "$";
|
|
53
|
+
}
|
|
54
|
+
__name(filterKeyByBase, "filterKeyByBase");
|
|
55
|
+
|
|
56
|
+
export { filterKeyByBase, ignoreExists, ignoreNotfound, isFileError, isValidId, normalizeBaseKey, normalizeId, normalizeKey, normalizePath, toFilePath };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { BaseStorageAdapter } from './chunk-VHCBD2IS.js';
|
|
2
|
+
import { ignoreNotfound } from './chunk-KFDNKOXM.js';
|
|
3
|
+
import { __name } from './chunk-SHUYVCID.js';
|
|
4
|
+
import { existsSync, exists } from '@stryke/fs/exists';
|
|
5
|
+
import { listFilesSync, listFiles } from '@stryke/fs/list-files';
|
|
6
|
+
import { readFileSync, readFile } from '@stryke/fs/read-file';
|
|
7
|
+
import { writeFileSync, writeFile } from '@stryke/fs/write-file';
|
|
8
|
+
import { unlinkSync } from 'node:fs';
|
|
9
|
+
import { unlink } from 'node:fs/promises';
|
|
10
|
+
|
|
11
|
+
var FileSystemStorageAdapter = class extends BaseStorageAdapter {
|
|
12
|
+
static {
|
|
13
|
+
__name(this, "FileSystemStorageAdapter");
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A name identifying the storage adapter type.
|
|
17
|
+
*/
|
|
18
|
+
name = "file-system";
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for the FileSystemStorageAdapter.
|
|
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 existsSync(this.resolve(key));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Asynchronously checks if a key exists in the storage.
|
|
38
|
+
*
|
|
39
|
+
* @param key - The key to check for existence.
|
|
40
|
+
* @returns A promise that resolves to `true` if the key exists, otherwise `false`.
|
|
41
|
+
*/
|
|
42
|
+
async exists(key) {
|
|
43
|
+
return exists(this.resolve(key));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Synchronously retrieves the value associated with a given key.
|
|
47
|
+
*
|
|
48
|
+
* @param key - The key whose value is to be retrieved.
|
|
49
|
+
* @returns The value associated with the key, or `null` if the key does not exist.
|
|
50
|
+
*/
|
|
51
|
+
getSync(key) {
|
|
52
|
+
return readFileSync(this.resolve(key));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Asynchronously retrieves the value associated with a given key.
|
|
56
|
+
*
|
|
57
|
+
* @param key - The key whose value is to be retrieved.
|
|
58
|
+
* @returns A promise that resolves to the value associated with the key, or `null` if the key does not exist.
|
|
59
|
+
*/
|
|
60
|
+
async get(key) {
|
|
61
|
+
return readFile(this.resolve(key));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Synchronously sets the value for a given key.
|
|
65
|
+
*
|
|
66
|
+
* @param key - The key to set the value for.
|
|
67
|
+
* @param value - The value to set.
|
|
68
|
+
*/
|
|
69
|
+
setSync(key, value) {
|
|
70
|
+
if (!this.options.isReadOnly) {
|
|
71
|
+
return writeFileSync(this.resolve(key), value);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Asynchronously sets the value for a given key.
|
|
76
|
+
*
|
|
77
|
+
* @param key - The key to set the value for.
|
|
78
|
+
* @param value - The value to set.
|
|
79
|
+
*/
|
|
80
|
+
async set(key, value) {
|
|
81
|
+
if (!this.options.isReadOnly) {
|
|
82
|
+
return writeFile(this.resolve(key), value);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Synchronously removes a key from the storage.
|
|
87
|
+
*
|
|
88
|
+
* @param key - The key to remove.
|
|
89
|
+
*/
|
|
90
|
+
removeSync(key) {
|
|
91
|
+
if (!this.options.isReadOnly) {
|
|
92
|
+
try {
|
|
93
|
+
return unlinkSync(this.resolve(key));
|
|
94
|
+
} catch (err) {
|
|
95
|
+
return ignoreNotfound(err);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Asynchronously removes a key from the storage.
|
|
101
|
+
*
|
|
102
|
+
* @param key - The key to remove.
|
|
103
|
+
*/
|
|
104
|
+
async remove(key) {
|
|
105
|
+
if (!this.options.isReadOnly) {
|
|
106
|
+
return unlink(this.resolve(key)).catch(ignoreNotfound);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Lists all keys under a given base path synchronously.
|
|
111
|
+
*
|
|
112
|
+
* @param base - The base path to list keys from.
|
|
113
|
+
* @returns An array of keys under the specified base path.
|
|
114
|
+
*/
|
|
115
|
+
listSync(base) {
|
|
116
|
+
try {
|
|
117
|
+
return listFilesSync(this.resolve(base), {
|
|
118
|
+
ignore: this.options.ignore
|
|
119
|
+
});
|
|
120
|
+
} catch (err) {
|
|
121
|
+
return ignoreNotfound(err) ?? [];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Asynchronously lists all keys under a given base path.
|
|
126
|
+
*
|
|
127
|
+
* @param base - The base path to list keys from.
|
|
128
|
+
* @returns A promise that resolves to an array of keys under the specified base path.
|
|
129
|
+
*/
|
|
130
|
+
async list(base) {
|
|
131
|
+
return listFiles(this.resolve(base), {
|
|
132
|
+
ignore: this.options.ignore
|
|
133
|
+
}).catch(ignoreNotfound).then((r) => r || []);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export { FileSystemStorageAdapter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWCXA5WFX_cjs = require('./chunk-WCXA5WFX.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var types = require('@storm-software/config-tools/types');
|
|
6
6
|
var esbuild = require('esbuild');
|
|
@@ -11,7 +11,7 @@ async function bundle(context, file, overrides = {}) {
|
|
|
11
11
|
throw new Error(`Module not found: "${file}". Please check the path and try again.`);
|
|
12
12
|
}
|
|
13
13
|
const result = await esbuild.build({
|
|
14
|
-
...
|
|
14
|
+
...chunkWCXA5WFX_cjs.extractESBuildConfig(context),
|
|
15
15
|
entry: [
|
|
16
16
|
path
|
|
17
17
|
],
|
|
@@ -19,7 +19,7 @@ function extractRspackConfig(context) {
|
|
|
19
19
|
skipNodeModulesBundle: context.config.build.skipNodeModulesBundle
|
|
20
20
|
}, {
|
|
21
21
|
output: {
|
|
22
|
-
path: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.
|
|
22
|
+
path: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath)
|
|
23
23
|
},
|
|
24
24
|
name: context.config.name,
|
|
25
25
|
node: context.config.build.platform === "node" ? {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLOW2TIQ6_cjs = require('./chunk-LOW2TIQ6.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var parseTypeDefinition = require('@stryke/convert/parse-type-definition');
|
|
6
6
|
var isSetString = require('@stryke/type-checks/is-set-string');
|
|
@@ -12,7 +12,7 @@ async function resolve(context, type, overrides = {}) {
|
|
|
12
12
|
} else {
|
|
13
13
|
typeDefinition = type;
|
|
14
14
|
}
|
|
15
|
-
const result = await
|
|
15
|
+
const result = await chunkLOW2TIQ6_cjs.bundle(context, typeDefinition.file, overrides);
|
|
16
16
|
const resolved = await context.resolver.evalModule(result.text, {
|
|
17
17
|
filename: result.path,
|
|
18
18
|
forceTranspile: true
|
|
@@ -17,7 +17,7 @@ function replacePathTokens(context, path) {
|
|
|
17
17
|
if (!path) {
|
|
18
18
|
return path;
|
|
19
19
|
}
|
|
20
|
-
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{
|
|
20
|
+
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replace.replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replace.replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replace.replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
21
21
|
}
|
|
22
22
|
chunkUSNT2KNT_cjs.__name(replacePathTokens, "replacePathTokens");
|
|
23
23
|
|
|
@@ -15,7 +15,7 @@ function replacePathTokens(context, path) {
|
|
|
15
15
|
if (!path) {
|
|
16
16
|
return path;
|
|
17
17
|
}
|
|
18
|
-
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{
|
|
18
|
+
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
19
19
|
}
|
|
20
20
|
__name(replacePathTokens, "replacePathTokens");
|
|
21
21
|
|