powerlines 0.41.6 → 0.41.8

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-BYLuEyjx.mjs} +142 -333
  3. package/dist/api-BYLuEyjx.mjs.map +1 -0
  4. package/dist/{api-GPlMYw0d.cjs → api-Zx_hzL3g.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 +17 -17
  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,96 +0,0 @@
1
-
2
- //#region ../core/src/constants/commands.ts
3
- const SUPPORTED_COMMANDS = [
4
- "new",
5
- "clean",
6
- "prepare",
7
- "lint",
8
- "test",
9
- "build",
10
- "docs",
11
- "deploy",
12
- "finalize"
13
- ];
14
-
15
- //#endregion
16
- //#region ../core/src/constants/plugin.ts
17
- const UNPLUGIN_BUILDER_VARIANTS = [
18
- "rollup",
19
- "webpack",
20
- "rspack",
21
- "vite",
22
- "esbuild",
23
- "farm",
24
- "unloader",
25
- "rolldown",
26
- "bun"
27
- ];
28
- const BUILDER_VARIANTS = [
29
- ...UNPLUGIN_BUILDER_VARIANTS,
30
- "tsup",
31
- "tsdown",
32
- "unbuild"
33
- ];
34
- const PLUGIN_NON_HOOK_FIELDS = [
35
- "name",
36
- "api",
37
- "enforce",
38
- "dedupe",
39
- "applyToEnvironment"
40
- ];
41
- const PLUGIN_HOOKS_FIELDS = [
42
- ...SUPPORTED_COMMANDS,
43
- "config",
44
- "configEnvironment",
45
- "configResolved",
46
- "types",
47
- "buildStart",
48
- "buildEnd",
49
- "transform",
50
- "load",
51
- "resolveId",
52
- "writeBundle"
53
- ];
54
- const KNOWN_PLUGIN_FIELDS = [
55
- ...PLUGIN_NON_HOOK_FIELDS,
56
- ...PLUGIN_HOOKS_FIELDS,
57
- ...BUILDER_VARIANTS
58
- ];
59
-
60
- //#endregion
61
- Object.defineProperty(exports, 'BUILDER_VARIANTS', {
62
- enumerable: true,
63
- get: function () {
64
- return BUILDER_VARIANTS;
65
- }
66
- });
67
- Object.defineProperty(exports, 'KNOWN_PLUGIN_FIELDS', {
68
- enumerable: true,
69
- get: function () {
70
- return KNOWN_PLUGIN_FIELDS;
71
- }
72
- });
73
- Object.defineProperty(exports, 'PLUGIN_HOOKS_FIELDS', {
74
- enumerable: true,
75
- get: function () {
76
- return PLUGIN_HOOKS_FIELDS;
77
- }
78
- });
79
- Object.defineProperty(exports, 'PLUGIN_NON_HOOK_FIELDS', {
80
- enumerable: true,
81
- get: function () {
82
- return PLUGIN_NON_HOOK_FIELDS;
83
- }
84
- });
85
- Object.defineProperty(exports, 'SUPPORTED_COMMANDS', {
86
- enumerable: true,
87
- get: function () {
88
- return SUPPORTED_COMMANDS;
89
- }
90
- });
91
- Object.defineProperty(exports, 'UNPLUGIN_BUILDER_VARIANTS', {
92
- enumerable: true,
93
- get: function () {
94
- return UNPLUGIN_BUILDER_VARIANTS;
95
- }
96
- });
@@ -1,26 +0,0 @@
1
- import { Et as PluginContext, N as UserConfig$1, a as ConfigEnv, j as ResolvedConfig$1 } from "./config-CK756s0L.mjs";
2
- import { DepOptimizationOptions, UserConfig } from "vite";
3
-
4
- //#region ../plugin-vite/src/types/build.d.ts
5
- type ViteOptions = Omit<UserConfig, "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output" | "platform" | "define" | "external"> & {
6
- /**
7
- * Optimize deps config
8
- */
9
- optimizeDeps?: Omit<DepOptimizationOptions, "extensions">;
10
- };
11
- //#endregion
12
- //#region ../plugin-vite/src/types/plugin.d.ts
13
- type VitePluginOptions = Partial<ViteOptions>;
14
- interface VitePluginUserConfig extends UserConfig$1 {
15
- vite?: VitePluginOptions;
16
- }
17
- interface VitePluginResolvedConfig extends ResolvedConfig$1 {
18
- vite: ViteOptions;
19
- }
20
- type VitePluginContext<TResolvedConfig extends VitePluginResolvedConfig = VitePluginResolvedConfig> = PluginContext<TResolvedConfig> & {
21
- dev: boolean;
22
- configEnv: ConfigEnv;
23
- };
24
- //#endregion
25
- export { VitePluginOptions as n, VitePluginUserConfig as r, VitePluginContext as t };
26
- //# sourceMappingURL=plugin-C_8RhG5V.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-C_8RhG5V.d.mts","names":[],"sources":["../../plugin-vite/src/types/build.ts","../../plugin-vite/src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAoBY,WAAA,GAAc,KACxB;;;AADF;EACE,YAAA,CAAA,EAce,IAdf,CAcoB,sBAdpB,EAAA,YAAA,CAAA;CADwB;;;KCMd,iBAAA,GAAoB,QAAQ;UAEvB,oBAAA,SAA6B;EDRlC,IAAA,CAAA,ECSH,iBDTc;;AAAG,UCYT,wBAAA,SAAiC,gBDZxB,CAAA;EAeJ,IAAA,ECFd,WDEc;;AAAD,KCCT,iBDDS,CAAA,wBCEK,wBDFL,GCEgC,wBDFhC,CAAA,GCGjB,aDHiB,CCGH,eDHG,CAAA,GAAA;;aCKR"}
@@ -1,61 +0,0 @@
1
- //#region ../core/src/constants/commands.ts
2
- const SUPPORTED_COMMANDS = [
3
- "new",
4
- "clean",
5
- "prepare",
6
- "lint",
7
- "test",
8
- "build",
9
- "docs",
10
- "deploy",
11
- "finalize"
12
- ];
13
-
14
- //#endregion
15
- //#region ../core/src/constants/plugin.ts
16
- const UNPLUGIN_BUILDER_VARIANTS = [
17
- "rollup",
18
- "webpack",
19
- "rspack",
20
- "vite",
21
- "esbuild",
22
- "farm",
23
- "unloader",
24
- "rolldown",
25
- "bun"
26
- ];
27
- const BUILDER_VARIANTS = [
28
- ...UNPLUGIN_BUILDER_VARIANTS,
29
- "tsup",
30
- "tsdown",
31
- "unbuild"
32
- ];
33
- const PLUGIN_NON_HOOK_FIELDS = [
34
- "name",
35
- "api",
36
- "enforce",
37
- "dedupe",
38
- "applyToEnvironment"
39
- ];
40
- const PLUGIN_HOOKS_FIELDS = [
41
- ...SUPPORTED_COMMANDS,
42
- "config",
43
- "configEnvironment",
44
- "configResolved",
45
- "types",
46
- "buildStart",
47
- "buildEnd",
48
- "transform",
49
- "load",
50
- "resolveId",
51
- "writeBundle"
52
- ];
53
- const KNOWN_PLUGIN_FIELDS = [
54
- ...PLUGIN_NON_HOOK_FIELDS,
55
- ...PLUGIN_HOOKS_FIELDS,
56
- ...BUILDER_VARIANTS
57
- ];
58
-
59
- //#endregion
60
- export { UNPLUGIN_BUILDER_VARIANTS as a, PLUGIN_NON_HOOK_FIELDS as i, KNOWN_PLUGIN_FIELDS as n, SUPPORTED_COMMANDS as o, PLUGIN_HOOKS_FIELDS as r, BUILDER_VARIANTS as t };
61
- //# sourceMappingURL=plugin-E5foRD0k.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-E5foRD0k.mjs","names":[],"sources":["../../core/src/constants/commands.ts","../../core/src/constants/plugin.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 const SUPPORTED_COMMANDS = [\n \"new\",\n \"clean\",\n \"prepare\",\n \"lint\",\n \"test\",\n \"build\",\n \"docs\",\n \"deploy\",\n \"finalize\"\n] as const;\n","/* -------------------------------------------------------------------\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 { SUPPORTED_COMMANDS } from \"./commands\";\n\nexport const UNPLUGIN_BUILDER_VARIANTS = [\n \"rollup\",\n \"webpack\",\n \"rspack\",\n \"vite\",\n \"esbuild\",\n \"farm\",\n \"unloader\",\n \"rolldown\",\n \"bun\"\n] as const;\n\nexport const BUILDER_VARIANTS = [\n ...UNPLUGIN_BUILDER_VARIANTS,\n \"tsup\",\n \"tsdown\",\n \"unbuild\"\n] as const;\n\nexport const PLUGIN_NON_HOOK_FIELDS = [\n \"name\",\n \"api\",\n \"enforce\",\n \"dedupe\",\n \"applyToEnvironment\"\n] as const;\n\nexport const PLUGIN_HOOKS_FIELDS = [\n ...SUPPORTED_COMMANDS,\n \"config\",\n \"configEnvironment\",\n \"configResolved\",\n \"types\",\n \"buildStart\",\n \"buildEnd\",\n \"transform\",\n \"load\",\n \"resolveId\",\n \"writeBundle\"\n] as const;\n\nexport const KNOWN_PLUGIN_FIELDS = [\n ...PLUGIN_NON_HOOK_FIELDS,\n ...PLUGIN_HOOKS_FIELDS,\n ...BUILDER_VARIANTS\n] as const;\n"],"mappings":";AAkBA,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;;;;ACRD,MAAa,4BAA4B;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,mBAAmB;CAC9B,GAAG;CACH;CACA;CACA;CACD;AAED,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,sBAAsB;CACjC,GAAG;CACH;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,sBAAsB;CACjC,GAAG;CACH,GAAG;CACH,GAAG;CACJ"}
@@ -1,387 +0,0 @@
1
- import { a as UNPLUGIN_BUILDER_VARIANTS, r as PLUGIN_HOOKS_FIELDS, t as BUILDER_VARIANTS } from "./plugin-E5foRD0k.mjs";
2
- import { n as format } from "./paths-CS8ecCnW.mjs";
3
- import { toArray } from "@stryke/convert/to-array";
4
- import { isFunction } from "@stryke/type-checks/is-function";
5
- import { isSetObject } from "@stryke/type-checks/is-set-object";
6
- import { isSetString } from "@stryke/type-checks/is-set-string";
7
- import { isString } from "@stryke/type-checks/is-string";
8
- import defu, { createDefu } from "defu";
9
- import { getUnique } from "@stryke/helpers/get-unique";
10
- import { isRegExp } from "@stryke/type-checks/is-regexp";
11
- import { isUndefined } from "@stryke/type-checks/is-undefined";
12
- import { joinPaths } from "@stryke/path/join";
13
- import { existsSync } from "node:fs";
14
-
15
- //#region ../core/src/plugin-utils/build-helpers.ts
16
- /**
17
- * Get the {@link ResolveConfig.external | external} and {@link ResolveConfig.noExternal | noExternal} dependencies for the build configuration.
18
- *
19
- * @param context - The build context.
20
- * @returns The dependency configuration.
21
- */
22
- function getDependencyConfig(context) {
23
- const noExternal = getUnique(toArray(context.config.resolve.noExternal).concat(context.builtins));
24
- const external = getUnique(toArray(context.config.resolve.external).reduce((ret, ext) => {
25
- if (isRegExp(ext)) {
26
- if (noExternal.some((noExt) => isRegExp(noExt) && noExt.source === ext.source)) return ret;
27
- const noExts = noExternal.filter((noExt) => isSetString(noExt) && ext.test(noExt));
28
- if (noExts.length > 0) {
29
- ret.push(new RegExp(noExts.reduce((regex, noExt) => `(?!${isRegExp(noExt) ? noExt.source : `^${noExt}$`})${regex}`, `${ext.source.replace(/^\^@\?/, "^@").replace(/^@\?/, "@").replace(/\$$/, "").replace(/\.\*$/, "")}.*$`)));
30
- return ret;
31
- }
32
- }
33
- ret.push(ext);
34
- return ret;
35
- }, []));
36
- return {
37
- external: external.length === 0 ? void 0 : external,
38
- noExternal: noExternal.length === 0 ? void 0 : noExternal
39
- };
40
- }
41
-
42
- //#endregion
43
- //#region ../core/src/plugin-utils/context-helpers.ts
44
- /**
45
- * Get the organization name from the context
46
- *
47
- * @param context - The Powerlines plugin context.
48
- * @returns The organization name or undefined if not found.
49
- */
50
- function getOrganizationName(context) {
51
- let result;
52
- if (isSetObject(context.workspaceConfig.organization)) result = context.workspaceConfig.organization.name;
53
- if (!result && isSetString(context.workspaceConfig.organization)) result = context.workspaceConfig.organization;
54
- if (!result && Array.isArray(context.packageJson.maintainers) && context.packageJson.maintainers.length > 0) {
55
- if (isSetObject(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0].name;
56
- if (!result && isSetString(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0];
57
- }
58
- if (!result && Array.isArray(context.packageJson.author) && context.packageJson.author.length > 0) {
59
- if (isSetObject(context.packageJson.author[0])) result = context.packageJson.author[0].name;
60
- if (!result && isSetString(context.packageJson.author[0])) result = context.packageJson.author[0];
61
- }
62
- if (!result && Array.isArray(context.packageJson.contributors) && context.packageJson.contributors.length > 0) {
63
- if (isSetObject(context.packageJson.contributors[0])) result = context.packageJson.contributors[0].name;
64
- if (!result && isSetString(context.packageJson.contributors[0])) result = context.packageJson.contributors[0];
65
- }
66
- if (!result && isSetString(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
67
- if (!result && isSetString(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
68
- return result;
69
- }
70
- /**
71
- * Get the organization name from the context
72
- *
73
- * @param context - The Powerlines plugin context.
74
- * @returns The organization name or undefined if not found.
75
- */
76
- function getWorkspaceName(context) {
77
- let result;
78
- if (isSetString(context.workspaceConfig.name)) result = context.workspaceConfig.name;
79
- if (!result && isSetString(context.workspaceConfig.namespace)) result = context.workspaceConfig.namespace.replace(/^@/, "");
80
- if (!result && isSetString(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
81
- if (!result && isSetString(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
82
- return result;
83
- }
84
-
85
- //#endregion
86
- //#region ../core/src/plugin-utils/helpers.ts
87
- /**
88
- * Type guard to check if an object is a {@link Plugin}
89
- *
90
- * @param value - The object to check
91
- * @returns True if the object is a {@link Plugin}, false otherwise
92
- */
93
- function isPlugin(value) {
94
- return isSetObject(value) && "name" in value && isSetString(value.name) && (isUndefined(value.api) || "api" in value && isSetObject(value.api)) && (isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction(value.applyToEnvironment)) && (isUndefined(value.dedupe) || "dedupe" in value && isFunction(value.dedupe)) && PLUGIN_HOOKS_FIELDS.every((hook) => isUndefined(value[hook]) || hook in value && (isPluginHookFunction(value[hook]) || hook === "config" && isSetObject(value[hook]))) && BUILDER_VARIANTS.every((variant) => isUndefined(value[variant]) || variant in value && isSetObject(value[variant]));
95
- }
96
- /**
97
- * Type guard to check if an object is a {@link PluginConfigObject}
98
- *
99
- * @param value - The object to check
100
- * @returns True if the object is a {@link PluginConfigObject}, false otherwise
101
- */
102
- function isPluginConfigObject(value) {
103
- return isSetObject(value) && "plugin" in value && ((isSetString(value.plugin) || isFunction(value.plugin)) && "options" in value && isSetObject(value.options) || isPlugin(value.plugin));
104
- }
105
- /**
106
- * Type guard to check if an object is a {@link PluginConfigTuple}
107
- *
108
- * @param value - The object to check
109
- * @returns True if the object is a {@link PluginConfigTuple}, false otherwise
110
- */
111
- function isPluginConfigTuple(value) {
112
- return Array.isArray(value) && (value.length === 1 || value.length === 2) && ((isSetString(value[0]) || isFunction(value[0])) && value.length > 1 && isSetObject(value[1]) || isPlugin(value[0]));
113
- }
114
- /**
115
- * Type guard to check if an object is a {@link PluginConfig}
116
- *
117
- * @param value - The object to check
118
- * @returns True if the object is a {@link PluginConfig}, false otherwise
119
- */
120
- function isPluginConfig(value) {
121
- return isSetString(value) || isFunction(value) || isPlugin(value) || isPluginConfigObject(value) || isPluginConfigTuple(value) || Array.isArray(value) && value.every((item) => isPluginConfig(item));
122
- }
123
- /**
124
- * Type guard to check if an value is a {@link PluginHook} function
125
- *
126
- * @param value - The value to check
127
- * @returns True if the value is a {@link PluginHook} function, false otherwise
128
- */
129
- function isPluginHookObject(value) {
130
- return isSetObject(value) && "handler" in value && isFunction(value.handler);
131
- }
132
- /**
133
- * Type guard to check if an value is a {@link PluginHook} function
134
- *
135
- * @param value - The value to check
136
- * @returns True if the value is a {@link PluginHook} function, false otherwise
137
- */
138
- function isPluginHookFunction(value) {
139
- return isFunction(value) || isPluginHookObject(value);
140
- }
141
- /**
142
- * Type guard to check if an object is a {@link PluginHook}
143
- *
144
- * @param value - The object to check
145
- * @returns True if the object is a {@link PluginHook}, false otherwise
146
- */
147
- function isPluginHook(value) {
148
- return isPluginHookFunction(value) || isPluginHookObject(value);
149
- }
150
- /**
151
- * Extract the hook handler function from a plugin hook
152
- *
153
- * @param pluginHook - The plugin hook to extract the handler function from
154
- * @returns The hook handler function
155
- */
156
- function getHookHandler(pluginHook) {
157
- return isFunction(pluginHook) ? pluginHook : pluginHook.handler;
158
- }
159
- /**
160
- * Extract a plugin hook from a plugin
161
- *
162
- * @param context - The build context
163
- * @param plugin - The plugin to extract the hook from
164
- * @param hook - The name of the hook to extract
165
- * @returns The extracted hook, or undefined if the hook does not exist
166
- */
167
- function extractPluginHook(context, plugin, hook) {
168
- const pluginHook = plugin[hook];
169
- if (!isPluginHook(pluginHook)) return;
170
- return isFunction(pluginHook) ? { normal: pluginHook.bind(context) } : { [pluginHook.order ? pluginHook.order : "normal"]: pluginHook.handler.bind(context) };
171
- }
172
- /**
173
- * Check if a hook is external.
174
- *
175
- * @param keys - The name of the hook to check.
176
- * @returns True if the hook is external, false otherwise.
177
- */
178
- function isUnpluginHookKey(keys) {
179
- return UNPLUGIN_BUILDER_VARIANTS.some((variant) => keys.startsWith(`${variant}:`));
180
- }
181
- /**
182
- * Check if a hook is internal.
183
- *
184
- * @param keys - The name of the hook to check.
185
- * @returns True if the hook is external, false otherwise.
186
- */
187
- function isPluginHookField(keys) {
188
- return !isUnpluginHookKey(keys) && PLUGIN_HOOKS_FIELDS.includes(keys);
189
- }
190
- /**
191
- * Check if a hook is external.
192
- *
193
- * @param field - The name of the hook to check.
194
- * @returns True if the hook is external, false otherwise.
195
- */
196
- function isUnpluginHookField(field) {
197
- return !isPluginHookField(field) && UNPLUGIN_BUILDER_VARIANTS.includes(field);
198
- }
199
- /**
200
- * Check if a plugin should be deduplicated.
201
- *
202
- * @param plugin - The plugin to check
203
- * @param plugins - The list of plugins to check against
204
- * @returns True if the plugin should be deduplicated, false otherwise
205
- */
206
- function checkDedupe(plugin, plugins) {
207
- return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && (isFunction(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
208
- }
209
- /**
210
- * Add a plugin hook to the hooks list.
211
- *
212
- * @param context - The plugin context
213
- * @param plugin - The plugin to add the hook from
214
- * @param pluginHook - The plugin hook to add
215
- * @param hooksList - The list of hooks to add to
216
- */
217
- function addPluginHook(context, plugin, pluginHook, hooksList) {
218
- if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin).filter(Boolean))) {
219
- const handler = ((...args) => getHookHandler(pluginHook).apply(context, args));
220
- if (!handler) return;
221
- hooksList.push({
222
- plugin,
223
- handler
224
- });
225
- }
226
- }
227
- /**
228
- * 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.
229
- *
230
- * @param config - The plugin configuration to check
231
- * @returns Null if the configuration is valid, otherwise an array of stringified invalid configurations
232
- */
233
- function findInvalidPluginConfig(config) {
234
- if (isPluginConfig(config)) return null;
235
- if (Array.isArray(config)) {
236
- const invalidItems = [];
237
- config.forEach((item) => {
238
- const invalid = findInvalidPluginConfig(item);
239
- if (invalid) invalidItems.push(...invalid.map((i) => JSON.stringify(i, null, 2)));
240
- });
241
- return invalidItems.length > 0 ? invalidItems : null;
242
- }
243
- return [JSON.stringify(config, null, 2)];
244
- }
245
-
246
- //#endregion
247
- //#region ../core/src/plugin-utils/merge.ts
248
- const mergePlugin = createDefu((obj, key, value) => {
249
- if (isPluginHook(obj[key]) && isPluginHook(value)) {
250
- obj[key] = {
251
- ...obj[key],
252
- ...value,
253
- handler: async (...params) => {
254
- const [resultA, resultB] = await Promise.all([getHookHandler(obj[key])(...params), getHookHandler(value)(...params)]);
255
- return resultB && resultA ? defu(resultA, resultB) : resultA || resultB;
256
- }
257
- };
258
- return true;
259
- }
260
- return false;
261
- });
262
- /**
263
- * Merges two {@link Plugin | plugins} or {@link PartialPlugin | partial plugins} together.
264
- *
265
- * @param pluginA - The first {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.
266
- * @param pluginB - The second {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.
267
- * @returns The merged {@link Plugin | plugin} or {@link PartialPlugin | partial plugin}.
268
- */
269
- function merge(pluginA, pluginB) {
270
- return mergePlugin(pluginA, pluginB);
271
- }
272
- /**
273
- * Merges two configuration objects together, with special handling for string values.
274
- * If the value from the second object is a non-empty string, it will overwrite the value from the first object.
275
- *
276
- * @example
277
- * ```ts
278
- * const configA = { name: "Default", version: "1.0.0" };
279
- * const configB = { name: "Custom", description: "A custom config" };
280
- * const mergedConfig = mergeConfig(configA, configB);
281
- * // Result: { name: "Custom", version: "1.0.0", description: "A custom config" }
282
- * ```
283
- *
284
- * @param objA - The first configuration object.
285
- * @param objB - The second configuration object.
286
- * @returns The merged configuration object.
287
- */
288
- const mergeConfig = createDefu((obj, key, value) => {
289
- if (isString(obj[key]) && isString(value)) {
290
- if (isSetString(value)) obj[key] = value;
291
- return true;
292
- }
293
- return false;
294
- });
295
-
296
- //#endregion
297
- //#region ../core/src/plugin-utils/extend.ts
298
- function extend(plugin, extension) {
299
- if (isFunction(plugin)) {
300
- if (isFunction(extension)) return async (options) => {
301
- const pluginResult = toArray(await Promise.resolve(plugin(options)));
302
- const extensionResult = toArray(await Promise.resolve(extension(options)));
303
- return pluginResult.map((p) => extensionResult.map((e) => merge(p, e))).flat();
304
- };
305
- return async (options) => {
306
- return toArray(await Promise.resolve(plugin(options))).map((p) => merge(p, extension));
307
- };
308
- } else if (isFunction(extension)) return async (options) => {
309
- return toArray(await Promise.resolve(extension(options))).map((e) => toArray(plugin).map((p) => merge(p, e))).flat();
310
- };
311
- return toArray(plugin).map((p) => merge(p, extension));
312
- }
313
-
314
- //#endregion
315
- //#region ../core/src/plugin-utils/format-package-json.ts
316
- /**
317
- * Formats the `package.json` file in the project root.
318
- *
319
- * @param context - The powerlines context.
320
- */
321
- async function formatPackageJson(context) {
322
- const packageJsonPath = joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, "package.json");
323
- const packageJsonFile = await context.fs.read(packageJsonPath);
324
- if (isSetString(packageJsonFile)) await context.fs.write(packageJsonPath, await format(context, packageJsonPath, packageJsonFile));
325
- }
326
-
327
- //#endregion
328
- //#region ../core/src/plugin-utils/get-config-path.ts
329
- /**
330
- * Get the configuration file path for a given name.
331
- *
332
- * @param context - The Powerlines context.
333
- * @param name - The name of the configuration file (without extension).
334
- * @returns The absolute path to the configuration file, or undefined if not found.
335
- */
336
- function getConfigPath(context, name) {
337
- if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yml`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yml`);
338
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yaml`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.yaml`);
339
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.json`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.json`);
340
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.jsonc`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.jsonc`);
341
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.ts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.ts`);
342
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cts`);
343
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mts`);
344
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.js`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.js`);
345
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.cjs`);
346
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.mjs`);
347
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.ts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.ts`);
348
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cts`);
349
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mts`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mts`);
350
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.js`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.js`);
351
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.cjs`);
352
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, `${name}.config.mjs`);
353
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yml`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yml`);
354
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yaml`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.yaml`);
355
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.json`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.json`);
356
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.jsonc`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.jsonc`);
357
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.ts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.ts`);
358
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cts`);
359
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mts`);
360
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.js`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.js`);
361
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.cjs`);
362
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.mjs`);
363
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.ts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.ts`);
364
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cts`);
365
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mts`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mts`);
366
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.js`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.js`);
367
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.cjs`);
368
- else if (existsSync(joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`))) return joinPaths(context.workspaceConfig.workspaceRoot, `${name}.config.mjs`);
369
- }
370
-
371
- //#endregion
372
- //#region ../core/src/plugin-utils/modules.ts
373
- /**
374
- * Determine if a module ID is a built-in Powerlines module ID.
375
- *
376
- * @param context - The Powerlines context.
377
- * @param moduleName - The name of the module to check.
378
- * @returns `true` if the module is a built-in module, otherwise `false`.
379
- */
380
- function isBuiltinModule(context, moduleName) {
381
- const prefix = context.config?.framework || "powerlines";
382
- return moduleName.startsWith(`${prefix.replace(/:$/, "")}:`) || Object.keys(context.fs.metadata).filter((key) => context.fs.metadata[key]?.type === "builtin").includes(moduleName);
383
- }
384
-
385
- //#endregion
386
- export { getWorkspaceName as C, getOrganizationName as S, isPluginHookField as _, merge as a, isUnpluginHookField as b, checkDedupe as c, getHookHandler as d, isPlugin as f, isPluginHook as g, isPluginConfigTuple as h, extend as i, extractPluginHook as l, isPluginConfigObject as m, getConfigPath as n, mergeConfig as o, isPluginConfig as p, formatPackageJson as r, addPluginHook as s, isBuiltinModule as t, findInvalidPluginConfig as u, isPluginHookFunction as v, getDependencyConfig as w, isUnpluginHookKey as x, isPluginHookObject as y };
387
- //# sourceMappingURL=plugin-utils-C3HnZJl1.mjs.map