powerlines 0.24.9 → 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-C4CJ7YAI.js → chunk-44PO64SX.js} +4 -2
- package/dist/chunk-4JCNAKOE.cjs +4 -0
- package/dist/{chunk-PT24UOCD.cjs → chunk-6MFZ436T.cjs} +970 -1004
- 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-PVUETJ3T.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-Q4DVMLUP.cjs → chunk-G2EHTXK6.cjs} +9 -7
- package/dist/chunk-GIE6OE3X.js +3 -0
- package/dist/chunk-HJW7OH6E.js +3 -0
- package/dist/{chunk-S5YGX5GU.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-357MDCVI.js → chunk-LQXE5JHF.js} +901 -932
- package/dist/chunk-MBBNZS6K.cjs +16 -0
- package/dist/{chunk-ABWNIXFZ.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-4ZYG5R5M.cjs → chunk-SDVEUTY2.cjs} +13 -11
- package/dist/{chunk-UWEARQIV.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-DcMDyPIg.d.ts → api-CCOhyMZo.d.cts} +1 -1
- package/dist/lib/{api-B7dqvw6M.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-Z74G7RN3.cjs → chunk-SFEEJZLK.cjs} +32 -38
- 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-FBRJW4AY.js → chunk-WLDQUTFD.js} +23 -29
- 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-BgeSOU_x.d.cts → config-Cqxh4V21.d.cts} +58 -475
- package/dist/lib/{config-Cobl3YxA.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 +70 -76
- package/dist/lib/index.d.cts +18 -356
- package/dist/lib/index.d.ts +18 -356
- package/dist/lib/index.js +21 -15
- package/dist/lib/{internal-C4LRBm2o.d.cts → internal-Cl7s1iAA.d.cts} +2 -2
- package/dist/lib/{internal-BgqhTTai.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 +17 -12
- package/dist/lib/unplugin/index.d.cts +4 -4
- package/dist/lib/unplugin/index.d.ts +4 -4
- package/dist/lib/unplugin/index.js +15 -10
- 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-CFcDbneD.d.ts → unplugin-Cg2NoKj0.d.ts} +2 -2
- package/dist/lib/{unplugin-BjKSIVn4.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 +27 -27
- 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.ts → context-PtfEjz3_.d.cts} +187 -230
- package/dist/plugin-utils/{context-BITGF5LZ.d.cts → 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 +71 -18
- 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-DTXP5O7S.cjs +0 -10
- 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-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,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var chunk2NZADVP5_cjs = require('./chunk-2NZADVP5.cjs');
|
|
4
3
|
var chunk4NHFXDTQ_cjs = require('./chunk-4NHFXDTQ.cjs');
|
|
5
|
-
var
|
|
4
|
+
var chunk2NZADVP5_cjs = require('./chunk-2NZADVP5.cjs');
|
|
5
|
+
var chunkNLJR4WIX_cjs = require('./chunk-NLJR4WIX.cjs');
|
|
6
6
|
var chunkB3EE3VHZ_cjs = require('./chunk-B3EE3VHZ.cjs');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var chunkWBSA6OG6_cjs = require('./chunk-WBSA6OG6.cjs');
|
|
8
|
+
var chunkHRRI4KOM_cjs = require('./chunk-HRRI4KOM.cjs');
|
|
9
|
+
var chunkD6MI2V6R_cjs = require('./chunk-D6MI2V6R.cjs');
|
|
9
10
|
var chunkGA3RXX4R_cjs = require('./chunk-GA3RXX4R.cjs');
|
|
10
11
|
var chunkJA4HSQRN_cjs = require('./chunk-JA4HSQRN.cjs');
|
|
11
12
|
var chunk3OCI4TH7_cjs = require('./chunk-3OCI4TH7.cjs');
|
|
@@ -16,6 +17,7 @@ var core = require('@babel/core');
|
|
|
16
17
|
var console = require('@storm-software/config-tools/logger/console');
|
|
17
18
|
var toArray = require('@stryke/convert/to-array');
|
|
18
19
|
var copyFile = require('@stryke/fs/copy-file');
|
|
20
|
+
var helpers = require('@stryke/fs/helpers');
|
|
19
21
|
var install = require('@stryke/fs/install');
|
|
20
22
|
var listFiles = require('@stryke/fs/list-files');
|
|
21
23
|
var packageFns = require('@stryke/fs/package-fns');
|
|
@@ -177,8 +179,11 @@ function formatTypes(code) {
|
|
|
177
179
|
chunkUSNT2KNT_cjs.__name(formatTypes, "formatTypes");
|
|
178
180
|
async function emitTypes(context, files) {
|
|
179
181
|
context.log(types.LogLevelLabel.TRACE, `Running the TypeScript compiler for ${files.length} generated runtime files.`);
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
const program = chunkD6MI2V6R_cjs.createProgram(context, {
|
|
183
|
+
skipAddingFilesFromTsConfig: true
|
|
184
|
+
});
|
|
185
|
+
program.addSourceFilesAtPaths(files);
|
|
186
|
+
const result = program.emitToMemory({
|
|
182
187
|
emitOnlyDtsFiles: true
|
|
183
188
|
});
|
|
184
189
|
let builtinModules = "";
|
|
@@ -269,9 +274,6 @@ async function resolveTsconfigChanges(context) {
|
|
|
269
274
|
const tsconfigJson = await json.readJsonFile(tsconfigFilePath);
|
|
270
275
|
tsconfigJson.compilerOptions ??= {};
|
|
271
276
|
if (context.config.output.dts !== false) {
|
|
272
|
-
if (filePathFns.findFileExtension(context.dtsPath) !== "d.ts" && filePathFns.findFileExtension(context.dtsPath) !== "d.cts" && filePathFns.findFileExtension(context.dtsPath) !== "d.mts") {
|
|
273
|
-
context.config.output.dts = joinPaths.joinPaths(context.dtsPath, "powerlines.d.ts");
|
|
274
|
-
}
|
|
275
277
|
const dtsRelativePath = joinPaths.joinPaths(filePathFns.relativePath(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot), filePathFns.findFilePath(context.dtsPath)), filePathFns.findFileName(context.dtsPath));
|
|
276
278
|
if (!tsconfigJson.include?.some((filePattern) => chunkGA3RXX4R_cjs.isIncludeMatchFound(filePattern, [
|
|
277
279
|
context.dtsPath,
|
|
@@ -314,9 +316,7 @@ async function initializeTsconfig(context) {
|
|
|
314
316
|
context.tsconfig.originalTsconfigJson = await json.readJsonFile(tsconfigFilePath);
|
|
315
317
|
context.tsconfig.tsconfigJson = await resolveTsconfigChanges(context);
|
|
316
318
|
context.log(types.LogLevelLabel.TRACE, "Writing updated TypeScript configuration (tsconfig.json) file to disk.");
|
|
317
|
-
await
|
|
318
|
-
mode: "fs"
|
|
319
|
-
});
|
|
319
|
+
await chunk2NZADVP5_cjs.writeFile(context.log, tsconfigFilePath, stormJson.StormJSON.stringify(context.tsconfig.tsconfigJson));
|
|
320
320
|
context.tsconfig = chunkGA3RXX4R_cjs.getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig, context.config.tsconfigRaw, context.tsconfig.originalTsconfigJson);
|
|
321
321
|
}
|
|
322
322
|
chunkUSNT2KNT_cjs.__name(initializeTsconfig, "initializeTsconfig");
|
|
@@ -402,7 +402,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
402
402
|
* Initialize the Powerlines API
|
|
403
403
|
*/
|
|
404
404
|
static async from(workspaceRoot, config) {
|
|
405
|
-
const api = new _PowerlinesAPI(await
|
|
405
|
+
const api = new _PowerlinesAPI(await chunkNLJR4WIX_cjs.PowerlinesAPIContext.from(workspaceRoot, config));
|
|
406
406
|
api.#context.$$internal.api = api;
|
|
407
407
|
for (const plugin of api.context.config.plugins ?? []) {
|
|
408
408
|
await api.#addPlugin(plugin);
|
|
@@ -446,24 +446,20 @@ ${context.entry.map((entry) => `- ${entry.input.file || entry.file}${entry.outpu
|
|
|
446
446
|
context.log(types.LogLevelLabel.TRACE, `Powerlines configuration has been resolved:
|
|
447
447
|
|
|
448
448
|
${console.formatLogMessage(context.config)}`);
|
|
449
|
-
await
|
|
449
|
+
await chunkHRRI4KOM_cjs.writeMetaFile(context);
|
|
450
450
|
context.persistedMeta = context.meta;
|
|
451
451
|
if (!context.fs.existsSync(context.cachePath)) {
|
|
452
|
-
await
|
|
453
|
-
mode: "fs"
|
|
454
|
-
});
|
|
452
|
+
await helpers.createDirectory(context.cachePath);
|
|
455
453
|
}
|
|
456
454
|
if (!context.fs.existsSync(context.dataPath)) {
|
|
457
|
-
await
|
|
458
|
-
mode: "fs"
|
|
459
|
-
});
|
|
455
|
+
await helpers.createDirectory(context.dataPath);
|
|
460
456
|
}
|
|
461
457
|
await this.callPreHook(context, "prepare");
|
|
462
458
|
await this.callNormalHook(context, "prepare");
|
|
463
459
|
if (context.config.output.dts !== false) {
|
|
464
460
|
context.log(types.LogLevelLabel.TRACE, `Preparing the TypeScript definitions for the Powerlines project.`);
|
|
465
461
|
if (context.fs.existsSync(context.dtsPath)) {
|
|
466
|
-
await context.fs.
|
|
462
|
+
await context.fs.remove(context.dtsPath);
|
|
467
463
|
}
|
|
468
464
|
context.log(types.LogLevelLabel.TRACE, "Transforming built-ins runtime modules files.");
|
|
469
465
|
const builtinFilePaths = await Promise.all((await context.getBuiltins()).map(async (file) => {
|
|
@@ -550,7 +546,7 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
550
546
|
generatedTypes = result;
|
|
551
547
|
}
|
|
552
548
|
}
|
|
553
|
-
await context.fs.
|
|
549
|
+
await context.fs.write(context.dtsPath, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
|
|
554
550
|
|
|
555
551
|
` : ""}${chunk4NHFXDTQ_cjs.getFileHeader(context, {
|
|
556
552
|
directive: null,
|
|
@@ -558,16 +554,14 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
558
554
|
})}
|
|
559
555
|
|
|
560
556
|
${formatTypes(generatedTypes)}
|
|
561
|
-
|
|
562
|
-
mode: "fs"
|
|
563
|
-
});
|
|
557
|
+
`);
|
|
564
558
|
}
|
|
565
559
|
context.tsconfig = chunkGA3RXX4R_cjs.getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig);
|
|
566
560
|
if (!context.tsconfig) {
|
|
567
561
|
throw new Error("Failed to parse the TypeScript configuration file.");
|
|
568
562
|
}
|
|
569
563
|
await this.callPostHook(context, "prepare");
|
|
570
|
-
await
|
|
564
|
+
await chunkHRRI4KOM_cjs.writeMetaFile(context);
|
|
571
565
|
});
|
|
572
566
|
this.context.log(types.LogLevelLabel.INFO, "Powerlines API has been prepared successfully");
|
|
573
567
|
}
|
|
@@ -628,8 +622,8 @@ ${formatTypes(generatedTypes)}
|
|
|
628
622
|
await this.prepare(inlineConfig);
|
|
629
623
|
await this.#executeEnvironments(async (context) => {
|
|
630
624
|
this.context.log(types.LogLevelLabel.TRACE, "Cleaning the project's dist and artifacts directories.");
|
|
631
|
-
await context.fs.
|
|
632
|
-
await context.fs.
|
|
625
|
+
await context.fs.remove(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath));
|
|
626
|
+
await context.fs.remove(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.artifactsPath));
|
|
633
627
|
await chunkB3EE3VHZ_cjs.callHook(context, "clean", {
|
|
634
628
|
sequential: true
|
|
635
629
|
});
|
|
@@ -671,11 +665,11 @@ ${formatTypes(generatedTypes)}
|
|
|
671
665
|
await this.#executeEnvironments(async (context) => {
|
|
672
666
|
await this.callPreHook(context, "build");
|
|
673
667
|
await this.callNormalHook(context, "build");
|
|
674
|
-
if (context.config.output.
|
|
675
|
-
const sourcePath = append.appendPath(context.config.output.
|
|
668
|
+
if (context.config.output.buildPath !== context.config.output.outputPath) {
|
|
669
|
+
const sourcePath = append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot);
|
|
676
670
|
const destinationPath = joinPaths.joinPaths(append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot), "dist");
|
|
677
671
|
if (sourcePath !== destinationPath) {
|
|
678
|
-
context.log(types.LogLevelLabel.INFO, `Copying build output files from project's build directory (${context.config.output.
|
|
672
|
+
context.log(types.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}).`);
|
|
679
673
|
await copyFile.copyFiles({
|
|
680
674
|
input: sourcePath,
|
|
681
675
|
glob: "**/*"
|
|
@@ -904,11 +898,11 @@ ${formatTypes(generatedTypes)}
|
|
|
904
898
|
if (isPromise.isPromiseLike(config)) {
|
|
905
899
|
awaited = await Promise.resolve(config);
|
|
906
900
|
}
|
|
907
|
-
if (!
|
|
901
|
+
if (!chunkWBSA6OG6_cjs.isPluginConfig(awaited)) {
|
|
908
902
|
throw new Error(`Invalid plugin specified in the configuration - ${JSON.stringify(awaited)}. Please ensure the value is a plugin name, an object with the \`plugin\` and \`props\` properties, or an instance of \`Plugin\`.`);
|
|
909
903
|
}
|
|
910
904
|
let plugin;
|
|
911
|
-
if (
|
|
905
|
+
if (chunkWBSA6OG6_cjs.isPlugin(awaited)) {
|
|
912
906
|
plugin = awaited;
|
|
913
907
|
} else if (isFunction.isFunction(awaited)) {
|
|
914
908
|
plugin = await Promise.resolve(awaited());
|
|
@@ -919,10 +913,10 @@ ${formatTypes(generatedTypes)}
|
|
|
919
913
|
} else {
|
|
920
914
|
plugin = resolved;
|
|
921
915
|
}
|
|
922
|
-
} else if (
|
|
916
|
+
} else if (chunkWBSA6OG6_cjs.isPluginConfigTuple(awaited) || chunkWBSA6OG6_cjs.isPluginConfigObject(awaited)) {
|
|
923
917
|
let pluginConfig;
|
|
924
918
|
let pluginOptions;
|
|
925
|
-
if (
|
|
919
|
+
if (chunkWBSA6OG6_cjs.isPluginConfigTuple(awaited)) {
|
|
926
920
|
pluginConfig = awaited[0];
|
|
927
921
|
pluginOptions = awaited?.length === 2 ? awaited[1] : void 0;
|
|
928
922
|
} else {
|
|
@@ -938,17 +932,17 @@ ${formatTypes(generatedTypes)}
|
|
|
938
932
|
}
|
|
939
933
|
} else if (isFunction.isFunction(pluginConfig)) {
|
|
940
934
|
plugin = await Promise.resolve(pluginConfig(pluginOptions));
|
|
941
|
-
} else if (
|
|
935
|
+
} else if (chunkWBSA6OG6_cjs.isPlugin(pluginConfig)) {
|
|
942
936
|
plugin = pluginConfig;
|
|
943
937
|
}
|
|
944
938
|
}
|
|
945
939
|
if (!plugin) {
|
|
946
940
|
throw new Error(`The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`);
|
|
947
941
|
}
|
|
948
|
-
if (!
|
|
942
|
+
if (!chunkWBSA6OG6_cjs.isPlugin(plugin)) {
|
|
949
943
|
throw new Error(`The plugin option ${JSON.stringify(plugin)} does not export a valid module. This configuration must point to a valid Powerlines plugin module.`);
|
|
950
944
|
}
|
|
951
|
-
if (
|
|
945
|
+
if (chunkWBSA6OG6_cjs.checkDedupe(plugin, this.context.plugins)) {
|
|
952
946
|
this.context.log(types.LogLevelLabel.TRACE, `Duplicate ${chalk2__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
|
|
953
947
|
return null;
|
|
954
948
|
}
|
|
@@ -115,7 +115,7 @@ function extractRollupConfig(context) {
|
|
|
115
115
|
}, context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {}, {
|
|
116
116
|
cache: !context.config.skipCache ? joinPaths(context.cachePath, "rollup") : false,
|
|
117
117
|
output: {
|
|
118
|
-
dir: context.config.output.
|
|
118
|
+
dir: context.config.output.buildPath
|
|
119
119
|
},
|
|
120
120
|
logLevel: context.config.logLevel
|
|
121
121
|
}, context.config.build.variant === "rollup" ? context.config.build : {}, context.config.build.variant === "vite" ? context.config.build.build?.rollupOptions : {}, {
|
|
@@ -126,7 +126,7 @@ function extractRollupConfig(context) {
|
|
|
126
126
|
}, context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {}, {
|
|
127
127
|
cache: !context.config.skipCache ? joinPaths.joinPaths(context.cachePath, "rollup") : false,
|
|
128
128
|
output: {
|
|
129
|
-
dir: context.config.output.
|
|
129
|
+
dir: context.config.output.buildPath
|
|
130
130
|
},
|
|
131
131
|
logLevel: context.config.logLevel
|
|
132
132
|
}, context.config.build.variant === "rollup" ? context.config.build : {}, context.config.build.variant === "vite" ? context.config.build.build?.rollupOptions : {}, {
|
|
@@ -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 joinPaths = require('@stryke/path/join-paths');
|
|
6
6
|
var defu = require('defu');
|
|
@@ -62,11 +62,11 @@ function extractViteConfig(context) {
|
|
|
62
62
|
mode: context.config.mode === "development" ? "development" : "production",
|
|
63
63
|
cacheDir: joinPaths.joinPaths(context.cachePath, "vite"),
|
|
64
64
|
build: {
|
|
65
|
-
outDir: context.config.output.
|
|
65
|
+
outDir: context.config.output.buildPath,
|
|
66
66
|
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
67
67
|
tsconfigRaw: context.tsconfig.tsconfigJson
|
|
68
68
|
},
|
|
69
|
-
esbuild:
|
|
69
|
+
esbuild: chunkWCXA5WFX_cjs.extractESBuildConfig(context),
|
|
70
70
|
logLevel: context.config.logLevel ?? void 0,
|
|
71
71
|
envDir: context.config.projectRoot
|
|
72
72
|
}, context.config.build.variant === "vite" ? context.config.build : {}, {
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
+
import { appendPath } from '@stryke/path/append';
|
|
3
|
+
import { correctPath } from '@stryke/path/correct-path';
|
|
4
|
+
import { joinPaths } from '@stryke/path/join';
|
|
5
|
+
import { resolve } from 'node:path';
|
|
6
|
+
|
|
7
|
+
var BaseStorageAdapter = class {
|
|
8
|
+
static {
|
|
9
|
+
__name(this, "BaseStorageAdapter");
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Indicates whether the storage adapter has been disposed.
|
|
13
|
+
*/
|
|
14
|
+
#isDisposed = false;
|
|
15
|
+
/**
|
|
16
|
+
* Configuration options for the storage adapter.
|
|
17
|
+
*/
|
|
18
|
+
options;
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for the BaseStorageAdapter.
|
|
21
|
+
*
|
|
22
|
+
* @param options - Configuration options for the storage adapter.
|
|
23
|
+
*/
|
|
24
|
+
constructor(options = {
|
|
25
|
+
base: "/"
|
|
26
|
+
}) {
|
|
27
|
+
this.options = options;
|
|
28
|
+
this.options.base = resolve(options.base);
|
|
29
|
+
this.options.isReadOnly = !!options.isReadOnly;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Asynchronously checks if a key exists in the storage.
|
|
33
|
+
*
|
|
34
|
+
* @param key - The key to check for existence.
|
|
35
|
+
* @returns A promise that resolves to `true` if the key exists, otherwise `false`.
|
|
36
|
+
*/
|
|
37
|
+
async exists(key) {
|
|
38
|
+
return this.existsSync(key);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Asynchronously retrieves the value associated with a given key.
|
|
42
|
+
*
|
|
43
|
+
* @param key - The key whose value is to be retrieved.
|
|
44
|
+
* @returns A promise that resolves to the value associated with the key, or `null` if the key does not exist.
|
|
45
|
+
*/
|
|
46
|
+
async get(key) {
|
|
47
|
+
return this.getSync(key);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Asynchronously sets the value for a given key.
|
|
51
|
+
*
|
|
52
|
+
* @param key - The key to set the value for.
|
|
53
|
+
* @param value - The value to set.
|
|
54
|
+
*/
|
|
55
|
+
async set(key, value) {
|
|
56
|
+
if (!this.options.isReadOnly) {
|
|
57
|
+
this.setSync(key, value);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Asynchronously removes a key from the storage.
|
|
62
|
+
*
|
|
63
|
+
* @param key - The key to remove.
|
|
64
|
+
*/
|
|
65
|
+
async remove(key) {
|
|
66
|
+
if (!this.options.isReadOnly) {
|
|
67
|
+
this.removeSync(key);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Synchronously removes all entries from the storage that match the provided base path.
|
|
72
|
+
*
|
|
73
|
+
* @param base - The base path to clear keys from.
|
|
74
|
+
*/
|
|
75
|
+
clearSync(base) {
|
|
76
|
+
if (!this.options.isReadOnly) {
|
|
77
|
+
const keys = this.listSync(base || this.options.base);
|
|
78
|
+
if (!keys.length) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
keys.map((key) => this.removeSync(base && !key.startsWith(base) ? joinPaths(base, key) : key));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Asynchronously removes all entries from the storage that match the provided base path.
|
|
86
|
+
*
|
|
87
|
+
* @param base - The base path to clear keys from.
|
|
88
|
+
* @returns A promise that resolves when the operation is complete.
|
|
89
|
+
*/
|
|
90
|
+
async clear(base) {
|
|
91
|
+
if (!this.options.isReadOnly) {
|
|
92
|
+
const keys = await this.list(base || this.options.base);
|
|
93
|
+
if (!keys.length) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
await Promise.all(keys.map(async (key) => this.remove(base && !key.startsWith(base) ? joinPaths(base, key) : key)));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Asynchronously lists all keys under a given base path.
|
|
101
|
+
*
|
|
102
|
+
* @param base - The base path to list keys from.
|
|
103
|
+
* @returns A promise that resolves to an array of keys under the specified base path.
|
|
104
|
+
*/
|
|
105
|
+
async list(base) {
|
|
106
|
+
return this.listSync(base);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Disposes of the storage adapter, releasing any held resources.
|
|
110
|
+
*
|
|
111
|
+
* @returns A promise that resolves when the disposal is complete.
|
|
112
|
+
*/
|
|
113
|
+
dispose() {
|
|
114
|
+
return Promise.resolve();
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Async dispose method to clean up resources.
|
|
118
|
+
*
|
|
119
|
+
* @returns A promise that resolves when disposal is complete.
|
|
120
|
+
*/
|
|
121
|
+
async [Symbol.asyncDispose]() {
|
|
122
|
+
return this._dispose();
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Resolves a given key to its full path within the storage adapter.
|
|
126
|
+
*
|
|
127
|
+
* @param key - The key to resolve.
|
|
128
|
+
* @returns The resolved full path for the key.
|
|
129
|
+
*/
|
|
130
|
+
resolve(key = this.options.base) {
|
|
131
|
+
if (/\.\.:|\.\.$/.test(key)) {
|
|
132
|
+
throw new Error(`[${this.name}]: Invalid key: ${JSON.stringify(key)} provided to storage adapter.`);
|
|
133
|
+
}
|
|
134
|
+
return appendPath(correctPath(key).replace(/:/g, "/"), this.options.base);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Disposes of the storage adapter, releasing any held resources.
|
|
138
|
+
*
|
|
139
|
+
* @returns A promise that resolves when the disposal is complete.
|
|
140
|
+
*/
|
|
141
|
+
async _dispose() {
|
|
142
|
+
if (!this.#isDisposed) {
|
|
143
|
+
await Promise.resolve(this.dispose());
|
|
144
|
+
this.#isDisposed = true;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export { BaseStorageAdapter };
|
|
@@ -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 { joinPaths } from '@stryke/path/join-paths';
|
|
4
4
|
import defu from 'defu';
|
|
@@ -56,7 +56,7 @@ function extractViteConfig(context) {
|
|
|
56
56
|
mode: context.config.mode === "development" ? "development" : "production",
|
|
57
57
|
cacheDir: joinPaths(context.cachePath, "vite"),
|
|
58
58
|
build: {
|
|
59
|
-
outDir: context.config.output.
|
|
59
|
+
outDir: context.config.output.buildPath,
|
|
60
60
|
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
61
61
|
tsconfigRaw: context.tsconfig.tsconfigJson
|
|
62
62
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getString } from './chunk-M263EZ4F.js';
|
|
2
|
-
import { extractRollupConfig } from './chunk-
|
|
2
|
+
import { extractRollupConfig } from './chunk-TAVG226Z.js';
|
|
3
3
|
import { __name } from './chunk-SHUYVCID.js';
|
|
4
4
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
5
5
|
import { isObject } from '@stryke/type-checks/is-object';
|
|
@@ -129,7 +129,7 @@ function extractUnbuildConfig(context) {
|
|
|
129
129
|
orgName: isObject(context.workspaceConfig.organization) ? context.workspaceConfig.organization.name : context.workspaceConfig.organization,
|
|
130
130
|
sourceRoot: context.config.sourceRoot,
|
|
131
131
|
projectRoot: context.config.projectRoot,
|
|
132
|
-
outputPath: context.config.output.
|
|
132
|
+
outputPath: context.config.output.buildPath || "dist",
|
|
133
133
|
platform: context.config.build.platform,
|
|
134
134
|
external: context.builtins.reduce((ret, id) => {
|
|
135
135
|
if (!ret.includes(id)) {
|