@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,45 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_context = require('../contexts/context.cjs');
3
+ let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
+ let __alloy_js_core = require("@alloy-js/core");
5
+ let __stryke_path_replace = require("@stryke/path/replace");
6
+
7
+ //#region ../plugin-alloy/src/core/components/output.tsx
8
+ /**
9
+ * Output component for rendering the Powerlines plugin's output files via templates.
10
+ */
11
+ function Output(props) {
12
+ const [{ children, context, meta, basePath }, rest] = (0, __alloy_js_core.splitProps)(props, [
13
+ "children",
14
+ "context",
15
+ "meta",
16
+ "basePath"
17
+ ]);
18
+ const contextRef = (0, __alloy_js_core.ref)(context);
19
+ const metaRef = (0, __alloy_js_core.ref)(meta ?? {});
20
+ const basePathRef = (0, __alloy_js_core.computed)(() => basePath ? (0, __stryke_path_replace.replacePath)(basePath, contextRef.value.workspaceConfig.workspaceRoot) : contextRef.value.workspaceConfig.workspaceRoot);
21
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Output, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
22
+ get basePath() {
23
+ return basePathRef.value;
24
+ },
25
+ get children() {
26
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_context.PowerlinesContext.Provider, {
27
+ value: {
28
+ ref: contextRef,
29
+ meta: metaRef
30
+ },
31
+ get children() {
32
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
33
+ get when() {
34
+ return Boolean(contextRef.value);
35
+ },
36
+ children
37
+ });
38
+ }
39
+ });
40
+ }
41
+ }));
42
+ }
43
+
44
+ //#endregion
45
+ exports.Output = Output;
@@ -0,0 +1,44 @@
1
+ import { PowerlinesContext } from "../contexts/context.mjs";
2
+ import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
3
+ import { Output, Show, computed, ref, splitProps } from "@alloy-js/core";
4
+ import { replacePath } from "@stryke/path/replace";
5
+
6
+ //#region ../plugin-alloy/src/core/components/output.tsx
7
+ /**
8
+ * Output component for rendering the Powerlines plugin's output files via templates.
9
+ */
10
+ function Output$1(props) {
11
+ const [{ children, context, meta, basePath }, rest] = splitProps(props, [
12
+ "children",
13
+ "context",
14
+ "meta",
15
+ "basePath"
16
+ ]);
17
+ const contextRef = ref(context);
18
+ const metaRef = ref(meta ?? {});
19
+ const basePathRef = computed(() => basePath ? replacePath(basePath, contextRef.value.workspaceConfig.workspaceRoot) : contextRef.value.workspaceConfig.workspaceRoot);
20
+ return createComponent(Output, mergeProps(rest, {
21
+ get basePath() {
22
+ return basePathRef.value;
23
+ },
24
+ get children() {
25
+ return createComponent(PowerlinesContext.Provider, {
26
+ value: {
27
+ ref: contextRef,
28
+ meta: metaRef
29
+ },
30
+ get children() {
31
+ return createComponent(Show, {
32
+ get when() {
33
+ return Boolean(contextRef.value);
34
+ },
35
+ children
36
+ });
37
+ }
38
+ });
39
+ }
40
+ }));
41
+ }
42
+
43
+ //#endregion
44
+ export { Output$1 as Output };
@@ -0,0 +1,22 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
+ let __alloy_js_core = require("@alloy-js/core");
4
+
5
+ //#region ../plugin-alloy/src/core/components/single-line-comment.tsx
6
+ /**
7
+ * A single line comment block. The children are rendered as a prose element, which means that they
8
+ * are broken into multiple lines
9
+ */
10
+ function SingleLineComment(props) {
11
+ const { variant = "double-slash", children } = props;
12
+ const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : "// ";
13
+ return [commentStart, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("align", {
14
+ string: commentStart,
15
+ get children() {
16
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
17
+ }
18
+ })];
19
+ }
20
+
21
+ //#endregion
22
+ exports.SingleLineComment = SingleLineComment;
@@ -0,0 +1,21 @@
1
+ import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
+ import { Prose } from "@alloy-js/core";
3
+
4
+ //#region ../plugin-alloy/src/core/components/single-line-comment.tsx
5
+ /**
6
+ * A single line comment block. The children are rendered as a prose element, which means that they
7
+ * are broken into multiple lines
8
+ */
9
+ function SingleLineComment(props) {
10
+ const { variant = "double-slash", children } = props;
11
+ const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : "// ";
12
+ return [commentStart, createIntrinsic("align", {
13
+ string: commentStart,
14
+ get children() {
15
+ return [createComponent(Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
16
+ }
17
+ })];
18
+ }
19
+
20
+ //#endregion
21
+ export { SingleLineComment };
@@ -0,0 +1,64 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_context = require('../contexts/context.cjs');
3
+ require('../contexts/index.cjs');
4
+ let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
+ let __alloy_js_core = require("@alloy-js/core");
6
+ let __stryke_path_append = require("@stryke/path/append");
7
+ let defu = require("defu");
8
+ defu = require_rolldown_runtime.__toESM(defu);
9
+
10
+ //#region ../plugin-alloy/src/core/components/source-file.tsx
11
+ /**
12
+ * A base component representing a Powerlines generated source file.
13
+ *
14
+ * @param props - The properties for the source file.
15
+ * @returns The rendered source file component.
16
+ */
17
+ function SourceFile(props) {
18
+ const [{ children, meta, path, header, storage, filetype, reference }] = (0, __alloy_js_core.splitProps)(props, [
19
+ "children",
20
+ "meta",
21
+ "path",
22
+ "header",
23
+ "storage",
24
+ "filetype",
25
+ "reference"
26
+ ]);
27
+ const metadata = require_context.useMeta();
28
+ const parentDirectory = (0, __alloy_js_core.useContext)(__alloy_js_core.SourceDirectoryContext);
29
+ const sourceFile = {
30
+ path: (0, __stryke_path_append.appendPath)(path, parentDirectory.path),
31
+ filetype,
32
+ reference
33
+ };
34
+ parentDirectory?.addContent(sourceFile);
35
+ const printOptions = (0, __alloy_js_core.useFormatOptions)({
36
+ printWidth: props.printWidth,
37
+ tabWidth: props.tabWidth,
38
+ useTabs: props.useTabs,
39
+ insertFinalNewLine: props.insertFinalNewLine
40
+ });
41
+ const nodeContext = (0, __alloy_js_core.getContext)();
42
+ nodeContext.meta = (0, defu.default)({
43
+ sourceFile,
44
+ printOptions
45
+ }, meta ?? {});
46
+ metadata[sourceFile.path] = {
47
+ storage,
48
+ ...meta ?? {}
49
+ };
50
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.SourceFileContext.Provider, {
51
+ value: sourceFile,
52
+ get children() {
53
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
54
+ when: header !== void 0,
55
+ get children() {
56
+ return [header, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
57
+ }
58
+ }), children];
59
+ }
60
+ });
61
+ }
62
+
63
+ //#endregion
64
+ exports.SourceFile = SourceFile;
@@ -0,0 +1,23 @@
1
+ import { StoragePreset } from "../../../../powerlines/src/types/fs.cjs";
2
+ import { ComponentProps } from "../../types/components.cjs";
3
+ import { SourceFileProps } from "@alloy-js/core";
4
+
5
+ //#region ../plugin-alloy/src/core/components/source-file.d.ts
6
+ type SourceFileProps$1 = SourceFileProps & ComponentProps & {
7
+ /**
8
+ * The storage preset for the output files.
9
+ *
10
+ * @remarks
11
+ * If not specified, the output mode will be determined by the provided `output.mode` value.
12
+ */
13
+ storage?: StoragePreset;
14
+ /**
15
+ * The metadata associated with the source file.
16
+ *
17
+ * @remarks
18
+ * The values stored in the metadata will be available in the rendering context.
19
+ */
20
+ meta?: Record<string, any>;
21
+ };
22
+ //#endregion
23
+ export { SourceFileProps$1 as SourceFileProps };
@@ -0,0 +1,23 @@
1
+ import { StoragePreset } from "../../../../powerlines/src/types/fs.mjs";
2
+ import { ComponentProps } from "../../types/components.mjs";
3
+ import { SourceFileProps } from "@alloy-js/core";
4
+
5
+ //#region ../plugin-alloy/src/core/components/source-file.d.ts
6
+ type SourceFileProps$1 = SourceFileProps & ComponentProps & {
7
+ /**
8
+ * The storage preset for the output files.
9
+ *
10
+ * @remarks
11
+ * If not specified, the output mode will be determined by the provided `output.mode` value.
12
+ */
13
+ storage?: StoragePreset;
14
+ /**
15
+ * The metadata associated with the source file.
16
+ *
17
+ * @remarks
18
+ * The values stored in the metadata will be available in the rendering context.
19
+ */
20
+ meta?: Record<string, any>;
21
+ };
22
+ //#endregion
23
+ export { SourceFileProps$1 as SourceFileProps };
@@ -0,0 +1,62 @@
1
+ import { useMeta } from "../contexts/context.mjs";
2
+ import "../contexts/index.mjs";
3
+ import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
4
+ import { Show, SourceDirectoryContext, SourceFileContext, getContext, splitProps, useContext, useFormatOptions } from "@alloy-js/core";
5
+ import { appendPath } from "@stryke/path/append";
6
+ import defu$1 from "defu";
7
+
8
+ //#region ../plugin-alloy/src/core/components/source-file.tsx
9
+ /**
10
+ * A base component representing a Powerlines generated source file.
11
+ *
12
+ * @param props - The properties for the source file.
13
+ * @returns The rendered source file component.
14
+ */
15
+ function SourceFile(props) {
16
+ const [{ children, meta, path, header, storage, filetype, reference }] = splitProps(props, [
17
+ "children",
18
+ "meta",
19
+ "path",
20
+ "header",
21
+ "storage",
22
+ "filetype",
23
+ "reference"
24
+ ]);
25
+ const metadata = useMeta();
26
+ const parentDirectory = useContext(SourceDirectoryContext);
27
+ const sourceFile = {
28
+ path: appendPath(path, parentDirectory.path),
29
+ filetype,
30
+ reference
31
+ };
32
+ parentDirectory?.addContent(sourceFile);
33
+ const printOptions = useFormatOptions({
34
+ printWidth: props.printWidth,
35
+ tabWidth: props.tabWidth,
36
+ useTabs: props.useTabs,
37
+ insertFinalNewLine: props.insertFinalNewLine
38
+ });
39
+ const nodeContext = getContext();
40
+ nodeContext.meta = defu$1({
41
+ sourceFile,
42
+ printOptions
43
+ }, meta ?? {});
44
+ metadata[sourceFile.path] = {
45
+ storage,
46
+ ...meta ?? {}
47
+ };
48
+ return createComponent(SourceFileContext.Provider, {
49
+ value: sourceFile,
50
+ get children() {
51
+ return [createComponent(Show, {
52
+ when: header !== void 0,
53
+ get children() {
54
+ return [header, createIntrinsic("hbr", {})];
55
+ }
56
+ }), children];
57
+ }
58
+ });
59
+ }
60
+
61
+ //#endregion
62
+ export { SourceFile };
@@ -0,0 +1,136 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_fs = require('../../../../powerlines/src/types/fs.cjs');
3
+ let __alloy_js_core = require("@alloy-js/core");
4
+
5
+ //#region ../plugin-alloy/src/core/contexts/context.ts
6
+ const __ΩRecord = [
7
+ "K",
8
+ "T",
9
+ "Record",
10
+ "l'e#\"Rb!b\"Pde\"!N#!w#y"
11
+ ];
12
+ const __ΩMetaItem = [
13
+ "builtin",
14
+ "entry",
15
+ "kind",
16
+ "The kind of metadata item.",
17
+ "skipFormat",
18
+ "Whether to skip formatting for this output.",
19
+ () => require_fs.__ΩStoragePreset,
20
+ "storage",
21
+ "The storage preset or adapter name for the output files.",
22
+ "MetaItem",
23
+ "PP.!.\"&J4#8?$)4%8?&Pn'&J4(8?)&\"LMw*y"
24
+ ];
25
+ const __ΩPowerlinesContextInterface = [
26
+ "PluginContext",
27
+ "TContext",
28
+ () => __ΩRecord,
29
+ () => __ΩMetaItem,
30
+ "TMeta",
31
+ "Ref",
32
+ "ref",
33
+ "The current Powerlines context.",
34
+ "meta",
35
+ "The current render metadata.",
36
+ "PowerlinesContextInterface",
37
+ "\"w!c\"&n$o##c%P\"w&4'?(\"w&4)?*Mw+y"
38
+ ];
39
+ /**
40
+ * The Powerlines context used in template rendering.
41
+ */
42
+ const PowerlinesContext = (__alloy_js_core.createNamedContext.Ω = [[() => __ΩPowerlinesContextInterface, "\"\"o!#"]], (0, __alloy_js_core.createNamedContext)("powerlines"));
43
+ /**
44
+ * Hook to access the Powerlines Context.
45
+ *
46
+ * @returns The Context.
47
+ */
48
+ function usePowerlinesContext() {
49
+ return __alloy_js_core.useContext.Ω = [[
50
+ () => __ΩPowerlinesContextInterface,
51
+ "PluginContext",
52
+ () => __ΩRecord,
53
+ () => __ΩMetaItem,
54
+ "\"w\"&n$o##o!#"
55
+ ]], (0, __alloy_js_core.useContext)(PowerlinesContext);
56
+ }
57
+ usePowerlinesContext.__type = [
58
+ () => __ΩPowerlinesContextInterface,
59
+ "usePowerlinesContext",
60
+ "Hook to access the Powerlines Context.",
61
+ "PP\"\"o!#-J/\"?#"
62
+ ];
63
+ /**
64
+ * Hook to safely access the {@link PluginContext | Powerlines context}.
65
+ *
66
+ * @returns The Powerlines context or undefined if not set.
67
+ */
68
+ function usePowerlinesSafe() {
69
+ return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"]], usePowerlinesContext())?.ref?.value;
70
+ }
71
+ usePowerlinesSafe.__type = [
72
+ "usePowerlinesSafe",
73
+ "Hook to safely access the {@link PluginContext | Powerlines context}.",
74
+ "PP\"-J/!?\""
75
+ ];
76
+ /**
77
+ * Hook to access the {@link PluginContext | Powerlines context}.
78
+ *
79
+ * @returns The Powerlines context.
80
+ */
81
+ function usePowerlines() {
82
+ const powerlines = (usePowerlinesSafe.Ω = [["PluginContext", "\"w!"]], usePowerlinesSafe());
83
+ if (!powerlines) throw new Error("Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
84
+ return powerlines;
85
+ }
86
+ usePowerlines.__type = [
87
+ "usePowerlines",
88
+ "Hook to access the {@link PluginContext | Powerlines context}.",
89
+ "P\"/!?\""
90
+ ];
91
+ /**
92
+ * Hook to safely access the render context's metadata.
93
+ *
94
+ * @returns The Powerlines context or undefined if not set.
95
+ */
96
+ function useMetaSafe() {
97
+ return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"], [
98
+ () => __ΩRecord,
99
+ () => __ΩMetaItem,
100
+ "&n\"o!#"
101
+ ]], usePowerlinesContext())?.meta?.value;
102
+ }
103
+ useMetaSafe.__type = [
104
+ "useMetaSafe",
105
+ "Hook to safely access the render context's metadata.",
106
+ "PP\"-J/!?\""
107
+ ];
108
+ /**
109
+ * Hook to access the render context's metadata.
110
+ *
111
+ * @returns The Powerlines context.
112
+ */
113
+ function useMeta() {
114
+ const meta = (useMetaSafe.Ω = [[
115
+ () => __ΩRecord,
116
+ () => __ΩMetaItem,
117
+ "&n\"o!#"
118
+ ]], useMetaSafe());
119
+ if (!meta) throw new Error("Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
120
+ return meta;
121
+ }
122
+ useMeta.__type = [
123
+ "useMeta",
124
+ "Hook to access the render context's metadata.",
125
+ "P\"/!?\""
126
+ ];
127
+
128
+ //#endregion
129
+ exports.PowerlinesContext = PowerlinesContext;
130
+ exports.__ΩMetaItem = __ΩMetaItem;
131
+ exports.__ΩPowerlinesContextInterface = __ΩPowerlinesContextInterface;
132
+ exports.useMeta = useMeta;
133
+ exports.useMetaSafe = useMetaSafe;
134
+ exports.usePowerlines = usePowerlines;
135
+ exports.usePowerlinesContext = usePowerlinesContext;
136
+ exports.usePowerlinesSafe = usePowerlinesSafe;
@@ -0,0 +1,128 @@
1
+ import { __ΩStoragePreset } from "../../../../powerlines/src/types/fs.mjs";
2
+ import { createNamedContext, useContext } from "@alloy-js/core";
3
+
4
+ //#region ../plugin-alloy/src/core/contexts/context.ts
5
+ const __ΩRecord = [
6
+ "K",
7
+ "T",
8
+ "Record",
9
+ "l'e#\"Rb!b\"Pde\"!N#!w#y"
10
+ ];
11
+ const __ΩMetaItem = [
12
+ "builtin",
13
+ "entry",
14
+ "kind",
15
+ "The kind of metadata item.",
16
+ "skipFormat",
17
+ "Whether to skip formatting for this output.",
18
+ () => __ΩStoragePreset,
19
+ "storage",
20
+ "The storage preset or adapter name for the output files.",
21
+ "MetaItem",
22
+ "PP.!.\"&J4#8?$)4%8?&Pn'&J4(8?)&\"LMw*y"
23
+ ];
24
+ const __ΩPowerlinesContextInterface = [
25
+ "PluginContext",
26
+ "TContext",
27
+ () => __ΩRecord,
28
+ () => __ΩMetaItem,
29
+ "TMeta",
30
+ "Ref",
31
+ "ref",
32
+ "The current Powerlines context.",
33
+ "meta",
34
+ "The current render metadata.",
35
+ "PowerlinesContextInterface",
36
+ "\"w!c\"&n$o##c%P\"w&4'?(\"w&4)?*Mw+y"
37
+ ];
38
+ /**
39
+ * The Powerlines context used in template rendering.
40
+ */
41
+ const PowerlinesContext = (createNamedContext.Ω = [[() => __ΩPowerlinesContextInterface, "\"\"o!#"]], createNamedContext("powerlines"));
42
+ /**
43
+ * Hook to access the Powerlines Context.
44
+ *
45
+ * @returns The Context.
46
+ */
47
+ function usePowerlinesContext() {
48
+ return useContext.Ω = [[
49
+ () => __ΩPowerlinesContextInterface,
50
+ "PluginContext",
51
+ () => __ΩRecord,
52
+ () => __ΩMetaItem,
53
+ "\"w\"&n$o##o!#"
54
+ ]], useContext(PowerlinesContext);
55
+ }
56
+ usePowerlinesContext.__type = [
57
+ () => __ΩPowerlinesContextInterface,
58
+ "usePowerlinesContext",
59
+ "Hook to access the Powerlines Context.",
60
+ "PP\"\"o!#-J/\"?#"
61
+ ];
62
+ /**
63
+ * Hook to safely access the {@link PluginContext | Powerlines context}.
64
+ *
65
+ * @returns The Powerlines context or undefined if not set.
66
+ */
67
+ function usePowerlinesSafe() {
68
+ return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"]], usePowerlinesContext())?.ref?.value;
69
+ }
70
+ usePowerlinesSafe.__type = [
71
+ "usePowerlinesSafe",
72
+ "Hook to safely access the {@link PluginContext | Powerlines context}.",
73
+ "PP\"-J/!?\""
74
+ ];
75
+ /**
76
+ * Hook to access the {@link PluginContext | Powerlines context}.
77
+ *
78
+ * @returns The Powerlines context.
79
+ */
80
+ function usePowerlines() {
81
+ const powerlines = (usePowerlinesSafe.Ω = [["PluginContext", "\"w!"]], usePowerlinesSafe());
82
+ if (!powerlines) throw new Error("Powerlines - Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
83
+ return powerlines;
84
+ }
85
+ usePowerlines.__type = [
86
+ "usePowerlines",
87
+ "Hook to access the {@link PluginContext | Powerlines context}.",
88
+ "P\"/!?\""
89
+ ];
90
+ /**
91
+ * Hook to safely access the render context's metadata.
92
+ *
93
+ * @returns The Powerlines context or undefined if not set.
94
+ */
95
+ function useMetaSafe() {
96
+ return (usePowerlinesContext.Ω = [["PluginContext", "\"w!"], [
97
+ () => __ΩRecord,
98
+ () => __ΩMetaItem,
99
+ "&n\"o!#"
100
+ ]], usePowerlinesContext())?.meta?.value;
101
+ }
102
+ useMetaSafe.__type = [
103
+ "useMetaSafe",
104
+ "Hook to safely access the render context's metadata.",
105
+ "PP\"-J/!?\""
106
+ ];
107
+ /**
108
+ * Hook to access the render context's metadata.
109
+ *
110
+ * @returns The Powerlines context.
111
+ */
112
+ function useMeta() {
113
+ const meta = (useMetaSafe.Ω = [[
114
+ () => __ΩRecord,
115
+ () => __ΩMetaItem,
116
+ "&n\"o!#"
117
+ ]], useMetaSafe());
118
+ if (!meta) throw new Error("Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
119
+ return meta;
120
+ }
121
+ useMeta.__type = [
122
+ "useMeta",
123
+ "Hook to access the render context's metadata.",
124
+ "P\"/!?\""
125
+ ];
126
+
127
+ //#endregion
128
+ export { PowerlinesContext, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe };
@@ -0,0 +1,2 @@
1
+ const require_context = require('./context.cjs');
2
+ const require_reflection = require('./reflection.cjs');
@@ -0,0 +1,4 @@
1
+ import { PowerlinesContext, __ΩMetaItem, __ΩPowerlinesContextInterface, useMeta, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
2
+ import { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.mjs";
3
+
4
+ export { };