powerlines 0.36.29 → 0.37.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/{context-DU4oqb6r.d.cts → api-CLQePK25.d.cts} +262 -127
- package/dist/{context-DmCNtNIs.d.ts → api-DClrDYWk.d.ts} +262 -127
- package/dist/api.cjs +4 -4
- package/dist/api.d.cts +7 -7
- package/dist/api.d.ts +7 -7
- package/dist/api.js +3 -3
- package/dist/astro.cjs +6 -6
- package/dist/astro.d.cts +6 -5
- package/dist/astro.d.ts +6 -5
- package/dist/astro.js +5 -5
- package/dist/{chunk-K4ZR45W7.cjs → chunk-2ZNVD64B.cjs} +4 -4
- package/dist/{chunk-7IDSUDJN.js → chunk-3JGCXWAM.js} +3 -3
- package/dist/chunk-42ZHOCZJ.cjs +14 -0
- package/dist/{chunk-PZZP3VX2.cjs → chunk-4PIVB3SY.cjs} +14 -9
- package/dist/{chunk-ZCMOAOQN.cjs → chunk-B6DVCLP5.cjs} +8 -7
- package/dist/chunk-CCJQBJKQ.js +12 -0
- package/dist/{chunk-VZMAJMBD.js → chunk-DVJEAUGP.js} +5 -5
- package/dist/{chunk-3CCAN6GY.cjs → chunk-E4QAO32M.cjs} +176 -128
- package/dist/chunk-FON7JDQF.cjs +12 -0
- package/dist/{chunk-NSHXFNIL.js → chunk-IBQ5USID.js} +12 -7
- package/dist/{chunk-TP4FRF4H.cjs → chunk-JQDMR7OP.cjs} +2 -2
- package/dist/{chunk-4VQBXIAH.js → chunk-MI5E6YZI.js} +3 -3
- package/dist/chunk-NITQ5IYP.js +22 -0
- package/dist/{chunk-JMX44J5R.js → chunk-NM3AFEVI.js} +174 -128
- package/dist/{chunk-AJPO5EP7.js → chunk-PQXP7XQK.js} +8 -7
- package/dist/{chunk-OCEXXVLR.cjs → chunk-TFRZZNXL.cjs} +6 -6
- package/dist/{chunk-JTK4RYSG.js → chunk-U5MNJ4XF.js} +3 -3
- package/dist/{chunk-EXY3RCJH.js → chunk-UNIWU6XL.js} +2 -2
- package/dist/chunk-V5WOGN7O.cjs +25 -0
- package/dist/chunk-XHOP5GXJ.cjs +12 -0
- package/dist/esbuild.cjs +8 -8
- package/dist/esbuild.d.cts +6 -5
- package/dist/esbuild.d.ts +6 -5
- package/dist/esbuild.js +5 -5
- package/dist/farm.cjs +5 -5
- package/dist/farm.d.cts +6 -5
- package/dist/farm.d.ts +6 -5
- package/dist/farm.js +4 -4
- package/dist/index.cjs +30 -22
- package/dist/index.d.cts +6 -7
- package/dist/index.d.ts +6 -7
- package/dist/index.js +6 -6
- package/dist/lib/build/esbuild.d.cts +1 -1
- package/dist/lib/build/esbuild.d.ts +1 -1
- package/dist/lib/build/index.d.cts +2 -3
- package/dist/lib/build/index.d.ts +2 -3
- package/dist/lib/build/rolldown.d.cts +1 -1
- package/dist/lib/build/rolldown.d.ts +1 -1
- package/dist/lib/build/rollup.d.cts +1 -1
- package/dist/lib/build/rollup.d.ts +1 -1
- package/dist/lib/build/rspack.d.cts +1 -1
- package/dist/lib/build/rspack.d.ts +1 -1
- package/dist/lib/build/tsdown.d.cts +1 -1
- package/dist/lib/build/tsdown.d.ts +1 -1
- package/dist/lib/build/tsup.d.cts +1 -1
- package/dist/lib/build/tsup.d.ts +1 -1
- package/dist/lib/build/unbuild.d.cts +2 -3
- package/dist/lib/build/unbuild.d.ts +2 -3
- package/dist/lib/build/vite.d.cts +1 -1
- package/dist/lib/build/vite.d.ts +1 -1
- package/dist/lib/build/webpack.d.cts +1 -1
- package/dist/lib/build/webpack.d.ts +1 -1
- package/dist/lib/chunk-254IMO3A.js +17 -0
- package/dist/lib/chunk-254IMO3A.js.map +1 -0
- package/dist/lib/{chunk-T3VYM4BO.cjs → chunk-4QMQCXAG.cjs} +6 -6
- package/dist/lib/{chunk-T3VYM4BO.cjs.map → chunk-4QMQCXAG.cjs.map} +1 -1
- package/dist/lib/chunk-64R4MDJ7.cjs +25 -0
- package/dist/lib/chunk-64R4MDJ7.cjs.map +1 -0
- package/dist/lib/{chunk-HEMW2YZA.js → chunk-7PD2L3PS.js} +2 -2
- package/dist/lib/{chunk-HEMW2YZA.js.map → chunk-7PD2L3PS.js.map} +1 -1
- package/dist/lib/{chunk-PWKYZBQQ.js → chunk-FI4QUQV2.js} +4 -4
- package/dist/lib/{chunk-PWKYZBQQ.js.map → chunk-FI4QUQV2.js.map} +1 -1
- package/dist/lib/{chunk-3RTOKGVV.cjs → chunk-G3BXMS2V.cjs} +47 -48
- package/dist/lib/chunk-G3BXMS2V.cjs.map +1 -0
- package/dist/lib/chunk-GNEHIBN4.cjs +20 -0
- package/dist/lib/chunk-GNEHIBN4.cjs.map +1 -0
- package/dist/lib/{chunk-57WHQU5T.cjs → chunk-GZDE4GLY.cjs} +2 -2
- package/dist/lib/{chunk-57WHQU5T.cjs.map → chunk-GZDE4GLY.cjs.map} +1 -1
- package/dist/lib/chunk-HGE5DAZF.js +22 -0
- package/dist/lib/chunk-HGE5DAZF.js.map +1 -0
- package/dist/lib/{chunk-GUZKITBG.js → chunk-I7BLJZ4D.js} +5 -5
- package/dist/lib/chunk-I7BLJZ4D.js.map +1 -0
- package/dist/lib/{chunk-MZQFHBHY.cjs → chunk-QVDESIYV.cjs} +5 -5
- package/dist/lib/chunk-QVDESIYV.cjs.map +1 -0
- package/dist/lib/{chunk-POY47Z36.js → chunk-TO3SBSXL.js} +35 -36
- package/dist/lib/chunk-TO3SBSXL.js.map +1 -0
- package/dist/lib/{chunk-XAALLEOG.js → chunk-TWAVU346.js} +27 -29
- package/dist/lib/chunk-TWAVU346.js.map +1 -0
- package/dist/lib/{chunk-C7KNYLNP.cjs → chunk-UXLXQOJD.cjs} +29 -30
- package/dist/lib/chunk-UXLXQOJD.cjs.map +1 -0
- package/dist/lib/chunk-WAN5RBXY.cjs +234 -0
- package/dist/lib/chunk-WAN5RBXY.cjs.map +1 -0
- package/dist/lib/chunk-XDUEQVFC.js +232 -0
- package/dist/lib/chunk-XDUEQVFC.js.map +1 -0
- package/dist/lib/{config-BSQhtJCR.d.ts → config-BLfOgflT.d.ts} +230 -104
- package/dist/lib/{config-CP6f9ozu.d.cts → config-CmG_oSbS.d.cts} +230 -104
- package/dist/lib/config-file.d.cts +1 -1
- package/dist/lib/config-file.d.ts +1 -1
- package/dist/lib/contexts/api-context.cjs +7 -5
- package/dist/lib/contexts/api-context.d.cts +2 -3
- package/dist/lib/contexts/api-context.d.ts +2 -3
- package/dist/lib/contexts/api-context.js +6 -4
- package/dist/lib/contexts/context.cjs +3 -2
- package/dist/lib/contexts/context.d.cts +2 -3
- package/dist/lib/contexts/context.d.ts +2 -3
- package/dist/lib/contexts/context.js +2 -1
- package/dist/lib/contexts/environment-context.cjs +6 -4
- package/dist/lib/contexts/environment-context.d.cts +3 -4
- package/dist/lib/contexts/environment-context.d.ts +3 -4
- package/dist/lib/contexts/environment-context.js +5 -3
- package/dist/lib/contexts/index.cjs +10 -8
- package/dist/lib/contexts/index.d.cts +2 -3
- package/dist/lib/contexts/index.d.ts +2 -3
- package/dist/lib/contexts/index.js +6 -4
- package/dist/lib/contexts/plugin-context.cjs +2 -2
- package/dist/lib/contexts/plugin-context.d.cts +2 -3
- package/dist/lib/contexts/plugin-context.d.ts +2 -3
- package/dist/lib/contexts/plugin-context.js +1 -1
- package/dist/lib/entry.d.cts +1 -1
- package/dist/lib/entry.d.ts +1 -1
- package/dist/lib/fs/index.d.cts +1 -1
- package/dist/lib/fs/index.d.ts +1 -1
- package/dist/lib/fs/vfs.d.cts +1 -1
- package/dist/lib/fs/vfs.d.ts +1 -1
- package/dist/lib/index.cjs +22 -17
- package/dist/lib/index.d.cts +3 -5
- package/dist/lib/index.d.ts +3 -5
- package/dist/lib/index.js +8 -7
- package/dist/lib/{internal-BusfSz8D.d.ts → internal-BfGb9HLc.d.ts} +4 -3
- package/dist/lib/{internal-CPKLmt5v.d.cts → internal-CYMrNGHE.d.cts} +4 -3
- package/dist/lib/logger.d.cts +1 -1
- package/dist/lib/logger.d.ts +1 -1
- package/dist/lib/typescript/import-transformer.d.cts +1 -1
- package/dist/lib/typescript/import-transformer.d.ts +1 -1
- package/dist/lib/typescript/index.d.cts +1 -1
- package/dist/lib/typescript/index.d.ts +1 -1
- package/dist/lib/typescript/ts-morph.d.cts +1 -1
- package/dist/lib/typescript/ts-morph.d.ts +1 -1
- package/dist/lib/unplugin/factory.cjs +8 -6
- package/dist/lib/unplugin/factory.d.cts +4 -128
- package/dist/lib/unplugin/factory.d.ts +4 -128
- package/dist/lib/unplugin/factory.js +7 -5
- package/dist/lib/unplugin/helpers.cjs +7 -2
- package/dist/lib/unplugin/helpers.d.cts +9 -2
- package/dist/lib/unplugin/helpers.d.ts +9 -2
- package/dist/lib/unplugin/helpers.js +2 -1
- package/dist/lib/unplugin/index.cjs +15 -10
- package/dist/lib/unplugin/index.d.cts +4 -6
- package/dist/lib/unplugin/index.d.ts +4 -6
- package/dist/lib/unplugin/index.js +8 -7
- package/dist/lib/unplugin/plugin.cjs +4 -3
- package/dist/lib/unplugin/plugin.d.cts +2 -4
- package/dist/lib/unplugin/plugin.d.ts +2 -4
- package/dist/lib/unplugin/plugin.js +3 -2
- package/dist/lib/utilities/bundle.d.cts +1 -1
- package/dist/lib/utilities/bundle.d.ts +1 -1
- package/dist/lib/utilities/cache.d.cts +1 -1
- package/dist/lib/utilities/cache.d.ts +1 -1
- package/dist/lib/utilities/file-header.d.cts +1 -1
- package/dist/lib/utilities/file-header.d.ts +1 -1
- package/dist/lib/utilities/index.d.cts +1 -1
- package/dist/lib/utilities/index.d.ts +1 -1
- package/dist/lib/utilities/meta.d.cts +1 -1
- package/dist/lib/utilities/meta.d.ts +1 -1
- package/dist/lib/utilities/resolve.d.cts +1 -1
- package/dist/lib/utilities/resolve.d.ts +1 -1
- package/dist/lib/utilities/source-file.d.cts +1 -1
- package/dist/lib/utilities/source-file.d.ts +1 -1
- package/dist/lib/utilities/source-map.d.cts +1 -1
- package/dist/lib/utilities/source-map.d.ts +1 -1
- package/dist/lib/utilities/worker.d.cts +1 -1
- package/dist/lib/utilities/worker.d.ts +1 -1
- package/dist/lib/utilities/write-file.d.cts +1 -1
- package/dist/lib/utilities/write-file.d.ts +1 -1
- package/dist/next.cjs +6 -6
- package/dist/next.js +5 -5
- package/dist/nuxt.cjs +9 -9
- package/dist/nuxt.d.cts +4 -3
- package/dist/nuxt.d.ts +4 -3
- package/dist/nuxt.js +7 -7
- package/dist/plugin-utils/{chunk-EJ5XPAJQ.cjs → chunk-2I5L22QB.cjs} +8 -6
- package/dist/plugin-utils/chunk-2I5L22QB.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-AHZPK4Z5.cjs → chunk-4FLR5DY5.cjs} +7 -7
- package/dist/plugin-utils/{chunk-AHZPK4Z5.cjs.map → chunk-4FLR5DY5.cjs.map} +1 -1
- package/dist/plugin-utils/{chunk-BWAX3NRG.cjs → chunk-6YOLE5BT.cjs} +34 -21
- package/dist/plugin-utils/chunk-6YOLE5BT.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-JAG7QJDV.cjs → chunk-ARNNN4GS.cjs} +5 -5
- package/dist/plugin-utils/chunk-ARNNN4GS.cjs.map +1 -0
- package/dist/plugin-utils/{chunk-FTVPZZJO.js → chunk-I3FSMSLD.js} +32 -20
- package/dist/plugin-utils/chunk-I3FSMSLD.js.map +1 -0
- package/dist/plugin-utils/{chunk-N4IXPCGY.js → chunk-RZAQTG45.js} +3 -3
- package/dist/plugin-utils/{chunk-N4IXPCGY.js.map → chunk-RZAQTG45.js.map} +1 -1
- package/dist/plugin-utils/{chunk-JCX2UJYO.js → chunk-XDURJUGS.js} +5 -3
- package/dist/plugin-utils/chunk-XDURJUGS.js.map +1 -0
- package/dist/plugin-utils/{chunk-WZCGJ7JR.js → chunk-Z2BYI6KW.js} +3 -3
- package/dist/plugin-utils/chunk-Z2BYI6KW.js.map +1 -0
- package/dist/plugin-utils/{context-GdayEWcl.d.cts → context-BQTlTcfV.d.cts} +444 -76
- package/dist/plugin-utils/{context-GdayEWcl.d.ts → context-BQTlTcfV.d.ts} +444 -76
- package/dist/plugin-utils/context-helpers.d.cts +11 -2
- package/dist/plugin-utils/context-helpers.d.ts +11 -2
- package/dist/plugin-utils/enforce.cjs +5 -5
- package/dist/plugin-utils/enforce.d.cts +13 -4
- package/dist/plugin-utils/enforce.d.ts +13 -4
- package/dist/plugin-utils/enforce.js +4 -4
- package/dist/plugin-utils/extend.cjs +4 -4
- package/dist/plugin-utils/extend.d.cts +11 -2
- package/dist/plugin-utils/extend.d.ts +11 -2
- package/dist/plugin-utils/extend.js +3 -3
- package/dist/plugin-utils/get-config-path.d.cts +11 -2
- package/dist/plugin-utils/get-config-path.d.ts +11 -2
- package/dist/plugin-utils/helpers.cjs +25 -21
- package/dist/plugin-utils/helpers.d.cts +36 -32
- package/dist/plugin-utils/helpers.d.ts +36 -32
- package/dist/plugin-utils/helpers.js +1 -1
- package/dist/plugin-utils/index.cjs +31 -27
- package/dist/plugin-utils/index.d.cts +12 -3
- package/dist/plugin-utils/index.d.ts +12 -3
- package/dist/plugin-utils/index.js +4 -4
- package/dist/plugin-utils/merge.cjs +3 -3
- package/dist/plugin-utils/merge.d.cts +11 -2
- package/dist/plugin-utils/merge.d.ts +11 -2
- package/dist/plugin-utils/merge.js +2 -2
- package/dist/plugin-utils/paths.d.cts +11 -2
- package/dist/plugin-utils/paths.d.ts +11 -2
- package/dist/rolldown.cjs +8 -8
- package/dist/rolldown.d.cts +6 -5
- package/dist/rolldown.d.ts +6 -5
- package/dist/rolldown.js +5 -5
- package/dist/rollup.cjs +5 -5
- package/dist/rollup.d.cts +6 -5
- package/dist/rollup.d.ts +6 -5
- package/dist/rollup.js +4 -4
- package/dist/rspack.cjs +5 -5
- package/dist/rspack.d.cts +6 -5
- package/dist/rspack.d.ts +6 -5
- package/dist/rspack.js +4 -4
- package/dist/tsdown.cjs +6 -6
- package/dist/tsdown.js +5 -5
- package/dist/tsup.cjs +6 -6
- package/dist/tsup.js +5 -5
- package/dist/types/api.d.cts +5 -5
- package/dist/types/api.d.ts +5 -5
- package/dist/types/babel.d.cts +6 -5
- package/dist/types/babel.d.ts +6 -5
- package/dist/types/build.cjs +7 -3
- package/dist/types/build.d.cts +19 -13
- package/dist/types/build.d.ts +19 -13
- package/dist/types/build.js +1 -1
- package/dist/types/commands.d.cts +4 -3
- package/dist/types/commands.d.ts +4 -3
- package/dist/types/config.d.cts +3 -2
- package/dist/types/config.d.ts +3 -2
- package/dist/types/context.cjs +2 -2
- package/dist/types/context.d.cts +3 -2
- package/dist/types/context.d.ts +3 -2
- package/dist/types/context.js +1 -1
- package/dist/types/hooks.cjs +8 -1
- package/dist/types/hooks.d.cts +15 -14
- package/dist/types/hooks.d.ts +15 -14
- package/dist/types/hooks.js +2 -1
- package/dist/types/index.cjs +19 -11
- package/dist/types/index.d.cts +4 -5
- package/dist/types/index.d.ts +4 -5
- package/dist/types/index.js +4 -4
- package/dist/types/internal.d.cts +8 -6
- package/dist/types/internal.d.ts +8 -6
- package/dist/types/plugin.cjs +7 -7
- package/dist/types/plugin.d.cts +3 -2
- package/dist/types/plugin.d.ts +3 -2
- package/dist/types/plugin.js +2 -2
- package/dist/types/resolved.d.cts +2 -1
- package/dist/types/resolved.d.ts +2 -1
- package/dist/types/unplugin.d.cts +14 -39
- package/dist/types/unplugin.d.ts +14 -39
- package/dist/unloader.cjs +5 -5
- package/dist/unloader.d.cts +4 -3
- package/dist/unloader.d.ts +4 -3
- package/dist/unloader.js +4 -4
- package/dist/unplugin.cjs +17 -15
- package/dist/unplugin.d.cts +18 -13
- package/dist/unplugin.d.ts +18 -13
- package/dist/unplugin.js +9 -13
- package/dist/vite.cjs +8 -8
- package/dist/vite.d.cts +6 -5
- package/dist/vite.d.ts +6 -5
- package/dist/vite.js +5 -5
- package/dist/webpack.cjs +8 -8
- package/dist/webpack.d.cts +6 -5
- package/dist/webpack.d.ts +6 -5
- package/dist/webpack.js +5 -5
- package/package.json +7 -4
- package/dist/api-D0gA4eJU.d.cts +0 -142
- package/dist/api-cYTlb0MO.d.ts +0 -142
- package/dist/chunk-HJW7OH6E.js +0 -3
- package/dist/chunk-J7SXQCBV.cjs +0 -12
- package/dist/chunk-U2RJRKLT.js +0 -15
- package/dist/chunk-WVLFG7L6.cjs +0 -12
- package/dist/chunk-XOMY3USD.cjs +0 -17
- package/dist/chunk-XZO6ZJQP.cjs +0 -4
- package/dist/lib/api-BeWRTlF3.d.cts +0 -141
- package/dist/lib/api-C00m3GB0.d.ts +0 -141
- package/dist/lib/chunk-3RTOKGVV.cjs.map +0 -1
- package/dist/lib/chunk-A4RSMLXW.cjs +0 -13
- package/dist/lib/chunk-A4RSMLXW.cjs.map +0 -1
- package/dist/lib/chunk-C7KNYLNP.cjs.map +0 -1
- package/dist/lib/chunk-DLX6BNNE.cjs +0 -196
- package/dist/lib/chunk-DLX6BNNE.cjs.map +0 -1
- package/dist/lib/chunk-GUZKITBG.js.map +0 -1
- package/dist/lib/chunk-HDUSUF6L.js +0 -11
- package/dist/lib/chunk-HDUSUF6L.js.map +0 -1
- package/dist/lib/chunk-MZQFHBHY.cjs.map +0 -1
- package/dist/lib/chunk-POY47Z36.js.map +0 -1
- package/dist/lib/chunk-XAALLEOG.js.map +0 -1
- package/dist/lib/chunk-XHDL2XZB.js +0 -194
- package/dist/lib/chunk-XHDL2XZB.js.map +0 -1
- package/dist/lib/unplugin-BKtwOoMk.d.ts +0 -18
- package/dist/lib/unplugin-BWG1mWFO.d.cts +0 -18
- package/dist/plugin-utils/chunk-BWAX3NRG.cjs.map +0 -1
- package/dist/plugin-utils/chunk-EJ5XPAJQ.cjs.map +0 -1
- package/dist/plugin-utils/chunk-FTVPZZJO.js.map +0 -1
- package/dist/plugin-utils/chunk-JAG7QJDV.cjs.map +0 -1
- package/dist/plugin-utils/chunk-JCX2UJYO.js.map +0 -1
- package/dist/plugin-utils/chunk-WZCGJ7JR.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PLUGIN_NON_HOOK_FIELDS,
|
|
2
|
-
import {
|
|
1
|
+
import { PLUGIN_NON_HOOK_FIELDS, PLUGIN_HOOKS_FIELDS } from './chunk-PQXP7XQK.js';
|
|
2
|
+
import { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS } from './chunk-NITQ5IYP.js';
|
|
3
3
|
import { __name } from './chunk-7QVYU63E.js';
|
|
4
4
|
import { transformAsync } from '@babel/core';
|
|
5
5
|
import { formatLogMessage } from '@storm-software/config-tools/logger/console';
|
|
@@ -340,35 +340,32 @@ ${value || ""}`.trim();
|
|
|
340
340
|
}
|
|
341
341
|
return false;
|
|
342
342
|
});
|
|
343
|
-
async function callHook(context,
|
|
344
|
-
const
|
|
345
|
-
if (
|
|
346
|
-
context.log(LogLevelLabel.DEBUG, ` \u{1F9E9} Calling plugin hook: ${chalk5.bold.cyanBright(`${
|
|
343
|
+
async function callHook(context, key, options, ...args) {
|
|
344
|
+
const hooks = context.selectHooks(key, options);
|
|
345
|
+
if (hooks.length > 0) {
|
|
346
|
+
context.log(LogLevelLabel.DEBUG, ` \u{1F9E9} Calling plugin hook: ${chalk5.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)}`);
|
|
347
|
+
const invokeHook = /* @__PURE__ */ __name(async (hook, hookArgs) => {
|
|
348
|
+
return Reflect.apply(hook.handler, hook.context, hookArgs);
|
|
349
|
+
}, "invokeHook");
|
|
347
350
|
let results = [];
|
|
348
351
|
if (options?.sequential === false) {
|
|
349
|
-
results = await Promise.all(
|
|
350
|
-
if (!isFunction(handler
|
|
351
|
-
throw new Error(`Plugin hook handler for hook "${
|
|
352
|
+
results = await Promise.all(hooks.map(async (hook) => {
|
|
353
|
+
if (!isFunction(hook.handler)) {
|
|
354
|
+
throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
|
|
352
355
|
}
|
|
353
|
-
return
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
...args
|
|
357
|
-
])
|
|
358
|
-
);
|
|
356
|
+
return invokeHook(hook, [
|
|
357
|
+
...args
|
|
358
|
+
]);
|
|
359
359
|
}));
|
|
360
360
|
} else {
|
|
361
|
-
for (const
|
|
362
|
-
if (!isFunction(handler
|
|
363
|
-
throw new Error(`Plugin hook handler for hook "${
|
|
361
|
+
for (const hook of hooks) {
|
|
362
|
+
if (!isFunction(hook.handler)) {
|
|
363
|
+
throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
|
|
364
364
|
}
|
|
365
365
|
if (options?.result === "first" || options?.asNextParam === false) {
|
|
366
|
-
results.push(await Promise.resolve(
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
...args
|
|
370
|
-
])
|
|
371
|
-
));
|
|
366
|
+
results.push(await Promise.resolve(invokeHook(hook, [
|
|
367
|
+
...args
|
|
368
|
+
])));
|
|
372
369
|
if (options?.result === "first" && isSet(results[results.length - 1])) {
|
|
373
370
|
break;
|
|
374
371
|
}
|
|
@@ -379,12 +376,9 @@ async function callHook(context, hook, options, ...args) {
|
|
|
379
376
|
if (results.length > 0 && sequenceArgs.length > 0) {
|
|
380
377
|
sequenceArgs[0] = isFunction(options.asNextParam) ? await Promise.resolve(options.asNextParam(results[0])) : results[0];
|
|
381
378
|
}
|
|
382
|
-
const result = await Promise.resolve(
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
...sequenceArgs
|
|
386
|
-
])
|
|
387
|
-
);
|
|
379
|
+
const result = await Promise.resolve(invokeHook(hook, [
|
|
380
|
+
...sequenceArgs
|
|
381
|
+
]));
|
|
388
382
|
if (result) {
|
|
389
383
|
if (options?.result === "last") {
|
|
390
384
|
results = [
|
|
@@ -799,7 +793,7 @@ function createResolver(options) {
|
|
|
799
793
|
}
|
|
800
794
|
__name(createResolver, "createResolver");
|
|
801
795
|
function isPlugin(value) {
|
|
802
|
-
return isSetObject(value) && "name" in value && isSetString(value.name) && (isUndefined(value.api) || "api" in value && isSetObject(value.api)) && (isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction(value.applyToEnvironment)) && (isUndefined(value.dedupe) || "dedupe" in value && isFunction(value.dedupe)) &&
|
|
796
|
+
return isSetObject(value) && "name" in value && isSetString(value.name) && (isUndefined(value.api) || "api" in value && isSetObject(value.api)) && (isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction(value.applyToEnvironment)) && (isUndefined(value.dedupe) || "dedupe" in value && isFunction(value.dedupe)) && PLUGIN_HOOKS_FIELDS.every((hook) => isUndefined(value[hook]) || hook in value && (isPluginHookFunction(value[hook]) || hook === "config" && isSetObject(value[hook]))) && BUILDER_VARIANTS.every((variant) => isUndefined(value[variant]) || variant in value && isSetObject(value[variant]));
|
|
803
797
|
}
|
|
804
798
|
__name(isPlugin, "isPlugin");
|
|
805
799
|
function isPluginConfigObject(value) {
|
|
@@ -830,23 +824,31 @@ function getHookHandler(pluginHook) {
|
|
|
830
824
|
return isFunction(pluginHook) ? pluginHook : pluginHook.handler;
|
|
831
825
|
}
|
|
832
826
|
__name(getHookHandler, "getHookHandler");
|
|
833
|
-
function
|
|
834
|
-
return
|
|
827
|
+
function isUnpluginHookKey(keys) {
|
|
828
|
+
return UNPLUGIN_BUILDER_VARIANTS.some((variant) => keys.startsWith(`${variant}:`));
|
|
835
829
|
}
|
|
836
|
-
__name(
|
|
830
|
+
__name(isUnpluginHookKey, "isUnpluginHookKey");
|
|
831
|
+
function isPluginHookField(keys) {
|
|
832
|
+
return !isUnpluginHookKey(keys) && PLUGIN_HOOKS_FIELDS.includes(keys);
|
|
833
|
+
}
|
|
834
|
+
__name(isPluginHookField, "isPluginHookField");
|
|
835
|
+
function isUnpluginHookField(field) {
|
|
836
|
+
return !isPluginHookField(field) && UNPLUGIN_BUILDER_VARIANTS.includes(field);
|
|
837
|
+
}
|
|
838
|
+
__name(isUnpluginHookField, "isUnpluginHookField");
|
|
837
839
|
function checkDedupe(plugin, plugins) {
|
|
838
840
|
return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && (isFunction(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
|
|
839
841
|
}
|
|
840
842
|
__name(checkDedupe, "checkDedupe");
|
|
841
843
|
function addPluginHook(context, plugin, pluginHook, hooksList) {
|
|
842
|
-
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin))) {
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
}
|
|
844
|
+
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin).filter(Boolean))) {
|
|
845
|
+
const handler = /* @__PURE__ */ __name((...args) => getHookHandler(pluginHook).apply(context, args), "handler");
|
|
846
|
+
if (!handler) {
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
hooksList.push({
|
|
847
850
|
plugin,
|
|
848
|
-
|
|
849
|
-
handler: getHookHandler(pluginHook).bind(context)
|
|
851
|
+
handler
|
|
850
852
|
});
|
|
851
853
|
}
|
|
852
854
|
}
|
|
@@ -3672,6 +3674,14 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3672
3674
|
}, []);
|
|
3673
3675
|
}
|
|
3674
3676
|
};
|
|
3677
|
+
function combineContexts(context, unplugin) {
|
|
3678
|
+
return defu(context, unplugin);
|
|
3679
|
+
}
|
|
3680
|
+
__name(combineContexts, "combineContexts");
|
|
3681
|
+
function isUnpluginBuilderVariant(str) {
|
|
3682
|
+
return isSetString(str) && UNPLUGIN_BUILDER_VARIANTS.includes(str);
|
|
3683
|
+
}
|
|
3684
|
+
__name(isUnpluginBuilderVariant, "isUnpluginBuilderVariant");
|
|
3675
3685
|
function createPluginContext(plugin, environment) {
|
|
3676
3686
|
const normalizeMessage = /* @__PURE__ */ __name((message) => {
|
|
3677
3687
|
return isString(message) ? message : message.message;
|
|
@@ -3810,30 +3820,66 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
|
|
|
3810
3820
|
});
|
|
3811
3821
|
this.#hooks = Object.keys(resolvedPlugin).filter((key) => !PLUGIN_NON_HOOK_FIELDS.includes(key)).reduce((ret, key) => {
|
|
3812
3822
|
const hook = key;
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
ret[hook] ??= {
|
|
3823
|
+
if (isPluginHookField(hook)) {
|
|
3824
|
+
const pluginHook = resolvedPlugin[hook];
|
|
3825
|
+
if (!isPluginHook(pluginHook)) {
|
|
3826
|
+
return ret;
|
|
3827
|
+
}
|
|
3828
|
+
ret[hook] ??= {
|
|
3829
|
+
preEnforced: [],
|
|
3830
|
+
preOrdered: [],
|
|
3831
|
+
normal: [],
|
|
3832
|
+
postEnforced: [],
|
|
3833
|
+
postOrdered: []
|
|
3834
|
+
};
|
|
3819
3835
|
if (resolvedPlugin.enforce) {
|
|
3820
|
-
|
|
3821
|
-
|
|
3836
|
+
const hookListOrder2 = `${resolvedPlugin.enforce}Enforced`;
|
|
3837
|
+
ret[hook][hookListOrder2] ??= [];
|
|
3838
|
+
const bucket = ret[hook][hookListOrder2];
|
|
3839
|
+
addPluginHook(context, resolvedPlugin, pluginHook, bucket);
|
|
3822
3840
|
return ret;
|
|
3823
3841
|
}
|
|
3824
3842
|
if (isFunction(pluginHook) || !pluginHook.order) {
|
|
3825
3843
|
ret[hook].normal ??= [];
|
|
3826
|
-
|
|
3844
|
+
const bucket = ret[hook].normal;
|
|
3845
|
+
addPluginHook(context, resolvedPlugin, pluginHook, bucket);
|
|
3846
|
+
return ret;
|
|
3847
|
+
}
|
|
3848
|
+
const hookListOrder = `${pluginHook.order}Ordered`;
|
|
3849
|
+
ret[hook][hookListOrder] ??= [];
|
|
3850
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][hookListOrder]);
|
|
3851
|
+
return ret;
|
|
3852
|
+
} else if (isUnpluginHookField(hook)) {
|
|
3853
|
+
const unpluginPlugin = resolvedPlugin[hook];
|
|
3854
|
+
if (!isSetObject(unpluginPlugin)) {
|
|
3827
3855
|
return ret;
|
|
3828
3856
|
}
|
|
3829
|
-
|
|
3830
|
-
|
|
3857
|
+
for (const field of Object.keys(unpluginPlugin)) {
|
|
3858
|
+
const variantField = field;
|
|
3859
|
+
const pluginHook = unpluginPlugin[variantField];
|
|
3860
|
+
if (!isPluginHook(pluginHook)) {
|
|
3861
|
+
continue;
|
|
3862
|
+
}
|
|
3863
|
+
ret[hook] ??= {};
|
|
3864
|
+
ret[hook][variantField] ??= {
|
|
3865
|
+
preEnforced: [],
|
|
3866
|
+
preOrdered: [],
|
|
3867
|
+
normal: [],
|
|
3868
|
+
postEnforced: [],
|
|
3869
|
+
postOrdered: []
|
|
3870
|
+
};
|
|
3871
|
+
if (resolvedPlugin.enforce) {
|
|
3872
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField][`${resolvedPlugin.enforce}Enforced`]);
|
|
3873
|
+
return ret;
|
|
3874
|
+
}
|
|
3875
|
+
if (isFunction(pluginHook) || !pluginHook.order) {
|
|
3876
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField].normal);
|
|
3877
|
+
return ret;
|
|
3878
|
+
}
|
|
3879
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField][`${pluginHook.order}Ordered`]);
|
|
3880
|
+
}
|
|
3831
3881
|
} else {
|
|
3832
|
-
|
|
3833
|
-
ret[hook].push({
|
|
3834
|
-
plugin: resolvedPlugin,
|
|
3835
|
-
hook: getHookHandler(pluginHook).bind(context)
|
|
3836
|
-
});
|
|
3882
|
+
this.warn(`Unknown plugin hook field: ${String(hook)}`);
|
|
3837
3883
|
}
|
|
3838
3884
|
return ret;
|
|
3839
3885
|
}, this.hooks);
|
|
@@ -3841,89 +3887,89 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
|
|
|
3841
3887
|
/**
|
|
3842
3888
|
* Retrieves the hook handlers for a specific hook name
|
|
3843
3889
|
*/
|
|
3844
|
-
selectHooks(
|
|
3890
|
+
selectHooks(key, options) {
|
|
3845
3891
|
const result = [];
|
|
3846
|
-
if (
|
|
3847
|
-
|
|
3848
|
-
|
|
3892
|
+
if (isUnpluginHookKey(key)) {
|
|
3893
|
+
const variant = String(key).split(":")[0];
|
|
3894
|
+
if (isUnpluginBuilderVariant(variant)) {
|
|
3895
|
+
const hooks = this.hooks[variant];
|
|
3896
|
+
if (hooks) {
|
|
3897
|
+
const field = String(key).split(":")[1];
|
|
3898
|
+
if (field && hooks[field]) {
|
|
3899
|
+
const fieldHooks = hooks[field];
|
|
3900
|
+
if (options?.order) {
|
|
3901
|
+
const mapHooksToResult = /* @__PURE__ */ __name((hooksList) => hooksList.map((hook) => {
|
|
3902
|
+
const plugin = this.plugins.find((p) => p.plugin.name === hook.plugin.name);
|
|
3903
|
+
if (!plugin) {
|
|
3904
|
+
throw new Error(`Could not find plugin context for plugin "${hook.plugin.name}".`);
|
|
3905
|
+
}
|
|
3906
|
+
return {
|
|
3907
|
+
handler: hook.handler,
|
|
3908
|
+
plugin: hook.plugin,
|
|
3909
|
+
context: plugin.context
|
|
3910
|
+
};
|
|
3911
|
+
}), "mapHooksToResult");
|
|
3912
|
+
if (options?.order === "pre") {
|
|
3913
|
+
result.push(...mapHooksToResult(fieldHooks.preOrdered ?? []));
|
|
3914
|
+
result.push(...mapHooksToResult(fieldHooks.preEnforced ?? []));
|
|
3915
|
+
} else if (options?.order === "post") {
|
|
3916
|
+
result.push(...mapHooksToResult(fieldHooks.postOrdered ?? []));
|
|
3917
|
+
result.push(...mapHooksToResult(fieldHooks.postEnforced ?? []));
|
|
3918
|
+
} else {
|
|
3919
|
+
result.push(...mapHooksToResult(fieldHooks.normal ?? []));
|
|
3920
|
+
}
|
|
3921
|
+
} else {
|
|
3922
|
+
result.push(...this.selectHooks(key, {
|
|
3923
|
+
order: "pre"
|
|
3924
|
+
}));
|
|
3925
|
+
result.push(...this.selectHooks(key, {
|
|
3926
|
+
order: "normal"
|
|
3927
|
+
}));
|
|
3928
|
+
result.push(...this.selectHooks(key, {
|
|
3929
|
+
order: "post"
|
|
3930
|
+
}));
|
|
3931
|
+
}
|
|
3932
|
+
}
|
|
3933
|
+
}
|
|
3934
|
+
}
|
|
3935
|
+
} else if (isPluginHookField(key)) {
|
|
3936
|
+
if (this.hooks[key]) {
|
|
3937
|
+
const fieldHooks = this.hooks[key];
|
|
3849
3938
|
if (options?.order) {
|
|
3939
|
+
const mapHooksToResult = /* @__PURE__ */ __name((hooksList) => hooksList.map((hook) => {
|
|
3940
|
+
const plugin = this.plugins.find((p) => p.plugin.name === hook.plugin.name);
|
|
3941
|
+
if (!plugin) {
|
|
3942
|
+
throw new Error(`Could not find plugin context for plugin "${hook.plugin.name}".`);
|
|
3943
|
+
}
|
|
3944
|
+
return {
|
|
3945
|
+
handler: hook.handler,
|
|
3946
|
+
plugin: hook.plugin,
|
|
3947
|
+
context: plugin.context
|
|
3948
|
+
};
|
|
3949
|
+
}), "mapHooksToResult");
|
|
3850
3950
|
if (options?.order === "pre") {
|
|
3851
|
-
result.push(...(
|
|
3852
|
-
|
|
3853
|
-
if (!plugin) {
|
|
3854
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3855
|
-
}
|
|
3856
|
-
return {
|
|
3857
|
-
handle: h.handler,
|
|
3858
|
-
context: plugin.context
|
|
3859
|
-
};
|
|
3860
|
-
}));
|
|
3861
|
-
result.push(...(hooks.preEnforced ?? []).map((h) => {
|
|
3862
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3863
|
-
if (!plugin) {
|
|
3864
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3865
|
-
}
|
|
3866
|
-
return {
|
|
3867
|
-
handle: h.handler,
|
|
3868
|
-
context: plugin.context
|
|
3869
|
-
};
|
|
3870
|
-
}));
|
|
3951
|
+
result.push(...mapHooksToResult(fieldHooks.preOrdered ?? []));
|
|
3952
|
+
result.push(...mapHooksToResult(fieldHooks.preEnforced ?? []));
|
|
3871
3953
|
} else if (options?.order === "post") {
|
|
3872
|
-
result.push(...(
|
|
3873
|
-
|
|
3874
|
-
if (!plugin) {
|
|
3875
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3876
|
-
}
|
|
3877
|
-
return {
|
|
3878
|
-
handle: h.handler,
|
|
3879
|
-
context: plugin.context
|
|
3880
|
-
};
|
|
3881
|
-
}));
|
|
3882
|
-
result.push(...(hooks.postEnforced ?? []).map((h) => {
|
|
3883
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3884
|
-
if (!plugin) {
|
|
3885
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3886
|
-
}
|
|
3887
|
-
return {
|
|
3888
|
-
handle: h.handler,
|
|
3889
|
-
context: plugin.context
|
|
3890
|
-
};
|
|
3891
|
-
}));
|
|
3954
|
+
result.push(...mapHooksToResult(fieldHooks.postOrdered ?? []));
|
|
3955
|
+
result.push(...mapHooksToResult(fieldHooks.postEnforced ?? []));
|
|
3892
3956
|
} else {
|
|
3893
|
-
result.push(...(
|
|
3894
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3895
|
-
if (!plugin) {
|
|
3896
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3897
|
-
}
|
|
3898
|
-
return {
|
|
3899
|
-
handle: h.handler,
|
|
3900
|
-
context: plugin.context
|
|
3901
|
-
};
|
|
3902
|
-
}));
|
|
3957
|
+
result.push(...mapHooksToResult(fieldHooks.normal ?? []));
|
|
3903
3958
|
}
|
|
3904
3959
|
} else {
|
|
3905
|
-
result.push(...this.selectHooks(
|
|
3960
|
+
result.push(...this.selectHooks(key, {
|
|
3906
3961
|
order: "pre"
|
|
3907
3962
|
}));
|
|
3908
|
-
result.push(...this.selectHooks(
|
|
3963
|
+
result.push(...this.selectHooks(key, {
|
|
3909
3964
|
order: "normal"
|
|
3910
3965
|
}));
|
|
3911
|
-
result.push(...this.selectHooks(
|
|
3966
|
+
result.push(...this.selectHooks(key, {
|
|
3912
3967
|
order: "post"
|
|
3913
3968
|
}));
|
|
3914
3969
|
}
|
|
3915
|
-
} else {
|
|
3916
|
-
result.push(...this.hooks[hook].map((h) => {
|
|
3917
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3918
|
-
if (!plugin) {
|
|
3919
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3920
|
-
}
|
|
3921
|
-
return {
|
|
3922
|
-
handle: h.handler,
|
|
3923
|
-
context: plugin.context
|
|
3924
|
-
};
|
|
3925
|
-
}));
|
|
3926
3970
|
}
|
|
3971
|
+
} else {
|
|
3972
|
+
throw new Error(`Unknown plugin hook key: ${String(key)}`);
|
|
3927
3973
|
}
|
|
3928
3974
|
return result;
|
|
3929
3975
|
}
|
|
@@ -4816,6 +4862,6 @@ Note: Please ensure the plugin package's default export is a class that extends
|
|
|
4816
4862
|
}
|
|
4817
4863
|
};
|
|
4818
4864
|
|
|
4819
|
-
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId, createLog, extendLog };
|
|
4820
|
-
//# sourceMappingURL=chunk-
|
|
4821
|
-
//# sourceMappingURL=chunk-
|
|
4865
|
+
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId, combineContexts, createLog, extendLog, isUnpluginBuilderVariant };
|
|
4866
|
+
//# sourceMappingURL=chunk-NM3AFEVI.js.map
|
|
4867
|
+
//# sourceMappingURL=chunk-NM3AFEVI.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BUILDER_VARIANTS } from './chunk-NITQ5IYP.js';
|
|
2
2
|
import { SUPPORTED_COMMANDS } from './chunk-2MYPFASJ.js';
|
|
3
3
|
|
|
4
4
|
// src/types/plugin.ts
|
|
@@ -9,11 +9,12 @@ var PLUGIN_NON_HOOK_FIELDS = [
|
|
|
9
9
|
"dedupe",
|
|
10
10
|
"applyToEnvironment"
|
|
11
11
|
];
|
|
12
|
-
var
|
|
12
|
+
var PLUGIN_HOOKS_FIELDS = [
|
|
13
13
|
...SUPPORTED_COMMANDS,
|
|
14
14
|
"config",
|
|
15
15
|
"configEnvironment",
|
|
16
16
|
"configResolved",
|
|
17
|
+
"types",
|
|
17
18
|
"buildStart",
|
|
18
19
|
"buildEnd",
|
|
19
20
|
"transform",
|
|
@@ -23,10 +24,10 @@ var KNOWN_HOOKS = [
|
|
|
23
24
|
];
|
|
24
25
|
var KNOWN_PLUGIN_FIELDS = [
|
|
25
26
|
...PLUGIN_NON_HOOK_FIELDS,
|
|
26
|
-
...
|
|
27
|
-
...
|
|
27
|
+
...PLUGIN_HOOKS_FIELDS,
|
|
28
|
+
...BUILDER_VARIANTS
|
|
28
29
|
];
|
|
29
30
|
|
|
30
|
-
export {
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
export { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS };
|
|
32
|
+
//# sourceMappingURL=chunk-PQXP7XQK.js.map
|
|
33
|
+
//# sourceMappingURL=chunk-PQXP7XQK.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkQHEKB7RW_cjs = require('./chunk-QHEKB7RW.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk4PIVB3SY_cjs = require('./chunk-4PIVB3SY.cjs');
|
|
5
5
|
var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
|
|
6
6
|
var environmentChecks = require('@stryke/env/environment-checks');
|
|
7
7
|
var defu = require('defu');
|
|
@@ -97,7 +97,7 @@ function extractViteConfig(context) {
|
|
|
97
97
|
chunkPK6SKIKE_cjs.__name(extractViteConfig, "extractViteConfig");
|
|
98
98
|
|
|
99
99
|
// src/vite.ts
|
|
100
|
-
var vite = unplugin.createVitePlugin(
|
|
100
|
+
var vite = unplugin.createVitePlugin(chunk4PIVB3SY_cjs.createUnpluginFactory("vite", (api, plugin) => {
|
|
101
101
|
return {
|
|
102
102
|
...plugin,
|
|
103
103
|
vite: {
|
|
@@ -111,9 +111,9 @@ var vite = unplugin.createVitePlugin(chunkPZZP3VX2_cjs.createUnpluginFactory("vi
|
|
|
111
111
|
async config(config, env) {
|
|
112
112
|
api.context.config.mode = environmentChecks.isDevelopmentMode(env.mode) ? "development" : environmentChecks.isTestMode(env.mode) ? "test" : "production";
|
|
113
113
|
const environment = await api.context.getEnvironment();
|
|
114
|
-
const result = await api.callHook("config", {
|
|
114
|
+
const result = await api.callHook("vite:config", {
|
|
115
115
|
environment
|
|
116
|
-
});
|
|
116
|
+
}, config, env);
|
|
117
117
|
return defu__default.default(
|
|
118
118
|
extractViteConfig(api.context),
|
|
119
119
|
// Need to use `any` here to avoid excessive type complexity
|
|
@@ -158,5 +158,5 @@ var vite_default = vite;
|
|
|
158
158
|
|
|
159
159
|
exports.vite = vite;
|
|
160
160
|
exports.vite_default = vite_default;
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-TFRZZNXL.cjs.map
|
|
162
|
+
//# sourceMappingURL=chunk-TFRZZNXL.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-IBQ5USID.js';
|
|
2
2
|
import { createWebpackPlugin } from 'unplugin';
|
|
3
3
|
|
|
4
4
|
var webpack = createWebpackPlugin(createUnpluginFactory("webpack"));
|
|
5
5
|
var webpack_default = webpack;
|
|
6
6
|
|
|
7
7
|
export { webpack, webpack_default };
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-U5MNJ4XF.js.map
|
|
9
|
+
//# sourceMappingURL=chunk-U5MNJ4XF.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/types/build.ts
|
|
4
|
+
var UNPLUGIN_BUILDER_VARIANTS = [
|
|
5
|
+
"rollup",
|
|
6
|
+
"webpack",
|
|
7
|
+
"rspack",
|
|
8
|
+
"vite",
|
|
9
|
+
"esbuild",
|
|
10
|
+
"farm",
|
|
11
|
+
"unloader",
|
|
12
|
+
"rolldown",
|
|
13
|
+
"bun"
|
|
14
|
+
];
|
|
15
|
+
var BUILDER_VARIANTS = [
|
|
16
|
+
...UNPLUGIN_BUILDER_VARIANTS,
|
|
17
|
+
"tsup",
|
|
18
|
+
"tsdown",
|
|
19
|
+
"unbuild"
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
exports.BUILDER_VARIANTS = BUILDER_VARIANTS;
|
|
23
|
+
exports.UNPLUGIN_BUILDER_VARIANTS = UNPLUGIN_BUILDER_VARIANTS;
|
|
24
|
+
//# sourceMappingURL=chunk-V5WOGN7O.cjs.map
|
|
25
|
+
//# sourceMappingURL=chunk-V5WOGN7O.cjs.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk4PIVB3SY_cjs = require('./chunk-4PIVB3SY.cjs');
|
|
4
|
+
var unplugin = require('unplugin');
|
|
5
|
+
|
|
6
|
+
var webpack = unplugin.createWebpackPlugin(chunk4PIVB3SY_cjs.createUnpluginFactory("webpack"));
|
|
7
|
+
var webpack_default = webpack;
|
|
8
|
+
|
|
9
|
+
exports.webpack = webpack;
|
|
10
|
+
exports.webpack_default = webpack_default;
|
|
11
|
+
//# sourceMappingURL=chunk-XHOP5GXJ.cjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-XHOP5GXJ.cjs.map
|
package/dist/esbuild.cjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunk2ZNVD64B_cjs = require('./chunk-2ZNVD64B.cjs');
|
|
6
6
|
require('./chunk-QHEKB7RW.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-4PIVB3SY.cjs');
|
|
8
|
+
require('./chunk-E4QAO32M.cjs');
|
|
9
|
+
require('./chunk-B6DVCLP5.cjs');
|
|
10
|
+
require('./chunk-V5WOGN7O.cjs');
|
|
11
11
|
require('./chunk-Z6ARQDHR.cjs');
|
|
12
12
|
require('./chunk-PK6SKIKE.cjs');
|
|
13
13
|
|
|
@@ -15,15 +15,15 @@ require('./chunk-PK6SKIKE.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "default", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk2ZNVD64B_cjs.esbuild_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "esbuild", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk2ZNVD64B_cjs.esbuild; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "module.exports", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk2ZNVD64B_cjs.esbuild; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=esbuild.cjs.map
|
|
29
29
|
//# sourceMappingURL=esbuild.cjs.map
|
package/dist/esbuild.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _esbuild from 'esbuild';
|
|
2
|
-
import {
|
|
2
|
+
import { a0 as ESBuildUserConfig } from './api-CLQePK25.cjs';
|
|
3
|
+
import '@stryke/types/base';
|
|
3
4
|
import '@stryke/env/get-env-paths';
|
|
4
5
|
import '@stryke/http/fetch';
|
|
5
|
-
import '@stryke/types/base';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jest-worker';
|
|
8
8
|
import 'jiti';
|
|
@@ -23,18 +23,19 @@ import 'c12';
|
|
|
23
23
|
import 'compatx';
|
|
24
24
|
import 'vite';
|
|
25
25
|
import '@babel/helper-plugin-utils';
|
|
26
|
-
import './types/fs.cjs';
|
|
27
|
-
import '@stryke/fs/resolve';
|
|
28
|
-
import '@stryke/types/array';
|
|
29
26
|
import './types/build.cjs';
|
|
30
27
|
import '@farmfe/core';
|
|
31
28
|
import '@rspack/core';
|
|
32
29
|
import '@storm-software/tsup/types';
|
|
33
30
|
import '@storm-software/unbuild/types';
|
|
31
|
+
import 'bun';
|
|
34
32
|
import 'rolldown';
|
|
35
33
|
import 'rollup';
|
|
36
34
|
import 'tsdown';
|
|
37
35
|
import 'webpack';
|
|
36
|
+
import './types/fs.cjs';
|
|
37
|
+
import '@stryke/fs/resolve';
|
|
38
|
+
import '@stryke/types/array';
|
|
38
39
|
import './types/tsconfig.cjs';
|
|
39
40
|
import '@stryke/types/tsconfig';
|
|
40
41
|
import 'typescript';
|
package/dist/esbuild.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _esbuild from 'esbuild';
|
|
2
|
-
import {
|
|
2
|
+
import { a0 as ESBuildUserConfig } from './api-DClrDYWk.js';
|
|
3
|
+
import '@stryke/types/base';
|
|
3
4
|
import '@stryke/env/get-env-paths';
|
|
4
5
|
import '@stryke/http/fetch';
|
|
5
|
-
import '@stryke/types/base';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jest-worker';
|
|
8
8
|
import 'jiti';
|
|
@@ -23,18 +23,19 @@ import 'c12';
|
|
|
23
23
|
import 'compatx';
|
|
24
24
|
import 'vite';
|
|
25
25
|
import '@babel/helper-plugin-utils';
|
|
26
|
-
import './types/fs.js';
|
|
27
|
-
import '@stryke/fs/resolve';
|
|
28
|
-
import '@stryke/types/array';
|
|
29
26
|
import './types/build.js';
|
|
30
27
|
import '@farmfe/core';
|
|
31
28
|
import '@rspack/core';
|
|
32
29
|
import '@storm-software/tsup/types';
|
|
33
30
|
import '@storm-software/unbuild/types';
|
|
31
|
+
import 'bun';
|
|
34
32
|
import 'rolldown';
|
|
35
33
|
import 'rollup';
|
|
36
34
|
import 'tsdown';
|
|
37
35
|
import 'webpack';
|
|
36
|
+
import './types/fs.js';
|
|
37
|
+
import '@stryke/fs/resolve';
|
|
38
|
+
import '@stryke/types/array';
|
|
38
39
|
import './types/tsconfig.js';
|
|
39
40
|
import '@stryke/types/tsconfig';
|
|
40
41
|
import 'typescript';
|
package/dist/esbuild.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-
|
|
1
|
+
export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-MI5E6YZI.js';
|
|
2
2
|
import './chunk-YJWTNJQF.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
3
|
+
import './chunk-IBQ5USID.js';
|
|
4
|
+
import './chunk-NM3AFEVI.js';
|
|
5
|
+
import './chunk-PQXP7XQK.js';
|
|
6
|
+
import './chunk-NITQ5IYP.js';
|
|
7
7
|
import './chunk-2MYPFASJ.js';
|
|
8
8
|
import './chunk-7QVYU63E.js';
|
|
9
9
|
//# sourceMappingURL=esbuild.js.map
|