powerlines 0.23.6 → 0.23.9
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-DxPACGY4.d.ts → api-5H3zEedD.d.ts} +1 -1
- package/dist/{api--9pVSIbm.d.cts → api-B77aqxGC.d.cts} +1 -1
- package/dist/api.cjs +2 -2
- package/dist/api.d.cts +2 -2
- package/dist/api.d.ts +2 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +16 -18
- package/dist/astro.d.cts +8 -6
- package/dist/astro.d.ts +8 -6
- package/dist/astro.js +16 -5
- package/dist/{chunk-Q3ZFML4W.cjs → chunk-2QLM4MYP.cjs} +2 -2
- package/dist/{chunk-62BQYRPM.cjs → chunk-6ZKM7WOB.cjs} +33 -20
- package/dist/{chunk-E4M4KEL3.js → chunk-FDEGM4CR.js} +33 -21
- package/dist/{chunk-I3EUY74Q.cjs → chunk-FJWXCUGQ.cjs} +20 -18
- package/dist/{chunk-4OAW547A.cjs → chunk-G5K3I7JU.cjs} +2 -2
- package/dist/{chunk-VRFJDHDN.cjs → chunk-ITL6JGKX.cjs} +2 -2
- package/dist/{chunk-W36NC3B7.js → chunk-KOBCKTHY.js} +1 -1
- package/dist/{chunk-GZNJUK7U.js → chunk-RKMUBSYG.js} +17 -17
- package/dist/{chunk-5CCEQUAZ.js → chunk-S47BU5QR.js} +1 -1
- package/dist/{chunk-XWBVMNBI.js → chunk-UYJXRMS3.js} +1 -1
- package/dist/config.d.cts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/esbuild.cjs +6 -6
- package/dist/esbuild.d.cts +5 -4
- package/dist/esbuild.d.ts +5 -4
- package/dist/esbuild.js +3 -3
- package/dist/farm.cjs +3 -3
- package/dist/farm.d.cts +9 -7
- package/dist/farm.d.ts +9 -7
- package/dist/farm.js +2 -2
- package/dist/index.cjs +14 -32
- package/dist/index.d.cts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +2 -16
- package/dist/lib/{api-B6hfFxVS.d.ts → api-Cm51oVbC.d.cts} +1 -1
- package/dist/lib/{api-CD2QlMig.d.cts → api-mja4jirh.d.ts} +1 -1
- 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 +3 -3
- package/dist/lib/build/index.d.ts +3 -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/tsup.d.cts +1 -1
- package/dist/lib/build/tsup.d.ts +1 -1
- package/dist/lib/build/unbuild.d.cts +3 -3
- package/dist/lib/build/unbuild.d.ts +3 -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-CCGA6ZHZ.cjs → chunk-3KR6TYGW.cjs} +13 -13
- package/dist/lib/{chunk-764HUXP3.js → chunk-63MH3ERQ.js} +25 -4
- package/dist/lib/{chunk-XW5TELHB.cjs → chunk-7JAGT5GC.cjs} +10 -3
- package/dist/lib/{chunk-EN4XP4D5.js → chunk-AHONHQGB.js} +1 -1
- package/dist/lib/{chunk-EJTGOYSI.cjs → chunk-B3DJ4CXY.cjs} +10 -10
- package/dist/lib/{chunk-NDKPSA3I.js → chunk-BGGENJH4.js} +2 -2
- package/dist/lib/{chunk-NVUXGMU5.cjs → chunk-LQEGZT5U.cjs} +25 -4
- package/dist/lib/{chunk-SZH2DJOG.js → chunk-OI7EHXNE.js} +3 -3
- package/dist/lib/{chunk-ZPIKFR7Z.js → chunk-PVCAB6BZ.js} +10 -3
- package/dist/lib/{chunk-27RAXIPT.cjs → chunk-SMZ672RP.cjs} +6 -6
- package/dist/lib/{config-DeUaQYc_.d.ts → config-7Q2dBjJE.d.ts} +7 -1
- package/dist/lib/{config-DTSdCZsw.d.cts → config-BnJpgcGr.d.cts} +7 -1
- package/dist/lib/config-file.cjs +3 -3
- package/dist/lib/config-file.d.cts +3 -2
- package/dist/lib/config-file.d.ts +3 -2
- package/dist/lib/config-file.js +1 -1
- package/dist/lib/contexts/api-context.cjs +5 -5
- package/dist/lib/contexts/api-context.d.cts +3 -3
- package/dist/lib/contexts/api-context.d.ts +3 -3
- package/dist/lib/contexts/api-context.js +4 -4
- package/dist/lib/contexts/context.cjs +3 -3
- package/dist/lib/contexts/context.d.cts +10 -3
- package/dist/lib/contexts/context.d.ts +10 -3
- package/dist/lib/contexts/context.js +2 -2
- package/dist/lib/contexts/environment-context.cjs +4 -4
- package/dist/lib/contexts/environment-context.d.cts +3 -3
- package/dist/lib/contexts/environment-context.d.ts +3 -3
- package/dist/lib/contexts/environment-context.js +3 -3
- package/dist/lib/contexts/index.cjs +7 -7
- package/dist/lib/contexts/index.d.cts +3 -3
- package/dist/lib/contexts/index.d.ts +3 -3
- package/dist/lib/contexts/index.js +4 -4
- package/dist/lib/contexts/plugin-context.d.cts +3 -3
- package/dist/lib/contexts/plugin-context.d.ts +3 -3
- package/dist/lib/entry.d.cts +1 -1
- package/dist/lib/entry.d.ts +1 -1
- package/dist/lib/index.cjs +12 -12
- package/dist/lib/index.d.cts +4 -3
- package/dist/lib/index.d.ts +4 -3
- package/dist/lib/index.js +5 -5
- package/dist/lib/{internal-CpVMJCaU.d.ts → internal-BEygquYh.d.ts} +2 -2
- package/dist/lib/{internal-ypnrUNZy.d.cts → internal-BeR8fOB1.d.cts} +2 -2
- package/dist/lib/logger.d.cts +1 -1
- package/dist/lib/logger.d.ts +1 -1
- package/dist/lib/typescript/compiler-host.d.cts +1 -1
- package/dist/lib/typescript/compiler-host.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/program.d.cts +1 -1
- package/dist/lib/typescript/program.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 +6 -6
- package/dist/lib/unplugin/factory.d.cts +4 -16
- package/dist/lib/unplugin/factory.d.ts +4 -16
- package/dist/lib/unplugin/factory.js +5 -5
- package/dist/lib/unplugin/helpers.d.cts +1 -1
- package/dist/lib/unplugin/helpers.d.ts +1 -1
- package/dist/lib/unplugin/index.cjs +6 -6
- package/dist/lib/unplugin/index.d.cts +3 -2
- package/dist/lib/unplugin/index.d.ts +3 -2
- package/dist/lib/unplugin/index.js +5 -5
- package/dist/lib/unplugin/plugin.d.cts +5 -3
- package/dist/lib/unplugin/plugin.d.ts +5 -3
- package/dist/lib/unplugin/resolve-id.d.cts +1 -1
- package/dist/lib/unplugin/resolve-id.d.ts +1 -1
- package/dist/lib/unplugin-CbbNDduM.d.ts +18 -0
- package/dist/lib/unplugin-ppAOzR__.d.cts +18 -0
- 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-path.d.cts +1 -1
- package/dist/lib/utilities/resolve-path.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 +21 -18
- package/dist/next.js +21 -5
- package/dist/nuxt.cjs +21 -18
- package/dist/nuxt.d.cts +12 -6
- package/dist/nuxt.d.ts +12 -6
- package/dist/nuxt.js +21 -5
- package/dist/plugin-utils/{context-DRFZE3XI.d.ts → context-Cg11S-CE.d.cts} +6 -0
- package/dist/plugin-utils/{context-DRFZE3XI.d.cts → context-Cg11S-CE.d.ts} +6 -0
- package/dist/plugin-utils/context-helpers.d.cts +1 -1
- package/dist/plugin-utils/context-helpers.d.ts +1 -1
- package/dist/plugin-utils/enforce.d.cts +1 -1
- package/dist/plugin-utils/enforce.d.ts +1 -1
- package/dist/plugin-utils/extend.d.cts +1 -1
- package/dist/plugin-utils/extend.d.ts +1 -1
- package/dist/plugin-utils/get-config-path.d.cts +1 -1
- package/dist/plugin-utils/get-config-path.d.ts +1 -1
- package/dist/plugin-utils/helpers.d.cts +1 -1
- package/dist/plugin-utils/helpers.d.ts +1 -1
- package/dist/plugin-utils/index.d.cts +1 -1
- package/dist/plugin-utils/index.d.ts +1 -1
- package/dist/plugin-utils/merge.d.cts +1 -1
- package/dist/plugin-utils/merge.d.ts +1 -1
- package/dist/plugin-utils/paths.d.cts +1 -1
- package/dist/plugin-utils/paths.d.ts +1 -1
- package/dist/{resolved-DKFZ11S7.d.ts → resolved-B3BSdXCt.d.ts} +13 -1
- package/dist/{resolved-C00CJgsk.d.cts → resolved-DGrpILrS.d.cts} +13 -1
- package/dist/rolldown.cjs +8 -16
- package/dist/rolldown.d.cts +5 -5
- package/dist/rolldown.d.ts +5 -5
- package/dist/rolldown.js +8 -3
- package/dist/rollup.cjs +8 -16
- package/dist/rollup.d.cts +5 -5
- package/dist/rollup.d.ts +5 -5
- package/dist/rollup.js +8 -3
- package/dist/rspack.cjs +8 -16
- package/dist/rspack.d.cts +3 -3
- package/dist/rspack.d.ts +3 -3
- package/dist/rspack.js +8 -3
- package/dist/tsup.cjs +40 -18
- package/dist/tsup.d.cts +3 -2
- package/dist/tsup.d.ts +3 -2
- package/dist/tsup.js +40 -5
- package/dist/types/api.d.cts +2 -2
- package/dist/types/api.d.ts +2 -2
- package/dist/types/babel.d.cts +1 -1
- package/dist/types/babel.d.ts +1 -1
- package/dist/types/commands.d.cts +1 -1
- package/dist/types/commands.d.ts +1 -1
- package/dist/types/config.d.cts +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/context.d.cts +1 -1
- package/dist/types/context.d.ts +1 -1
- package/dist/types/hooks.d.cts +1 -1
- package/dist/types/hooks.d.ts +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/internal.d.cts +2 -2
- package/dist/types/internal.d.ts +2 -2
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.ts +1 -1
- package/dist/types/resolved.d.cts +1 -1
- package/dist/types/resolved.d.ts +1 -1
- package/dist/types/unplugin.d.cts +2 -2
- package/dist/types/unplugin.d.ts +2 -2
- package/dist/unloader.cjs +8 -16
- package/dist/unloader.d.cts +7 -6
- package/dist/unloader.d.ts +7 -6
- package/dist/unloader.js +8 -3
- package/dist/unplugin.cjs +186 -26
- package/dist/unplugin.d.cts +58 -35
- package/dist/unplugin.d.ts +58 -35
- package/dist/unplugin.js +186 -16
- package/dist/vite.cjs +6 -6
- package/dist/vite.d.cts +7 -6
- package/dist/vite.d.ts +7 -6
- package/dist/vite.js +3 -3
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.d.cts +5 -5
- package/dist/webpack.d.ts +5 -5
- package/dist/webpack.js +3 -3
- package/package.json +10 -10
- package/dist/babel-types.d.ts +0 -292
- package/dist/chunk-33BDG6M5.js +0 -38
- package/dist/chunk-3HOOIAF4.js +0 -7
- package/dist/chunk-AK5B45AH.js +0 -14
- package/dist/chunk-GHHMURR4.js +0 -7
- package/dist/chunk-GXJ5L37C.cjs +0 -10
- package/dist/chunk-IVABRCNA.js +0 -29
- package/dist/chunk-JJXDDTSL.cjs +0 -22
- package/dist/chunk-K5TOHSUD.cjs +0 -17
- package/dist/chunk-M7N6RX2H.js +0 -19
- package/dist/chunk-MAOXZVDE.cjs +0 -22
- package/dist/chunk-NWZXH2HK.cjs +0 -10
- package/dist/chunk-PFECSHR6.cjs +0 -41
- package/dist/chunk-RM37JA3L.cjs +0 -32
- package/dist/chunk-RVO5GC2H.cjs +0 -10
- package/dist/chunk-TSKJTJ2P.js +0 -19
- package/dist/chunk-XDNNFAQR.js +0 -7
- package/dist/chunk-YBOJFFO2.cjs +0 -10
- package/dist/chunk-ZOMJH52N.js +0 -7
package/dist/types/resolved.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import '@stryke/types/configuration';
|
|
|
3
3
|
import '@stryke/types/file';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import './build.js';
|
|
6
|
-
export {
|
|
6
|
+
export { cp as BabelResolvedConfig, cx as ESBuildResolvedConfig, cq as EnvironmentResolvedConfig, cC as FarmResolvedConfig, cD as InferResolvedConfig, cs as OutputResolvedConfig, cr as ResolvedAssetGlob, ct as ResolvedConfig, co as ResolvedEntryTypeDefinition, cz as RolldownResolvedConfig, cy as RollupResolvedConfig, cw as RspackResolvedConfig, cA as TsupResolvedConfig, cB as UnbuildResolvedConfig, cu as ViteResolvedConfig, cv as WebpackResolvedConfig, cF as __ΩBabelResolvedConfig, cN as __ΩESBuildResolvedConfig, cG as __ΩEnvironmentResolvedConfig, cS as __ΩFarmResolvedConfig, cT as __ΩInferResolvedConfig, cI as __ΩOutputResolvedConfig, cH as __ΩResolvedAssetGlob, cJ as __ΩResolvedConfig, cE as __ΩResolvedEntryTypeDefinition, cP as __ΩRolldownResolvedConfig, cO as __ΩRollupResolvedConfig, cM as __ΩRspackResolvedConfig, cQ as __ΩTsupResolvedConfig, cR as __ΩUnbuildResolvedConfig, cK as __ΩViteResolvedConfig, cL as __ΩWebpackResolvedConfig } from '../resolved-B3BSdXCt.js';
|
|
7
7
|
import '@farmfe/core';
|
|
8
8
|
import '@rspack/core';
|
|
9
9
|
import '@storm-software/tsup/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UnpluginOptions, UnpluginContextMeta } from 'unplugin';
|
|
2
|
-
import { A as API } from '../api
|
|
2
|
+
import { A as API } from '../api-B77aqxGC.cjs';
|
|
3
3
|
import { UnpluginBuildVariant, InferUnpluginVariant } from './build.cjs';
|
|
4
|
-
import {
|
|
4
|
+
import { cD as InferResolvedConfig, c2 as BuildPlugin, bd as PluginContext, a1 as InferUserConfig } from '../resolved-DGrpILrS.cjs';
|
|
5
5
|
import '@farmfe/core';
|
|
6
6
|
import '@rspack/core';
|
|
7
7
|
import '@storm-software/tsup/types';
|
package/dist/types/unplugin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UnpluginOptions, UnpluginContextMeta } from 'unplugin';
|
|
2
|
-
import { A as API } from '../api-
|
|
2
|
+
import { A as API } from '../api-5H3zEedD.js';
|
|
3
3
|
import { UnpluginBuildVariant, InferUnpluginVariant } from './build.js';
|
|
4
|
-
import {
|
|
4
|
+
import { cD as InferResolvedConfig, c2 as BuildPlugin, bd as PluginContext, a1 as InferUserConfig } from '../resolved-B3BSdXCt.js';
|
|
5
5
|
import '@farmfe/core';
|
|
6
6
|
import '@rspack/core';
|
|
7
7
|
import '@storm-software/tsup/types';
|
package/dist/unloader.cjs
CHANGED
|
@@ -2,25 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-62BQYRPM.cjs');
|
|
5
|
+
var chunkFJWXCUGQ_cjs = require('./chunk-FJWXCUGQ.cjs');
|
|
6
|
+
require('./chunk-6ZKM7WOB.cjs');
|
|
8
7
|
require('./chunk-ETKZMGLN.cjs');
|
|
9
8
|
require('./chunk-PAMSESZV.cjs');
|
|
10
9
|
require('./chunk-AYKZK666.cjs');
|
|
11
10
|
require('./chunk-USNT2KNT.cjs');
|
|
11
|
+
var unplugin = require('unplugin');
|
|
12
12
|
|
|
13
|
+
var unloader = unplugin.createUnloaderPlugin(chunkFJWXCUGQ_cjs.createUnpluginFactory("unloader"));
|
|
14
|
+
var unloader_default = unloader;
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
get: function () { return chunkGXJ5L37C_cjs.unloader_default; }
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "module.exports", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return chunkGXJ5L37C_cjs.unloader; }
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports, "unloader", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () { return chunkGXJ5L37C_cjs.unloader; }
|
|
26
|
-
});
|
|
16
|
+
exports.default = unloader_default;
|
|
17
|
+
exports["module.exports"] = unloader;
|
|
18
|
+
exports.unloader = unloader;
|
package/dist/unloader.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _unloader from 'unloader';
|
|
2
2
|
import { BuildConfig, BuildResolvedConfig } from './types/build.cjs';
|
|
3
|
-
import { U as UserConfig } from './resolved-
|
|
3
|
+
import { U as UserConfig } from './resolved-DGrpILrS.cjs';
|
|
4
4
|
import '@farmfe/core';
|
|
5
5
|
import '@rspack/core';
|
|
6
6
|
import '@storm-software/tsup/types';
|
|
@@ -41,13 +41,14 @@ import 'typescript';
|
|
|
41
41
|
* @example
|
|
42
42
|
* ```ts
|
|
43
43
|
* // unloader.config.js
|
|
44
|
-
* import powerlines from
|
|
44
|
+
* import powerlines from "powerlines/unloader";
|
|
45
45
|
*
|
|
46
46
|
* export default defineConfig({
|
|
47
|
-
* plugins: [powerlines()],
|
|
48
|
-
* })
|
|
47
|
+
* plugins: [powerlines({ name: "example-app", ... })],
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
49
50
|
* ```
|
|
50
51
|
*/
|
|
51
|
-
declare const unloader: (options: Partial<UserConfig<BuildConfig, BuildResolvedConfig, any>>) =>
|
|
52
|
+
declare const unloader: (options: Partial<UserConfig<BuildConfig, BuildResolvedConfig, any>>) => _unloader.Plugin<false> | _unloader.Plugin<false>[];
|
|
52
53
|
|
|
53
54
|
export { unloader as "module.exports", unloader as default, unloader };
|
package/dist/unloader.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _unloader from 'unloader';
|
|
2
2
|
import { BuildConfig, BuildResolvedConfig } from './types/build.js';
|
|
3
|
-
import { U as UserConfig } from './resolved-
|
|
3
|
+
import { U as UserConfig } from './resolved-B3BSdXCt.js';
|
|
4
4
|
import '@farmfe/core';
|
|
5
5
|
import '@rspack/core';
|
|
6
6
|
import '@storm-software/tsup/types';
|
|
@@ -41,13 +41,14 @@ import 'typescript';
|
|
|
41
41
|
* @example
|
|
42
42
|
* ```ts
|
|
43
43
|
* // unloader.config.js
|
|
44
|
-
* import powerlines from
|
|
44
|
+
* import powerlines from "powerlines/unloader";
|
|
45
45
|
*
|
|
46
46
|
* export default defineConfig({
|
|
47
|
-
* plugins: [powerlines()],
|
|
48
|
-
* })
|
|
47
|
+
* plugins: [powerlines({ name: "example-app", ... })],
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
49
50
|
* ```
|
|
50
51
|
*/
|
|
51
|
-
declare const unloader: (options: Partial<UserConfig<BuildConfig, BuildResolvedConfig, any>>) =>
|
|
52
|
+
declare const unloader: (options: Partial<UserConfig<BuildConfig, BuildResolvedConfig, any>>) => _unloader.Plugin<false> | _unloader.Plugin<false>[];
|
|
52
53
|
|
|
53
54
|
export { unloader as "module.exports", unloader as default, unloader };
|
package/dist/unloader.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-E4M4KEL3.js';
|
|
1
|
+
import { createUnpluginFactory } from './chunk-RKMUBSYG.js';
|
|
2
|
+
import './chunk-FDEGM4CR.js';
|
|
4
3
|
import './chunk-JQCWV4DT.js';
|
|
5
4
|
import './chunk-JKBJF3UI.js';
|
|
6
5
|
import './chunk-VT7NVLLU.js';
|
|
7
6
|
import './chunk-SHUYVCID.js';
|
|
7
|
+
import { createUnloaderPlugin } from 'unplugin';
|
|
8
|
+
|
|
9
|
+
var unloader = createUnloaderPlugin(createUnpluginFactory("unloader"));
|
|
10
|
+
var unloader_default = unloader;
|
|
11
|
+
|
|
12
|
+
export { unloader_default as default, unloader as "module.exports", unloader };
|
package/dist/unplugin.cjs
CHANGED
|
@@ -1,38 +1,198 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var chunkRM37JA3L_cjs = require('./chunk-RM37JA3L.cjs');
|
|
6
|
-
require('./chunk-YBOJFFO2.cjs');
|
|
7
|
-
require('./chunk-RVO5GC2H.cjs');
|
|
8
|
-
require('./chunk-NWZXH2HK.cjs');
|
|
9
|
-
require('./chunk-PFECSHR6.cjs');
|
|
10
|
-
require('./chunk-GXJ5L37C.cjs');
|
|
11
|
-
require('./chunk-K5TOHSUD.cjs');
|
|
12
|
-
require('./chunk-4OAW547A.cjs');
|
|
13
|
-
require('./chunk-MAOXZVDE.cjs');
|
|
14
|
-
require('./chunk-JJXDDTSL.cjs');
|
|
15
|
-
require('./chunk-VRFJDHDN.cjs');
|
|
16
|
-
require('./chunk-5IBA5HC2.cjs');
|
|
17
|
-
require('./chunk-Q3ZFML4W.cjs');
|
|
18
|
-
var chunkI3EUY74Q_cjs = require('./chunk-I3EUY74Q.cjs');
|
|
19
|
-
require('./chunk-62BQYRPM.cjs');
|
|
3
|
+
var chunkFJWXCUGQ_cjs = require('./chunk-FJWXCUGQ.cjs');
|
|
4
|
+
var chunk6ZKM7WOB_cjs = require('./chunk-6ZKM7WOB.cjs');
|
|
20
5
|
require('./chunk-ETKZMGLN.cjs');
|
|
21
6
|
require('./chunk-PAMSESZV.cjs');
|
|
22
7
|
require('./chunk-AYKZK666.cjs');
|
|
23
|
-
require('./chunk-USNT2KNT.cjs');
|
|
8
|
+
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
9
|
+
var types = require('@storm-software/config-tools/types');
|
|
10
|
+
var filePathFns = require('@stryke/path/file-path-fns');
|
|
11
|
+
var replace = require('@stryke/path/replace');
|
|
12
|
+
var isString = require('@stryke/type-checks/is-string');
|
|
13
|
+
var defu = require('defu');
|
|
24
14
|
|
|
15
|
+
function combineContexts(context, unplugin) {
|
|
16
|
+
return defu.defu(context, unplugin);
|
|
17
|
+
}
|
|
18
|
+
chunkUSNT2KNT_cjs.__name(combineContexts, "combineContexts");
|
|
25
19
|
|
|
20
|
+
// src/lib/unplugin/plugin.ts
|
|
21
|
+
function createUnplugin(context, options = {}) {
|
|
22
|
+
const ctx = context;
|
|
23
|
+
return () => {
|
|
24
|
+
const log = chunk6ZKM7WOB_cjs.extendLog(ctx.log, "unplugin");
|
|
25
|
+
log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
|
|
26
|
+
try {
|
|
27
|
+
async function buildStart() {
|
|
28
|
+
log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
|
|
29
|
+
await ctx.$$internal.callHook("buildStart", {
|
|
30
|
+
sequential: true
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
chunkUSNT2KNT_cjs.__name(buildStart, "buildStart");
|
|
34
|
+
async function resolveId(id, importer, opts = {
|
|
35
|
+
isEntry: false
|
|
36
|
+
}) {
|
|
37
|
+
const resolved = await (async () => {
|
|
38
|
+
let result = await ctx.$$internal.callHook("resolveId", {
|
|
39
|
+
sequential: true,
|
|
40
|
+
result: "first",
|
|
41
|
+
order: "pre"
|
|
42
|
+
}, id, importer, opts);
|
|
43
|
+
if (result) {
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
result = await ctx.$$internal.callHook("resolveId", {
|
|
47
|
+
sequential: true,
|
|
48
|
+
result: "first",
|
|
49
|
+
order: "normal"
|
|
50
|
+
}, id, importer, opts);
|
|
51
|
+
if (result) {
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
result = await chunkFJWXCUGQ_cjs.handleResolveId(ctx, {
|
|
55
|
+
id,
|
|
56
|
+
importer,
|
|
57
|
+
options: opts
|
|
58
|
+
}, {
|
|
59
|
+
skipResolve: options.skipResolve,
|
|
60
|
+
skipNodeModulesBundle: ctx.config.build.skipNodeModulesBundle,
|
|
61
|
+
external: ctx.config.build.external,
|
|
62
|
+
noExternal: ctx.config.build.noExternal
|
|
63
|
+
});
|
|
64
|
+
if (result) {
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
return ctx.$$internal.callHook("resolveId", {
|
|
68
|
+
sequential: true,
|
|
69
|
+
result: "first",
|
|
70
|
+
order: "post"
|
|
71
|
+
}, id, importer, opts);
|
|
72
|
+
})();
|
|
73
|
+
if (resolved && opts.isEntry && ctx.config.build.polyfill && ctx.config.build.polyfill.length > 0) {
|
|
74
|
+
const entry = ctx.entry.find((entry2) => entry2.file === (isString.isString(resolved) ? resolved : resolved.id));
|
|
75
|
+
if (entry) {
|
|
76
|
+
entry.file = `${replace.replaceExtension(isString.isString(resolved) ? resolved : resolved.id)}-polyfill.ts`;
|
|
77
|
+
entry.output ||= entry.output?.replace(filePathFns.findFileName(entry.output, {
|
|
78
|
+
withExtension: true
|
|
79
|
+
}), entry.file);
|
|
80
|
+
await ctx.emitEntry(`
|
|
81
|
+
${ctx.config.build.polyfill.map((p) => `import "${p}";`).join("\n")}
|
|
26
82
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
|
|
83
|
+
export * from "${isString.isString(resolved) ? resolved : resolved.id}";
|
|
84
|
+
`, entry.file, {
|
|
85
|
+
mode: "virtual"
|
|
86
|
+
});
|
|
87
|
+
return entry.file;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return resolved;
|
|
91
|
+
}
|
|
92
|
+
chunkUSNT2KNT_cjs.__name(resolveId, "resolveId");
|
|
93
|
+
async function load(id) {
|
|
94
|
+
let result = await ctx.$$internal.callHook("load", {
|
|
95
|
+
sequential: true,
|
|
96
|
+
result: "first",
|
|
97
|
+
order: "pre"
|
|
98
|
+
}, id);
|
|
99
|
+
if (result) {
|
|
100
|
+
return result;
|
|
101
|
+
}
|
|
102
|
+
result = await ctx.$$internal.callHook("load", {
|
|
103
|
+
sequential: true,
|
|
104
|
+
result: "first",
|
|
105
|
+
order: "normal"
|
|
106
|
+
}, id);
|
|
107
|
+
if (result) {
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
if (id) {
|
|
111
|
+
const resolvedPath = ctx.fs.resolve(id);
|
|
112
|
+
if (resolvedPath) {
|
|
113
|
+
return ctx.fs.readFile(resolvedPath);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return ctx.$$internal.callHook("load", {
|
|
117
|
+
sequential: true,
|
|
118
|
+
result: "first",
|
|
119
|
+
order: "post"
|
|
120
|
+
}, id);
|
|
121
|
+
}
|
|
122
|
+
chunkUSNT2KNT_cjs.__name(load, "load");
|
|
123
|
+
async function transform(code, id) {
|
|
124
|
+
let transformed = code;
|
|
125
|
+
for (const handler of ctx.$$internal.environment.selectHooks("transform")) {
|
|
126
|
+
const result = await handler.apply(combineContexts(ctx, this), [
|
|
127
|
+
chunkFJWXCUGQ_cjs.getString(transformed),
|
|
128
|
+
id
|
|
129
|
+
]);
|
|
130
|
+
if (result) {
|
|
131
|
+
transformed = result;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return transformed;
|
|
135
|
+
}
|
|
136
|
+
chunkUSNT2KNT_cjs.__name(transform, "transform");
|
|
137
|
+
async function buildEnd() {
|
|
138
|
+
log(types.LogLevelLabel.DEBUG, "Powerlines build plugin finishing...");
|
|
139
|
+
return ctx.$$internal.callHook("buildEnd", {
|
|
140
|
+
sequential: true
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
chunkUSNT2KNT_cjs.__name(buildEnd, "buildEnd");
|
|
144
|
+
async function writeBundle() {
|
|
145
|
+
log(types.LogLevelLabel.DEBUG, "Finalizing Powerlines project output...");
|
|
146
|
+
return ctx.$$internal.callHook("writeBundle", {
|
|
147
|
+
sequential: true
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
chunkUSNT2KNT_cjs.__name(writeBundle, "writeBundle");
|
|
151
|
+
return {
|
|
152
|
+
name: "powerlines",
|
|
153
|
+
api: ctx.$$internal.api,
|
|
154
|
+
resolveId: {
|
|
155
|
+
filter: {
|
|
156
|
+
id: {
|
|
157
|
+
include: [
|
|
158
|
+
/.*/
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
handler: resolveId
|
|
163
|
+
},
|
|
164
|
+
load: {
|
|
165
|
+
filter: {
|
|
166
|
+
id: {
|
|
167
|
+
include: [
|
|
168
|
+
/.*/
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
handler: load
|
|
173
|
+
},
|
|
174
|
+
transform,
|
|
175
|
+
buildStart,
|
|
176
|
+
buildEnd,
|
|
177
|
+
writeBundle,
|
|
178
|
+
vite: {
|
|
179
|
+
sharedDuringBuild: true
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
} catch (error) {
|
|
183
|
+
log(types.LogLevelLabel.FATAL, error?.message);
|
|
184
|
+
throw error;
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
chunkUSNT2KNT_cjs.__name(createUnplugin, "createUnplugin");
|
|
189
|
+
|
|
190
|
+
Object.defineProperty(exports, "createUnpluginFactory", {
|
|
32
191
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkFJWXCUGQ_cjs.createUnpluginFactory; }
|
|
34
193
|
});
|
|
35
|
-
Object.defineProperty(exports, "
|
|
194
|
+
Object.defineProperty(exports, "handleResolveId", {
|
|
36
195
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkFJWXCUGQ_cjs.handleResolveId; }
|
|
38
197
|
});
|
|
198
|
+
exports.createUnplugin = createUnplugin;
|
package/dist/unplugin.d.cts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import * as webpack from 'webpack';
|
|
2
|
-
import * as vite from 'vite';
|
|
3
|
-
import * as unloader from 'unloader';
|
|
4
|
-
import * as unplugin from 'unplugin';
|
|
5
|
-
import * as rollup from 'rollup';
|
|
6
|
-
import * as rolldown from 'rolldown';
|
|
7
|
-
import * as _nuxt_schema from '@nuxt/schema';
|
|
8
|
-
import * as _esbuild from 'esbuild';
|
|
9
|
-
import * as astro from 'astro';
|
|
10
|
-
import { b7 as Context, cB as InferResolvedConfig, cs as ViteResolvedConfig, Y as ESBuildUserConfig, V as RolldownUserConfig, T as RollupUserConfig, Q as RspackUserConfig, U as UserConfig, X as ViteUserConfig, M as WebpackUserConfig } from './resolved-C00CJgsk.cjs';
|
|
11
|
-
import { UnpluginBuildVariant, BuildConfig, BuildResolvedConfig } from './types/build.cjs';
|
|
12
|
-
import next from './next.cjs';
|
|
13
|
-
import tsup from './tsup.cjs';
|
|
14
1
|
import { PowerlinesAPI } from './api.cjs';
|
|
2
|
+
import { UnpluginBuildVariant } from './types/build.cjs';
|
|
3
|
+
import { b9 as Context, cD as InferResolvedConfig, bd as PluginContext } from './resolved-DGrpILrS.cjs';
|
|
15
4
|
import { PowerlinesUnpluginOptions, InferUnpluginOptions, PowerlinesUnpluginFactory } from './types/unplugin.cjs';
|
|
5
|
+
import { ExternalIdResult } from 'unplugin';
|
|
6
|
+
import './api-B77aqxGC.cjs';
|
|
16
7
|
import '@stryke/types/base';
|
|
17
8
|
import '@stryke/types/configuration';
|
|
18
9
|
import '@stryke/types/file';
|
|
10
|
+
import 'vite';
|
|
11
|
+
import '@farmfe/core';
|
|
12
|
+
import '@rspack/core';
|
|
13
|
+
import '@storm-software/tsup/types';
|
|
14
|
+
import '@storm-software/unbuild/types';
|
|
15
|
+
import 'esbuild';
|
|
16
|
+
import 'rolldown';
|
|
17
|
+
import 'rollup';
|
|
18
|
+
import 'webpack';
|
|
19
19
|
import '@babel/core';
|
|
20
20
|
import '@storm-software/build-tools/types';
|
|
21
21
|
import '@storm-software/config-tools/types';
|
|
@@ -36,13 +36,6 @@ import '@stryke/types/array';
|
|
|
36
36
|
import './types/tsconfig.cjs';
|
|
37
37
|
import '@stryke/types/tsconfig';
|
|
38
38
|
import 'typescript';
|
|
39
|
-
import '@farmfe/core';
|
|
40
|
-
import '@rspack/core';
|
|
41
|
-
import '@storm-software/tsup/types';
|
|
42
|
-
import '@storm-software/unbuild/types';
|
|
43
|
-
import 'next';
|
|
44
|
-
import 'tsup';
|
|
45
|
-
import './api--9pVSIbm.cjs';
|
|
46
39
|
|
|
47
40
|
/**
|
|
48
41
|
* Creates a Powerlines unplugin factory that generates a plugin instance.
|
|
@@ -53,21 +46,51 @@ import './api--9pVSIbm.cjs';
|
|
|
53
46
|
*/
|
|
54
47
|
declare function createUnpluginFactory<TBuildVariant extends UnpluginBuildVariant, TContext extends Context<InferResolvedConfig<TBuildVariant>> = Context<InferResolvedConfig<TBuildVariant>>>(variant: TBuildVariant, decorate?: (api: PowerlinesAPI<TContext["config"]>, plugin: Omit<PowerlinesUnpluginOptions<TBuildVariant>, UnpluginBuildVariant>) => InferUnpluginOptions<TBuildVariant>): PowerlinesUnpluginFactory<TBuildVariant>;
|
|
55
48
|
|
|
49
|
+
interface CreateUnpluginOptions {
|
|
50
|
+
/**
|
|
51
|
+
* If true, skips the plugin resolution step.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* This value should be set to `true` when using a build tool that handles `external` and `noExternal` options itself (for example `tsup`).
|
|
55
|
+
*
|
|
56
|
+
* @defaultValue false
|
|
57
|
+
*/
|
|
58
|
+
skipResolve?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Creates a Powerlines unplugin instance.
|
|
62
|
+
*
|
|
63
|
+
* @param context - The plugin context.
|
|
64
|
+
* @param options - Options for creating the unplugin.
|
|
65
|
+
* @returns The unplugin instance.
|
|
66
|
+
*/
|
|
67
|
+
declare function createUnplugin<TContext extends PluginContext = PluginContext>(context: TContext, options?: CreateUnpluginOptions): PowerlinesUnpluginFactory<UnpluginBuildVariant>;
|
|
68
|
+
declare type __ΩCreateUnpluginOptions = any[];
|
|
69
|
+
|
|
70
|
+
interface ResolveIdArgs {
|
|
71
|
+
id: string;
|
|
72
|
+
importer: string | undefined;
|
|
73
|
+
options: {
|
|
74
|
+
isEntry: boolean;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
interface ResolveIdOptions {
|
|
78
|
+
skipResolve?: boolean;
|
|
79
|
+
skipNodeModulesBundle?: boolean;
|
|
80
|
+
external: (string | RegExp)[];
|
|
81
|
+
noExternal: (string | RegExp)[];
|
|
82
|
+
resolvePatterns: (string | RegExp)[];
|
|
83
|
+
}
|
|
56
84
|
/**
|
|
57
|
-
*
|
|
85
|
+
* Handle the resolveId hook for the unplugin.
|
|
86
|
+
*
|
|
87
|
+
* @param context - The plugin context.
|
|
88
|
+
* @param args - The arguments for the hook.
|
|
89
|
+
* @param options - The options for the hook.
|
|
90
|
+
* @returns The resolved id or null if not found.
|
|
58
91
|
*/
|
|
59
|
-
declare
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
readonly next: typeof next;
|
|
63
|
-
readonly nuxt: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions, _nuxt_schema.ModuleOptions, false>;
|
|
64
|
-
readonly rolldown: (options: Partial<RolldownUserConfig>) => rolldown.Plugin<any> | rolldown.Plugin<any>[];
|
|
65
|
-
readonly rollup: (options: Partial<RollupUserConfig>) => rollup.Plugin<any> | rollup.Plugin<any>[];
|
|
66
|
-
readonly rspack: (options: Partial<RspackUserConfig>) => unplugin.RspackPluginInstance;
|
|
67
|
-
readonly tsup: typeof tsup;
|
|
68
|
-
readonly unloader: (options: Partial<UserConfig<BuildConfig, BuildResolvedConfig, any>>) => unloader.Plugin<false> | unloader.Plugin<false>[];
|
|
69
|
-
readonly vite: (options: Partial<ViteUserConfig>) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
70
|
-
readonly webpack: (options: Partial<WebpackUserConfig>) => webpack.WebpackPluginInstance;
|
|
71
|
-
};
|
|
92
|
+
declare function handleResolveId(context: Context, args: ResolveIdArgs, options?: Partial<ResolveIdOptions>): Promise<ExternalIdResult | null | undefined>;
|
|
93
|
+
declare type __ΩResolveIdArgs = any[];
|
|
94
|
+
declare type __ΩResolveIdOptions = any[];
|
|
72
95
|
|
|
73
|
-
export {
|
|
96
|
+
export { type CreateUnpluginOptions, type ResolveIdArgs, type ResolveIdOptions, type __ΩCreateUnpluginOptions, type __ΩResolveIdArgs, type __ΩResolveIdOptions, createUnplugin, createUnpluginFactory, handleResolveId };
|
package/dist/unplugin.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import * as webpack from 'webpack';
|
|
2
|
-
import * as vite from 'vite';
|
|
3
|
-
import * as unloader from 'unloader';
|
|
4
|
-
import * as unplugin from 'unplugin';
|
|
5
|
-
import * as rollup from 'rollup';
|
|
6
|
-
import * as rolldown from 'rolldown';
|
|
7
|
-
import * as _nuxt_schema from '@nuxt/schema';
|
|
8
|
-
import * as _esbuild from 'esbuild';
|
|
9
|
-
import * as astro from 'astro';
|
|
10
|
-
import { b7 as Context, cB as InferResolvedConfig, cs as ViteResolvedConfig, Y as ESBuildUserConfig, V as RolldownUserConfig, T as RollupUserConfig, Q as RspackUserConfig, U as UserConfig, X as ViteUserConfig, M as WebpackUserConfig } from './resolved-DKFZ11S7.js';
|
|
11
|
-
import { UnpluginBuildVariant, BuildConfig, BuildResolvedConfig } from './types/build.js';
|
|
12
|
-
import next from './next.js';
|
|
13
|
-
import tsup from './tsup.js';
|
|
14
1
|
import { PowerlinesAPI } from './api.js';
|
|
2
|
+
import { UnpluginBuildVariant } from './types/build.js';
|
|
3
|
+
import { b9 as Context, cD as InferResolvedConfig, bd as PluginContext } from './resolved-B3BSdXCt.js';
|
|
15
4
|
import { PowerlinesUnpluginOptions, InferUnpluginOptions, PowerlinesUnpluginFactory } from './types/unplugin.js';
|
|
5
|
+
import { ExternalIdResult } from 'unplugin';
|
|
6
|
+
import './api-5H3zEedD.js';
|
|
16
7
|
import '@stryke/types/base';
|
|
17
8
|
import '@stryke/types/configuration';
|
|
18
9
|
import '@stryke/types/file';
|
|
10
|
+
import 'vite';
|
|
11
|
+
import '@farmfe/core';
|
|
12
|
+
import '@rspack/core';
|
|
13
|
+
import '@storm-software/tsup/types';
|
|
14
|
+
import '@storm-software/unbuild/types';
|
|
15
|
+
import 'esbuild';
|
|
16
|
+
import 'rolldown';
|
|
17
|
+
import 'rollup';
|
|
18
|
+
import 'webpack';
|
|
19
19
|
import '@babel/core';
|
|
20
20
|
import '@storm-software/build-tools/types';
|
|
21
21
|
import '@storm-software/config-tools/types';
|
|
@@ -36,13 +36,6 @@ import '@stryke/types/array';
|
|
|
36
36
|
import './types/tsconfig.js';
|
|
37
37
|
import '@stryke/types/tsconfig';
|
|
38
38
|
import 'typescript';
|
|
39
|
-
import '@farmfe/core';
|
|
40
|
-
import '@rspack/core';
|
|
41
|
-
import '@storm-software/tsup/types';
|
|
42
|
-
import '@storm-software/unbuild/types';
|
|
43
|
-
import 'next';
|
|
44
|
-
import 'tsup';
|
|
45
|
-
import './api-DxPACGY4.js';
|
|
46
39
|
|
|
47
40
|
/**
|
|
48
41
|
* Creates a Powerlines unplugin factory that generates a plugin instance.
|
|
@@ -53,21 +46,51 @@ import './api-DxPACGY4.js';
|
|
|
53
46
|
*/
|
|
54
47
|
declare function createUnpluginFactory<TBuildVariant extends UnpluginBuildVariant, TContext extends Context<InferResolvedConfig<TBuildVariant>> = Context<InferResolvedConfig<TBuildVariant>>>(variant: TBuildVariant, decorate?: (api: PowerlinesAPI<TContext["config"]>, plugin: Omit<PowerlinesUnpluginOptions<TBuildVariant>, UnpluginBuildVariant>) => InferUnpluginOptions<TBuildVariant>): PowerlinesUnpluginFactory<TBuildVariant>;
|
|
55
48
|
|
|
49
|
+
interface CreateUnpluginOptions {
|
|
50
|
+
/**
|
|
51
|
+
* If true, skips the plugin resolution step.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* This value should be set to `true` when using a build tool that handles `external` and `noExternal` options itself (for example `tsup`).
|
|
55
|
+
*
|
|
56
|
+
* @defaultValue false
|
|
57
|
+
*/
|
|
58
|
+
skipResolve?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Creates a Powerlines unplugin instance.
|
|
62
|
+
*
|
|
63
|
+
* @param context - The plugin context.
|
|
64
|
+
* @param options - Options for creating the unplugin.
|
|
65
|
+
* @returns The unplugin instance.
|
|
66
|
+
*/
|
|
67
|
+
declare function createUnplugin<TContext extends PluginContext = PluginContext>(context: TContext, options?: CreateUnpluginOptions): PowerlinesUnpluginFactory<UnpluginBuildVariant>;
|
|
68
|
+
declare type __ΩCreateUnpluginOptions = any[];
|
|
69
|
+
|
|
70
|
+
interface ResolveIdArgs {
|
|
71
|
+
id: string;
|
|
72
|
+
importer: string | undefined;
|
|
73
|
+
options: {
|
|
74
|
+
isEntry: boolean;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
interface ResolveIdOptions {
|
|
78
|
+
skipResolve?: boolean;
|
|
79
|
+
skipNodeModulesBundle?: boolean;
|
|
80
|
+
external: (string | RegExp)[];
|
|
81
|
+
noExternal: (string | RegExp)[];
|
|
82
|
+
resolvePatterns: (string | RegExp)[];
|
|
83
|
+
}
|
|
56
84
|
/**
|
|
57
|
-
*
|
|
85
|
+
* Handle the resolveId hook for the unplugin.
|
|
86
|
+
*
|
|
87
|
+
* @param context - The plugin context.
|
|
88
|
+
* @param args - The arguments for the hook.
|
|
89
|
+
* @param options - The options for the hook.
|
|
90
|
+
* @returns The resolved id or null if not found.
|
|
58
91
|
*/
|
|
59
|
-
declare
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
readonly next: typeof next;
|
|
63
|
-
readonly nuxt: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions, _nuxt_schema.ModuleOptions, false>;
|
|
64
|
-
readonly rolldown: (options: Partial<RolldownUserConfig>) => rolldown.Plugin<any> | rolldown.Plugin<any>[];
|
|
65
|
-
readonly rollup: (options: Partial<RollupUserConfig>) => rollup.Plugin<any> | rollup.Plugin<any>[];
|
|
66
|
-
readonly rspack: (options: Partial<RspackUserConfig>) => unplugin.RspackPluginInstance;
|
|
67
|
-
readonly tsup: typeof tsup;
|
|
68
|
-
readonly unloader: (options: Partial<UserConfig<BuildConfig, BuildResolvedConfig, any>>) => unloader.Plugin<false> | unloader.Plugin<false>[];
|
|
69
|
-
readonly vite: (options: Partial<ViteUserConfig>) => vite.Plugin<any> | vite.Plugin<any>[];
|
|
70
|
-
readonly webpack: (options: Partial<WebpackUserConfig>) => webpack.WebpackPluginInstance;
|
|
71
|
-
};
|
|
92
|
+
declare function handleResolveId(context: Context, args: ResolveIdArgs, options?: Partial<ResolveIdOptions>): Promise<ExternalIdResult | null | undefined>;
|
|
93
|
+
declare type __ΩResolveIdArgs = any[];
|
|
94
|
+
declare type __ΩResolveIdOptions = any[];
|
|
72
95
|
|
|
73
|
-
export {
|
|
96
|
+
export { type CreateUnpluginOptions, type ResolveIdArgs, type ResolveIdOptions, type __ΩCreateUnpluginOptions, type __ΩResolveIdArgs, type __ΩResolveIdOptions, createUnplugin, createUnpluginFactory, handleResolveId };
|