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,29 +1,21 @@
1
- const require_plugin_utils = require('./plugin-utils-Ck3cx3w6.cjs');
2
- require('./plugin-CZ_PJPpQ.cjs');
3
- const require_paths = require('./paths-YmyIGEVo.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_chunk = require('./chunk-AIJqnxB6.cjs');
4
3
 
5
- exports.addPluginHook = require_plugin_utils.addPluginHook;
6
- exports.checkDedupe = require_plugin_utils.checkDedupe;
7
- exports.extend = require_plugin_utils.extend;
8
- exports.extractPluginHook = require_plugin_utils.extractPluginHook;
9
- exports.findInvalidPluginConfig = require_plugin_utils.findInvalidPluginConfig;
10
- exports.formatPackageJson = require_plugin_utils.formatPackageJson;
11
- exports.getConfigPath = require_plugin_utils.getConfigPath;
12
- exports.getDependencyConfig = require_plugin_utils.getDependencyConfig;
13
- exports.getHookHandler = require_plugin_utils.getHookHandler;
14
- exports.getOrganizationName = require_plugin_utils.getOrganizationName;
15
- exports.getWorkspaceName = require_plugin_utils.getWorkspaceName;
16
- exports.isBuiltinModule = require_plugin_utils.isBuiltinModule;
17
- exports.isPlugin = require_plugin_utils.isPlugin;
18
- exports.isPluginConfig = require_plugin_utils.isPluginConfig;
19
- exports.isPluginConfigObject = require_plugin_utils.isPluginConfigObject;
20
- exports.isPluginConfigTuple = require_plugin_utils.isPluginConfigTuple;
21
- exports.isPluginHook = require_plugin_utils.isPluginHook;
22
- exports.isPluginHookField = require_plugin_utils.isPluginHookField;
23
- exports.isPluginHookFunction = require_plugin_utils.isPluginHookFunction;
24
- exports.isPluginHookObject = require_plugin_utils.isPluginHookObject;
25
- exports.isUnpluginHookField = require_plugin_utils.isUnpluginHookField;
26
- exports.isUnpluginHookKey = require_plugin_utils.isUnpluginHookKey;
27
- exports.merge = require_plugin_utils.merge;
28
- exports.mergeConfig = require_plugin_utils.mergeConfig;
29
- exports.replacePathTokens = require_paths.replacePathTokens;
4
+ //#region src/plugin-utils.ts
5
+ var plugin_utils_exports = /* @__PURE__ */ require_chunk.__exportAll({});
6
+ require_chunk.__reExport(plugin_utils_exports, require("@powerlines/core/plugin-utils"));
7
+
8
+ //#endregion
9
+ Object.defineProperty(exports, 'plugin_utils_exports', {
10
+ enumerable: true,
11
+ get: function () {
12
+ return plugin_utils_exports;
13
+ }
14
+ });
15
+ var _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
16
+ Object.keys(_powerlines_core_plugin_utils).forEach(function (k) {
17
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
18
+ enumerable: true,
19
+ get: function () { return _powerlines_core_plugin_utils[k]; }
20
+ });
21
+ });
@@ -1,267 +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-vnrrSxEB.cjs";
2
- import * as _stryke_types_base0 from "@stryke/types/base";
3
- import { AnyFunction, IsUndefined } from "@stryke/types/base";
4
- import * as unplugin0 from "unplugin";
5
- import * as rollup1 from "rollup";
6
-
7
- //#region ../core/src/plugin-utils/build-helpers.d.ts
8
- interface GetDependencyConfigResult {
9
- external: ResolveConfig["external"];
10
- noExternal: ResolveConfig["noExternal"];
11
- }
12
- /**
13
- * Get the {@link ResolveConfig.external | external} and {@link ResolveConfig.noExternal | noExternal} dependencies for the build configuration.
14
- *
15
- * @param context - The build context.
16
- * @returns The dependency configuration.
17
- */
18
- declare function getDependencyConfig(context: Context): GetDependencyConfigResult;
19
- declare type __ΩGetDependencyConfigResult = any[];
20
- //#endregion
21
- //#region ../core/src/plugin-utils/context-helpers.d.ts
22
- /**
23
- * Get the organization name from the context
24
- *
25
- * @param context - The Powerlines plugin context.
26
- * @returns The organization name or undefined if not found.
27
- */
28
- declare function getOrganizationName(context: UnresolvedContext): string | undefined;
29
- /**
30
- * Get the organization name from the context
31
- *
32
- * @param context - The Powerlines plugin context.
33
- * @returns The organization name or undefined if not found.
34
- */
35
- declare function getWorkspaceName(context: UnresolvedContext): string | undefined;
36
- //#endregion
37
- //#region ../core/src/plugin-utils/extend.d.ts
38
- /**
39
- * Adds additional helper functionality to a plugin via a plugin builder function.
40
- *
41
- * @param plugin - The base plugin object or factory function to extend.
42
- * @param extension - The plugin extension object or factory function. This function receives the plugin options and returns a plugin object.
43
- * @returns A function accepting the plugin options and returning the extended plugin.
44
- */
45
- declare function extend<TContext extends PluginContext = PluginContext, TPluginOptions = unknown, TExtensionOptions = unknown>(plugin: PluginFactory<TContext, TPluginOptions>, extension: PartialPluginFactory<TContext, TExtensionOptions>): PluginFactory<TContext, TPluginOptions & TExtensionOptions>;
46
- declare function extend<TContext extends PluginContext = PluginContext, TPluginOptions = unknown>(plugin: PluginFactory<TContext, TPluginOptions>, extension: PartialPlugin<TContext>): PluginFactory<TContext, TPluginOptions>;
47
- declare function extend<TContext extends PluginContext = PluginContext, TExtensionOptions = unknown>(plugin: Plugin<TContext> | Plugin<TContext>[], extension: PartialPluginFactory<TContext, TExtensionOptions>): PluginFactory<TContext, TExtensionOptions>;
48
- declare function extend<TContext extends PluginContext = PluginContext>(plugin: Plugin<TContext> | Plugin<TContext>[], extension: PartialPlugin<TContext>): Plugin<TContext>[];
49
- //#endregion
50
- //#region ../core/src/plugin-utils/format-package-json.d.ts
51
- /**
52
- * Formats the `package.json` file in the project root.
53
- *
54
- * @param context - The powerlines context.
55
- */
56
- declare function formatPackageJson(context: Context): Promise<void>;
57
- //#endregion
58
- //#region ../core/src/plugin-utils/get-config-path.d.ts
59
- /**
60
- * Get the configuration file path for a given name.
61
- *
62
- * @param context - The Powerlines context.
63
- * @param name - The name of the configuration file (without extension).
64
- * @returns The absolute path to the configuration file, or undefined if not found.
65
- */
66
- declare function getConfigPath(context: UnresolvedContext, name: string): string | undefined;
67
- //#endregion
68
- //#region ../core/src/plugin-utils/helpers.d.ts
69
- /**
70
- * Type guard to check if an object is a {@link Plugin}
71
- *
72
- * @param value - The object to check
73
- * @returns True if the object is a {@link Plugin}, false otherwise
74
- */
75
- declare function isPlugin<TContext extends PluginContext = PluginContext<ResolvedConfig>>(value: unknown): value is Plugin<TContext>;
76
- /**
77
- * Type guard to check if an object is a {@link PluginConfigObject}
78
- *
79
- * @param value - The object to check
80
- * @returns True if the object is a {@link PluginConfigObject}, false otherwise
81
- */
82
- declare function isPluginConfigObject<TContext extends PluginContext = PluginContext<ResolvedConfig>>(value: unknown): value is PluginConfigObject<TContext>;
83
- /**
84
- * Type guard to check if an object is a {@link PluginConfigTuple}
85
- *
86
- * @param value - The object to check
87
- * @returns True if the object is a {@link PluginConfigTuple}, false otherwise
88
- */
89
- declare function isPluginConfigTuple<TContext extends PluginContext = PluginContext<ResolvedConfig>>(value: unknown): value is PluginConfigTuple<TContext>;
90
- /**
91
- * Type guard to check if an object is a {@link PluginConfig}
92
- *
93
- * @param value - The object to check
94
- * @returns True if the object is a {@link PluginConfig}, false otherwise
95
- */
96
- declare function isPluginConfig<TContext extends PluginContext = PluginContext<ResolvedConfig>>(value: unknown): value is PluginConfig<TContext>;
97
- /**
98
- * Type guard to check if an value is a {@link PluginHook} function
99
- *
100
- * @param value - The value to check
101
- * @returns True if the value is a {@link PluginHook} function, false otherwise
102
- */
103
- declare function isPluginHookObject(value: unknown): value is PluginHookObject<AnyFunction>;
104
- /**
105
- * Type guard to check if an value is a {@link PluginHook} function
106
- *
107
- * @param value - The value to check
108
- * @returns True if the value is a {@link PluginHook} function, false otherwise
109
- */
110
- declare function isPluginHookFunction(value: unknown): value is AnyFunction;
111
- /**
112
- * Type guard to check if an object is a {@link PluginHook}
113
- *
114
- * @param value - The object to check
115
- * @returns True if the object is a {@link PluginHook}, false otherwise
116
- */
117
- declare function isPluginHook(value: unknown): value is PluginHook<AnyFunction>;
118
- 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;
119
- /**
120
- * Extract the hook handler function from a plugin hook
121
- *
122
- * @param pluginHook - The plugin hook to extract the handler function from
123
- * @returns The hook handler function
124
- */
125
- declare function getHookHandler<TContext extends PluginContext = PluginContext, TField extends HookFields<TContext> = HookFields<TContext>>(pluginHook: PluginHook<AnyFunction>): GetHookHandlerReturnType<TContext, TField>;
126
- /**
127
- * Extract a plugin hook from a plugin
128
- *
129
- * @param context - The build context
130
- * @param plugin - The plugin to extract the hook from
131
- * @param hook - The name of the hook to extract
132
- * @returns The extracted hook, or undefined if the hook does not exist
133
- */
134
- declare function extractPluginHook<TContext extends PluginContext = PluginContext, TPlugin extends Plugin<TContext> = Plugin<TContext>>(context: TContext, plugin: TPlugin, hook: keyof PluginHooks<TContext>): {
135
- 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: {
136
- isEntry: boolean;
137
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>) | (((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
138
- isEntry: boolean;
139
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>) & PluginHookObject<(this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
140
- isEntry: boolean;
141
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>, "id">) | (PluginHookObject<(this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
142
- isEntry: boolean;
143
- }) => _stryke_types_base0.MaybePromise<string | ResolveResult | null | undefined>, never> & ((this: unplugin0.UnpluginBuildContext & PluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
144
- isEntry: boolean;
145
- }) => _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>)>;
146
- } | {
147
- [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: {
148
- isEntry: boolean;
149
- }) => _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>)>;
150
- normal?: undefined;
151
- } | undefined;
152
- /**
153
- * Check if a hook is external.
154
- *
155
- * @param keys - The name of the hook to check.
156
- * @returns True if the hook is external, false otherwise.
157
- */
158
- declare function isUnpluginHookKey<TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant>(keys: string): keys is `${TUnpluginBuilderVariant}:${keyof UnpluginOptions$1[TUnpluginBuilderVariant] & string}`;
159
- /**
160
- * Check if a hook is internal.
161
- *
162
- * @param keys - The name of the hook to check.
163
- * @returns True if the hook is external, false otherwise.
164
- */
165
- declare function isPluginHookField<TContext extends PluginContext>(keys: string): keys is PluginHookFields<TContext>;
166
- /**
167
- * Check if a hook is external.
168
- *
169
- * @param field - The name of the hook to check.
170
- * @returns True if the hook is external, false otherwise.
171
- */
172
- declare function isUnpluginHookField<TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant>(field: string): field is TUnpluginBuilderVariant;
173
- /**
174
- * Check if a plugin should be deduplicated.
175
- *
176
- * @param plugin - The plugin to check
177
- * @param plugins - The list of plugins to check against
178
- * @returns True if the plugin should be deduplicated, false otherwise
179
- */
180
- declare function checkDedupe<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TContext extends PluginContext<TResolvedConfig> = PluginContext<TResolvedConfig>>(plugin: Plugin<TContext>, plugins: Plugin<TContext>[]): boolean;
181
- /**
182
- * Add a plugin hook to the hooks list.
183
- *
184
- * @param context - The plugin context
185
- * @param plugin - The plugin to add the hook from
186
- * @param pluginHook - The plugin hook to add
187
- * @param hooksList - The list of hooks to add to
188
- */
189
- 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;
190
- /**
191
- * 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.
192
- *
193
- * @param config - The plugin configuration to check
194
- * @returns Null if the configuration is valid, otherwise an array of stringified invalid configurations
195
- */
196
- declare function findInvalidPluginConfig<TContext extends PluginContext = PluginContext<ResolvedConfig>>(config: PluginConfig<TContext>): string[] | null;
197
- declare type __ΩGetHookHandlerReturnType = any[];
198
- //#endregion
199
- //#region ../core/src/plugin-utils/merge.d.ts
200
- 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>;
201
- /**
202
- * Merges two {@link Plugin | plugins} or {@link PartialPlugin | partial plugins} together.
203
- *
204
- * @param pluginA - The first {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.
205
- * @param pluginB - The second {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.
206
- * @returns The merged {@link Plugin | plugin} or {@link PartialPlugin | partial plugin}.
207
- */
208
- declare function merge<TContext extends PluginContext = PluginContext>(pluginA: Plugin<TContext> | PartialPlugin<TContext>, pluginB: Plugin<TContext> | PartialPlugin<TContext>): MergeResult<TContext, typeof pluginA, typeof pluginB>;
209
- /**
210
- * Merges two configuration objects together, with special handling for string values.
211
- * If the value from the second object is a non-empty string, it will overwrite the value from the first object.
212
- *
213
- * @example
214
- * ```ts
215
- * const configA = { name: "Default", version: "1.0.0" };
216
- * const configB = { name: "Custom", description: "A custom config" };
217
- * const mergedConfig = mergeConfig(configA, configB);
218
- * // Result: { name: "Custom", version: "1.0.0", description: "A custom config" }
219
- * ```
220
- *
221
- * @param objA - The first configuration object.
222
- * @param objB - The second configuration object.
223
- * @returns The merged configuration object.
224
- */
225
- declare const mergeConfig: (...configs: unknown[]) => ResolvedConfig;
226
- declare type __ΩMergeResult = any[];
227
- //#endregion
228
- //#region ../core/src/plugin-utils/modules.d.ts
229
- /**
230
- * Determine if a module ID is a built-in Powerlines module ID.
231
- *
232
- * @param context - The Powerlines context.
233
- * @param moduleName - The name of the module to check.
234
- * @returns `true` if the module is a built-in module, otherwise `false`.
235
- */
236
- declare function isBuiltinModule(context: Context, moduleName: string): boolean;
237
- //#endregion
238
- //#region ../core/src/plugin-utils/paths.d.ts
239
- /**
240
- * Replaces tokens in the given path string with their corresponding values from the context.
241
- *
242
- * @remarks
243
- * The following tokens are supported:
244
- * - `{workspaceRoot}` - The root directory of the workspace.
245
- * - `{root}` - The root directory of the project (same as `{projectRoot}`).
246
- * - `{projectRoot}` - The root directory of the project (same as `{root}`).
247
- * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
248
- * - `{powerlinesPath}` - The directory where Powerlines is installed.
249
- * - `{cachePath}` - The environment's directory for cached files.
250
- * - `{dataPath}` - The environment's directory for data files.
251
- * - `{logPath}` - The environment's directory for log files.
252
- * - `{tempPath}` - The environment's directory for temporary files.
253
- * - `{configPath}` - The environment's directory for configuration files.
254
- * - `{outputPath}` - The configured output directory for the project.
255
- * - `{buildPath}` - The configured distribution directory for the project.
256
- * - `{artifactsPath}` - The configured directory for build artifacts.
257
- * - `{builtinPath}` - The configured directory for generated built-in plugins.
258
- * - `{entryPath}` - The configured directory for generated entry files.
259
- *
260
- * @param context - The context containing the values for the path tokens.
261
- * @param path - The path string with tokens to replace.
262
- * @returns The path string with tokens replaced by their corresponding values from the context.
263
- */
264
- declare function replacePathTokens(context: UnresolvedContext, path?: string): IsUndefined<typeof path> extends true ? undefined : string;
265
- //#endregion
266
- 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 };
267
- //# sourceMappingURL=plugin-utils.d.cts.map
1
+ export * from "@powerlines/core/plugin-utils";