powerlines 0.23.6 → 0.23.7
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.cjs +2 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +16 -18
- package/dist/astro.js +16 -5
- package/dist/{chunk-I3EUY74Q.cjs → chunk-32NXGMLQ.cjs} +20 -18
- package/dist/{chunk-Q3ZFML4W.cjs → chunk-4TAIQVJG.cjs} +2 -2
- package/dist/{chunk-5CCEQUAZ.js → chunk-6CYDJ53Z.js} +1 -1
- package/dist/{chunk-XWBVMNBI.js → chunk-CSSV6ES3.js} +1 -1
- package/dist/{chunk-VRFJDHDN.cjs → chunk-I7G24RUE.cjs} +2 -2
- package/dist/{chunk-E4M4KEL3.js → chunk-NVNBOUXL.js} +1 -1
- package/dist/{chunk-GZNJUK7U.js → chunk-QXTSQTX5.js} +17 -17
- package/dist/{chunk-W36NC3B7.js → chunk-RQAKTG6M.js} +1 -1
- package/dist/{chunk-62BQYRPM.cjs → chunk-V732KPW6.cjs} +1 -0
- package/dist/{chunk-4OAW547A.cjs → chunk-ZUQDWAUO.cjs} +2 -2
- package/dist/esbuild.cjs +6 -6
- package/dist/esbuild.js +3 -3
- package/dist/farm.cjs +3 -3
- package/dist/farm.js +2 -2
- package/dist/index.cjs +14 -32
- package/dist/index.d.cts +0 -8
- package/dist/index.d.ts +0 -8
- package/dist/index.js +2 -16
- package/dist/lib/{api-CD2QlMig.d.cts → api-BJ7F7DmT.d.ts} +1 -1
- package/dist/lib/{api-B6hfFxVS.d.ts → api-Bwwdt0YR.d.cts} +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/{config-DeUaQYc_.d.ts → config-CFZYRPQj.d.ts} +1 -1
- package/dist/lib/{config-DTSdCZsw.d.cts → config-CxONCKEx.d.cts} +1 -1
- package/dist/lib/config-file.d.cts +1 -1
- package/dist/lib/config-file.d.ts +1 -1
- package/dist/lib/contexts/api-context.d.cts +3 -3
- package/dist/lib/contexts/api-context.d.ts +3 -3
- package/dist/lib/contexts/context.d.cts +3 -3
- package/dist/lib/contexts/context.d.ts +3 -3
- package/dist/lib/contexts/environment-context.d.cts +3 -3
- package/dist/lib/contexts/environment-context.d.ts +3 -3
- package/dist/lib/contexts/index.d.cts +3 -3
- package/dist/lib/contexts/index.d.ts +3 -3
- 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.d.cts +4 -3
- package/dist/lib/index.d.ts +4 -3
- package/dist/lib/{internal-ypnrUNZy.d.cts → internal-9D9Up5pT.d.cts} +2 -2
- package/dist/lib/{internal-CpVMJCaU.d.ts → internal-kEzuoIrl.d.ts} +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.d.cts +4 -16
- package/dist/lib/unplugin/factory.d.ts +4 -16
- package/dist/lib/unplugin/helpers.d.cts +1 -1
- package/dist/lib/unplugin/helpers.d.ts +1 -1
- package/dist/lib/unplugin/index.d.cts +3 -2
- package/dist/lib/unplugin/index.d.ts +3 -2
- 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-BdLs3dwd.d.cts +18 -0
- package/dist/lib/unplugin-tmNrQvUk.d.ts +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.js +21 -5
- package/dist/rolldown.cjs +8 -16
- package/dist/rolldown.d.cts +2 -2
- package/dist/rolldown.d.ts +2 -2
- package/dist/rolldown.js +8 -3
- package/dist/rollup.cjs +8 -16
- package/dist/rollup.d.cts +2 -2
- package/dist/rollup.d.ts +2 -2
- package/dist/rollup.js +8 -3
- package/dist/rspack.cjs +8 -16
- package/dist/rspack.js +8 -3
- package/dist/tsup.cjs +40 -18
- package/dist/tsup.js +40 -5
- package/dist/unloader.cjs +8 -16
- package/dist/unloader.d.cts +2 -2
- package/dist/unloader.d.ts +2 -2
- 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 +2 -2
- package/dist/vite.d.ts +2 -2
- package/dist/vite.js +3 -3
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.d.cts +2 -2
- package/dist/webpack.d.ts +2 -2
- package/dist/webpack.js +3 -3
- package/package.json +3 -3
- 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/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 { b7 as Context, cB as InferResolvedConfig, bb as PluginContext } from './resolved-DKFZ11S7.js';
|
|
15
4
|
import { PowerlinesUnpluginOptions, InferUnpluginOptions, PowerlinesUnpluginFactory } from './types/unplugin.js';
|
|
5
|
+
import { ExternalIdResult } from 'unplugin';
|
|
6
|
+
import './api-DxPACGY4.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
|
+
}
|
|
56
60
|
/**
|
|
57
|
-
*
|
|
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
|
+
}
|
|
84
|
+
/**
|
|
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.js
CHANGED
|
@@ -1,19 +1,189 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-ZOMJH52N.js';
|
|
5
|
-
import './chunk-33BDG6M5.js';
|
|
6
|
-
import './chunk-GHHMURR4.js';
|
|
7
|
-
import './chunk-AK5B45AH.js';
|
|
8
|
-
import './chunk-W36NC3B7.js';
|
|
9
|
-
import './chunk-TSKJTJ2P.js';
|
|
10
|
-
import './chunk-M7N6RX2H.js';
|
|
11
|
-
import './chunk-XWBVMNBI.js';
|
|
12
|
-
import './chunk-VBR53KGY.js';
|
|
13
|
-
import './chunk-5CCEQUAZ.js';
|
|
14
|
-
export { createUnpluginFactory } from './chunk-GZNJUK7U.js';
|
|
15
|
-
import './chunk-E4M4KEL3.js';
|
|
1
|
+
import { handleResolveId, getString } from './chunk-QXTSQTX5.js';
|
|
2
|
+
export { createUnpluginFactory, handleResolveId } from './chunk-QXTSQTX5.js';
|
|
3
|
+
import { extendLog } from './chunk-NVNBOUXL.js';
|
|
16
4
|
import './chunk-JQCWV4DT.js';
|
|
17
5
|
import './chunk-JKBJF3UI.js';
|
|
18
6
|
import './chunk-VT7NVLLU.js';
|
|
19
|
-
import './chunk-SHUYVCID.js';
|
|
7
|
+
import { __name } from './chunk-SHUYVCID.js';
|
|
8
|
+
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
9
|
+
import { findFileName } from '@stryke/path/file-path-fns';
|
|
10
|
+
import { replaceExtension } from '@stryke/path/replace';
|
|
11
|
+
import { isString } from '@stryke/type-checks/is-string';
|
|
12
|
+
import { defu } from 'defu';
|
|
13
|
+
|
|
14
|
+
function combineContexts(context, unplugin) {
|
|
15
|
+
return defu(context, unplugin);
|
|
16
|
+
}
|
|
17
|
+
__name(combineContexts, "combineContexts");
|
|
18
|
+
|
|
19
|
+
// src/lib/unplugin/plugin.ts
|
|
20
|
+
function createUnplugin(context, options = {}) {
|
|
21
|
+
const ctx = context;
|
|
22
|
+
return () => {
|
|
23
|
+
const log = extendLog(ctx.log, "unplugin");
|
|
24
|
+
log(LogLevelLabel.DEBUG, "Initializing Unplugin");
|
|
25
|
+
try {
|
|
26
|
+
async function buildStart() {
|
|
27
|
+
log(LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
|
|
28
|
+
await ctx.$$internal.callHook("buildStart", {
|
|
29
|
+
sequential: true
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
__name(buildStart, "buildStart");
|
|
33
|
+
async function resolveId(id, importer, opts = {
|
|
34
|
+
isEntry: false
|
|
35
|
+
}) {
|
|
36
|
+
const resolved = await (async () => {
|
|
37
|
+
let result = await ctx.$$internal.callHook("resolveId", {
|
|
38
|
+
sequential: true,
|
|
39
|
+
result: "first",
|
|
40
|
+
order: "pre"
|
|
41
|
+
}, id, importer, opts);
|
|
42
|
+
if (result) {
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
result = await ctx.$$internal.callHook("resolveId", {
|
|
46
|
+
sequential: true,
|
|
47
|
+
result: "first",
|
|
48
|
+
order: "normal"
|
|
49
|
+
}, id, importer, opts);
|
|
50
|
+
if (result) {
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
result = await handleResolveId(ctx, {
|
|
54
|
+
id,
|
|
55
|
+
importer,
|
|
56
|
+
options: opts
|
|
57
|
+
}, {
|
|
58
|
+
skipResolve: options.skipResolve,
|
|
59
|
+
skipNodeModulesBundle: ctx.config.build.skipNodeModulesBundle,
|
|
60
|
+
external: ctx.config.build.external,
|
|
61
|
+
noExternal: ctx.config.build.noExternal
|
|
62
|
+
});
|
|
63
|
+
if (result) {
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
66
|
+
return ctx.$$internal.callHook("resolveId", {
|
|
67
|
+
sequential: true,
|
|
68
|
+
result: "first",
|
|
69
|
+
order: "post"
|
|
70
|
+
}, id, importer, opts);
|
|
71
|
+
})();
|
|
72
|
+
if (resolved && opts.isEntry && ctx.config.build.polyfill && ctx.config.build.polyfill.length > 0) {
|
|
73
|
+
const entry = ctx.entry.find((entry2) => entry2.file === (isString(resolved) ? resolved : resolved.id));
|
|
74
|
+
if (entry) {
|
|
75
|
+
entry.file = `${replaceExtension(isString(resolved) ? resolved : resolved.id)}-polyfill.ts`;
|
|
76
|
+
entry.output ||= entry.output?.replace(findFileName(entry.output, {
|
|
77
|
+
withExtension: true
|
|
78
|
+
}), entry.file);
|
|
79
|
+
await ctx.emitEntry(`
|
|
80
|
+
${ctx.config.build.polyfill.map((p) => `import "${p}";`).join("\n")}
|
|
81
|
+
|
|
82
|
+
export * from "${isString(resolved) ? resolved : resolved.id}";
|
|
83
|
+
`, entry.file, {
|
|
84
|
+
mode: "virtual"
|
|
85
|
+
});
|
|
86
|
+
return entry.file;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return resolved;
|
|
90
|
+
}
|
|
91
|
+
__name(resolveId, "resolveId");
|
|
92
|
+
async function load(id) {
|
|
93
|
+
let result = await ctx.$$internal.callHook("load", {
|
|
94
|
+
sequential: true,
|
|
95
|
+
result: "first",
|
|
96
|
+
order: "pre"
|
|
97
|
+
}, id);
|
|
98
|
+
if (result) {
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
result = await ctx.$$internal.callHook("load", {
|
|
102
|
+
sequential: true,
|
|
103
|
+
result: "first",
|
|
104
|
+
order: "normal"
|
|
105
|
+
}, id);
|
|
106
|
+
if (result) {
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
if (id) {
|
|
110
|
+
const resolvedPath = ctx.fs.resolve(id);
|
|
111
|
+
if (resolvedPath) {
|
|
112
|
+
return ctx.fs.readFile(resolvedPath);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return ctx.$$internal.callHook("load", {
|
|
116
|
+
sequential: true,
|
|
117
|
+
result: "first",
|
|
118
|
+
order: "post"
|
|
119
|
+
}, id);
|
|
120
|
+
}
|
|
121
|
+
__name(load, "load");
|
|
122
|
+
async function transform(code, id) {
|
|
123
|
+
let transformed = code;
|
|
124
|
+
for (const handler of ctx.$$internal.environment.selectHooks("transform")) {
|
|
125
|
+
const result = await handler.apply(combineContexts(ctx, this), [
|
|
126
|
+
getString(transformed),
|
|
127
|
+
id
|
|
128
|
+
]);
|
|
129
|
+
if (result) {
|
|
130
|
+
transformed = result;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return transformed;
|
|
134
|
+
}
|
|
135
|
+
__name(transform, "transform");
|
|
136
|
+
async function buildEnd() {
|
|
137
|
+
log(LogLevelLabel.DEBUG, "Powerlines build plugin finishing...");
|
|
138
|
+
return ctx.$$internal.callHook("buildEnd", {
|
|
139
|
+
sequential: true
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
__name(buildEnd, "buildEnd");
|
|
143
|
+
async function writeBundle() {
|
|
144
|
+
log(LogLevelLabel.DEBUG, "Finalizing Powerlines project output...");
|
|
145
|
+
return ctx.$$internal.callHook("writeBundle", {
|
|
146
|
+
sequential: true
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
__name(writeBundle, "writeBundle");
|
|
150
|
+
return {
|
|
151
|
+
name: "powerlines",
|
|
152
|
+
api: ctx.$$internal.api,
|
|
153
|
+
resolveId: {
|
|
154
|
+
filter: {
|
|
155
|
+
id: {
|
|
156
|
+
include: [
|
|
157
|
+
/.*/
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
handler: resolveId
|
|
162
|
+
},
|
|
163
|
+
load: {
|
|
164
|
+
filter: {
|
|
165
|
+
id: {
|
|
166
|
+
include: [
|
|
167
|
+
/.*/
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
handler: load
|
|
172
|
+
},
|
|
173
|
+
transform,
|
|
174
|
+
buildStart,
|
|
175
|
+
buildEnd,
|
|
176
|
+
writeBundle,
|
|
177
|
+
vite: {
|
|
178
|
+
sharedDuringBuild: true
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
} catch (error) {
|
|
182
|
+
log(LogLevelLabel.FATAL, error?.message);
|
|
183
|
+
throw error;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
__name(createUnplugin, "createUnplugin");
|
|
188
|
+
|
|
189
|
+
export { createUnplugin };
|
package/dist/vite.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkI7G24RUE_cjs = require('./chunk-I7G24RUE.cjs');
|
|
6
6
|
require('./chunk-5IBA5HC2.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-32NXGMLQ.cjs');
|
|
8
|
+
require('./chunk-V732KPW6.cjs');
|
|
9
9
|
require('./chunk-ETKZMGLN.cjs');
|
|
10
10
|
require('./chunk-PAMSESZV.cjs');
|
|
11
11
|
require('./chunk-AYKZK666.cjs');
|
|
@@ -15,13 +15,13 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "default", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkI7G24RUE_cjs.vite_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "module.exports", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkI7G24RUE_cjs.vite; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "vite", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkI7G24RUE_cjs.vite; }
|
|
27
27
|
});
|
package/dist/vite.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _vite from 'vite';
|
|
2
2
|
import { X as ViteUserConfig } from './resolved-C00CJgsk.cjs';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import '@stryke/types/configuration';
|
|
@@ -49,6 +49,6 @@ import 'typescript';
|
|
|
49
49
|
* })
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
|
-
declare const vite: (options: Partial<ViteUserConfig>) =>
|
|
52
|
+
declare const vite: (options: Partial<ViteUserConfig>) => _vite.Plugin<any> | _vite.Plugin<any>[];
|
|
53
53
|
|
|
54
54
|
export { vite as "module.exports", vite as default, vite };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _vite from 'vite';
|
|
2
2
|
import { X as ViteUserConfig } from './resolved-DKFZ11S7.js';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import '@stryke/types/configuration';
|
|
@@ -49,6 +49,6 @@ import 'typescript';
|
|
|
49
49
|
* })
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
|
-
declare const vite: (options: Partial<ViteUserConfig>) =>
|
|
52
|
+
declare const vite: (options: Partial<ViteUserConfig>) => _vite.Plugin<any> | _vite.Plugin<any>[];
|
|
53
53
|
|
|
54
54
|
export { vite as "module.exports", vite as default, vite };
|
package/dist/vite.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { vite_default as default, vite as "module.exports", vite } from './chunk-
|
|
1
|
+
export { vite_default as default, vite as "module.exports", vite } from './chunk-CSSV6ES3.js';
|
|
2
2
|
import './chunk-VBR53KGY.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-QXTSQTX5.js';
|
|
4
|
+
import './chunk-NVNBOUXL.js';
|
|
5
5
|
import './chunk-JQCWV4DT.js';
|
|
6
6
|
import './chunk-JKBJF3UI.js';
|
|
7
7
|
import './chunk-VT7NVLLU.js';
|
package/dist/webpack.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
5
|
+
var chunk4TAIQVJG_cjs = require('./chunk-4TAIQVJG.cjs');
|
|
6
|
+
require('./chunk-32NXGMLQ.cjs');
|
|
7
|
+
require('./chunk-V732KPW6.cjs');
|
|
8
8
|
require('./chunk-ETKZMGLN.cjs');
|
|
9
9
|
require('./chunk-PAMSESZV.cjs');
|
|
10
10
|
require('./chunk-AYKZK666.cjs');
|
|
@@ -14,13 +14,13 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "default", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk4TAIQVJG_cjs.webpack_default; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "module.exports", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk4TAIQVJG_cjs.webpack; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "webpack", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk4TAIQVJG_cjs.webpack; }
|
|
26
26
|
});
|
package/dist/webpack.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _webpack from 'webpack';
|
|
2
2
|
import { M as WebpackUserConfig } from './resolved-C00CJgsk.cjs';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import '@stryke/types/configuration';
|
|
@@ -49,6 +49,6 @@ import 'typescript';
|
|
|
49
49
|
* }
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
|
-
declare const webpack: (options: Partial<WebpackUserConfig>) =>
|
|
52
|
+
declare const webpack: (options: Partial<WebpackUserConfig>) => _webpack.WebpackPluginInstance;
|
|
53
53
|
|
|
54
54
|
export { webpack as "module.exports", webpack as default, webpack };
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _webpack from 'webpack';
|
|
2
2
|
import { M as WebpackUserConfig } from './resolved-DKFZ11S7.js';
|
|
3
3
|
import '@stryke/types/base';
|
|
4
4
|
import '@stryke/types/configuration';
|
|
@@ -49,6 +49,6 @@ import 'typescript';
|
|
|
49
49
|
* }
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
|
-
declare const webpack: (options: Partial<WebpackUserConfig>) =>
|
|
52
|
+
declare const webpack: (options: Partial<WebpackUserConfig>) => _webpack.WebpackPluginInstance;
|
|
53
53
|
|
|
54
54
|
export { webpack as "module.exports", webpack as default, webpack };
|
package/dist/webpack.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { webpack_default as default, webpack as "module.exports", webpack } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { webpack_default as default, webpack as "module.exports", webpack } from './chunk-6CYDJ53Z.js';
|
|
2
|
+
import './chunk-QXTSQTX5.js';
|
|
3
|
+
import './chunk-NVNBOUXL.js';
|
|
4
4
|
import './chunk-JQCWV4DT.js';
|
|
5
5
|
import './chunk-JKBJF3UI.js';
|
|
6
6
|
import './chunk-VT7NVLLU.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerlines",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The \"any framework\" framework that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.",
|
|
6
6
|
"repository": {
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
"memfs": "^4.51.0",
|
|
546
546
|
"unionfs": "^4.6.0",
|
|
547
547
|
"unplugin": "^2.3.10",
|
|
548
|
-
"unstorage": "^1.17.
|
|
548
|
+
"unstorage": "^1.17.3",
|
|
549
549
|
"vite": "^7.2.4"
|
|
550
550
|
},
|
|
551
551
|
"devDependencies": {
|
|
@@ -566,5 +566,5 @@
|
|
|
566
566
|
"typescript": "^5.9.3"
|
|
567
567
|
},
|
|
568
568
|
"publishConfig": { "access": "public" },
|
|
569
|
-
"gitHead": "
|
|
569
|
+
"gitHead": "76575e78b1db97f4786341913ad2ec42ec1de504"
|
|
570
570
|
}
|
package/dist/chunk-33BDG6M5.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { esbuild_default } from './chunk-W36NC3B7.js';
|
|
2
|
-
import { __name } from './chunk-SHUYVCID.js';
|
|
3
|
-
import { omit } from '@stryke/helpers/omit';
|
|
4
|
-
|
|
5
|
-
function tsup(options = {}) {
|
|
6
|
-
return {
|
|
7
|
-
...options,
|
|
8
|
-
esbuildPlugins: [
|
|
9
|
-
esbuild_default({
|
|
10
|
-
output: {
|
|
11
|
-
outputPath: options.outDir,
|
|
12
|
-
format: options.format
|
|
13
|
-
},
|
|
14
|
-
build: {
|
|
15
|
-
...omit(options, [
|
|
16
|
-
"plugins",
|
|
17
|
-
"banner",
|
|
18
|
-
"footer",
|
|
19
|
-
"outExtension",
|
|
20
|
-
"outDir",
|
|
21
|
-
"format",
|
|
22
|
-
"minify",
|
|
23
|
-
"pure",
|
|
24
|
-
"inject"
|
|
25
|
-
]),
|
|
26
|
-
minify: Boolean(options.minify),
|
|
27
|
-
pure: Array.isArray(options.pure) ? options.pure : typeof options.pure === "string" ? [
|
|
28
|
-
options.pure
|
|
29
|
-
] : []
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
]
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
__name(tsup, "tsup");
|
|
36
|
-
var tsup_default = tsup;
|
|
37
|
-
|
|
38
|
-
export { tsup, tsup_default };
|
package/dist/chunk-3HOOIAF4.js
DELETED
package/dist/chunk-AK5B45AH.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { vite_default } from './chunk-XWBVMNBI.js';
|
|
2
|
-
import { __name } from './chunk-SHUYVCID.js';
|
|
3
|
-
|
|
4
|
-
// src/astro.ts
|
|
5
|
-
var astro = /* @__PURE__ */ __name((config) => ({
|
|
6
|
-
vite: {
|
|
7
|
-
plugins: [
|
|
8
|
-
vite_default(config)
|
|
9
|
-
]
|
|
10
|
-
}
|
|
11
|
-
}), "astro");
|
|
12
|
-
var astro_default = astro;
|
|
13
|
-
|
|
14
|
-
export { astro, astro_default };
|
package/dist/chunk-GHHMURR4.js
DELETED
package/dist/chunk-GXJ5L37C.cjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkI3EUY74Q_cjs = require('./chunk-I3EUY74Q.cjs');
|
|
4
|
-
var unplugin = require('unplugin');
|
|
5
|
-
|
|
6
|
-
var unloader = unplugin.createUnloaderPlugin(chunkI3EUY74Q_cjs.createUnpluginFactory("unloader"));
|
|
7
|
-
var unloader_default = unloader;
|
|
8
|
-
|
|
9
|
-
exports.unloader = unloader;
|
|
10
|
-
exports.unloader_default = unloader_default;
|
package/dist/chunk-IVABRCNA.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { rolldown_default } from './chunk-3HOOIAF4.js';
|
|
2
|
-
import { rollup_default } from './chunk-XDNNFAQR.js';
|
|
3
|
-
import { rspack_default } from './chunk-ZOMJH52N.js';
|
|
4
|
-
import { tsup_default } from './chunk-33BDG6M5.js';
|
|
5
|
-
import { unloader_default } from './chunk-GHHMURR4.js';
|
|
6
|
-
import { astro_default } from './chunk-AK5B45AH.js';
|
|
7
|
-
import { esbuild_default } from './chunk-W36NC3B7.js';
|
|
8
|
-
import { next_default } from './chunk-TSKJTJ2P.js';
|
|
9
|
-
import { nuxt_default } from './chunk-M7N6RX2H.js';
|
|
10
|
-
import { vite_default } from './chunk-XWBVMNBI.js';
|
|
11
|
-
import { webpack_default } from './chunk-5CCEQUAZ.js';
|
|
12
|
-
|
|
13
|
-
// src/unplugin.ts
|
|
14
|
-
var plugins = {
|
|
15
|
-
astro: astro_default,
|
|
16
|
-
esbuild: esbuild_default,
|
|
17
|
-
next: next_default,
|
|
18
|
-
nuxt: nuxt_default,
|
|
19
|
-
rolldown: rolldown_default,
|
|
20
|
-
rollup: rollup_default,
|
|
21
|
-
rspack: rspack_default,
|
|
22
|
-
tsup: tsup_default,
|
|
23
|
-
unloader: unloader_default,
|
|
24
|
-
vite: vite_default,
|
|
25
|
-
webpack: webpack_default
|
|
26
|
-
};
|
|
27
|
-
var unplugin_default = plugins;
|
|
28
|
-
|
|
29
|
-
export { plugins, unplugin_default };
|
package/dist/chunk-JJXDDTSL.cjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkVRFJDHDN_cjs = require('./chunk-VRFJDHDN.cjs');
|
|
4
|
-
var chunkQ3ZFML4W_cjs = require('./chunk-Q3ZFML4W.cjs');
|
|
5
|
-
var kit = require('@nuxt/kit');
|
|
6
|
-
require('@nuxt/schema');
|
|
7
|
-
|
|
8
|
-
var nuxt = kit.defineNuxtModule({
|
|
9
|
-
meta: {
|
|
10
|
-
name: "powerlines",
|
|
11
|
-
configKey: "storm"
|
|
12
|
-
},
|
|
13
|
-
defaults: {},
|
|
14
|
-
setup(options, _nuxt) {
|
|
15
|
-
kit.addVitePlugin(() => chunkVRFJDHDN_cjs.vite_default(options));
|
|
16
|
-
kit.addWebpackPlugin(() => chunkQ3ZFML4W_cjs.webpack_default(options));
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
var nuxt_default = nuxt;
|
|
20
|
-
|
|
21
|
-
exports.nuxt = nuxt;
|
|
22
|
-
exports.nuxt_default = nuxt_default;
|
package/dist/chunk-K5TOHSUD.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkVRFJDHDN_cjs = require('./chunk-VRFJDHDN.cjs');
|
|
4
|
-
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
|
-
|
|
6
|
-
// src/astro.ts
|
|
7
|
-
var astro = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((config) => ({
|
|
8
|
-
vite: {
|
|
9
|
-
plugins: [
|
|
10
|
-
chunkVRFJDHDN_cjs.vite_default(config)
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}), "astro");
|
|
14
|
-
var astro_default = astro;
|
|
15
|
-
|
|
16
|
-
exports.astro = astro;
|
|
17
|
-
exports.astro_default = astro_default;
|
package/dist/chunk-M7N6RX2H.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { vite_default } from './chunk-XWBVMNBI.js';
|
|
2
|
-
import { webpack_default } from './chunk-5CCEQUAZ.js';
|
|
3
|
-
import { defineNuxtModule, addVitePlugin, addWebpackPlugin } from '@nuxt/kit';
|
|
4
|
-
import '@nuxt/schema';
|
|
5
|
-
|
|
6
|
-
var nuxt = defineNuxtModule({
|
|
7
|
-
meta: {
|
|
8
|
-
name: "powerlines",
|
|
9
|
-
configKey: "storm"
|
|
10
|
-
},
|
|
11
|
-
defaults: {},
|
|
12
|
-
setup(options, _nuxt) {
|
|
13
|
-
addVitePlugin(() => vite_default(options));
|
|
14
|
-
addWebpackPlugin(() => webpack_default(options));
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
var nuxt_default = nuxt;
|
|
18
|
-
|
|
19
|
-
export { nuxt, nuxt_default };
|