powerlines 0.41.6 → 0.41.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 (234) hide show
  1. package/README.md +14 -16
  2. package/dist/{api-CY668wMZ.mjs → api-6f2oVwGy.mjs} +142 -333
  3. package/dist/api-6f2oVwGy.mjs.map +1 -0
  4. package/dist/{api-GPlMYw0d.cjs → api-CFXLaAxU.cjs} +505 -722
  5. package/dist/astro.cjs +8 -18
  6. package/dist/astro.d.cts +1 -2
  7. package/dist/astro.d.cts.map +1 -1
  8. package/dist/astro.d.mts +1 -6
  9. package/dist/astro.d.mts.map +1 -1
  10. package/dist/astro.mjs +6 -16
  11. package/dist/astro.mjs.map +1 -1
  12. package/dist/{chunk-CbDLau6x.cjs → chunk-AIJqnxB6.cjs} +27 -1
  13. package/dist/chunk-CtajNgzt.mjs +36 -0
  14. package/dist/config.cjs +20 -4
  15. package/dist/config.d.cts +1 -2
  16. package/dist/config.d.mts +1 -3
  17. package/dist/config.mjs +11 -2
  18. package/dist/config.mjs.map +1 -0
  19. package/dist/constants.cjs +20 -20
  20. package/dist/constants.d.cts +1 -24
  21. package/dist/constants.d.mts +1 -24
  22. package/dist/constants.mjs +11 -3
  23. package/dist/constants.mjs.map +1 -0
  24. package/dist/context/index.cjs +4 -9
  25. package/dist/context/index.d.cts +56 -132
  26. package/dist/context/index.d.cts.map +1 -1
  27. package/dist/context/index.d.mts +55 -135
  28. package/dist/context/index.d.mts.map +1 -1
  29. package/dist/context/index.mjs +3 -9
  30. package/dist/esbuild.cjs +60 -17
  31. package/dist/esbuild.d.cts +5 -29
  32. package/dist/esbuild.d.cts.map +1 -1
  33. package/dist/esbuild.d.mts +5 -33
  34. package/dist/esbuild.d.mts.map +1 -1
  35. package/dist/esbuild.mjs +44 -12
  36. package/dist/esbuild.mjs.map +1 -0
  37. package/dist/farm.cjs +6 -13
  38. package/dist/farm.d.cts +2 -3
  39. package/dist/farm.d.cts.map +1 -1
  40. package/dist/farm.d.mts +2 -6
  41. package/dist/farm.d.mts.map +1 -1
  42. package/dist/farm.mjs +4 -11
  43. package/dist/farm.mjs.map +1 -1
  44. package/dist/index.cjs +7 -13
  45. package/dist/index.d.cts +263 -6
  46. package/dist/index.d.cts.map +1 -0
  47. package/dist/index.d.mts +263 -7
  48. package/dist/index.d.mts.map +1 -0
  49. package/dist/index.mjs +3 -9
  50. package/dist/index.mjs.map +1 -1
  51. package/dist/next.cjs +7 -14
  52. package/dist/next.d.cts +0 -1
  53. package/dist/next.d.cts.map +1 -1
  54. package/dist/next.d.mts +0 -1
  55. package/dist/next.d.mts.map +1 -1
  56. package/dist/next.mjs +6 -13
  57. package/dist/next.mjs.map +1 -1
  58. package/dist/nuxt.cjs +12 -22
  59. package/dist/nuxt.d.cts +2 -3
  60. package/dist/nuxt.d.cts.map +1 -1
  61. package/dist/nuxt.d.mts +2 -7
  62. package/dist/nuxt.d.mts.map +1 -1
  63. package/dist/nuxt.mjs +8 -18
  64. package/dist/nuxt.mjs.map +1 -1
  65. package/dist/plugin-utils.cjs +20 -28
  66. package/dist/plugin-utils.d.cts +1 -267
  67. package/dist/plugin-utils.d.mts +1 -272
  68. package/dist/plugin-utils.mjs +11 -4
  69. package/dist/plugin-utils.mjs.map +1 -0
  70. package/dist/rolldown.cjs +52 -18
  71. package/dist/rolldown.d.cts +5 -29
  72. package/dist/rolldown.d.cts.map +1 -1
  73. package/dist/rolldown.d.mts +5 -32
  74. package/dist/rolldown.d.mts.map +1 -1
  75. package/dist/rolldown.mjs +36 -13
  76. package/dist/rolldown.mjs.map +1 -0
  77. package/dist/rollup.cjs +20 -48
  78. package/dist/rollup.d.cts +5 -29
  79. package/dist/rollup.d.cts.map +1 -1
  80. package/dist/rollup.d.mts +5 -32
  81. package/dist/rollup.d.mts.map +1 -1
  82. package/dist/rollup.mjs +6 -44
  83. package/dist/rollup.mjs.map +1 -1
  84. package/dist/rspack.cjs +20 -82
  85. package/dist/rspack.d.cts +4 -24
  86. package/dist/rspack.d.cts.map +1 -1
  87. package/dist/rspack.d.mts +4 -27
  88. package/dist/rspack.d.mts.map +1 -1
  89. package/dist/rspack.mjs +5 -77
  90. package/dist/rspack.mjs.map +1 -1
  91. package/dist/storage/index.cjs +2 -3
  92. package/dist/storage/index.d.cts +7 -7
  93. package/dist/storage/index.d.cts.map +1 -1
  94. package/dist/storage/index.d.mts +7 -11
  95. package/dist/storage/index.d.mts.map +1 -1
  96. package/dist/storage/index.mjs +1 -3
  97. package/dist/{tsconfig-C8M8X6U0.cjs → tsconfig-BJrUrPC_.cjs} +13 -13
  98. package/dist/{tsconfig-B92heKit.mjs → tsconfig-D9GCB2I9.mjs} +5 -5
  99. package/dist/tsconfig-D9GCB2I9.mjs.map +1 -0
  100. package/dist/tsdown.cjs +38 -187
  101. package/dist/tsdown.d.cts +2 -24
  102. package/dist/tsdown.d.cts.map +1 -1
  103. package/dist/tsdown.d.mts +4 -30
  104. package/dist/tsdown.d.mts.map +1 -1
  105. package/dist/tsdown.mjs +8 -167
  106. package/dist/tsdown.mjs.map +1 -1
  107. package/dist/tsup.cjs +29 -134
  108. package/dist/tsup.d.cts +2 -24
  109. package/dist/tsup.d.cts.map +1 -1
  110. package/dist/tsup.d.mts +2 -28
  111. package/dist/tsup.d.mts.map +1 -1
  112. package/dist/tsup.mjs +7 -122
  113. package/dist/tsup.mjs.map +1 -1
  114. package/dist/types-DerAvFjs.d.cts +4 -0
  115. package/dist/types-DerAvFjs.d.cts.map +1 -0
  116. package/dist/types-ro7jWCtL.d.mts +4 -0
  117. package/dist/types-ro7jWCtL.d.mts.map +1 -0
  118. package/dist/typescript/index.cjs +2 -1
  119. package/dist/typescript/index.d.cts +2 -2
  120. package/dist/typescript/index.d.cts.map +1 -1
  121. package/dist/typescript/index.d.mts +1 -4
  122. package/dist/typescript/index.d.mts.map +1 -1
  123. package/dist/typescript/index.mjs +1 -1
  124. package/dist/unloader.cjs +6 -13
  125. package/dist/unloader.d.cts +2 -4
  126. package/dist/unloader.d.cts.map +1 -1
  127. package/dist/unloader.d.mts +2 -7
  128. package/dist/unloader.d.mts.map +1 -1
  129. package/dist/unloader.mjs +4 -11
  130. package/dist/unloader.mjs.map +1 -1
  131. package/dist/unplugin.cjs +11 -14
  132. package/dist/unplugin.d.cts +5 -6
  133. package/dist/unplugin.d.cts.map +1 -1
  134. package/dist/unplugin.d.mts +3 -6
  135. package/dist/unplugin.d.mts.map +1 -1
  136. package/dist/unplugin.mjs +6 -10
  137. package/dist/utils.cjs +38 -22
  138. package/dist/utils.d.cts +3 -2
  139. package/dist/utils.d.mts +3 -3
  140. package/dist/utils.mjs +19 -3
  141. package/dist/utils.mjs.map +1 -0
  142. package/dist/{virtual-B1MLgqnQ.cjs → virtual-Cbvj12lU.cjs} +33 -33
  143. package/dist/{virtual-B9imjOqe.mjs → virtual-DvkJm7gK.mjs} +7 -7
  144. package/dist/virtual-DvkJm7gK.mjs.map +1 -0
  145. package/dist/vite.cjs +84 -19
  146. package/dist/vite.d.cts +5 -16
  147. package/dist/vite.d.cts.map +1 -1
  148. package/dist/vite.d.mts +5 -19
  149. package/dist/vite.d.mts.map +1 -1
  150. package/dist/vite.mjs +67 -14
  151. package/dist/vite.mjs.map +1 -0
  152. package/dist/webpack.cjs +42 -16
  153. package/dist/webpack.d.cts +5 -29
  154. package/dist/webpack.d.cts.map +1 -1
  155. package/dist/webpack.d.mts +5 -32
  156. package/dist/webpack.d.mts.map +1 -1
  157. package/dist/webpack.mjs +26 -11
  158. package/dist/webpack.mjs.map +1 -0
  159. package/package.json +15 -15
  160. package/dist/api-CY668wMZ.mjs.map +0 -1
  161. package/dist/commands-7TWNqTU1.d.cts +0 -12
  162. package/dist/commands-7TWNqTU1.d.cts.map +0 -1
  163. package/dist/commands-yacLkOi0.d.mts +0 -12
  164. package/dist/commands-yacLkOi0.d.mts.map +0 -1
  165. package/dist/config-CK756s0L.d.mts +0 -2232
  166. package/dist/config-CK756s0L.d.mts.map +0 -1
  167. package/dist/config-CiPXgwzt.d.mts +0 -39
  168. package/dist/config-CiPXgwzt.d.mts.map +0 -1
  169. package/dist/config-D4Fh2gQL.mjs +0 -87
  170. package/dist/config-D4Fh2gQL.mjs.map +0 -1
  171. package/dist/config-D86Vw7SC.cjs +0 -105
  172. package/dist/config-J74ORCFY.d.cts +0 -39
  173. package/dist/config-J74ORCFY.d.cts.map +0 -1
  174. package/dist/config-vnrrSxEB.d.cts +0 -2232
  175. package/dist/config-vnrrSxEB.d.cts.map +0 -1
  176. package/dist/constants-CZh5rsgh.cjs +0 -103
  177. package/dist/constants-cXxSHhNp.mjs +0 -32
  178. package/dist/constants-cXxSHhNp.mjs.map +0 -1
  179. package/dist/constants.d.cts.map +0 -1
  180. package/dist/constants.d.mts.map +0 -1
  181. package/dist/esbuild-B3NuCco0.cjs +0 -100
  182. package/dist/esbuild-DWiE0pYc.mjs +0 -82
  183. package/dist/esbuild-DWiE0pYc.mjs.map +0 -1
  184. package/dist/index-2JXW-b2-.d.mts +0 -82
  185. package/dist/index-2JXW-b2-.d.mts.map +0 -1
  186. package/dist/index-6BLROVtJ.d.mts +0 -261
  187. package/dist/index-6BLROVtJ.d.mts.map +0 -1
  188. package/dist/index-C7W0kmm7.d.mts +0 -171
  189. package/dist/index-C7W0kmm7.d.mts.map +0 -1
  190. package/dist/index-DJ-k0GOX.d.cts +0 -261
  191. package/dist/index-DJ-k0GOX.d.cts.map +0 -1
  192. package/dist/paths-CS8ecCnW.mjs +0 -81
  193. package/dist/paths-CS8ecCnW.mjs.map +0 -1
  194. package/dist/paths-YmyIGEVo.cjs +0 -98
  195. package/dist/plugin-B9TQt-p0.d.cts +0 -82
  196. package/dist/plugin-B9TQt-p0.d.cts.map +0 -1
  197. package/dist/plugin-BE3wmhoU.d.cts +0 -26
  198. package/dist/plugin-BE3wmhoU.d.cts.map +0 -1
  199. package/dist/plugin-CZ_PJPpQ.cjs +0 -96
  200. package/dist/plugin-C_8RhG5V.d.mts +0 -26
  201. package/dist/plugin-C_8RhG5V.d.mts.map +0 -1
  202. package/dist/plugin-E5foRD0k.mjs +0 -61
  203. package/dist/plugin-E5foRD0k.mjs.map +0 -1
  204. package/dist/plugin-utils-C3HnZJl1.mjs +0 -387
  205. package/dist/plugin-utils-C3HnZJl1.mjs.map +0 -1
  206. package/dist/plugin-utils-Ck3cx3w6.cjs +0 -531
  207. package/dist/plugin-utils.d.cts.map +0 -1
  208. package/dist/plugin-utils.d.mts.map +0 -1
  209. package/dist/resolve-options-6sXFqzEA.mjs +0 -116
  210. package/dist/resolve-options-6sXFqzEA.mjs.map +0 -1
  211. package/dist/resolve-options-BQnTgg3V.cjs +0 -105
  212. package/dist/resolve-options-D-RGs8j8.mjs +0 -117
  213. package/dist/resolve-options-D-RGs8j8.mjs.map +0 -1
  214. package/dist/resolve-options-DHL3RM8F.mjs +0 -87
  215. package/dist/resolve-options-DHL3RM8F.mjs.map +0 -1
  216. package/dist/resolve-options-lxQ2pm0W.cjs +0 -127
  217. package/dist/resolve-options-vyFhhkLp.cjs +0 -133
  218. package/dist/rolldown-CQI8ps6f.cjs +0 -83
  219. package/dist/rolldown-DsXEFXyP.mjs +0 -65
  220. package/dist/rolldown-DsXEFXyP.mjs.map +0 -1
  221. package/dist/tsconfig-B92heKit.mjs.map +0 -1
  222. package/dist/types-Bh_vLuQ0.d.mts +0 -1
  223. package/dist/utils-BbDma_5Y.cjs +0 -449
  224. package/dist/utils-DoQcX7Sk.mjs +0 -339
  225. package/dist/utils-DoQcX7Sk.mjs.map +0 -1
  226. package/dist/virtual-B9imjOqe.mjs.map +0 -1
  227. package/dist/vite-Bx1gbbj3.mjs +0 -171
  228. package/dist/vite-Bx1gbbj3.mjs.map +0 -1
  229. package/dist/vite-XV170zx6.cjs +0 -189
  230. package/dist/webpack-9G4xJBfz.cjs +0 -107
  231. package/dist/webpack-BkTkELre.mjs +0 -88
  232. package/dist/webpack-BkTkELre.mjs.map +0 -1
  233. package/dist/write-file-CpNWY8SV.d.cts +0 -171
  234. package/dist/write-file-CpNWY8SV.d.cts.map +0 -1
@@ -1,272 +1 @@
1
- import { C as PluginConfigTuple, Dt as ResolveResult, Et as PluginContext, Ft as UnresolvedContext, In as UnpluginHooksListItem, O as ResolveConfig, S as PluginConfigObject, Sn as HookFields, Sr as UnpluginBuilderVariant, _t as Context, ar as PluginHookObject, b as PartialPluginFactory, c as EnvironmentConfig, cr as TypesResult, er as Plugin, j as ResolvedConfig, jn as PluginHooksListItem, l as EnvironmentResolvedConfig, nr as PluginHook, or as PluginHooks, rr as PluginHookFields, w as PluginFactory, wr as UnpluginOptions$1, x as PluginConfig, y as PartialPlugin } from "./config-CK756s0L.mjs";
2
- import "./config-CiPXgwzt.mjs";
3
- import "./index-C7W0kmm7.mjs";
4
- import "./index-2JXW-b2-.mjs";
5
- import "./types-Bh_vLuQ0.mjs";
6
- import "./index-6BLROVtJ.mjs";
7
- import * as unplugin0 from "unplugin";
8
- import * as rollup1 from "rollup";
9
- import * as _stryke_types_base0 from "@stryke/types/base";
10
- import { AnyFunction, IsUndefined } from "@stryke/types/base";
11
-
12
- //#region ../core/src/plugin-utils/build-helpers.d.ts
13
- interface GetDependencyConfigResult {
14
- external: ResolveConfig["external"];
15
- noExternal: ResolveConfig["noExternal"];
16
- }
17
- /**
18
- * Get the {@link ResolveConfig.external | external} and {@link ResolveConfig.noExternal | noExternal} dependencies for the build configuration.
19
- *
20
- * @param context - The build context.
21
- * @returns The dependency configuration.
22
- */
23
- declare function getDependencyConfig(context: Context): GetDependencyConfigResult;
24
- declare type __ΩGetDependencyConfigResult = any[];
25
- //#endregion
26
- //#region ../core/src/plugin-utils/context-helpers.d.ts
27
- /**
28
- * Get the organization name from the context
29
- *
30
- * @param context - The Powerlines plugin context.
31
- * @returns The organization name or undefined if not found.
32
- */
33
- declare function getOrganizationName(context: UnresolvedContext): string | undefined;
34
- /**
35
- * Get the organization name from the context
36
- *
37
- * @param context - The Powerlines plugin context.
38
- * @returns The organization name or undefined if not found.
39
- */
40
- declare function getWorkspaceName(context: UnresolvedContext): string | undefined;
41
- //#endregion
42
- //#region ../core/src/plugin-utils/extend.d.ts
43
- /**
44
- * Adds additional helper functionality to a plugin via a plugin builder function.
45
- *
46
- * @param plugin - The base plugin object or factory function to extend.
47
- * @param extension - The plugin extension object or factory function. This function receives the plugin options and returns a plugin object.
48
- * @returns A function accepting the plugin options and returning the extended plugin.
49
- */
50
- declare function extend<TContext extends PluginContext = PluginContext, TPluginOptions = unknown, TExtensionOptions = unknown>(plugin: PluginFactory<TContext, TPluginOptions>, extension: PartialPluginFactory<TContext, TExtensionOptions>): PluginFactory<TContext, TPluginOptions & TExtensionOptions>;
51
- declare function extend<TContext extends PluginContext = PluginContext, TPluginOptions = unknown>(plugin: PluginFactory<TContext, TPluginOptions>, extension: PartialPlugin<TContext>): PluginFactory<TContext, TPluginOptions>;
52
- declare function extend<TContext extends PluginContext = PluginContext, TExtensionOptions = unknown>(plugin: Plugin<TContext> | Plugin<TContext>[], extension: PartialPluginFactory<TContext, TExtensionOptions>): PluginFactory<TContext, TExtensionOptions>;
53
- declare function extend<TContext extends PluginContext = PluginContext>(plugin: Plugin<TContext> | Plugin<TContext>[], extension: PartialPlugin<TContext>): Plugin<TContext>[];
54
- //#endregion
55
- //#region ../core/src/plugin-utils/format-package-json.d.ts
56
- /**
57
- * Formats the `package.json` file in the project root.
58
- *
59
- * @param context - The powerlines context.
60
- */
61
- declare function formatPackageJson(context: Context): Promise<void>;
62
- //#endregion
63
- //#region ../core/src/plugin-utils/get-config-path.d.ts
64
- /**
65
- * Get the configuration file path for a given name.
66
- *
67
- * @param context - The Powerlines context.
68
- * @param name - The name of the configuration file (without extension).
69
- * @returns The absolute path to the configuration file, or undefined if not found.
70
- */
71
- declare function getConfigPath(context: UnresolvedContext, name: string): string | undefined;
72
- //#endregion
73
- //#region ../core/src/plugin-utils/helpers.d.ts
74
- /**
75
- * Type guard to check if an object is a {@link Plugin}
76
- *
77
- * @param value - The object to check
78
- * @returns True if the object is a {@link Plugin}, false otherwise
79
- */
80
- declare function isPlugin<TContext extends PluginContext = PluginContext<ResolvedConfig>>(value: unknown): value is Plugin<TContext>;
81
- /**
82
- * Type guard to check if an object is a {@link PluginConfigObject}
83
- *
84
- * @param value - The object to check
85
- * @returns True if the object is a {@link PluginConfigObject}, false otherwise
86
- */
87
- declare function isPluginConfigObject<TContext extends PluginContext = PluginContext<ResolvedConfig>>(value: unknown): value is PluginConfigObject<TContext>;
88
- /**
89
- * Type guard to check if an object is a {@link PluginConfigTuple}
90
- *
91
- * @param value - The object to check
92
- * @returns True if the object is a {@link PluginConfigTuple}, false otherwise
93
- */
94
- declare function isPluginConfigTuple<TContext extends PluginContext = PluginContext<ResolvedConfig>>(value: unknown): value is PluginConfigTuple<TContext>;
95
- /**
96
- * Type guard to check if an object is a {@link PluginConfig}
97
- *
98
- * @param value - The object to check
99
- * @returns True if the object is a {@link PluginConfig}, false otherwise
100
- */
101
- declare function isPluginConfig<TContext extends PluginContext = PluginContext<ResolvedConfig>>(value: unknown): value is PluginConfig<TContext>;
102
- /**
103
- * Type guard to check if an value is a {@link PluginHook} function
104
- *
105
- * @param value - The value to check
106
- * @returns True if the value is a {@link PluginHook} function, false otherwise
107
- */
108
- declare function isPluginHookObject(value: unknown): value is PluginHookObject<AnyFunction>;
109
- /**
110
- * Type guard to check if an value is a {@link PluginHook} function
111
- *
112
- * @param value - The value to check
113
- * @returns True if the value is a {@link PluginHook} function, false otherwise
114
- */
115
- declare function isPluginHookFunction(value: unknown): value is AnyFunction;
116
- /**
117
- * Type guard to check if an object is a {@link PluginHook}
118
- *
119
- * @param value - The object to check
120
- * @returns True if the object is a {@link PluginHook}, false otherwise
121
- */
122
- declare function isPluginHook(value: unknown): value is PluginHook<AnyFunction>;
123
- type GetHookHandlerReturnType<TContext extends PluginContext = PluginContext, TField extends HookFields<TContext> = HookFields<TContext>> = TField extends PluginHookFields ? PluginHooksListItem<TContext, TField>["handler"] : TField extends UnpluginBuilderVariant ? UnpluginHooksListItem<TContext, TField>["handler"] : never;
124
- /**
125
- * Extract the hook handler function from a plugin hook
126
- *
127
- * @param pluginHook - The plugin hook to extract the handler function from
128
- * @returns The hook handler function
129
- */
130
- declare function getHookHandler<TContext extends PluginContext = PluginContext, TField extends HookFields<TContext> = HookFields<TContext>>(pluginHook: PluginHook<AnyFunction>): GetHookHandlerReturnType<TContext, TField>;
131
- /**
132
- * Extract a plugin hook from a plugin
133
- *
134
- * @param context - The build context
135
- * @param plugin - The plugin to extract the hook from
136
- * @param hook - The name of the hook to extract
137
- * @returns The extracted hook, or undefined if the hook does not exist
138
- */
139
- declare function extractPluginHook<TContext extends PluginContext = PluginContext, TPlugin extends Plugin<TContext> = Plugin<TContext>>(context: TContext, plugin: TPlugin, hook: keyof PluginHooks<TContext>): {
140
- normal: OmitThisParameter<((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, code: string, id: string) => _stryke_types_base0.MaybePromise<unplugin0.TransformResult>) | (((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, code: string, id: string) => _stryke_types_base0.MaybePromise<unplugin0.TransformResult>) & PluginHookObject<(this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, code: string, id: string) => _stryke_types_base0.MaybePromise<unplugin0.TransformResult>, "code" | "id">) | (PluginHookObject<(this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, code: string, id: string) => _stryke_types_base0.MaybePromise<unplugin0.TransformResult>, never> & ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, code: string, id: string) => _stryke_types_base0.MaybePromise<unplugin0.TransformResult>)) | ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string) => _stryke_types_base0.MaybePromise<rollup1.LoadResult>) | (((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string) => _stryke_types_base0.MaybePromise<rollup1.LoadResult>) & PluginHookObject<(this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string) => _stryke_types_base0.MaybePromise<rollup1.LoadResult>, "id">) | (PluginHookObject<(this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string) => _stryke_types_base0.MaybePromise<rollup1.LoadResult>, never> & ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string) => _stryke_types_base0.MaybePromise<rollup1.LoadResult>)) | ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
141
- isEntry: boolean;
142
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>) | (((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
143
- isEntry: boolean;
144
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>) & PluginHookObject<(this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
145
- isEntry: boolean;
146
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>, "id">) | (PluginHookObject<(this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
147
- isEntry: boolean;
148
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>, never> & ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
149
- isEntry: boolean;
150
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>)) | (((this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T ? { [K in keyof T]?: (T[K] extends infer T_1 ? { [K_2 in keyof T_1]?: (T_1[K_2] extends infer T_2 ? { [K_3 in keyof T_2]?: (T_2[K_3] extends infer T_3 ? { [K_4 in keyof T_3]?: (T_3[K_4] extends infer T_4 ? { [K_5 in keyof T_4]?: (T_4[K_5] extends infer T_5 ? { [K_6 in keyof T_5]?: (T_5[K_6] extends infer T_6 ? { [K_7 in keyof T_6]?: (T_6[K_7] extends infer T_7 ? { [K_8 in keyof T_7]?: (T_7[K_8] extends infer T_8 ? { [K_9 in keyof T_8]?: (T_8[K_9] extends infer T_9 ? { [K_10 in keyof T_9]?: (T_9[K_10] extends infer T_10 ? { [K_11 in keyof T_10]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>) & ((this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T ? { [K in keyof T]?: (T[K] extends infer T_1 ? { [K_2 in keyof T_1]?: (T_1[K_2] extends infer T_2 ? { [K_3 in keyof T_2]?: (T_2[K_3] extends infer T_3 ? { [K_4 in keyof T_3]?: (T_3[K_4] extends infer T_4 ? { [K_5 in keyof T_4]?: (T_4[K_5] extends infer T_5 ? { [K_6 in keyof T_5]?: (T_5[K_6] extends infer T_6 ? { [K_7 in keyof T_6]?: (T_6[K_7] extends infer T_7 ? { [K_8 in keyof T_7]?: (T_7[K_8] extends infer T_8 ? { [K_9 in keyof T_8]?: (T_8[K_9] extends infer T_9 ? { [K_10 in keyof T_9]?: (T_9[K_10] extends infer T_10 ? { [K_11 in keyof T_10]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>)) | (((this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T ? { [K in keyof T]?: (T[K] extends infer T_1 ? { [K_2 in keyof T_1]?: (T_1[K_2] extends infer T_2 ? { [K_3 in keyof T_2]?: (T_2[K_3] extends infer T_3 ? { [K_4 in keyof T_3]?: (T_3[K_4] extends infer T_4 ? { [K_5 in keyof T_4]?: (T_4[K_5] extends infer T_5 ? { [K_6 in keyof T_5]?: (T_5[K_6] extends infer T_6 ? { [K_7 in keyof T_6]?: (T_6[K_7] extends infer T_7 ? { [K_8 in keyof T_7]?: (T_7[K_8] extends infer T_8 ? { [K_9 in keyof T_8]?: (T_8[K_9] extends infer T_9 ? { [K_10 in keyof T_9]?: (T_9[K_10] extends infer T_10 ? { [K_11 in keyof T_10]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>) & PluginHookObject<(this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T ? { [K in keyof T]?: (T[K] extends infer T_1 ? { [K_2 in keyof T_1]?: (T_1[K_2] extends infer T_2 ? { [K_3 in keyof T_2]?: (T_2[K_3] extends infer T_3 ? { [K_4 in keyof T_3]?: (T_3[K_4] extends infer T_4 ? { [K_5 in keyof T_4]?: (T_4[K_5] extends infer T_5 ? { [K_6 in keyof T_5]?: (T_5[K_6] extends infer T_6 ? { [K_7 in keyof T_6]?: (T_6[K_7] extends infer T_7 ? { [K_8 in keyof T_7]?: (T_7[K_8] extends infer T_8 ? { [K_9 in keyof T_8]?: (T_8[K_9] extends infer T_9 ? { [K_10 in keyof T_9]?: (T_9[K_10] extends infer T_10 ? { [K_11 in keyof T_10]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>, never>) | (((this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T ? { [K in keyof T]?: (T[K] extends infer T_1 ? { [K_2 in keyof T_1]?: (T_1[K_2] extends infer T_2 ? { [K_3 in keyof T_2]?: (T_2[K_3] extends infer T_3 ? { [K_4 in keyof T_3]?: (T_3[K_4] extends infer T_4 ? { [K_5 in keyof T_4]?: (T_4[K_5] extends infer T_5 ? { [K_6 in keyof T_5]?: (T_5[K_6] extends infer T_6 ? { [K_7 in keyof T_6]?: (T_6[K_7] extends infer T_7 ? { [K_8 in keyof T_7]?: (T_7[K_8] extends infer T_8 ? { [K_9 in keyof T_8]?: (T_8[K_9] extends infer T_9 ? { [K_10 in keyof T_9]?: (T_9[K_10] extends infer T_10 ? { [K_11 in keyof T_10]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>) & (TContext["config"] extends infer T ? { [K in keyof T]?: (T[K] extends infer T_1 ? { [K_2 in keyof T_1]?: (T_1[K_2] extends infer T_2 ? { [K_3 in keyof T_2]?: (T_2[K_3] extends infer T_3 ? { [K_4 in keyof T_3]?: (T_3[K_4] extends infer T_4 ? { [K_5 in keyof T_4]?: (T_4[K_5] extends infer T_5 ? { [K_6 in keyof T_5]?: (T_5[K_6] extends infer T_6 ? { [K_7 in keyof T_6]?: (T_6[K_7] extends infer T_7 ? { [K_8 in keyof T_7]?: (T_7[K_8] extends infer T_8 ? { [K_9 in keyof T_8]?: (T_8[K_9] extends infer T_9 ? { [K_10 in keyof T_9]?: (T_9[K_10] extends infer T_10 ? { [K_11 in keyof T_10]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>) | (PluginHookObject<(this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T_1 ? { [K in keyof T_1]?: (T_1[K] extends infer T_2 ? { [K_2 in keyof T_2]?: (T_2[K_2] extends infer T_3 ? { [K_3 in keyof T_3]?: (T_3[K_3] extends infer T_4 ? { [K_4 in keyof T_4]?: (T_4[K_4] extends infer T_5 ? { [K_5 in keyof T_5]?: (T_5[K_5] extends infer T_6 ? { [K_6 in keyof T_6]?: (T_6[K_6] extends infer T_7 ? { [K_7 in keyof T_7]?: (T_7[K_7] extends infer T_8 ? { [K_8 in keyof T_8]?: (T_8[K_8] extends infer T_9 ? { [K_9 in keyof T_9]?: (T_9[K_9] extends infer T_10 ? { [K_10 in keyof T_10]?: (T_10[K_10] extends infer T_11 ? { [K_11 in keyof T_11]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>, never> & ((this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T_1 ? { [K in keyof T_1]?: (T_1[K] extends infer T_2 ? { [K_2 in keyof T_2]?: (T_2[K_2] extends infer T_3 ? { [K_3 in keyof T_3]?: (T_3[K_3] extends infer T_4 ? { [K_4 in keyof T_4]?: (T_4[K_4] extends infer T_5 ? { [K_5 in keyof T_5]?: (T_5[K_5] extends infer T_6 ? { [K_6 in keyof T_6]?: (T_6[K_6] extends infer T_7 ? { [K_7 in keyof T_7]?: (T_7[K_7] extends infer T_8 ? { [K_8 in keyof T_8]?: (T_8[K_8] extends infer T_9 ? { [K_9 in keyof T_9]?: (T_9[K_9] extends infer T_10 ? { [K_10 in keyof T_10]?: (T_10[K_10] extends infer T_11 ? { [K_11 in keyof T_11]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>)) | ((this: TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: TContext, name: string, environment: EnvironmentConfig) => _stryke_types_base0.MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>) | ((this: TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: TContext, code: string) => _stryke_types_base0.MaybePromise<TypesResult | string | undefined | null>)>;
151
- } | {
152
- [x: string]: OmitThisParameter<((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, code: string, id: string) => _stryke_types_base0.MaybePromise<unplugin0.TransformResult>) | ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string) => _stryke_types_base0.MaybePromise<rollup1.LoadResult>) | ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
153
- isEntry: boolean;
154
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>) | ((this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T_1 ? { [K in keyof T_1]?: (T_1[K] extends infer T_2 ? { [K_2 in keyof T_2]?: (T_2[K_2] extends infer T_3 ? { [K_3 in keyof T_3]?: (T_3[K_3] extends infer T_4 ? { [K_4 in keyof T_4]?: (T_4[K_4] extends infer T_5 ? { [K_5 in keyof T_5]?: (T_5[K_5] extends infer T_6 ? { [K_6 in keyof T_6]?: (T_6[K_6] extends infer T_7 ? { [K_7 in keyof T_7]?: (T_7[K_7] extends infer T_8 ? { [K_8 in keyof T_8]?: (T_8[K_8] extends infer T_9 ? { [K_9 in keyof T_9]?: (T_9[K_9] extends infer T_10 ? { [K_10 in keyof T_10]?: (T_10[K_10] extends infer T_11 ? { [K_11 in keyof T_11]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>) | (((this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T_1 ? { [K in keyof T_1]?: (T_1[K] extends infer T_2 ? { [K_2 in keyof T_2]?: (T_2[K_2] extends infer T_3 ? { [K_3 in keyof T_3]?: (T_3[K_3] extends infer T_4 ? { [K_4 in keyof T_4]?: (T_4[K_4] extends infer T_5 ? { [K_5 in keyof T_5]?: (T_5[K_5] extends infer T_6 ? { [K_6 in keyof T_6]?: (T_6[K_6] extends infer T_7 ? { [K_7 in keyof T_7]?: (T_7[K_7] extends infer T_8 ? { [K_8 in keyof T_8]?: (T_8[K_8] extends infer T_9 ? { [K_9 in keyof T_9]?: (T_9[K_9] extends infer T_10 ? { [K_10 in keyof T_10]?: (T_10[K_10] extends infer T_11 ? { [K_11 in keyof T_11]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>) & ((this: UnresolvedContext<TContext["config"]>) => _stryke_types_base0.MaybePromise<(TContext["config"] extends infer T_1 ? { [K in keyof T_1]?: (T_1[K] extends infer T_2 ? { [K_2 in keyof T_2]?: (T_2[K_2] extends infer T_3 ? { [K_3 in keyof T_3]?: (T_3[K_3] extends infer T_4 ? { [K_4 in keyof T_4]?: (T_4[K_4] extends infer T_5 ? { [K_5 in keyof T_5]?: (T_5[K_5] extends infer T_6 ? { [K_6 in keyof T_6]?: (T_6[K_6] extends infer T_7 ? { [K_7 in keyof T_7]?: (T_7[K_7] extends infer T_8 ? { [K_8 in keyof T_8]?: (T_8[K_8] extends infer T_9 ? { [K_9 in keyof T_9]?: (T_9[K_9] extends infer T_10 ? { [K_10 in keyof T_10]?: (T_10[K_10] extends infer T_11 ? { [K_11 in keyof T_11]?: /*elided*/any | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) | undefined } : never) & Record<string, any>>)) | ((this: TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: TContext, name: string, environment: EnvironmentConfig) => _stryke_types_base0.MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>) | ((this: TContext) => _stryke_types_base0.MaybePromise<void>) | ((this: TContext, code: string) => _stryke_types_base0.MaybePromise<TypesResult | string | undefined | null>)>;
155
- normal?: undefined;
156
- } | undefined;
157
- /**
158
- * Check if a hook is external.
159
- *
160
- * @param keys - The name of the hook to check.
161
- * @returns True if the hook is external, false otherwise.
162
- */
163
- declare function isUnpluginHookKey<TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant>(keys: string): keys is `${TUnpluginBuilderVariant}:${keyof UnpluginOptions$1[TUnpluginBuilderVariant] & string}`;
164
- /**
165
- * Check if a hook is internal.
166
- *
167
- * @param keys - The name of the hook to check.
168
- * @returns True if the hook is external, false otherwise.
169
- */
170
- declare function isPluginHookField<TContext extends PluginContext>(keys: string): keys is PluginHookFields<TContext>;
171
- /**
172
- * Check if a hook is external.
173
- *
174
- * @param field - The name of the hook to check.
175
- * @returns True if the hook is external, false otherwise.
176
- */
177
- declare function isUnpluginHookField<TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant>(field: string): field is TUnpluginBuilderVariant;
178
- /**
179
- * Check if a plugin should be deduplicated.
180
- *
181
- * @param plugin - The plugin to check
182
- * @param plugins - The list of plugins to check against
183
- * @returns True if the plugin should be deduplicated, false otherwise
184
- */
185
- declare function checkDedupe<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TContext extends PluginContext<TResolvedConfig> = PluginContext<TResolvedConfig>>(plugin: Plugin<TContext>, plugins: Plugin<TContext>[]): boolean;
186
- /**
187
- * Add a plugin hook to the hooks list.
188
- *
189
- * @param context - The plugin context
190
- * @param plugin - The plugin to add the hook from
191
- * @param pluginHook - The plugin hook to add
192
- * @param hooksList - The list of hooks to add to
193
- */
194
- declare function addPluginHook<TContext extends PluginContext = PluginContext, TField extends PluginHookFields<TContext> = PluginHookFields<TContext>, TList extends PluginHooksListItem<TContext, TField> = PluginHooksListItem<TContext, TField>>(context: TContext, plugin: Plugin<TContext>, pluginHook: PluginHook<AnyFunction>, hooksList: TList[]): void;
195
- /**
196
- * Check the provided {@link PluginConfig}, and return a stringified version of the invalid configuration. If an array is provided, check each item in the array.
197
- *
198
- * @param config - The plugin configuration to check
199
- * @returns Null if the configuration is valid, otherwise an array of stringified invalid configurations
200
- */
201
- declare function findInvalidPluginConfig<TContext extends PluginContext = PluginContext<ResolvedConfig>>(config: PluginConfig<TContext>): string[] | null;
202
- declare type __ΩGetHookHandlerReturnType = any[];
203
- //#endregion
204
- //#region ../core/src/plugin-utils/merge.d.ts
205
- type MergeResult<TContext extends PluginContext, TPluginA extends Plugin<TContext> | PartialPlugin<TContext>, TPluginB extends Plugin<TContext> | PartialPlugin<TContext>> = TPluginA extends Plugin<TContext> ? Plugin<TContext> : TPluginB extends Plugin<TContext> ? Plugin<TContext> : PartialPlugin<TContext>;
206
- /**
207
- * Merges two {@link Plugin | plugins} or {@link PartialPlugin | partial plugins} together.
208
- *
209
- * @param pluginA - The first {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.
210
- * @param pluginB - The second {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.
211
- * @returns The merged {@link Plugin | plugin} or {@link PartialPlugin | partial plugin}.
212
- */
213
- declare function merge<TContext extends PluginContext = PluginContext>(pluginA: Plugin<TContext> | PartialPlugin<TContext>, pluginB: Plugin<TContext> | PartialPlugin<TContext>): MergeResult<TContext, typeof pluginA, typeof pluginB>;
214
- /**
215
- * Merges two configuration objects together, with special handling for string values.
216
- * If the value from the second object is a non-empty string, it will overwrite the value from the first object.
217
- *
218
- * @example
219
- * ```ts
220
- * const configA = { name: "Default", version: "1.0.0" };
221
- * const configB = { name: "Custom", description: "A custom config" };
222
- * const mergedConfig = mergeConfig(configA, configB);
223
- * // Result: { name: "Custom", version: "1.0.0", description: "A custom config" }
224
- * ```
225
- *
226
- * @param objA - The first configuration object.
227
- * @param objB - The second configuration object.
228
- * @returns The merged configuration object.
229
- */
230
- declare const mergeConfig: (...configs: unknown[]) => ResolvedConfig;
231
- declare type __ΩMergeResult = any[];
232
- //#endregion
233
- //#region ../core/src/plugin-utils/modules.d.ts
234
- /**
235
- * Determine if a module ID is a built-in Powerlines module ID.
236
- *
237
- * @param context - The Powerlines context.
238
- * @param moduleName - The name of the module to check.
239
- * @returns `true` if the module is a built-in module, otherwise `false`.
240
- */
241
- declare function isBuiltinModule(context: Context, moduleName: string): boolean;
242
- //#endregion
243
- //#region ../core/src/plugin-utils/paths.d.ts
244
- /**
245
- * Replaces tokens in the given path string with their corresponding values from the context.
246
- *
247
- * @remarks
248
- * The following tokens are supported:
249
- * - `{workspaceRoot}` - The root directory of the workspace.
250
- * - `{root}` - The root directory of the project (same as `{projectRoot}`).
251
- * - `{projectRoot}` - The root directory of the project (same as `{root}`).
252
- * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
253
- * - `{powerlinesPath}` - The directory where Powerlines is installed.
254
- * - `{cachePath}` - The environment's directory for cached files.
255
- * - `{dataPath}` - The environment's directory for data files.
256
- * - `{logPath}` - The environment's directory for log files.
257
- * - `{tempPath}` - The environment's directory for temporary files.
258
- * - `{configPath}` - The environment's directory for configuration files.
259
- * - `{outputPath}` - The configured output directory for the project.
260
- * - `{buildPath}` - The configured distribution directory for the project.
261
- * - `{artifactsPath}` - The configured directory for build artifacts.
262
- * - `{builtinPath}` - The configured directory for generated built-in plugins.
263
- * - `{entryPath}` - The configured directory for generated entry files.
264
- *
265
- * @param context - The context containing the values for the path tokens.
266
- * @param path - The path string with tokens to replace.
267
- * @returns The path string with tokens replaced by their corresponding values from the context.
268
- */
269
- declare function replacePathTokens(context: UnresolvedContext, path?: string): IsUndefined<typeof path> extends true ? undefined : string;
270
- //#endregion
271
- export { GetDependencyConfigResult, GetHookHandlerReturnType, MergeResult, __ΩGetDependencyConfigResult, __ΩGetHookHandlerReturnType, __ΩMergeResult, addPluginHook, checkDedupe, extend, extractPluginHook, findInvalidPluginConfig, formatPackageJson, getConfigPath, getDependencyConfig, getHookHandler, getOrganizationName, getWorkspaceName, isBuiltinModule, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, merge, mergeConfig, replacePathTokens };
272
- //# sourceMappingURL=plugin-utils.d.mts.map
1
+ export * from "@powerlines/core/plugin-utils";
@@ -1,5 +1,12 @@
1
- import { C as getWorkspaceName, S as getOrganizationName, _ as isPluginHookField, a as merge, b as isUnpluginHookField, c as checkDedupe, d as getHookHandler, f as isPlugin, g as isPluginHook, h as isPluginConfigTuple, i as extend, l as extractPluginHook, m as isPluginConfigObject, n as getConfigPath, o as mergeConfig, p as isPluginConfig, r as formatPackageJson, s as addPluginHook, t as isBuiltinModule, u as findInvalidPluginConfig, v as isPluginHookFunction, w as getDependencyConfig, x as isUnpluginHookKey, y as isPluginHookObject } from "./plugin-utils-C3HnZJl1.mjs";
2
- import "./plugin-E5foRD0k.mjs";
3
- import { t as replacePathTokens } from "./paths-CS8ecCnW.mjs";
1
+ import { n as __reExport, t as __exportAll } from "./chunk-CtajNgzt.mjs";
4
2
 
5
- export { addPluginHook, checkDedupe, extend, extractPluginHook, findInvalidPluginConfig, formatPackageJson, getConfigPath, getDependencyConfig, getHookHandler, getOrganizationName, getWorkspaceName, isBuiltinModule, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isPluginHookFunction, isPluginHookObject, isUnpluginHookField, isUnpluginHookKey, merge, mergeConfig, replacePathTokens };
3
+ export * from "@powerlines/core/plugin-utils"
4
+
5
+ //#region src/plugin-utils.ts
6
+ var plugin_utils_exports = /* @__PURE__ */ __exportAll({});
7
+ import * as import__powerlines_core_plugin_utils from "@powerlines/core/plugin-utils";
8
+ __reExport(plugin_utils_exports, import__powerlines_core_plugin_utils);
9
+
10
+ //#endregion
11
+ export { plugin_utils_exports as t };
12
+ //# sourceMappingURL=plugin-utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-utils.mjs","names":[],"sources":["../src/plugin-utils.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport * from \"@powerlines/core/plugin-utils\";\n"],"mappings":""}
package/dist/rolldown.cjs CHANGED
@@ -1,19 +1,53 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- require('./api-GPlMYw0d.cjs');
3
- require('./tsconfig-C8M8X6U0.cjs');
4
- require('./plugin-utils-Ck3cx3w6.cjs');
5
- require('./plugin-CZ_PJPpQ.cjs');
6
- require('./paths-YmyIGEVo.cjs');
7
- require('./constants-CZh5rsgh.cjs');
8
- require('./config-D86Vw7SC.cjs');
9
- require('./utils-BbDma_5Y.cjs');
10
- require('./virtual-B1MLgqnQ.cjs');
11
- require('./resolve-options-vyFhhkLp.cjs');
12
- require('./resolve-options-lxQ2pm0W.cjs');
13
- const require_rolldown = require('./rolldown-CQI8ps6f.cjs');
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_chunk = require('./chunk-AIJqnxB6.cjs');
3
+ const require_api = require('./api-CFXLaAxU.cjs');
4
+ require('./tsconfig-BJrUrPC_.cjs');
5
+ require('./virtual-Cbvj12lU.cjs');
6
+ let defu = require("defu");
7
+ let unplugin = require("unplugin");
8
+ let _powerlines_plugin_rolldown_helpers_resolve_options = require("@powerlines/plugin-rolldown/helpers/resolve-options");
9
+ let _powerlines_plugin_rolldown = require("@powerlines/plugin-rolldown");
10
+ _powerlines_plugin_rolldown = require_chunk.__toESM(_powerlines_plugin_rolldown);
14
11
 
15
- exports.default = require_rolldown.rolldown_default;
16
- exports["module.exports"] = require_rolldown.unplugin;
17
- exports.unplugin = require_rolldown.unplugin;
18
- exports.plugin = require_rolldown.src_default;
19
- exports.rolldown = require_rolldown.src_default;
12
+ //#region src/rolldown.ts
13
+ /**
14
+ * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.
15
+ *
16
+ * @see https://rollupjs.org/guide/en/#plugins-overview
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * // rollup.config.ts
21
+ * import powerlines from "powerlines/rollup";
22
+ *
23
+ * export default defineConfig({
24
+ * plugins: [powerlines({ name: "example-app", ... })],
25
+ * })
26
+ * ```
27
+ */
28
+ const unplugin$1 = (0, unplugin.createRolldownPlugin)(require_api.createUnpluginFactory("rolldown", (api, plugin) => {
29
+ return {
30
+ ...plugin,
31
+ rolldown: { async options(options) {
32
+ const merged = (0, defu.defu)(await api.context.getEnvironment(), this);
33
+ return (0, defu.defu)((0, _powerlines_plugin_rolldown_helpers_resolve_options.resolveOptions)(merged), options, api.callHook("rolldown:options", { environment: merged }, options) ?? {});
34
+ } }
35
+ };
36
+ }));
37
+
38
+ //#endregion
39
+ exports.default = unplugin$1;
40
+ exports["module.exports"] = unplugin$1;
41
+ exports.unplugin = unplugin$1;
42
+ Object.defineProperty(exports, 'plugin', {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _powerlines_plugin_rolldown.default;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, 'rolldown', {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _powerlines_plugin_rolldown.default;
52
+ }
53
+ });
@@ -1,31 +1,7 @@
1
- import { Et as PluginContext, N as UserConfig, er as Plugin, j as ResolvedConfig } from "./config-vnrrSxEB.cjs";
2
- import * as rolldown0 from "rolldown";
3
- import { RolldownOptions } from "rolldown";
1
+ import * as rolldown$1 from "rolldown";
2
+ import { RolldownPluginUserConfig } from "@powerlines/plugin-rolldown/types/plugin";
3
+ import plugin, { default as rolldown } from "@powerlines/plugin-rolldown";
4
4
 
5
- //#region ../plugin-rolldown/src/types/build.d.ts
6
- type RolldownOptions$1 = Omit<RolldownOptions, "input" | "external" | "tsconfig" | "logLevel" | "output">;
7
- //#endregion
8
- //#region ../plugin-rolldown/src/types/plugin.d.ts
9
- type RolldownPluginOptions = Partial<RolldownOptions$1>;
10
- interface RolldownPluginUserConfig extends UserConfig {
11
- rolldown: RolldownPluginOptions;
12
- }
13
- interface RolldownPluginResolvedConfig extends ResolvedConfig {
14
- rolldown: RolldownOptions$1;
15
- }
16
- type RolldownPluginContext<TResolvedConfig extends RolldownPluginResolvedConfig = RolldownPluginResolvedConfig> = PluginContext<TResolvedConfig>;
17
- //#endregion
18
- //#region ../plugin-rolldown/src/index.d.ts
19
- declare module "@powerlines/core" {
20
- interface Config {
21
- rolldown?: RolldownPluginOptions;
22
- }
23
- }
24
- /**
25
- * A Powerlines plugin to assist in developing other Powerlines plugins.
26
- */
27
- declare const plugin: <TContext extends RolldownPluginContext = RolldownPluginContext>(options?: RolldownPluginOptions) => Plugin<TContext>;
28
- //#endregion
29
5
  //#region src/rolldown.d.ts
30
6
  /**
31
7
  * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.
@@ -42,7 +18,7 @@ declare const plugin: <TContext extends RolldownPluginContext = RolldownPluginCo
42
18
  * })
43
19
  * ```
44
20
  */
45
- declare const unplugin: (options: Partial<RolldownPluginUserConfig>) => rolldown0.Plugin<any> | rolldown0.Plugin<any>[];
21
+ declare const unplugin: (options: Partial<RolldownPluginUserConfig>) => rolldown$1.Plugin<any> | rolldown$1.Plugin<any>[];
46
22
  //#endregion
47
- export { unplugin as default, unplugin as "module.exports", unplugin, plugin, plugin as rolldown };
23
+ export { unplugin as default, unplugin as "module.exports", unplugin, plugin, rolldown };
48
24
  //# sourceMappingURL=rolldown.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolldown.d.cts","names":[],"sources":["../../plugin-rolldown/src/types/build.ts","../../plugin-rolldown/src/types/plugin.ts","../../plugin-rolldown/src/index.ts","../src/rolldown.ts"],"sourcesContent":[],"mappings":";;;;;KAoBY,iBAAA,GAAkB,KAC5B;;;KCAU,qBAAA,GAAwB,QAAQ;UAE3B,wBAAA,SAAiC;YACtC;ADJZ;UCOiB,4BAAA,SAAqC;YAC1C;;AAPA,KAUA,qBAVqB,CAAA,wBAWP,4BAXiB,GAYvC,4BAZuC,CAAA,GAavC,aAbuC,CAazB,eAbyB,CAAA;;;;EDD/B,UAAA,MAAA,CAAA;eEeG;;;ADdf;AAEA;AAIA;AAIY,cCWC,MDXD,EAAqB,CAAA,iBCYd,qBDZc,GCYU,qBDZV,CAAA,CAAA,OAAA,CAAA,ECctB,qBDdsB,EAAA,GCe9B,MDf8B,CCevB,QDfuB,CAAA;;;;;;ADXjC;;;;ACCA;AAEA;AAIA;AAIA;;;;;AAGiB,cEcJ,QFdI,EAAA,CAAA,OAAA,EEcI,OFdJ,CEcI,wBFdJ,CAAA,EAAA,GEcI,SAAA,CAAA,MFdJ,CAAA,GAAA,CAAA,GEcI,SAAA,CAAA,MFdJ,CAAA,GAAA,CAAA,EAAA"}
1
+ {"version":3,"file":"rolldown.d.cts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;AAgDA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,wBAAA,MAAA,UAAA,CAAA,MAAA,QAAA,UAAA,CAAA,MAAA"}
@@ -1,34 +1,7 @@
1
- import { Et as PluginContext, N as UserConfig, er as Plugin, j as ResolvedConfig } from "./config-CK756s0L.mjs";
2
- import "./config-CiPXgwzt.mjs";
3
- import "./index-C7W0kmm7.mjs";
4
- import "./index-2JXW-b2-.mjs";
5
- import * as rolldown0 from "rolldown";
6
- import { RolldownOptions } from "rolldown";
1
+ import plugin, { default as rolldown } from "@powerlines/plugin-rolldown";
2
+ import * as rolldown$1 from "rolldown";
3
+ import { RolldownPluginUserConfig } from "@powerlines/plugin-rolldown/types/plugin";
7
4
 
8
- //#region ../plugin-rolldown/src/types/build.d.ts
9
- type RolldownOptions$1 = Omit<RolldownOptions, "input" | "external" | "tsconfig" | "logLevel" | "output">;
10
- //#endregion
11
- //#region ../plugin-rolldown/src/types/plugin.d.ts
12
- type RolldownPluginOptions = Partial<RolldownOptions$1>;
13
- interface RolldownPluginUserConfig extends UserConfig {
14
- rolldown: RolldownPluginOptions;
15
- }
16
- interface RolldownPluginResolvedConfig extends ResolvedConfig {
17
- rolldown: RolldownOptions$1;
18
- }
19
- type RolldownPluginContext<TResolvedConfig extends RolldownPluginResolvedConfig = RolldownPluginResolvedConfig> = PluginContext<TResolvedConfig>;
20
- //#endregion
21
- //#region ../plugin-rolldown/src/index.d.ts
22
- declare module "@powerlines/core" {
23
- interface Config {
24
- rolldown?: RolldownPluginOptions;
25
- }
26
- }
27
- /**
28
- * A Powerlines plugin to assist in developing other Powerlines plugins.
29
- */
30
- declare const plugin: <TContext extends RolldownPluginContext = RolldownPluginContext>(options?: RolldownPluginOptions) => Plugin<TContext>;
31
- //#endregion
32
5
  //#region src/rolldown.d.ts
33
6
  /**
34
7
  * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.
@@ -45,7 +18,7 @@ declare const plugin: <TContext extends RolldownPluginContext = RolldownPluginCo
45
18
  * })
46
19
  * ```
47
20
  */
48
- declare const unplugin: (options: Partial<RolldownPluginUserConfig>) => rolldown0.Plugin<any> | rolldown0.Plugin<any>[];
21
+ declare const unplugin: (options: Partial<RolldownPluginUserConfig>) => rolldown$1.Plugin<any> | rolldown$1.Plugin<any>[];
49
22
  //#endregion
50
- export { unplugin as default, unplugin as "module.exports", unplugin, plugin, plugin as rolldown };
23
+ export { unplugin as default, unplugin as "module.exports", unplugin, plugin, rolldown };
51
24
  //# sourceMappingURL=rolldown.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolldown.d.mts","names":[],"sources":["../../plugin-rolldown/src/types/build.ts","../../plugin-rolldown/src/types/plugin.ts","../../plugin-rolldown/src/index.ts","../src/rolldown.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAoBY,iBAAA,GAAkB,KAC5B;;;KCAU,qBAAA,GAAwB,QAAQ;UAE3B,wBAAA,SAAiC;YACtC;;UAGK,4BAAA,SAAqC;YAC1C;ADRZ;KCWY,8CACc,+BACtB,gCACA,cAAc;;;;;eCCH;;AFff;;;;ACCY,cCqBC,MDrBD,EAAqB,CAAA,iBCsBd,qBDtBwB,GCsBA,qBDtBA,CAAA,CAAA,OAAA,CAAA,ECwBhC,qBDxBgC,EAAA,GCyBxC,MDzBwC,CCyBjC,QDzBiC,CAAA;;;;;;;;;ADD3C;;;;ACCA;AAEA;AAIA;AAIA;;AAEI,cEeS,QFfT,EAAA,CAAA,OAAA,EEeiB,OFfjB,CEeiB,wBFfjB,CAAA,EAAA,GEeiB,SAAA,CAAA,MFfjB,CAAA,GAAA,CAAA,GEeiB,SAAA,CAAA,MFfjB,CAAA,GAAA,CAAA,EAAA"}
1
+ {"version":3,"file":"rolldown.d.mts","names":[],"sources":["../src/rolldown.ts"],"mappings":";;;;;;;;AAgDA;;;;;;;;;;;;cAAa,QAAA,GAAQ,OAAA,EAAA,OAAA,CAAA,wBAAA,MAAA,UAAA,CAAA,MAAA,QAAA,UAAA,CAAA,MAAA"}
package/dist/rolldown.mjs CHANGED
@@ -1,14 +1,37 @@
1
- import "./api-CY668wMZ.mjs";
2
- import "./tsconfig-B92heKit.mjs";
3
- import "./plugin-utils-C3HnZJl1.mjs";
4
- import "./plugin-E5foRD0k.mjs";
5
- import "./paths-CS8ecCnW.mjs";
6
- import "./constants-cXxSHhNp.mjs";
7
- import "./config-D4Fh2gQL.mjs";
8
- import "./utils-DoQcX7Sk.mjs";
9
- import "./virtual-B9imjOqe.mjs";
10
- import "./resolve-options-6sXFqzEA.mjs";
11
- import "./resolve-options-D-RGs8j8.mjs";
12
- import { n as unplugin, r as src_default, t as rolldown_default } from "./rolldown-DsXEFXyP.mjs";
1
+ import { a as createUnpluginFactory } from "./api-6f2oVwGy.mjs";
2
+ import "./tsconfig-D9GCB2I9.mjs";
3
+ import "./virtual-DvkJm7gK.mjs";
4
+ import { defu } from "defu";
5
+ import { createRolldownPlugin } from "unplugin";
6
+ import { resolveOptions } from "@powerlines/plugin-rolldown/helpers/resolve-options";
7
+ import plugin, { default as rolldown } from "@powerlines/plugin-rolldown";
13
8
 
14
- export { rolldown_default as default, unplugin as "module.exports", unplugin, src_default as plugin, src_default as rolldown };
9
+ //#region src/rolldown.ts
10
+ /**
11
+ * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.
12
+ *
13
+ * @see https://rollupjs.org/guide/en/#plugins-overview
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * // rollup.config.ts
18
+ * import powerlines from "powerlines/rollup";
19
+ *
20
+ * export default defineConfig({
21
+ * plugins: [powerlines({ name: "example-app", ... })],
22
+ * })
23
+ * ```
24
+ */
25
+ const unplugin = createRolldownPlugin(createUnpluginFactory("rolldown", (api, plugin) => {
26
+ return {
27
+ ...plugin,
28
+ rolldown: { async options(options) {
29
+ const merged = defu(await api.context.getEnvironment(), this);
30
+ return defu(resolveOptions(merged), options, api.callHook("rolldown:options", { environment: merged }, options) ?? {});
31
+ } }
32
+ };
33
+ }));
34
+
35
+ //#endregion
36
+ export { unplugin as default, unplugin as "module.exports", unplugin, plugin, rolldown };
37
+ //# sourceMappingURL=rolldown.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolldown.mjs","names":[],"sources":["../src/rolldown.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { resolveOptions } from \"@powerlines/plugin-rolldown/helpers/resolve-options\";\nimport {\n RolldownPluginContext,\n RolldownPluginUserConfig\n} from \"@powerlines/plugin-rolldown/types/plugin\";\nimport { defu } from \"defu\";\nimport type { InputOptions } from \"rolldown\";\nimport { createRolldownPlugin } from \"unplugin\";\nimport { createUnpluginFactory } from \"./unplugin\";\n\nexport {\n default as plugin,\n default as rolldown\n} from \"@powerlines/plugin-rolldown\";\n\n/**\n * A Rolldown plugin that will invoke the Powerlines API hooks during the build process.\n *\n * @see https://rollupjs.org/guide/en/#plugins-overview\n *\n * @example\n * ```ts\n * // rollup.config.ts\n * import powerlines from \"powerlines/rollup\";\n *\n * export default defineConfig({\n * plugins: [powerlines({ name: \"example-app\", ... })],\n * })\n * ```\n */\nexport const unplugin = createRolldownPlugin<Partial<RolldownPluginUserConfig>>(\n createUnpluginFactory<RolldownPluginContext>(\"rolldown\", (api, plugin) => {\n return {\n ...plugin,\n rolldown: {\n async options(options: InputOptions) {\n const merged = defu(await api.context.getEnvironment(), this);\n\n return defu(\n resolveOptions(merged),\n options,\n api.callHook(\n \"rolldown:options\",\n { environment: merged },\n options\n ) ?? {}\n );\n }\n }\n };\n })\n);\n\nexport { unplugin as \"module.exports\" };\n\nexport default unplugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,WAAW,qBACtB,sBAA6C,aAAa,KAAK,WAAW;AACxE,QAAO;EACL,GAAG;EACH,UAAU,EACR,MAAM,QAAQ,SAAuB;GACnC,MAAM,SAAS,KAAK,MAAM,IAAI,QAAQ,gBAAgB,EAAE,KAAK;AAE7D,UAAO,KACL,eAAe,OAAO,EACtB,SACA,IAAI,SACF,oBACA,EAAE,aAAa,QAAQ,EACvB,QACD,IAAI,EAAE,CACR;KAEJ;EACF;EACD,CACH"}