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,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkB6DVCLP5_cjs = require('./chunk-B6DVCLP5.cjs');
|
|
4
|
+
var chunkV5WOGN7O_cjs = require('./chunk-V5WOGN7O.cjs');
|
|
5
5
|
var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
|
|
6
6
|
var core = require('@babel/core');
|
|
7
7
|
var console = require('@storm-software/config-tools/logger/console');
|
|
@@ -369,35 +369,32 @@ ${value || ""}`.trim();
|
|
|
369
369
|
}
|
|
370
370
|
return false;
|
|
371
371
|
});
|
|
372
|
-
async function callHook(context,
|
|
373
|
-
const
|
|
374
|
-
if (
|
|
375
|
-
context.log(types.LogLevelLabel.DEBUG, ` \u{1F9E9} Calling plugin hook: ${chalk5__default.default.bold.cyanBright(`${
|
|
372
|
+
async function callHook(context, key, options, ...args) {
|
|
373
|
+
const hooks = context.selectHooks(key, options);
|
|
374
|
+
if (hooks.length > 0) {
|
|
375
|
+
context.log(types.LogLevelLabel.DEBUG, ` \u{1F9E9} Calling plugin hook: ${chalk5__default.default.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)}`);
|
|
376
|
+
const invokeHook = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name(async (hook, hookArgs) => {
|
|
377
|
+
return Reflect.apply(hook.handler, hook.context, hookArgs);
|
|
378
|
+
}, "invokeHook");
|
|
376
379
|
let results = [];
|
|
377
380
|
if (options?.sequential === false) {
|
|
378
|
-
results = await Promise.all(
|
|
379
|
-
if (!isFunction.isFunction(handler
|
|
380
|
-
throw new Error(`Plugin hook handler for hook "${
|
|
381
|
+
results = await Promise.all(hooks.map(async (hook) => {
|
|
382
|
+
if (!isFunction.isFunction(hook.handler)) {
|
|
383
|
+
throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
|
|
381
384
|
}
|
|
382
|
-
return
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
...args
|
|
386
|
-
])
|
|
387
|
-
);
|
|
385
|
+
return invokeHook(hook, [
|
|
386
|
+
...args
|
|
387
|
+
]);
|
|
388
388
|
}));
|
|
389
389
|
} else {
|
|
390
|
-
for (const
|
|
391
|
-
if (!isFunction.isFunction(handler
|
|
392
|
-
throw new Error(`Plugin hook handler for hook "${
|
|
390
|
+
for (const hook of hooks) {
|
|
391
|
+
if (!isFunction.isFunction(hook.handler)) {
|
|
392
|
+
throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
|
|
393
393
|
}
|
|
394
394
|
if (options?.result === "first" || options?.asNextParam === false) {
|
|
395
|
-
results.push(await Promise.resolve(
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
...args
|
|
399
|
-
])
|
|
400
|
-
));
|
|
395
|
+
results.push(await Promise.resolve(invokeHook(hook, [
|
|
396
|
+
...args
|
|
397
|
+
])));
|
|
401
398
|
if (options?.result === "first" && isSet.isSet(results[results.length - 1])) {
|
|
402
399
|
break;
|
|
403
400
|
}
|
|
@@ -408,12 +405,9 @@ async function callHook(context, hook, options, ...args) {
|
|
|
408
405
|
if (results.length > 0 && sequenceArgs.length > 0) {
|
|
409
406
|
sequenceArgs[0] = isFunction.isFunction(options.asNextParam) ? await Promise.resolve(options.asNextParam(results[0])) : results[0];
|
|
410
407
|
}
|
|
411
|
-
const result = await Promise.resolve(
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
...sequenceArgs
|
|
415
|
-
])
|
|
416
|
-
);
|
|
408
|
+
const result = await Promise.resolve(invokeHook(hook, [
|
|
409
|
+
...sequenceArgs
|
|
410
|
+
]));
|
|
417
411
|
if (result) {
|
|
418
412
|
if (options?.result === "last") {
|
|
419
413
|
results = [
|
|
@@ -828,7 +822,7 @@ function createResolver(options) {
|
|
|
828
822
|
}
|
|
829
823
|
chunkPK6SKIKE_cjs.__name(createResolver, "createResolver");
|
|
830
824
|
function isPlugin(value) {
|
|
831
|
-
return isSetObject.isSetObject(value) && "name" in value && isSetString.isSetString(value.name) && (isUndefined.isUndefined(value.api) || "api" in value && isSetObject.isSetObject(value.api)) && (isUndefined.isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction.isFunction(value.applyToEnvironment)) && (isUndefined.isUndefined(value.dedupe) || "dedupe" in value && isFunction.isFunction(value.dedupe)) &&
|
|
825
|
+
return isSetObject.isSetObject(value) && "name" in value && isSetString.isSetString(value.name) && (isUndefined.isUndefined(value.api) || "api" in value && isSetObject.isSetObject(value.api)) && (isUndefined.isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction.isFunction(value.applyToEnvironment)) && (isUndefined.isUndefined(value.dedupe) || "dedupe" in value && isFunction.isFunction(value.dedupe)) && chunkB6DVCLP5_cjs.PLUGIN_HOOKS_FIELDS.every((hook) => isUndefined.isUndefined(value[hook]) || hook in value && (isPluginHookFunction(value[hook]) || hook === "config" && isSetObject.isSetObject(value[hook]))) && chunkV5WOGN7O_cjs.BUILDER_VARIANTS.every((variant) => isUndefined.isUndefined(value[variant]) || variant in value && isSetObject.isSetObject(value[variant]));
|
|
832
826
|
}
|
|
833
827
|
chunkPK6SKIKE_cjs.__name(isPlugin, "isPlugin");
|
|
834
828
|
function isPluginConfigObject(value) {
|
|
@@ -859,23 +853,31 @@ function getHookHandler(pluginHook) {
|
|
|
859
853
|
return isFunction.isFunction(pluginHook) ? pluginHook : pluginHook.handler;
|
|
860
854
|
}
|
|
861
855
|
chunkPK6SKIKE_cjs.__name(getHookHandler, "getHookHandler");
|
|
862
|
-
function
|
|
863
|
-
return
|
|
856
|
+
function isUnpluginHookKey(keys) {
|
|
857
|
+
return chunkV5WOGN7O_cjs.UNPLUGIN_BUILDER_VARIANTS.some((variant) => keys.startsWith(`${variant}:`));
|
|
864
858
|
}
|
|
865
|
-
chunkPK6SKIKE_cjs.__name(
|
|
859
|
+
chunkPK6SKIKE_cjs.__name(isUnpluginHookKey, "isUnpluginHookKey");
|
|
860
|
+
function isPluginHookField(keys) {
|
|
861
|
+
return !isUnpluginHookKey(keys) && chunkB6DVCLP5_cjs.PLUGIN_HOOKS_FIELDS.includes(keys);
|
|
862
|
+
}
|
|
863
|
+
chunkPK6SKIKE_cjs.__name(isPluginHookField, "isPluginHookField");
|
|
864
|
+
function isUnpluginHookField(field) {
|
|
865
|
+
return !isPluginHookField(field) && chunkV5WOGN7O_cjs.UNPLUGIN_BUILDER_VARIANTS.includes(field);
|
|
866
|
+
}
|
|
867
|
+
chunkPK6SKIKE_cjs.__name(isUnpluginHookField, "isUnpluginHookField");
|
|
866
868
|
function checkDedupe(plugin, plugins) {
|
|
867
869
|
return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && (isFunction.isFunction(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
|
|
868
870
|
}
|
|
869
871
|
chunkPK6SKIKE_cjs.__name(checkDedupe, "checkDedupe");
|
|
870
872
|
function addPluginHook(context, plugin, pluginHook, hooksList) {
|
|
871
|
-
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin))) {
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
}
|
|
873
|
+
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin).filter(Boolean))) {
|
|
874
|
+
const handler = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((...args) => getHookHandler(pluginHook).apply(context, args), "handler");
|
|
875
|
+
if (!handler) {
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
hooksList.push({
|
|
876
879
|
plugin,
|
|
877
|
-
|
|
878
|
-
handler: getHookHandler(pluginHook).bind(context)
|
|
880
|
+
handler
|
|
879
881
|
});
|
|
880
882
|
}
|
|
881
883
|
}
|
|
@@ -3701,6 +3703,14 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3701
3703
|
}, []);
|
|
3702
3704
|
}
|
|
3703
3705
|
};
|
|
3706
|
+
function combineContexts(context, unplugin) {
|
|
3707
|
+
return defu7.defu(context, unplugin);
|
|
3708
|
+
}
|
|
3709
|
+
chunkPK6SKIKE_cjs.__name(combineContexts, "combineContexts");
|
|
3710
|
+
function isUnpluginBuilderVariant(str) {
|
|
3711
|
+
return isSetString.isSetString(str) && chunkV5WOGN7O_cjs.UNPLUGIN_BUILDER_VARIANTS.includes(str);
|
|
3712
|
+
}
|
|
3713
|
+
chunkPK6SKIKE_cjs.__name(isUnpluginBuilderVariant, "isUnpluginBuilderVariant");
|
|
3704
3714
|
function createPluginContext(plugin, environment) {
|
|
3705
3715
|
const normalizeMessage = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((message) => {
|
|
3706
3716
|
return isString.isString(message) ? message : message.message;
|
|
@@ -3837,32 +3847,68 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
|
|
|
3837
3847
|
plugin: resolvedPlugin,
|
|
3838
3848
|
context
|
|
3839
3849
|
});
|
|
3840
|
-
this.#hooks = Object.keys(resolvedPlugin).filter((key) => !
|
|
3850
|
+
this.#hooks = Object.keys(resolvedPlugin).filter((key) => !chunkB6DVCLP5_cjs.PLUGIN_NON_HOOK_FIELDS.includes(key)).reduce((ret, key) => {
|
|
3841
3851
|
const hook = key;
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
ret[hook] ??= {
|
|
3852
|
+
if (isPluginHookField(hook)) {
|
|
3853
|
+
const pluginHook = resolvedPlugin[hook];
|
|
3854
|
+
if (!isPluginHook(pluginHook)) {
|
|
3855
|
+
return ret;
|
|
3856
|
+
}
|
|
3857
|
+
ret[hook] ??= {
|
|
3858
|
+
preEnforced: [],
|
|
3859
|
+
preOrdered: [],
|
|
3860
|
+
normal: [],
|
|
3861
|
+
postEnforced: [],
|
|
3862
|
+
postOrdered: []
|
|
3863
|
+
};
|
|
3848
3864
|
if (resolvedPlugin.enforce) {
|
|
3849
|
-
|
|
3850
|
-
|
|
3865
|
+
const hookListOrder2 = `${resolvedPlugin.enforce}Enforced`;
|
|
3866
|
+
ret[hook][hookListOrder2] ??= [];
|
|
3867
|
+
const bucket = ret[hook][hookListOrder2];
|
|
3868
|
+
addPluginHook(context, resolvedPlugin, pluginHook, bucket);
|
|
3851
3869
|
return ret;
|
|
3852
3870
|
}
|
|
3853
3871
|
if (isFunction.isFunction(pluginHook) || !pluginHook.order) {
|
|
3854
3872
|
ret[hook].normal ??= [];
|
|
3855
|
-
|
|
3873
|
+
const bucket = ret[hook].normal;
|
|
3874
|
+
addPluginHook(context, resolvedPlugin, pluginHook, bucket);
|
|
3875
|
+
return ret;
|
|
3876
|
+
}
|
|
3877
|
+
const hookListOrder = `${pluginHook.order}Ordered`;
|
|
3878
|
+
ret[hook][hookListOrder] ??= [];
|
|
3879
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][hookListOrder]);
|
|
3880
|
+
return ret;
|
|
3881
|
+
} else if (isUnpluginHookField(hook)) {
|
|
3882
|
+
const unpluginPlugin = resolvedPlugin[hook];
|
|
3883
|
+
if (!isSetObject.isSetObject(unpluginPlugin)) {
|
|
3856
3884
|
return ret;
|
|
3857
3885
|
}
|
|
3858
|
-
|
|
3859
|
-
|
|
3886
|
+
for (const field of Object.keys(unpluginPlugin)) {
|
|
3887
|
+
const variantField = field;
|
|
3888
|
+
const pluginHook = unpluginPlugin[variantField];
|
|
3889
|
+
if (!isPluginHook(pluginHook)) {
|
|
3890
|
+
continue;
|
|
3891
|
+
}
|
|
3892
|
+
ret[hook] ??= {};
|
|
3893
|
+
ret[hook][variantField] ??= {
|
|
3894
|
+
preEnforced: [],
|
|
3895
|
+
preOrdered: [],
|
|
3896
|
+
normal: [],
|
|
3897
|
+
postEnforced: [],
|
|
3898
|
+
postOrdered: []
|
|
3899
|
+
};
|
|
3900
|
+
if (resolvedPlugin.enforce) {
|
|
3901
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField][`${resolvedPlugin.enforce}Enforced`]);
|
|
3902
|
+
return ret;
|
|
3903
|
+
}
|
|
3904
|
+
if (isFunction.isFunction(pluginHook) || !pluginHook.order) {
|
|
3905
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField].normal);
|
|
3906
|
+
return ret;
|
|
3907
|
+
}
|
|
3908
|
+
addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][variantField][`${pluginHook.order}Ordered`]);
|
|
3909
|
+
}
|
|
3860
3910
|
} else {
|
|
3861
|
-
|
|
3862
|
-
ret[hook].push({
|
|
3863
|
-
plugin: resolvedPlugin,
|
|
3864
|
-
hook: getHookHandler(pluginHook).bind(context)
|
|
3865
|
-
});
|
|
3911
|
+
this.warn(`Unknown plugin hook field: ${String(hook)}`);
|
|
3866
3912
|
}
|
|
3867
3913
|
return ret;
|
|
3868
3914
|
}, this.hooks);
|
|
@@ -3870,89 +3916,89 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
|
|
|
3870
3916
|
/**
|
|
3871
3917
|
* Retrieves the hook handlers for a specific hook name
|
|
3872
3918
|
*/
|
|
3873
|
-
selectHooks(
|
|
3919
|
+
selectHooks(key, options) {
|
|
3874
3920
|
const result = [];
|
|
3875
|
-
if (
|
|
3876
|
-
|
|
3877
|
-
|
|
3921
|
+
if (isUnpluginHookKey(key)) {
|
|
3922
|
+
const variant = String(key).split(":")[0];
|
|
3923
|
+
if (isUnpluginBuilderVariant(variant)) {
|
|
3924
|
+
const hooks = this.hooks[variant];
|
|
3925
|
+
if (hooks) {
|
|
3926
|
+
const field = String(key).split(":")[1];
|
|
3927
|
+
if (field && hooks[field]) {
|
|
3928
|
+
const fieldHooks = hooks[field];
|
|
3929
|
+
if (options?.order) {
|
|
3930
|
+
const mapHooksToResult = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((hooksList) => hooksList.map((hook) => {
|
|
3931
|
+
const plugin = this.plugins.find((p) => p.plugin.name === hook.plugin.name);
|
|
3932
|
+
if (!plugin) {
|
|
3933
|
+
throw new Error(`Could not find plugin context for plugin "${hook.plugin.name}".`);
|
|
3934
|
+
}
|
|
3935
|
+
return {
|
|
3936
|
+
handler: hook.handler,
|
|
3937
|
+
plugin: hook.plugin,
|
|
3938
|
+
context: plugin.context
|
|
3939
|
+
};
|
|
3940
|
+
}), "mapHooksToResult");
|
|
3941
|
+
if (options?.order === "pre") {
|
|
3942
|
+
result.push(...mapHooksToResult(fieldHooks.preOrdered ?? []));
|
|
3943
|
+
result.push(...mapHooksToResult(fieldHooks.preEnforced ?? []));
|
|
3944
|
+
} else if (options?.order === "post") {
|
|
3945
|
+
result.push(...mapHooksToResult(fieldHooks.postOrdered ?? []));
|
|
3946
|
+
result.push(...mapHooksToResult(fieldHooks.postEnforced ?? []));
|
|
3947
|
+
} else {
|
|
3948
|
+
result.push(...mapHooksToResult(fieldHooks.normal ?? []));
|
|
3949
|
+
}
|
|
3950
|
+
} else {
|
|
3951
|
+
result.push(...this.selectHooks(key, {
|
|
3952
|
+
order: "pre"
|
|
3953
|
+
}));
|
|
3954
|
+
result.push(...this.selectHooks(key, {
|
|
3955
|
+
order: "normal"
|
|
3956
|
+
}));
|
|
3957
|
+
result.push(...this.selectHooks(key, {
|
|
3958
|
+
order: "post"
|
|
3959
|
+
}));
|
|
3960
|
+
}
|
|
3961
|
+
}
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
} else if (isPluginHookField(key)) {
|
|
3965
|
+
if (this.hooks[key]) {
|
|
3966
|
+
const fieldHooks = this.hooks[key];
|
|
3878
3967
|
if (options?.order) {
|
|
3968
|
+
const mapHooksToResult = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((hooksList) => hooksList.map((hook) => {
|
|
3969
|
+
const plugin = this.plugins.find((p) => p.plugin.name === hook.plugin.name);
|
|
3970
|
+
if (!plugin) {
|
|
3971
|
+
throw new Error(`Could not find plugin context for plugin "${hook.plugin.name}".`);
|
|
3972
|
+
}
|
|
3973
|
+
return {
|
|
3974
|
+
handler: hook.handler,
|
|
3975
|
+
plugin: hook.plugin,
|
|
3976
|
+
context: plugin.context
|
|
3977
|
+
};
|
|
3978
|
+
}), "mapHooksToResult");
|
|
3879
3979
|
if (options?.order === "pre") {
|
|
3880
|
-
result.push(...(
|
|
3881
|
-
|
|
3882
|
-
if (!plugin) {
|
|
3883
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3884
|
-
}
|
|
3885
|
-
return {
|
|
3886
|
-
handle: h.handler,
|
|
3887
|
-
context: plugin.context
|
|
3888
|
-
};
|
|
3889
|
-
}));
|
|
3890
|
-
result.push(...(hooks.preEnforced ?? []).map((h) => {
|
|
3891
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3892
|
-
if (!plugin) {
|
|
3893
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3894
|
-
}
|
|
3895
|
-
return {
|
|
3896
|
-
handle: h.handler,
|
|
3897
|
-
context: plugin.context
|
|
3898
|
-
};
|
|
3899
|
-
}));
|
|
3980
|
+
result.push(...mapHooksToResult(fieldHooks.preOrdered ?? []));
|
|
3981
|
+
result.push(...mapHooksToResult(fieldHooks.preEnforced ?? []));
|
|
3900
3982
|
} else if (options?.order === "post") {
|
|
3901
|
-
result.push(...(
|
|
3902
|
-
|
|
3903
|
-
if (!plugin) {
|
|
3904
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3905
|
-
}
|
|
3906
|
-
return {
|
|
3907
|
-
handle: h.handler,
|
|
3908
|
-
context: plugin.context
|
|
3909
|
-
};
|
|
3910
|
-
}));
|
|
3911
|
-
result.push(...(hooks.postEnforced ?? []).map((h) => {
|
|
3912
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3913
|
-
if (!plugin) {
|
|
3914
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3915
|
-
}
|
|
3916
|
-
return {
|
|
3917
|
-
handle: h.handler,
|
|
3918
|
-
context: plugin.context
|
|
3919
|
-
};
|
|
3920
|
-
}));
|
|
3983
|
+
result.push(...mapHooksToResult(fieldHooks.postOrdered ?? []));
|
|
3984
|
+
result.push(...mapHooksToResult(fieldHooks.postEnforced ?? []));
|
|
3921
3985
|
} else {
|
|
3922
|
-
result.push(...(
|
|
3923
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3924
|
-
if (!plugin) {
|
|
3925
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3926
|
-
}
|
|
3927
|
-
return {
|
|
3928
|
-
handle: h.handler,
|
|
3929
|
-
context: plugin.context
|
|
3930
|
-
};
|
|
3931
|
-
}));
|
|
3986
|
+
result.push(...mapHooksToResult(fieldHooks.normal ?? []));
|
|
3932
3987
|
}
|
|
3933
3988
|
} else {
|
|
3934
|
-
result.push(...this.selectHooks(
|
|
3989
|
+
result.push(...this.selectHooks(key, {
|
|
3935
3990
|
order: "pre"
|
|
3936
3991
|
}));
|
|
3937
|
-
result.push(...this.selectHooks(
|
|
3992
|
+
result.push(...this.selectHooks(key, {
|
|
3938
3993
|
order: "normal"
|
|
3939
3994
|
}));
|
|
3940
|
-
result.push(...this.selectHooks(
|
|
3995
|
+
result.push(...this.selectHooks(key, {
|
|
3941
3996
|
order: "post"
|
|
3942
3997
|
}));
|
|
3943
3998
|
}
|
|
3944
|
-
} else {
|
|
3945
|
-
result.push(...this.hooks[hook].map((h) => {
|
|
3946
|
-
const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
|
|
3947
|
-
if (!plugin) {
|
|
3948
|
-
throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
|
|
3949
|
-
}
|
|
3950
|
-
return {
|
|
3951
|
-
handle: h.handler,
|
|
3952
|
-
context: plugin.context
|
|
3953
|
-
};
|
|
3954
|
-
}));
|
|
3955
3999
|
}
|
|
4000
|
+
} else {
|
|
4001
|
+
throw new Error(`Unknown plugin hook key: ${String(key)}`);
|
|
3956
4002
|
}
|
|
3957
4003
|
return result;
|
|
3958
4004
|
}
|
|
@@ -4852,7 +4898,9 @@ exports.FileStorage = FileStorage;
|
|
|
4852
4898
|
exports.FileSystem = FileSystem;
|
|
4853
4899
|
exports.PowerlinesAPI = PowerlinesAPI;
|
|
4854
4900
|
exports._capnpFileId = _capnpFileId;
|
|
4901
|
+
exports.combineContexts = combineContexts;
|
|
4855
4902
|
exports.createLog = createLog;
|
|
4856
4903
|
exports.extendLog = extendLog;
|
|
4857
|
-
|
|
4858
|
-
//# sourceMappingURL=chunk-
|
|
4904
|
+
exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
|
|
4905
|
+
//# sourceMappingURL=chunk-E4QAO32M.cjs.map
|
|
4906
|
+
//# sourceMappingURL=chunk-E4QAO32M.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 rolldown = unplugin.createRolldownPlugin(chunk4PIVB3SY_cjs.createUnpluginFactory("rolldown"));
|
|
7
|
+
var rolldown_default = rolldown;
|
|
8
|
+
|
|
9
|
+
exports.rolldown = rolldown;
|
|
10
|
+
exports.rolldown_default = rolldown_default;
|
|
11
|
+
//# sourceMappingURL=chunk-FON7JDQF.cjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-FON7JDQF.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLog, PowerlinesAPI } from './chunk-
|
|
1
|
+
import { createLog, PowerlinesAPI } from './chunk-NM3AFEVI.js';
|
|
2
2
|
import { __name } from './chunk-7QVYU63E.js';
|
|
3
3
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
4
4
|
import { getWorkspaceRoot } from '@stryke/fs/get-workspace-root';
|
|
@@ -44,10 +44,10 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
__name(buildStart, "buildStart");
|
|
47
|
-
async function resolveId(id, importer,
|
|
47
|
+
async function resolveId(id, importer, options2 = {
|
|
48
48
|
isEntry: false
|
|
49
49
|
}) {
|
|
50
|
-
return api.context.resolve(id, importer,
|
|
50
|
+
return api.context.resolve(id, importer, options2);
|
|
51
51
|
}
|
|
52
52
|
__name(resolveId, "resolveId");
|
|
53
53
|
async function load(id) {
|
|
@@ -91,7 +91,7 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
__name(writeBundle, "writeBundle");
|
|
94
|
-
const
|
|
94
|
+
const options = {
|
|
95
95
|
name: "powerlines",
|
|
96
96
|
api,
|
|
97
97
|
resolveId: {
|
|
@@ -119,7 +119,12 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
119
119
|
buildStart,
|
|
120
120
|
writeBundle
|
|
121
121
|
};
|
|
122
|
-
|
|
122
|
+
const result = decorate ? decorate(api, options) : options;
|
|
123
|
+
log(LogLevelLabel.DEBUG, "Unplugin initialized successfully.");
|
|
124
|
+
return {
|
|
125
|
+
api,
|
|
126
|
+
...result
|
|
127
|
+
};
|
|
123
128
|
} catch (error) {
|
|
124
129
|
log(LogLevelLabel.FATAL, error?.message);
|
|
125
130
|
throw error;
|
|
@@ -129,5 +134,5 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
129
134
|
__name(createUnpluginFactory, "createUnpluginFactory");
|
|
130
135
|
|
|
131
136
|
export { createUnpluginFactory, getString };
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
133
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-IBQ5USID.js.map
|
|
138
|
+
//# sourceMappingURL=chunk-IBQ5USID.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-YJWTNJQF.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-IBQ5USID.js';
|
|
3
3
|
import { __name } from './chunk-7QVYU63E.js';
|
|
4
4
|
import { isUndefined } from '@stryke/type-checks/is-undefined';
|
|
5
5
|
import { createEsbuildPlugin } from 'unplugin';
|
|
@@ -29,5 +29,5 @@ var esbuild = createEsbuildPlugin(createUnpluginFactory("esbuild", (api, plugin)
|
|
|
29
29
|
var esbuild_default = esbuild;
|
|
30
30
|
|
|
31
31
|
export { esbuild, esbuild_default };
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-MI5E6YZI.js.map
|
|
33
|
+
//# sourceMappingURL=chunk-MI5E6YZI.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/types/build.ts
|
|
2
|
+
var UNPLUGIN_BUILDER_VARIANTS = [
|
|
3
|
+
"rollup",
|
|
4
|
+
"webpack",
|
|
5
|
+
"rspack",
|
|
6
|
+
"vite",
|
|
7
|
+
"esbuild",
|
|
8
|
+
"farm",
|
|
9
|
+
"unloader",
|
|
10
|
+
"rolldown",
|
|
11
|
+
"bun"
|
|
12
|
+
];
|
|
13
|
+
var BUILDER_VARIANTS = [
|
|
14
|
+
...UNPLUGIN_BUILDER_VARIANTS,
|
|
15
|
+
"tsup",
|
|
16
|
+
"tsdown",
|
|
17
|
+
"unbuild"
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
export { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS };
|
|
21
|
+
//# sourceMappingURL=chunk-NITQ5IYP.js.map
|
|
22
|
+
//# sourceMappingURL=chunk-NITQ5IYP.js.map
|