@powerlines/plugin-env 0.15.4 → 0.15.6

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 (264) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/babel/index.cjs +1 -0
  3. package/dist/babel/index.d.cts +1 -0
  4. package/dist/babel/index.d.mts +1 -0
  5. package/dist/babel/index.mjs +3 -0
  6. package/dist/babel/plugin.cjs +200 -0
  7. package/dist/babel/plugin.d.cts +8 -0
  8. package/dist/babel/plugin.d.mts +9 -0
  9. package/dist/babel/plugin.mjs +198 -0
  10. package/dist/components/docs.cjs +70 -3
  11. package/dist/components/docs.d.cts +8 -1
  12. package/dist/components/docs.d.mts +8 -1
  13. package/dist/components/docs.mjs +68 -2
  14. package/dist/components/env.cjs +574 -4
  15. package/dist/components/env.d.cts +19 -2
  16. package/dist/components/env.d.mts +19 -3
  17. package/dist/components/env.mjs +570 -2
  18. package/dist/components/index.cjs +5 -7
  19. package/dist/components/index.d.cts +2 -4
  20. package/dist/components/index.d.mts +2 -5
  21. package/dist/components/index.mjs +2 -4
  22. package/dist/deepkit/schemas/reflection.cjs +5368 -0
  23. package/dist/{plugin-BwuEBScL.d.cts → deepkit/schemas/reflection.d.cts} +1 -268
  24. package/dist/{plugin-BaInAuAh.d.mts → deepkit/schemas/reflection.d.mts} +59 -326
  25. package/dist/deepkit/schemas/reflection.mjs +5365 -0
  26. package/dist/deepkit/schemas/reflection2.cjs +4112 -0
  27. package/dist/deepkit/schemas/reflection2.mjs +4110 -0
  28. package/dist/deepkit/src/capnp.cjs +1692 -0
  29. package/dist/deepkit/src/capnp.mjs +1690 -0
  30. package/dist/deepkit/src/esbuild-plugin.cjs +99 -0
  31. package/dist/deepkit/src/esbuild-plugin.mjs +98 -0
  32. package/dist/deepkit/src/reflect-type.cjs +40 -0
  33. package/dist/deepkit/src/reflect-type.mjs +38 -0
  34. package/dist/deepkit/src/resolve-reflections.cjs +23 -0
  35. package/dist/deepkit/src/resolve-reflections.mjs +22 -0
  36. package/dist/deepkit/src/transformer.cjs +92 -0
  37. package/dist/deepkit/src/transformer.mjs +89 -0
  38. package/dist/deepkit/src/transpile.cjs +39 -0
  39. package/dist/deepkit/src/transpile.mjs +37 -0
  40. package/dist/deepkit/src/types.cjs +22 -0
  41. package/dist/deepkit/src/types.d.cts +10 -0
  42. package/dist/deepkit/src/types.d.mts +10 -0
  43. package/dist/deepkit/src/types.mjs +21 -0
  44. package/dist/deepkit/src/utilities.cjs +182 -0
  45. package/dist/deepkit/src/utilities.mjs +181 -0
  46. package/dist/helpers/automd-generator.cjs +32 -0
  47. package/dist/helpers/automd-generator.mjs +31 -0
  48. package/dist/helpers/create-reflection-resource.cjs +98 -0
  49. package/dist/helpers/create-reflection-resource.d.cts +15 -0
  50. package/dist/helpers/create-reflection-resource.d.mts +15 -0
  51. package/dist/helpers/create-reflection-resource.mjs +97 -0
  52. package/dist/helpers/index.cjs +6 -0
  53. package/dist/helpers/index.d.cts +6 -0
  54. package/dist/helpers/index.d.mts +6 -0
  55. package/dist/helpers/index.mjs +8 -0
  56. package/dist/helpers/load.cjs +134 -0
  57. package/dist/helpers/load.d.cts +35 -0
  58. package/dist/helpers/load.d.mts +36 -0
  59. package/dist/helpers/load.mjs +131 -0
  60. package/dist/helpers/persistence.cjs +320 -0
  61. package/dist/helpers/persistence.d.cts +84 -0
  62. package/dist/helpers/persistence.d.mts +84 -0
  63. package/dist/helpers/persistence.mjs +308 -0
  64. package/dist/helpers/reflect.cjs +263 -0
  65. package/dist/helpers/reflect.d.cts +46 -0
  66. package/dist/helpers/reflect.d.mts +46 -0
  67. package/dist/helpers/reflect.mjs +254 -0
  68. package/dist/helpers/source-file-env.cjs +58 -0
  69. package/dist/helpers/source-file-env.d.cts +8 -0
  70. package/dist/helpers/source-file-env.d.mts +8 -0
  71. package/dist/helpers/source-file-env.mjs +56 -0
  72. package/dist/helpers/template-helpers.cjs +70 -0
  73. package/dist/helpers/template-helpers.d.cts +15 -0
  74. package/dist/helpers/template-helpers.d.mts +15 -0
  75. package/dist/helpers/template-helpers.mjs +69 -0
  76. package/dist/index.cjs +82 -696
  77. package/dist/index.d.cts +16 -185
  78. package/dist/index.d.mts +17 -190
  79. package/dist/index.mjs +31 -648
  80. package/dist/plugin-alloy/src/core/components/output.cjs +45 -0
  81. package/dist/plugin-alloy/src/core/components/output.mjs +44 -0
  82. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +22 -0
  83. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +21 -0
  84. package/dist/plugin-alloy/src/core/components/source-file.cjs +64 -0
  85. package/dist/plugin-alloy/src/core/components/source-file.d.cts +23 -0
  86. package/dist/plugin-alloy/src/core/components/source-file.d.mts +23 -0
  87. package/dist/plugin-alloy/src/core/components/source-file.mjs +62 -0
  88. package/dist/plugin-alloy/src/core/contexts/context.cjs +136 -0
  89. package/dist/plugin-alloy/src/core/contexts/context.mjs +128 -0
  90. package/dist/plugin-alloy/src/core/contexts/index.cjs +2 -0
  91. package/dist/plugin-alloy/src/core/contexts/index.mjs +4 -0
  92. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +110 -0
  93. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +101 -0
  94. package/dist/plugin-alloy/src/helpers/refkey.cjs +23 -0
  95. package/dist/plugin-alloy/src/helpers/refkey.mjs +22 -0
  96. package/dist/plugin-alloy/src/index.cjs +93 -0
  97. package/dist/plugin-alloy/src/index.mjs +91 -0
  98. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +115 -0
  99. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +114 -0
  100. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +39 -0
  101. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +38 -0
  102. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +72 -0
  103. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +71 -0
  104. package/dist/plugin-alloy/src/types/components.cjs +22 -0
  105. package/dist/plugin-alloy/src/types/components.d.cts +22 -0
  106. package/dist/{components-8W0Zgj0y.d.mts → plugin-alloy/src/types/components.d.mts} +2 -1
  107. package/dist/plugin-alloy/src/types/components.mjs +21 -0
  108. package/dist/plugin-alloy/src/types/index.d.mts +2 -0
  109. package/dist/plugin-alloy/src/types/plugin.cjs +55 -0
  110. package/dist/plugin-alloy/src/types/plugin.d.cts +37 -0
  111. package/dist/plugin-alloy/src/types/plugin.d.mts +37 -0
  112. package/dist/plugin-alloy/src/types/plugin.mjs +52 -0
  113. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +57 -0
  114. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +25 -0
  115. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +26 -0
  116. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +56 -0
  117. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +126 -0
  118. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +124 -0
  119. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +442 -0
  120. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +27 -0
  121. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +28 -0
  122. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +433 -0
  123. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +194 -0
  124. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +14 -0
  125. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +15 -0
  126. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +191 -0
  127. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +68 -0
  128. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +11 -0
  129. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +12 -0
  130. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +67 -0
  131. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +124 -0
  132. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +123 -0
  133. package/dist/plugin-automd/src/index.cjs +127 -0
  134. package/dist/plugin-automd/src/index.mjs +124 -0
  135. package/dist/plugin-automd/src/types/plugin.cjs +47 -0
  136. package/dist/plugin-automd/src/types/plugin.d.cts +38 -0
  137. package/dist/plugin-automd/src/types/plugin.d.mts +40 -0
  138. package/dist/plugin-automd/src/types/plugin.mjs +47 -0
  139. package/dist/plugin-automd/src/types/toc.cjs +26 -0
  140. package/dist/plugin-automd/src/types/toc.d.cts +33 -0
  141. package/dist/plugin-automd/src/types/toc.d.mts +33 -0
  142. package/dist/plugin-automd/src/types/toc.mjs +25 -0
  143. package/dist/plugin-babel/src/helpers/ast-utils.cjs +74 -0
  144. package/dist/plugin-babel/src/helpers/ast-utils.mjs +70 -0
  145. package/dist/plugin-babel/src/helpers/create-plugin.cjs +71 -0
  146. package/dist/plugin-babel/src/helpers/create-plugin.mjs +69 -0
  147. package/dist/plugin-babel/src/helpers/filters.cjs +158 -0
  148. package/dist/plugin-babel/src/helpers/filters.mjs +154 -0
  149. package/dist/plugin-babel/src/helpers/index.cjs +5 -0
  150. package/dist/plugin-babel/src/helpers/index.mjs +7 -0
  151. package/dist/plugin-babel/src/helpers/module-helpers.cjs +200 -0
  152. package/dist/plugin-babel/src/helpers/module-helpers.mjs +192 -0
  153. package/dist/plugin-babel/src/helpers/options.cjs +74 -0
  154. package/dist/plugin-babel/src/helpers/options.mjs +71 -0
  155. package/dist/plugin-babel/src/index.cjs +134 -0
  156. package/dist/plugin-babel/src/index.mjs +132 -0
  157. package/dist/plugin-babel/src/types/index.d.mts +1 -0
  158. package/dist/plugin-babel/src/types/plugin.cjs +42 -0
  159. package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
  160. package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
  161. package/dist/plugin-babel/src/types/plugin.mjs +39 -0
  162. package/dist/powerlines/schemas/fs.d.mts +1 -0
  163. package/dist/powerlines/src/api.d.mts +7 -0
  164. package/dist/powerlines/src/index.d.mts +12 -0
  165. package/dist/powerlines/src/internal/helpers/hooks.cjs +119 -0
  166. package/dist/powerlines/src/internal/helpers/hooks.d.mts +5 -0
  167. package/dist/powerlines/src/internal/helpers/hooks.mjs +118 -0
  168. package/dist/powerlines/src/lib/build/esbuild.cjs +161 -0
  169. package/dist/powerlines/src/lib/build/esbuild.mjs +159 -0
  170. package/dist/powerlines/src/lib/entry.cjs +203 -0
  171. package/dist/powerlines/src/lib/entry.mjs +201 -0
  172. package/dist/powerlines/src/lib/logger.cjs +108 -0
  173. package/dist/powerlines/src/lib/logger.mjs +106 -0
  174. package/dist/powerlines/src/lib/utilities/bundle.cjs +67 -0
  175. package/dist/powerlines/src/lib/utilities/bundle.mjs +66 -0
  176. package/dist/powerlines/src/lib/utilities/resolve.cjs +49 -0
  177. package/dist/powerlines/src/lib/utilities/resolve.mjs +48 -0
  178. package/dist/powerlines/src/plugin-utils/paths.cjs +46 -0
  179. package/dist/powerlines/src/plugin-utils/paths.mjs +45 -0
  180. package/dist/powerlines/src/types/api.cjs +1 -0
  181. package/dist/powerlines/src/types/api.d.mts +5 -0
  182. package/dist/powerlines/src/types/api.mjs +3 -0
  183. package/dist/powerlines/src/types/babel.cjs +156 -0
  184. package/dist/powerlines/src/types/babel.d.cts +23 -0
  185. package/dist/powerlines/src/types/babel.d.mts +23 -0
  186. package/dist/powerlines/src/types/babel.mjs +147 -0
  187. package/dist/powerlines/src/types/build.cjs +105 -0
  188. package/dist/powerlines/src/types/build.d.cts +145 -0
  189. package/dist/powerlines/src/types/build.d.mts +147 -0
  190. package/dist/powerlines/src/types/build.mjs +101 -0
  191. package/dist/powerlines/src/types/commands.cjs +16 -0
  192. package/dist/powerlines/src/types/commands.d.cts +8 -0
  193. package/dist/powerlines/src/types/commands.d.mts +9 -0
  194. package/dist/powerlines/src/types/commands.mjs +15 -0
  195. package/dist/powerlines/src/types/config.cjs +306 -0
  196. package/dist/powerlines/src/types/config.d.cts +387 -0
  197. package/dist/powerlines/src/types/config.d.mts +388 -0
  198. package/dist/powerlines/src/types/config.mjs +293 -0
  199. package/dist/powerlines/src/types/context.cjs +324 -0
  200. package/dist/powerlines/src/types/context.d.cts +414 -0
  201. package/dist/powerlines/src/types/context.d.mts +416 -0
  202. package/dist/powerlines/src/types/context.mjs +311 -0
  203. package/dist/powerlines/src/types/fs.cjs +78 -0
  204. package/dist/powerlines/src/types/fs.d.cts +486 -0
  205. package/dist/powerlines/src/types/fs.d.mts +486 -0
  206. package/dist/powerlines/src/types/fs.mjs +75 -0
  207. package/dist/powerlines/src/types/hooks.cjs +52 -0
  208. package/dist/powerlines/src/types/hooks.d.mts +2 -0
  209. package/dist/powerlines/src/types/hooks.mjs +48 -0
  210. package/dist/powerlines/src/types/index.cjs +11 -0
  211. package/dist/powerlines/src/types/index.d.mts +12 -0
  212. package/dist/powerlines/src/types/index.mjs +13 -0
  213. package/dist/powerlines/src/types/plugin.cjs +249 -0
  214. package/dist/powerlines/src/types/plugin.d.cts +231 -0
  215. package/dist/powerlines/src/types/plugin.d.mts +231 -0
  216. package/dist/powerlines/src/types/plugin.mjs +240 -0
  217. package/dist/powerlines/src/types/resolved.cjs +153 -0
  218. package/dist/powerlines/src/types/resolved.d.cts +82 -0
  219. package/dist/powerlines/src/types/resolved.d.mts +83 -0
  220. package/dist/powerlines/src/types/resolved.mjs +148 -0
  221. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  222. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  223. package/dist/powerlines/src/types/unplugin.cjs +1 -0
  224. package/dist/powerlines/src/types/unplugin.d.mts +7 -0
  225. package/dist/powerlines/src/types/unplugin.mjs +3 -0
  226. package/dist/types/index.cjs +10 -3
  227. package/dist/types/index.d.cts +2 -4
  228. package/dist/types/index.d.mts +2 -5
  229. package/dist/types/index.mjs +3 -4
  230. package/dist/types/plugin.cjs +133 -1
  231. package/dist/types/plugin.d.cts +156 -3
  232. package/dist/types/plugin.d.mts +158 -4
  233. package/dist/types/plugin.mjs +128 -2
  234. package/dist/types/runtime.cjs +242 -1
  235. package/dist/types/runtime.d.cts +793 -2
  236. package/dist/types/runtime.d.mts +793 -2
  237. package/dist/types/runtime.mjs +240 -2
  238. package/package.json +13 -9
  239. package/dist/components-C9bYrQVK.cjs +0 -0
  240. package/dist/components-CNIQFfeK.mjs +0 -1
  241. package/dist/create-reflection-resource-BNYxBgW2.mjs +0 -9846
  242. package/dist/create-reflection-resource-BWYhmX7O.cjs +0 -10085
  243. package/dist/docs-5r844zC1.d.mts +0 -9
  244. package/dist/docs-B66b9li3.mjs +0 -219
  245. package/dist/docs-_MmTNBQX.d.cts +0 -9
  246. package/dist/docs-hBlKCRWK.cjs +0 -224
  247. package/dist/env-BPodCdD1.d.cts +0 -116
  248. package/dist/env-IQvgnabX.mjs +0 -1578
  249. package/dist/env-cO4BUDn1.cjs +0 -1596
  250. package/dist/env-zhzvpUI5.d.mts +0 -98
  251. package/dist/index-BXxhKmeA.d.mts +0 -1
  252. package/dist/index-Cc7fCJU9.d.mts +0 -1
  253. package/dist/index-CqdNToYT.d.cts +0 -1
  254. package/dist/index-DWPDThxu.d.cts +0 -1
  255. package/dist/plugin-D3B5E_Hg.mjs +0 -1
  256. package/dist/plugin-D5qyQPqC.cjs +0 -0
  257. package/dist/resolved-BZG2cwRG.d.cts +0 -1789
  258. package/dist/resolved-V5COsfDu.d.mts +0 -1791
  259. package/dist/runtime-Bisl_1Ja.cjs +0 -0
  260. package/dist/runtime-Q8Ni8SeN.d.cts +0 -794
  261. package/dist/runtime-azNoeKr-.mjs +0 -1
  262. package/dist/runtime-qZ0Z2kEd.d.mts +0 -794
  263. package/dist/types-DwElXV6q.mjs +0 -1
  264. package/dist/types-MYBaygjr.cjs +0 -0
@@ -0,0 +1,46 @@
1
+ const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
+ const require_context = require('../types/context.cjs');
3
+ let __stryke_path_replace = require("@stryke/path/replace");
4
+
5
+ //#region ../powerlines/src/plugin-utils/paths.ts
6
+ /**
7
+ * Replaces tokens in the given path string with their corresponding values from the context.
8
+ *
9
+ * @remarks
10
+ * The following tokens are supported:
11
+ * - `{workspaceRoot}` - The root directory of the workspace.
12
+ * - `{root}` - The root directory of the project (same as `{projectRoot}`).
13
+ * - `{projectRoot}` - The root directory of the project (same as `{root}`).
14
+ * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
15
+ * - `{powerlinesPath}` - The directory where Powerlines is installed.
16
+ * - `{cachePath}` - The environment's directory for cached files.
17
+ * - `{dataPath}` - The environment's directory for data files.
18
+ * - `{logPath}` - The environment's directory for log files.
19
+ * - `{tempPath}` - The environment's directory for temporary files.
20
+ * - `{configPath}` - The environment's directory for configuration files.
21
+ * - `{outputPath}` - The configured output directory for the project.
22
+ * - `{buildPath}` - The configured distribution directory for the project.
23
+ * - `{artifactsPath}` - The configured directory for build artifacts.
24
+ * - `{builtinPath}` - The configured directory for generated built-in plugins.
25
+ * - `{entryPath}` - The configured directory for generated entry files.
26
+ *
27
+ * @param context - The context containing the values for the path tokens.
28
+ * @param path - The path string with tokens to replace.
29
+ * @returns The path string with tokens replaced by their corresponding values from the context.
30
+ */
31
+ function replacePathTokens(context, path) {
32
+ if (!path) return path;
33
+ return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", (0, __stryke_path_replace.replacePath)(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", (0, __stryke_path_replace.replacePath)(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", (0, __stryke_path_replace.replacePath)(context.entryPath, context.workspaceConfig.workspaceRoot));
34
+ }
35
+ replacePathTokens.__type = [
36
+ () => require_context.__ΩUnresolvedContext,
37
+ "context",
38
+ "path",
39
+ true,
40
+ "replacePathTokens",
41
+ "Replaces tokens in the given path string with their corresponding values from the context.",
42
+ "l3-R&RPe#!.$qk#%QRPn!2\"&2#8Pd!p'/%?&"
43
+ ];
44
+
45
+ //#endregion
46
+ exports.replacePathTokens = replacePathTokens;
@@ -0,0 +1,45 @@
1
+ import { __ΩUnresolvedContext } from "../types/context.mjs";
2
+ import { replacePath } from "@stryke/path/replace";
3
+
4
+ //#region ../powerlines/src/plugin-utils/paths.ts
5
+ /**
6
+ * Replaces tokens in the given path string with their corresponding values from the context.
7
+ *
8
+ * @remarks
9
+ * The following tokens are supported:
10
+ * - `{workspaceRoot}` - The root directory of the workspace.
11
+ * - `{root}` - The root directory of the project (same as `{projectRoot}`).
12
+ * - `{projectRoot}` - The root directory of the project (same as `{root}`).
13
+ * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
14
+ * - `{powerlinesPath}` - The directory where Powerlines is installed.
15
+ * - `{cachePath}` - The environment's directory for cached files.
16
+ * - `{dataPath}` - The environment's directory for data files.
17
+ * - `{logPath}` - The environment's directory for log files.
18
+ * - `{tempPath}` - The environment's directory for temporary files.
19
+ * - `{configPath}` - The environment's directory for configuration files.
20
+ * - `{outputPath}` - The configured output directory for the project.
21
+ * - `{buildPath}` - The configured distribution directory for the project.
22
+ * - `{artifactsPath}` - The configured directory for build artifacts.
23
+ * - `{builtinPath}` - The configured directory for generated built-in plugins.
24
+ * - `{entryPath}` - The configured directory for generated entry files.
25
+ *
26
+ * @param context - The context containing the values for the path tokens.
27
+ * @param path - The path string with tokens to replace.
28
+ * @returns The path string with tokens replaced by their corresponding values from the context.
29
+ */
30
+ function replacePathTokens(context, path) {
31
+ if (!path) return path;
32
+ return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
33
+ }
34
+ replacePathTokens.__type = [
35
+ () => __ΩUnresolvedContext,
36
+ "context",
37
+ "path",
38
+ true,
39
+ "replacePathTokens",
40
+ "Replaces tokens in the given path string with their corresponding values from the context.",
41
+ "l3-R&RPe#!.$qk#%QRPn!2\"&2#8Pd!p'/%?&"
42
+ ];
43
+
44
+ //#endregion
45
+ export { replacePathTokens };
@@ -0,0 +1 @@
1
+ require('../internal/helpers/hooks.cjs');
@@ -0,0 +1,5 @@
1
+ import "./hooks.mjs";
2
+ import "./context.mjs";
3
+ import "./config.mjs";
4
+ import "./resolved.mjs";
5
+ import "../internal/helpers/hooks.mjs";
@@ -0,0 +1,3 @@
1
+ import "../internal/helpers/hooks.mjs";
2
+
3
+ export { };
@@ -0,0 +1,156 @@
1
+
2
+ //#region ../powerlines/src/types/babel.ts
3
+ const __ΩRecord = [
4
+ "K",
5
+ "T",
6
+ "Record",
7
+ "l'e#\"Rb!b\"Pde\"!N#!w#y"
8
+ ];
9
+ const __ΩOmit = [
10
+ "T",
11
+ "K",
12
+ () => __ΩPick,
13
+ () => __ΩExclude,
14
+ "Omit",
15
+ "b!b\"e!!e!!ge!\"o$#o##w%y"
16
+ ];
17
+ const __ΩRequired = [
18
+ "T",
19
+ "Required",
20
+ "l+e#!e\"!fRb!Pde\"!gN##w\"y"
21
+ ];
22
+ const __ΩPick = [
23
+ "T",
24
+ "K",
25
+ "Pick",
26
+ "l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
27
+ ];
28
+ const __ΩExclude = [
29
+ "T",
30
+ "U",
31
+ "Exclude",
32
+ "l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
33
+ ];
34
+ const __ΩBabelPluginPass = [
35
+ "TState",
36
+ "PluginPass",
37
+ "BabelPluginPass",
38
+ "#c!P\"w\"e\"!Kw#y"
39
+ ];
40
+ const __ΩBabelTransformPluginFilter = [
41
+ "code",
42
+ "id",
43
+ "",
44
+ "BabelTransformPluginFilter",
45
+ "P&2!&2\")/#w$y"
46
+ ];
47
+ const __ΩBabelTransformPlugin = [
48
+ "Context",
49
+ "TContext",
50
+ () => __ΩRecord,
51
+ "TOptions",
52
+ "TState",
53
+ "context",
54
+ "name",
55
+ "LogFn",
56
+ "log",
57
+ "BabelAPI",
58
+ "api",
59
+ "options",
60
+ "dirname",
61
+ "PluginObj",
62
+ "",
63
+ "$$name",
64
+ "BabelTransformPlugin",
65
+ "\"w!c\"&\"o##c$#c%PPe#!2&PP&4'\"w(4)\"w*4+e%\"4,e%!4&&4-M2,\"w.////P&40MKw1y"
66
+ ];
67
+ const __ΩBabelTransformPluginOptions = [
68
+ "Context",
69
+ "TContext",
70
+ () => __ΩRecord,
71
+ "TOptions",
72
+ "TState",
73
+ "PluginItem",
74
+ () => __ΩBabelTransformPlugin,
75
+ () => __ΩBabelTransformPlugin,
76
+ () => __ΩBabelTransformPlugin,
77
+ () => __ΩBabelTransformPluginFilter,
78
+ "BabelTransformPluginOptions",
79
+ "\"w!c\"&\"o##c$#c%P\"w&e\"!e\"\"e\"#o'$Pe#!e#\"e##o($e#\"GPe#!e#\"e##o)$e#\"n*GJw+y"
80
+ ];
81
+ const __ΩResolvedBabelTransformPluginOptions = [
82
+ "Context",
83
+ "TContext",
84
+ () => __ΩRecord,
85
+ "TOptions",
86
+ "TState",
87
+ "PluginItem",
88
+ () => __ΩBabelTransformPlugin,
89
+ () => __ΩBabelTransformPluginFilter,
90
+ "ResolvedBabelTransformPluginOptions",
91
+ "\"w!c\"&\"o##c$#c%P\"w&Pe#!e#\"e##o'$e#\"Pn(,JGJw)y"
92
+ ];
93
+ const __ΩBabelTransformPluginBuilderParams = [
94
+ "Context",
95
+ "TContext",
96
+ () => __ΩRecord,
97
+ "TOptions",
98
+ "name",
99
+ "LogFn",
100
+ "log",
101
+ "BabelAPI",
102
+ "api",
103
+ "options",
104
+ "context",
105
+ "dirname",
106
+ "BabelTransformPluginBuilderParams",
107
+ "\"w!c\"&\"o##c$P&4%\"w&4'\"w(4)e\"\"4*e\"!4+&4,Mw-y"
108
+ ];
109
+ const __ΩBabelTransformPluginBuilder = [
110
+ "Context",
111
+ "TContext",
112
+ () => __ΩRecord,
113
+ "TOptions",
114
+ "TState",
115
+ () => __ΩBabelTransformPluginBuilderParams,
116
+ "params",
117
+ "PluginObj",
118
+ "",
119
+ "BabelTransformPluginBuilder",
120
+ "\"w!c\"&\"o##c$\"c%Pe\"!e\"\"o&#2'\"w(/)w*y"
121
+ ];
122
+ const __ΩDeclareBabelTransformPluginReturn = [
123
+ "Context",
124
+ "TContext",
125
+ () => __ΩRecord,
126
+ "TOptions",
127
+ "TState",
128
+ () => __ΩOmit,
129
+ () => __ΩBabelTransformPlugin,
130
+ "$$name",
131
+ () => __ΩRequired,
132
+ () => __ΩPick,
133
+ () => __ΩBabelTransformPlugin,
134
+ "$$name",
135
+ "DeclareBabelTransformPluginReturn",
136
+ "\"w!c\"&\"o##c$\"c%Pe\"!e\"\"e\"#o'$.(o&#e\"!e\"\"e\"#o+$.,o*#o)\"Kw-y"
137
+ ];
138
+ const __ΩImportSpecifier = [
139
+ "name",
140
+ "module",
141
+ "imported",
142
+ "A non-local import specifier represents an import that is not defined within the current module.",
143
+ "ImportSpecifier",
144
+ "P&4!8&4\"&4#M?$w%y"
145
+ ];
146
+
147
+ //#endregion
148
+ exports.__ΩBabelPluginPass = __ΩBabelPluginPass;
149
+ exports.__ΩBabelTransformPlugin = __ΩBabelTransformPlugin;
150
+ exports.__ΩBabelTransformPluginBuilder = __ΩBabelTransformPluginBuilder;
151
+ exports.__ΩBabelTransformPluginBuilderParams = __ΩBabelTransformPluginBuilderParams;
152
+ exports.__ΩBabelTransformPluginFilter = __ΩBabelTransformPluginFilter;
153
+ exports.__ΩBabelTransformPluginOptions = __ΩBabelTransformPluginOptions;
154
+ exports.__ΩDeclareBabelTransformPluginReturn = __ΩDeclareBabelTransformPluginReturn;
155
+ exports.__ΩImportSpecifier = __ΩImportSpecifier;
156
+ exports.__ΩResolvedBabelTransformPluginOptions = __ΩResolvedBabelTransformPluginOptions;
@@ -0,0 +1,23 @@
1
+ import { Context } from "./context.cjs";
2
+ import { LogFn } from "./config.cjs";
3
+ import { PluginItem, PluginObj, PluginPass } from "@babel/core";
4
+ import { BabelAPI } from "@babel/helper-plugin-utils";
5
+
6
+ //#region ../powerlines/src/types/babel.d.ts
7
+
8
+ type BabelPluginPass<TState = unknown> = PluginPass & TState;
9
+ type BabelTransformPluginFilter = (code: string, id: string) => boolean;
10
+ type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
11
+ name: string;
12
+ log: LogFn;
13
+ api: BabelAPI;
14
+ options: TOptions;
15
+ context: TContext;
16
+ dirname: string;
17
+ }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
18
+ $$name: string;
19
+ };
20
+ type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
21
+ type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = Omit<BabelTransformPlugin<TContext, TOptions, TState>, "$$name"> & Required<Pick<BabelTransformPlugin<TContext, TOptions, TState>, "$$name">>;
22
+ //#endregion
23
+ export { BabelTransformPluginOptions, DeclareBabelTransformPluginReturn };
@@ -0,0 +1,23 @@
1
+ import { Context } from "./context.mjs";
2
+ import { LogFn } from "./config.mjs";
3
+ import { PluginItem, PluginObj, PluginPass } from "@babel/core";
4
+ import { BabelAPI } from "@babel/helper-plugin-utils";
5
+
6
+ //#region ../powerlines/src/types/babel.d.ts
7
+
8
+ type BabelPluginPass<TState = unknown> = PluginPass & TState;
9
+ type BabelTransformPluginFilter = (code: string, id: string) => boolean;
10
+ type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
11
+ name: string;
12
+ log: LogFn;
13
+ api: BabelAPI;
14
+ options: TOptions;
15
+ context: TContext;
16
+ dirname: string;
17
+ }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
18
+ $$name: string;
19
+ };
20
+ type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
21
+ type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = Omit<BabelTransformPlugin<TContext, TOptions, TState>, "$$name"> & Required<Pick<BabelTransformPlugin<TContext, TOptions, TState>, "$$name">>;
22
+ //#endregion
23
+ export { BabelPluginPass, BabelTransformPlugin, BabelTransformPluginFilter, BabelTransformPluginOptions, DeclareBabelTransformPluginReturn };
@@ -0,0 +1,147 @@
1
+ //#region ../powerlines/src/types/babel.ts
2
+ const __ΩRecord = [
3
+ "K",
4
+ "T",
5
+ "Record",
6
+ "l'e#\"Rb!b\"Pde\"!N#!w#y"
7
+ ];
8
+ const __ΩOmit = [
9
+ "T",
10
+ "K",
11
+ () => __ΩPick,
12
+ () => __ΩExclude,
13
+ "Omit",
14
+ "b!b\"e!!e!!ge!\"o$#o##w%y"
15
+ ];
16
+ const __ΩRequired = [
17
+ "T",
18
+ "Required",
19
+ "l+e#!e\"!fRb!Pde\"!gN##w\"y"
20
+ ];
21
+ const __ΩPick = [
22
+ "T",
23
+ "K",
24
+ "Pick",
25
+ "l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
26
+ ];
27
+ const __ΩExclude = [
28
+ "T",
29
+ "U",
30
+ "Exclude",
31
+ "l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
32
+ ];
33
+ const __ΩBabelPluginPass = [
34
+ "TState",
35
+ "PluginPass",
36
+ "BabelPluginPass",
37
+ "#c!P\"w\"e\"!Kw#y"
38
+ ];
39
+ const __ΩBabelTransformPluginFilter = [
40
+ "code",
41
+ "id",
42
+ "",
43
+ "BabelTransformPluginFilter",
44
+ "P&2!&2\")/#w$y"
45
+ ];
46
+ const __ΩBabelTransformPlugin = [
47
+ "Context",
48
+ "TContext",
49
+ () => __ΩRecord,
50
+ "TOptions",
51
+ "TState",
52
+ "context",
53
+ "name",
54
+ "LogFn",
55
+ "log",
56
+ "BabelAPI",
57
+ "api",
58
+ "options",
59
+ "dirname",
60
+ "PluginObj",
61
+ "",
62
+ "$$name",
63
+ "BabelTransformPlugin",
64
+ "\"w!c\"&\"o##c$#c%PPe#!2&PP&4'\"w(4)\"w*4+e%\"4,e%!4&&4-M2,\"w.////P&40MKw1y"
65
+ ];
66
+ const __ΩBabelTransformPluginOptions = [
67
+ "Context",
68
+ "TContext",
69
+ () => __ΩRecord,
70
+ "TOptions",
71
+ "TState",
72
+ "PluginItem",
73
+ () => __ΩBabelTransformPlugin,
74
+ () => __ΩBabelTransformPlugin,
75
+ () => __ΩBabelTransformPlugin,
76
+ () => __ΩBabelTransformPluginFilter,
77
+ "BabelTransformPluginOptions",
78
+ "\"w!c\"&\"o##c$#c%P\"w&e\"!e\"\"e\"#o'$Pe#!e#\"e##o($e#\"GPe#!e#\"e##o)$e#\"n*GJw+y"
79
+ ];
80
+ const __ΩResolvedBabelTransformPluginOptions = [
81
+ "Context",
82
+ "TContext",
83
+ () => __ΩRecord,
84
+ "TOptions",
85
+ "TState",
86
+ "PluginItem",
87
+ () => __ΩBabelTransformPlugin,
88
+ () => __ΩBabelTransformPluginFilter,
89
+ "ResolvedBabelTransformPluginOptions",
90
+ "\"w!c\"&\"o##c$#c%P\"w&Pe#!e#\"e##o'$e#\"Pn(,JGJw)y"
91
+ ];
92
+ const __ΩBabelTransformPluginBuilderParams = [
93
+ "Context",
94
+ "TContext",
95
+ () => __ΩRecord,
96
+ "TOptions",
97
+ "name",
98
+ "LogFn",
99
+ "log",
100
+ "BabelAPI",
101
+ "api",
102
+ "options",
103
+ "context",
104
+ "dirname",
105
+ "BabelTransformPluginBuilderParams",
106
+ "\"w!c\"&\"o##c$P&4%\"w&4'\"w(4)e\"\"4*e\"!4+&4,Mw-y"
107
+ ];
108
+ const __ΩBabelTransformPluginBuilder = [
109
+ "Context",
110
+ "TContext",
111
+ () => __ΩRecord,
112
+ "TOptions",
113
+ "TState",
114
+ () => __ΩBabelTransformPluginBuilderParams,
115
+ "params",
116
+ "PluginObj",
117
+ "",
118
+ "BabelTransformPluginBuilder",
119
+ "\"w!c\"&\"o##c$\"c%Pe\"!e\"\"o&#2'\"w(/)w*y"
120
+ ];
121
+ const __ΩDeclareBabelTransformPluginReturn = [
122
+ "Context",
123
+ "TContext",
124
+ () => __ΩRecord,
125
+ "TOptions",
126
+ "TState",
127
+ () => __ΩOmit,
128
+ () => __ΩBabelTransformPlugin,
129
+ "$$name",
130
+ () => __ΩRequired,
131
+ () => __ΩPick,
132
+ () => __ΩBabelTransformPlugin,
133
+ "$$name",
134
+ "DeclareBabelTransformPluginReturn",
135
+ "\"w!c\"&\"o##c$\"c%Pe\"!e\"\"e\"#o'$.(o&#e\"!e\"\"e\"#o+$.,o*#o)\"Kw-y"
136
+ ];
137
+ const __ΩImportSpecifier = [
138
+ "name",
139
+ "module",
140
+ "imported",
141
+ "A non-local import specifier represents an import that is not defined within the current module.",
142
+ "ImportSpecifier",
143
+ "P&4!8&4\"&4#M?$w%y"
144
+ ];
145
+
146
+ //#endregion
147
+ export { __ΩBabelPluginPass, __ΩBabelTransformPlugin, __ΩBabelTransformPluginBuilder, __ΩBabelTransformPluginBuilderParams, __ΩBabelTransformPluginFilter, __ΩBabelTransformPluginOptions, __ΩDeclareBabelTransformPluginReturn, __ΩImportSpecifier, __ΩResolvedBabelTransformPluginOptions };
@@ -0,0 +1,105 @@
1
+
2
+ //#region ../powerlines/src/types/build.ts
3
+ const __ΩRecord = [
4
+ "K",
5
+ "T",
6
+ "Record",
7
+ "l'e#\"Rb!b\"Pde\"!N#!w#y"
8
+ ];
9
+ const __ΩOmit = [
10
+ "T",
11
+ "K",
12
+ () => __ΩPick,
13
+ () => __ΩExclude,
14
+ "Omit",
15
+ "b!b\"e!!e!!ge!\"o$#o##w%y"
16
+ ];
17
+ const __ΩPick = [
18
+ "T",
19
+ "K",
20
+ "Pick",
21
+ "l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
22
+ ];
23
+ const __ΩExclude = [
24
+ "T",
25
+ "U",
26
+ "Exclude",
27
+ "l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
28
+ ];
29
+ const UNPLUGIN_BUILD_VARIANTS = [
30
+ "rollup",
31
+ "webpack",
32
+ "rspack",
33
+ "vite",
34
+ "esbuild",
35
+ "farm",
36
+ "unloader",
37
+ "rolldown"
38
+ ];
39
+ const __ΩBuildConfig = [
40
+ "node",
41
+ "browser",
42
+ "neutral",
43
+ "platform",
44
+ "neutral",
45
+ "The platform to build the project for",
46
+ "polyfill",
47
+ "Array of strings indicating the polyfills to include for the build.",
48
+ "mainFields",
49
+ "`['browser', 'module', 'jsnext:main', 'jsnext']`",
50
+ "Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.",
51
+ "conditions",
52
+ "Array of strings indicating what conditions should be used for module resolution.",
53
+ "extensions",
54
+ "`['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`",
55
+ "Array of strings indicating what file extensions should be used for module resolution.",
56
+ "dedupe",
57
+ "Array of strings indicating what modules should be deduplicated to a single version in the build.",
58
+ "builtins",
59
+ "Array of strings or regular expressions that indicate what modules are builtin for the environment.",
60
+ () => __ΩRecord,
61
+ "define",
62
+ "Define global variable replacements.",
63
+ () => __ΩRecord,
64
+ "inject",
65
+ "Global variables that will have import statements injected where necessary",
66
+ () => __ΩRecord,
67
+ "find",
68
+ "replacement",
69
+ "alias",
70
+ "The alias mappings to use for module resolution during the build process.",
71
+ "external",
72
+ "A list of modules that should not be bundled, even if they are external dependencies.",
73
+ "noExternal",
74
+ "A list of modules that should always be bundled, even if they are external dependencies.",
75
+ "skipNodeModulesBundle",
76
+ "Should the Powerlines CLI processes skip bundling the `node_modules` directory?",
77
+ "keepProcessEnv",
78
+ true,
79
+ "If true, `process.env` referenced in code will be preserved as-is and evaluated in runtime. Otherwise, it is statically replaced as an empty object.",
80
+ () => __ΩRecord,
81
+ "override",
82
+ "An optional set of override options to apply to the selected build variant.",
83
+ "BuildConfig",
84
+ "PP.!.\".#J4$8>%?&&F4'8?(&F4)8>*?+&F4,8?-&F4.8>/?0&F418?2P&AJF438?4&\"o5#468?7&P&&FJo8#498?:P&&o;#PP&AJ4<&4=MFJ4>8??P&AJF4@8?AP&AJF4B8?C)4D8?E)4F8>G?H&\"oI#4J8?KMwLy"
85
+ ];
86
+ const __ΩBuildResolvedConfig = [
87
+ () => __ΩOmit,
88
+ () => __ΩBuildConfig,
89
+ "override",
90
+ "BuildResolvedConfig",
91
+ "n\".#o!#w$y"
92
+ ];
93
+ const __ΩESBuildResolvedBuildConfig = [
94
+ () => __ΩOmit,
95
+ "inject",
96
+ () => __ΩBuildResolvedConfig,
97
+ "ESBuildResolvedBuildConfig",
98
+ "P!.\"o!#n#Kw$y"
99
+ ];
100
+
101
+ //#endregion
102
+ exports.UNPLUGIN_BUILD_VARIANTS = UNPLUGIN_BUILD_VARIANTS;
103
+ exports.__ΩBuildConfig = __ΩBuildConfig;
104
+ exports.__ΩBuildResolvedConfig = __ΩBuildResolvedConfig;
105
+ exports.__ΩESBuildResolvedBuildConfig = __ΩESBuildResolvedBuildConfig;