powerlines 0.23.5 → 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.
Files changed (159) hide show
  1. package/dist/api.cjs +2 -2
  2. package/dist/api.js +1 -1
  3. package/dist/astro.cjs +16 -18
  4. package/dist/astro.js +16 -5
  5. package/dist/{chunk-I3EUY74Q.cjs → chunk-32NXGMLQ.cjs} +20 -18
  6. package/dist/{chunk-Q3ZFML4W.cjs → chunk-4TAIQVJG.cjs} +2 -2
  7. package/dist/{chunk-5CCEQUAZ.js → chunk-6CYDJ53Z.js} +1 -1
  8. package/dist/{chunk-XWBVMNBI.js → chunk-CSSV6ES3.js} +1 -1
  9. package/dist/{chunk-VRFJDHDN.cjs → chunk-I7G24RUE.cjs} +2 -2
  10. package/dist/{chunk-E4M4KEL3.js → chunk-NVNBOUXL.js} +1 -1
  11. package/dist/{chunk-GZNJUK7U.js → chunk-QXTSQTX5.js} +17 -17
  12. package/dist/{chunk-W36NC3B7.js → chunk-RQAKTG6M.js} +1 -1
  13. package/dist/{chunk-62BQYRPM.cjs → chunk-V732KPW6.cjs} +1 -0
  14. package/dist/{chunk-4OAW547A.cjs → chunk-ZUQDWAUO.cjs} +2 -2
  15. package/dist/esbuild.cjs +6 -6
  16. package/dist/esbuild.js +3 -3
  17. package/dist/farm.cjs +3 -3
  18. package/dist/farm.js +2 -2
  19. package/dist/index.cjs +14 -32
  20. package/dist/index.d.cts +0 -8
  21. package/dist/index.d.ts +0 -8
  22. package/dist/index.js +2 -16
  23. package/dist/lib/{api-CD2QlMig.d.cts → api-BJ7F7DmT.d.ts} +1 -1
  24. package/dist/lib/{api-B6hfFxVS.d.ts → api-Bwwdt0YR.d.cts} +1 -1
  25. package/dist/lib/build/esbuild.d.cts +1 -1
  26. package/dist/lib/build/esbuild.d.ts +1 -1
  27. package/dist/lib/build/index.d.cts +3 -3
  28. package/dist/lib/build/index.d.ts +3 -3
  29. package/dist/lib/build/rolldown.d.cts +1 -1
  30. package/dist/lib/build/rolldown.d.ts +1 -1
  31. package/dist/lib/build/rollup.d.cts +1 -1
  32. package/dist/lib/build/rollup.d.ts +1 -1
  33. package/dist/lib/build/rspack.d.cts +1 -1
  34. package/dist/lib/build/rspack.d.ts +1 -1
  35. package/dist/lib/build/tsup.d.cts +1 -1
  36. package/dist/lib/build/tsup.d.ts +1 -1
  37. package/dist/lib/build/unbuild.d.cts +3 -3
  38. package/dist/lib/build/unbuild.d.ts +3 -3
  39. package/dist/lib/build/vite.d.cts +1 -1
  40. package/dist/lib/build/vite.d.ts +1 -1
  41. package/dist/lib/build/webpack.d.cts +1 -1
  42. package/dist/lib/build/webpack.d.ts +1 -1
  43. package/dist/lib/{config-DeUaQYc_.d.ts → config-CFZYRPQj.d.ts} +1 -1
  44. package/dist/lib/{config-DTSdCZsw.d.cts → config-CxONCKEx.d.cts} +1 -1
  45. package/dist/lib/config-file.d.cts +1 -1
  46. package/dist/lib/config-file.d.ts +1 -1
  47. package/dist/lib/contexts/api-context.d.cts +3 -3
  48. package/dist/lib/contexts/api-context.d.ts +3 -3
  49. package/dist/lib/contexts/context.d.cts +3 -3
  50. package/dist/lib/contexts/context.d.ts +3 -3
  51. package/dist/lib/contexts/environment-context.d.cts +3 -3
  52. package/dist/lib/contexts/environment-context.d.ts +3 -3
  53. package/dist/lib/contexts/index.d.cts +3 -3
  54. package/dist/lib/contexts/index.d.ts +3 -3
  55. package/dist/lib/contexts/plugin-context.d.cts +3 -3
  56. package/dist/lib/contexts/plugin-context.d.ts +3 -3
  57. package/dist/lib/entry.d.cts +1 -1
  58. package/dist/lib/entry.d.ts +1 -1
  59. package/dist/lib/index.d.cts +4 -3
  60. package/dist/lib/index.d.ts +4 -3
  61. package/dist/lib/{internal-ypnrUNZy.d.cts → internal-9D9Up5pT.d.cts} +2 -2
  62. package/dist/lib/{internal-CpVMJCaU.d.ts → internal-kEzuoIrl.d.ts} +2 -2
  63. package/dist/lib/logger.d.cts +1 -1
  64. package/dist/lib/logger.d.ts +1 -1
  65. package/dist/lib/typescript/compiler-host.d.cts +1 -1
  66. package/dist/lib/typescript/compiler-host.d.ts +1 -1
  67. package/dist/lib/typescript/import-transformer.d.cts +1 -1
  68. package/dist/lib/typescript/import-transformer.d.ts +1 -1
  69. package/dist/lib/typescript/index.d.cts +1 -1
  70. package/dist/lib/typescript/index.d.ts +1 -1
  71. package/dist/lib/typescript/program.d.cts +1 -1
  72. package/dist/lib/typescript/program.d.ts +1 -1
  73. package/dist/lib/typescript/ts-morph.d.cts +1 -1
  74. package/dist/lib/typescript/ts-morph.d.ts +1 -1
  75. package/dist/lib/unplugin/factory.d.cts +4 -16
  76. package/dist/lib/unplugin/factory.d.ts +4 -16
  77. package/dist/lib/unplugin/helpers.d.cts +1 -1
  78. package/dist/lib/unplugin/helpers.d.ts +1 -1
  79. package/dist/lib/unplugin/index.d.cts +3 -2
  80. package/dist/lib/unplugin/index.d.ts +3 -2
  81. package/dist/lib/unplugin/plugin.d.cts +5 -3
  82. package/dist/lib/unplugin/plugin.d.ts +5 -3
  83. package/dist/lib/unplugin/resolve-id.d.cts +1 -1
  84. package/dist/lib/unplugin/resolve-id.d.ts +1 -1
  85. package/dist/lib/unplugin-BdLs3dwd.d.cts +18 -0
  86. package/dist/lib/unplugin-tmNrQvUk.d.ts +18 -0
  87. package/dist/lib/utilities/bundle.d.cts +1 -1
  88. package/dist/lib/utilities/bundle.d.ts +1 -1
  89. package/dist/lib/utilities/cache.d.cts +1 -1
  90. package/dist/lib/utilities/cache.d.ts +1 -1
  91. package/dist/lib/utilities/file-header.d.cts +1 -1
  92. package/dist/lib/utilities/file-header.d.ts +1 -1
  93. package/dist/lib/utilities/index.d.cts +1 -1
  94. package/dist/lib/utilities/index.d.ts +1 -1
  95. package/dist/lib/utilities/meta.d.cts +1 -1
  96. package/dist/lib/utilities/meta.d.ts +1 -1
  97. package/dist/lib/utilities/resolve-path.d.cts +1 -1
  98. package/dist/lib/utilities/resolve-path.d.ts +1 -1
  99. package/dist/lib/utilities/resolve.d.cts +1 -1
  100. package/dist/lib/utilities/resolve.d.ts +1 -1
  101. package/dist/lib/utilities/source-file.d.cts +1 -1
  102. package/dist/lib/utilities/source-file.d.ts +1 -1
  103. package/dist/lib/utilities/source-map.d.cts +1 -1
  104. package/dist/lib/utilities/source-map.d.ts +1 -1
  105. package/dist/lib/utilities/worker.d.cts +1 -1
  106. package/dist/lib/utilities/worker.d.ts +1 -1
  107. package/dist/lib/utilities/write-file.d.cts +1 -1
  108. package/dist/lib/utilities/write-file.d.ts +1 -1
  109. package/dist/next.cjs +21 -18
  110. package/dist/next.js +21 -5
  111. package/dist/nuxt.cjs +21 -18
  112. package/dist/nuxt.js +21 -5
  113. package/dist/rolldown.cjs +8 -16
  114. package/dist/rolldown.d.cts +2 -2
  115. package/dist/rolldown.d.ts +2 -2
  116. package/dist/rolldown.js +8 -3
  117. package/dist/rollup.cjs +8 -16
  118. package/dist/rollup.d.cts +2 -2
  119. package/dist/rollup.d.ts +2 -2
  120. package/dist/rollup.js +8 -3
  121. package/dist/rspack.cjs +8 -16
  122. package/dist/rspack.js +8 -3
  123. package/dist/tsup.cjs +40 -18
  124. package/dist/tsup.js +40 -5
  125. package/dist/unloader.cjs +8 -16
  126. package/dist/unloader.d.cts +2 -2
  127. package/dist/unloader.d.ts +2 -2
  128. package/dist/unloader.js +8 -3
  129. package/dist/unplugin.cjs +186 -26
  130. package/dist/unplugin.d.cts +58 -35
  131. package/dist/unplugin.d.ts +58 -35
  132. package/dist/unplugin.js +186 -16
  133. package/dist/vite.cjs +6 -6
  134. package/dist/vite.d.cts +2 -2
  135. package/dist/vite.d.ts +2 -2
  136. package/dist/vite.js +3 -3
  137. package/dist/webpack.cjs +6 -6
  138. package/dist/webpack.d.cts +2 -2
  139. package/dist/webpack.d.ts +2 -2
  140. package/dist/webpack.js +3 -3
  141. package/package.json +4 -6
  142. package/dist/chunk-33BDG6M5.js +0 -38
  143. package/dist/chunk-3HOOIAF4.js +0 -7
  144. package/dist/chunk-AK5B45AH.js +0 -14
  145. package/dist/chunk-GHHMURR4.js +0 -7
  146. package/dist/chunk-GXJ5L37C.cjs +0 -10
  147. package/dist/chunk-IVABRCNA.js +0 -29
  148. package/dist/chunk-JJXDDTSL.cjs +0 -22
  149. package/dist/chunk-K5TOHSUD.cjs +0 -17
  150. package/dist/chunk-M7N6RX2H.js +0 -19
  151. package/dist/chunk-MAOXZVDE.cjs +0 -22
  152. package/dist/chunk-NWZXH2HK.cjs +0 -10
  153. package/dist/chunk-PFECSHR6.cjs +0 -41
  154. package/dist/chunk-RM37JA3L.cjs +0 -32
  155. package/dist/chunk-RVO5GC2H.cjs +0 -10
  156. package/dist/chunk-TSKJTJ2P.js +0 -19
  157. package/dist/chunk-XDNNFAQR.js +0 -7
  158. package/dist/chunk-YBOJFFO2.cjs +0 -10
  159. package/dist/chunk-ZOMJH52N.js +0 -7
@@ -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
- * An object containing all Powerlines plugins for various build tools and frameworks.
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 const plugins: {
60
- readonly astro: (config: Partial<Omit<ViteResolvedConfig["userConfig"], "variant">>) => astro.AstroUserConfig;
61
- readonly esbuild: (options: Partial<ESBuildUserConfig>) => _esbuild.Plugin;
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 { createUnpluginFactory, plugins as default, plugins };
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
- export { unplugin_default as default, plugins } from './chunk-IVABRCNA.js';
2
- import './chunk-3HOOIAF4.js';
3
- import './chunk-XDNNFAQR.js';
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 chunkVRFJDHDN_cjs = require('./chunk-VRFJDHDN.cjs');
5
+ var chunkI7G24RUE_cjs = require('./chunk-I7G24RUE.cjs');
6
6
  require('./chunk-5IBA5HC2.cjs');
7
- require('./chunk-I3EUY74Q.cjs');
8
- require('./chunk-62BQYRPM.cjs');
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 chunkVRFJDHDN_cjs.vite_default; }
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 chunkVRFJDHDN_cjs.vite; }
22
+ get: function () { return chunkI7G24RUE_cjs.vite; }
23
23
  });
24
24
  Object.defineProperty(exports, "vite", {
25
25
  enumerable: true,
26
- get: function () { return chunkVRFJDHDN_cjs.vite; }
26
+ get: function () { return chunkI7G24RUE_cjs.vite; }
27
27
  });
package/dist/vite.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import * as vite$1 from 'vite';
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>) => vite$1.Plugin<any> | vite$1.Plugin<any>[];
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 vite$1 from 'vite';
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>) => vite$1.Plugin<any> | vite$1.Plugin<any>[];
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-XWBVMNBI.js';
1
+ export { vite_default as default, vite as "module.exports", vite } from './chunk-CSSV6ES3.js';
2
2
  import './chunk-VBR53KGY.js';
3
- import './chunk-GZNJUK7U.js';
4
- import './chunk-E4M4KEL3.js';
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 chunkQ3ZFML4W_cjs = require('./chunk-Q3ZFML4W.cjs');
6
- require('./chunk-I3EUY74Q.cjs');
7
- require('./chunk-62BQYRPM.cjs');
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 chunkQ3ZFML4W_cjs.webpack_default; }
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 chunkQ3ZFML4W_cjs.webpack; }
21
+ get: function () { return chunk4TAIQVJG_cjs.webpack; }
22
22
  });
23
23
  Object.defineProperty(exports, "webpack", {
24
24
  enumerable: true,
25
- get: function () { return chunkQ3ZFML4W_cjs.webpack; }
25
+ get: function () { return chunk4TAIQVJG_cjs.webpack; }
26
26
  });
@@ -1,4 +1,4 @@
1
- import * as webpack$1 from 'webpack';
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>) => webpack$1.WebpackPluginInstance;
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 webpack$1 from 'webpack';
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>) => webpack$1.WebpackPluginInstance;
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-5CCEQUAZ.js';
2
- import './chunk-GZNJUK7U.js';
3
- import './chunk-E4M4KEL3.js';
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.5",
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": {
@@ -538,15 +538,14 @@
538
538
  "jest-worker": "^30.2.0",
539
539
  "jiti": "^2.6.1",
540
540
  "magic-string": "^0.30.21",
541
- "nanotar": "^0.2.0",
542
- "oxc-parser": "^0.95.0",
543
541
  "prettier": "^3.6.2",
544
542
  "rollup-plugin-typescript2": "^0.36.0",
545
543
  "ts-morph": "^27.0.2",
546
544
  "unimport": "^5.5.0",
545
+ "memfs": "^4.51.0",
547
546
  "unionfs": "^4.6.0",
548
547
  "unplugin": "^2.3.10",
549
- "unstorage": "^1.17.2",
548
+ "unstorage": "^1.17.3",
550
549
  "vite": "^7.2.4"
551
550
  },
552
551
  "devDependencies": {
@@ -562,11 +561,10 @@
562
561
  "@types/node": "^24.10.1",
563
562
  "@types/semver": "^7.7.1",
564
563
  "eslint": "^9.39.1",
565
- "memfs": "^4.51.0",
566
564
  "minimatch": "^10.1.1",
567
565
  "tsup": "8.4.0",
568
566
  "typescript": "^5.9.3"
569
567
  },
570
568
  "publishConfig": { "access": "public" },
571
- "gitHead": "50a08b483769a727b5d7c3a2f38e022e21ee915d"
569
+ "gitHead": "76575e78b1db97f4786341913ad2ec42ec1de504"
572
570
  }
@@ -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 };
@@ -1,7 +0,0 @@
1
- import { createUnpluginFactory } from './chunk-GZNJUK7U.js';
2
- import { createRolldownPlugin } from 'unplugin';
3
-
4
- var rolldown = createRolldownPlugin(createUnpluginFactory("rolldown"));
5
- var rolldown_default = rolldown;
6
-
7
- export { rolldown, rolldown_default };
@@ -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 };
@@ -1,7 +0,0 @@
1
- import { createUnpluginFactory } from './chunk-GZNJUK7U.js';
2
- import { createUnloaderPlugin } from 'unplugin';
3
-
4
- var unloader = createUnloaderPlugin(createUnpluginFactory("unloader"));
5
- var unloader_default = unloader;
6
-
7
- export { unloader, unloader_default };
@@ -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;
@@ -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 };
@@ -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;
@@ -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;