@powerlines/plugin-alloy 0.26.48 → 0.26.51

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 (377) hide show
  1. package/package.json +6 -6
  2. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  3. package/dist/core/components/index.cjs +0 -12
  4. package/dist/core/components/index.d.cts +0 -6
  5. package/dist/core/components/index.d.mts +0 -6
  6. package/dist/core/components/index.mjs +0 -7
  7. package/dist/core/components/infrastructure-file.cjs +0 -48
  8. package/dist/core/components/infrastructure-file.d.cts +0 -27
  9. package/dist/core/components/infrastructure-file.d.cts.map +0 -1
  10. package/dist/core/components/infrastructure-file.d.mts +0 -27
  11. package/dist/core/components/infrastructure-file.d.mts.map +0 -1
  12. package/dist/core/components/infrastructure-file.mjs +0 -46
  13. package/dist/core/components/infrastructure-file.mjs.map +0 -1
  14. package/dist/core/components/output.cjs +0 -41
  15. package/dist/core/components/output.d.cts +0 -23
  16. package/dist/core/components/output.d.cts.map +0 -1
  17. package/dist/core/components/output.d.mts +0 -23
  18. package/dist/core/components/output.d.mts.map +0 -1
  19. package/dist/core/components/output.mjs +0 -40
  20. package/dist/core/components/output.mjs.map +0 -1
  21. package/dist/core/components/single-line-comment.cjs +0 -23
  22. package/dist/core/components/single-line-comment.d.cts +0 -21
  23. package/dist/core/components/single-line-comment.d.cts.map +0 -1
  24. package/dist/core/components/single-line-comment.d.mts +0 -21
  25. package/dist/core/components/single-line-comment.d.mts.map +0 -1
  26. package/dist/core/components/single-line-comment.mjs +0 -22
  27. package/dist/core/components/single-line-comment.mjs.map +0 -1
  28. package/dist/core/components/source-file.cjs +0 -64
  29. package/dist/core/components/source-file.d.cts +0 -32
  30. package/dist/core/components/source-file.d.cts.map +0 -1
  31. package/dist/core/components/source-file.d.mts +0 -32
  32. package/dist/core/components/source-file.d.mts.map +0 -1
  33. package/dist/core/components/source-file.mjs +0 -62
  34. package/dist/core/components/source-file.mjs.map +0 -1
  35. package/dist/core/components/spacing.cjs +0 -20
  36. package/dist/core/components/spacing.d.cts +0 -23
  37. package/dist/core/components/spacing.d.cts.map +0 -1
  38. package/dist/core/components/spacing.d.mts +0 -23
  39. package/dist/core/components/spacing.d.mts.map +0 -1
  40. package/dist/core/components/spacing.mjs +0 -19
  41. package/dist/core/components/spacing.mjs.map +0 -1
  42. package/dist/core/contexts/context.cjs +0 -41
  43. package/dist/core/contexts/context.d.cts +0 -29
  44. package/dist/core/contexts/context.d.cts.map +0 -1
  45. package/dist/core/contexts/context.d.mts +0 -29
  46. package/dist/core/contexts/context.d.mts.map +0 -1
  47. package/dist/core/contexts/context.mjs +0 -37
  48. package/dist/core/contexts/context.mjs.map +0 -1
  49. package/dist/core/contexts/index.cjs +0 -22
  50. package/dist/core/contexts/index.d.cts +0 -4
  51. package/dist/core/contexts/index.d.mts +0 -4
  52. package/dist/core/contexts/index.mjs +0 -5
  53. package/dist/core/contexts/meta.cjs +0 -41
  54. package/dist/core/contexts/meta.d.cts +0 -47
  55. package/dist/core/contexts/meta.d.cts.map +0 -1
  56. package/dist/core/contexts/meta.d.mts +0 -47
  57. package/dist/core/contexts/meta.d.mts.map +0 -1
  58. package/dist/core/contexts/meta.mjs +0 -37
  59. package/dist/core/contexts/meta.mjs.map +0 -1
  60. package/dist/core/contexts/reflection.cjs +0 -80
  61. package/dist/core/contexts/reflection.d.cts +0 -62
  62. package/dist/core/contexts/reflection.d.cts.map +0 -1
  63. package/dist/core/contexts/reflection.d.mts +0 -62
  64. package/dist/core/contexts/reflection.d.mts.map +0 -1
  65. package/dist/core/contexts/reflection.mjs +0 -71
  66. package/dist/core/contexts/reflection.mjs.map +0 -1
  67. package/dist/core/helpers/code.cjs +0 -34
  68. package/dist/core/helpers/code.d.cts +0 -29
  69. package/dist/core/helpers/code.d.cts.map +0 -1
  70. package/dist/core/helpers/code.d.mts +0 -29
  71. package/dist/core/helpers/code.d.mts.map +0 -1
  72. package/dist/core/helpers/code.mjs +0 -33
  73. package/dist/core/helpers/code.mjs.map +0 -1
  74. package/dist/core/helpers/index.cjs +0 -4
  75. package/dist/core/helpers/index.d.cts +0 -2
  76. package/dist/core/helpers/index.d.mts +0 -2
  77. package/dist/core/helpers/index.mjs +0 -3
  78. package/dist/core/index.cjs +0 -37
  79. package/dist/core/index.d.cts +0 -10
  80. package/dist/core/index.d.mts +0 -10
  81. package/dist/core/index.mjs +0 -14
  82. package/dist/hcl/components/block-declaration.cjs +0 -34
  83. package/dist/hcl/components/block-declaration.d.cts +0 -21
  84. package/dist/hcl/components/block-declaration.d.cts.map +0 -1
  85. package/dist/hcl/components/block-declaration.d.mts +0 -21
  86. package/dist/hcl/components/block-declaration.d.mts.map +0 -1
  87. package/dist/hcl/components/block-declaration.mjs +0 -33
  88. package/dist/hcl/components/block-declaration.mjs.map +0 -1
  89. package/dist/hcl/components/hcl-file.cjs +0 -83
  90. package/dist/hcl/components/hcl-file.d.cts +0 -26
  91. package/dist/hcl/components/hcl-file.d.cts.map +0 -1
  92. package/dist/hcl/components/hcl-file.d.mts +0 -26
  93. package/dist/hcl/components/hcl-file.d.mts.map +0 -1
  94. package/dist/hcl/components/hcl-file.mjs +0 -81
  95. package/dist/hcl/components/hcl-file.mjs.map +0 -1
  96. package/dist/hcl/components/index.cjs +0 -11
  97. package/dist/hcl/components/index.d.cts +0 -5
  98. package/dist/hcl/components/index.d.mts +0 -5
  99. package/dist/hcl/components/index.mjs +0 -6
  100. package/dist/hcl/components/packer-file.cjs +0 -29
  101. package/dist/hcl/components/packer-file.d.cts +0 -18
  102. package/dist/hcl/components/packer-file.d.cts.map +0 -1
  103. package/dist/hcl/components/packer-file.d.mts +0 -18
  104. package/dist/hcl/components/packer-file.d.mts.map +0 -1
  105. package/dist/hcl/components/packer-file.mjs +0 -28
  106. package/dist/hcl/components/packer-file.mjs.map +0 -1
  107. package/dist/hcl/components/terraform-file.cjs +0 -30
  108. package/dist/hcl/components/terraform-file.d.cts +0 -19
  109. package/dist/hcl/components/terraform-file.d.cts.map +0 -1
  110. package/dist/hcl/components/terraform-file.d.mts +0 -19
  111. package/dist/hcl/components/terraform-file.d.mts.map +0 -1
  112. package/dist/hcl/components/terraform-file.mjs +0 -29
  113. package/dist/hcl/components/terraform-file.mjs.map +0 -1
  114. package/dist/hcl/index.cjs +0 -12
  115. package/dist/hcl/index.d.cts +0 -5
  116. package/dist/hcl/index.d.mts +0 -5
  117. package/dist/hcl/index.mjs +0 -7
  118. package/dist/helpers/capnp.cjs +0 -277
  119. package/dist/helpers/capnp.d.cts +0 -83
  120. package/dist/helpers/capnp.d.cts.map +0 -1
  121. package/dist/helpers/capnp.d.mts +0 -83
  122. package/dist/helpers/capnp.d.mts.map +0 -1
  123. package/dist/helpers/capnp.mjs +0 -260
  124. package/dist/helpers/capnp.mjs.map +0 -1
  125. package/dist/helpers/create-builtin.cjs +0 -20
  126. package/dist/helpers/create-builtin.d.cts +0 -15
  127. package/dist/helpers/create-builtin.d.cts.map +0 -1
  128. package/dist/helpers/create-builtin.d.mts +0 -15
  129. package/dist/helpers/create-builtin.d.mts.map +0 -1
  130. package/dist/helpers/create-builtin.mjs +0 -19
  131. package/dist/helpers/create-builtin.mjs.map +0 -1
  132. package/dist/helpers/index.cjs +0 -25
  133. package/dist/helpers/index.d.cts +0 -5
  134. package/dist/helpers/index.d.mts +0 -5
  135. package/dist/helpers/index.mjs +0 -6
  136. package/dist/helpers/refkey.cjs +0 -17
  137. package/dist/helpers/refkey.d.cts +0 -13
  138. package/dist/helpers/refkey.d.cts.map +0 -1
  139. package/dist/helpers/refkey.d.mts +0 -13
  140. package/dist/helpers/refkey.d.mts.map +0 -1
  141. package/dist/helpers/refkey.mjs +0 -16
  142. package/dist/helpers/refkey.mjs.map +0 -1
  143. package/dist/helpers/typescript.cjs +0 -48
  144. package/dist/helpers/typescript.d.cts +0 -24
  145. package/dist/helpers/typescript.d.cts.map +0 -1
  146. package/dist/helpers/typescript.d.mts +0 -24
  147. package/dist/helpers/typescript.d.mts.map +0 -1
  148. package/dist/helpers/typescript.mjs +0 -47
  149. package/dist/helpers/typescript.mjs.map +0 -1
  150. package/dist/index.cjs +0 -55
  151. package/dist/index.d.cts +0 -19
  152. package/dist/index.d.cts.map +0 -1
  153. package/dist/index.d.mts +0 -19
  154. package/dist/index.d.mts.map +0 -1
  155. package/dist/index.mjs +0 -52
  156. package/dist/index.mjs.map +0 -1
  157. package/dist/markdown/components/front-matter.cjs +0 -29
  158. package/dist/markdown/components/front-matter.d.cts +0 -15
  159. package/dist/markdown/components/front-matter.d.cts.map +0 -1
  160. package/dist/markdown/components/front-matter.d.mts +0 -15
  161. package/dist/markdown/components/front-matter.d.mts.map +0 -1
  162. package/dist/markdown/components/front-matter.mjs +0 -28
  163. package/dist/markdown/components/front-matter.mjs.map +0 -1
  164. package/dist/markdown/components/heading.cjs +0 -24
  165. package/dist/markdown/components/heading.d.cts +0 -19
  166. package/dist/markdown/components/heading.d.cts.map +0 -1
  167. package/dist/markdown/components/heading.d.mts +0 -19
  168. package/dist/markdown/components/heading.d.mts.map +0 -1
  169. package/dist/markdown/components/heading.mjs +0 -23
  170. package/dist/markdown/components/heading.mjs.map +0 -1
  171. package/dist/markdown/components/index.cjs +0 -13
  172. package/dist/markdown/components/index.d.cts +0 -5
  173. package/dist/markdown/components/index.d.mts +0 -5
  174. package/dist/markdown/components/index.mjs +0 -6
  175. package/dist/markdown/components/markdown-file.cjs +0 -135
  176. package/dist/markdown/components/markdown-file.d.cts +0 -27
  177. package/dist/markdown/components/markdown-file.d.cts.map +0 -1
  178. package/dist/markdown/components/markdown-file.d.mts +0 -27
  179. package/dist/markdown/components/markdown-file.d.mts.map +0 -1
  180. package/dist/markdown/components/markdown-file.mjs +0 -133
  181. package/dist/markdown/components/markdown-file.mjs.map +0 -1
  182. package/dist/markdown/components/markdown-table.cjs +0 -102
  183. package/dist/markdown/components/markdown-table.d.cts +0 -26
  184. package/dist/markdown/components/markdown-table.d.cts.map +0 -1
  185. package/dist/markdown/components/markdown-table.d.mts +0 -26
  186. package/dist/markdown/components/markdown-table.d.mts.map +0 -1
  187. package/dist/markdown/components/markdown-table.mjs +0 -99
  188. package/dist/markdown/components/markdown-table.mjs.map +0 -1
  189. package/dist/markdown/contexts/index.cjs +0 -7
  190. package/dist/markdown/contexts/index.d.cts +0 -2
  191. package/dist/markdown/contexts/index.d.mts +0 -2
  192. package/dist/markdown/contexts/index.mjs +0 -3
  193. package/dist/markdown/contexts/markdown-table.cjs +0 -38
  194. package/dist/markdown/contexts/markdown-table.d.cts +0 -36
  195. package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
  196. package/dist/markdown/contexts/markdown-table.d.mts +0 -36
  197. package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
  198. package/dist/markdown/contexts/markdown-table.mjs +0 -34
  199. package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
  200. package/dist/markdown/index.cjs +0 -20
  201. package/dist/markdown/index.d.cts +0 -6
  202. package/dist/markdown/index.d.mts +0 -6
  203. package/dist/markdown/index.mjs +0 -9
  204. package/dist/render.cjs +0 -91
  205. package/dist/render.d.cts +0 -38
  206. package/dist/render.d.cts.map +0 -1
  207. package/dist/render.d.mts +0 -38
  208. package/dist/render.d.mts.map +0 -1
  209. package/dist/render.mjs +0 -89
  210. package/dist/render.mjs.map +0 -1
  211. package/dist/types/components.cjs +0 -9
  212. package/dist/types/components.d.cts +0 -126
  213. package/dist/types/components.d.cts.map +0 -1
  214. package/dist/types/components.d.mts +0 -126
  215. package/dist/types/components.d.mts.map +0 -1
  216. package/dist/types/components.mjs +0 -10
  217. package/dist/types/components.mjs.map +0 -1
  218. package/dist/types/index.cjs +0 -0
  219. package/dist/types/index.d.cts +0 -3
  220. package/dist/types/index.d.mts +0 -3
  221. package/dist/types/index.mjs +0 -1
  222. package/dist/types/plugin.cjs +0 -0
  223. package/dist/types/plugin.d.cts +0 -35
  224. package/dist/types/plugin.d.cts.map +0 -1
  225. package/dist/types/plugin.d.mts +0 -35
  226. package/dist/types/plugin.d.mts.map +0 -1
  227. package/dist/types/plugin.mjs +0 -1
  228. package/dist/typescript/components/builtin-file.cjs +0 -63
  229. package/dist/typescript/components/builtin-file.d.cts +0 -34
  230. package/dist/typescript/components/builtin-file.d.cts.map +0 -1
  231. package/dist/typescript/components/builtin-file.d.mts +0 -34
  232. package/dist/typescript/components/builtin-file.d.mts.map +0 -1
  233. package/dist/typescript/components/builtin-file.mjs +0 -62
  234. package/dist/typescript/components/builtin-file.mjs.map +0 -1
  235. package/dist/typescript/components/class-declaration.cjs +0 -306
  236. package/dist/typescript/components/class-declaration.d.cts +0 -140
  237. package/dist/typescript/components/class-declaration.d.cts.map +0 -1
  238. package/dist/typescript/components/class-declaration.d.mts +0 -140
  239. package/dist/typescript/components/class-declaration.d.mts.map +0 -1
  240. package/dist/typescript/components/class-declaration.mjs +0 -300
  241. package/dist/typescript/components/class-declaration.mjs.map +0 -1
  242. package/dist/typescript/components/dynamic-import-statement.cjs +0 -26
  243. package/dist/typescript/components/dynamic-import-statement.d.cts +0 -32
  244. package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
  245. package/dist/typescript/components/dynamic-import-statement.d.mts +0 -32
  246. package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
  247. package/dist/typescript/components/dynamic-import-statement.mjs +0 -25
  248. package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
  249. package/dist/typescript/components/entry-file.cjs +0 -43
  250. package/dist/typescript/components/entry-file.d.cts +0 -27
  251. package/dist/typescript/components/entry-file.d.cts.map +0 -1
  252. package/dist/typescript/components/entry-file.d.mts +0 -27
  253. package/dist/typescript/components/entry-file.d.mts.map +0 -1
  254. package/dist/typescript/components/entry-file.mjs +0 -41
  255. package/dist/typescript/components/entry-file.mjs.map +0 -1
  256. package/dist/typescript/components/index.cjs +0 -64
  257. package/dist/typescript/components/index.d.cts +0 -14
  258. package/dist/typescript/components/index.d.mts +0 -14
  259. package/dist/typescript/components/index.mjs +0 -15
  260. package/dist/typescript/components/interface-declaration.cjs +0 -239
  261. package/dist/typescript/components/interface-declaration.d.cts +0 -80
  262. package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
  263. package/dist/typescript/components/interface-declaration.d.mts +0 -80
  264. package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
  265. package/dist/typescript/components/interface-declaration.mjs +0 -235
  266. package/dist/typescript/components/interface-declaration.mjs.map +0 -1
  267. package/dist/typescript/components/object-declaration.cjs +0 -139
  268. package/dist/typescript/components/object-declaration.d.cts +0 -28
  269. package/dist/typescript/components/object-declaration.d.cts.map +0 -1
  270. package/dist/typescript/components/object-declaration.d.mts +0 -28
  271. package/dist/typescript/components/object-declaration.d.mts.map +0 -1
  272. package/dist/typescript/components/object-declaration.mjs +0 -137
  273. package/dist/typescript/components/object-declaration.mjs.map +0 -1
  274. package/dist/typescript/components/property-name.cjs +0 -32
  275. package/dist/typescript/components/property-name.d.cts +0 -23
  276. package/dist/typescript/components/property-name.d.cts.map +0 -1
  277. package/dist/typescript/components/property-name.d.mts +0 -23
  278. package/dist/typescript/components/property-name.d.mts.map +0 -1
  279. package/dist/typescript/components/property-name.mjs +0 -31
  280. package/dist/typescript/components/property-name.mjs.map +0 -1
  281. package/dist/typescript/components/record-expression.cjs +0 -13
  282. package/dist/typescript/components/record-expression.d.cts +0 -12
  283. package/dist/typescript/components/record-expression.d.cts.map +0 -1
  284. package/dist/typescript/components/record-expression.d.mts +0 -12
  285. package/dist/typescript/components/record-expression.d.mts.map +0 -1
  286. package/dist/typescript/components/record-expression.mjs +0 -12
  287. package/dist/typescript/components/record-expression.mjs.map +0 -1
  288. package/dist/typescript/components/tsdoc-reflection.cjs +0 -331
  289. package/dist/typescript/components/tsdoc-reflection.d.cts +0 -42
  290. package/dist/typescript/components/tsdoc-reflection.d.cts.map +0 -1
  291. package/dist/typescript/components/tsdoc-reflection.d.mts +0 -42
  292. package/dist/typescript/components/tsdoc-reflection.d.mts.map +0 -1
  293. package/dist/typescript/components/tsdoc-reflection.mjs +0 -325
  294. package/dist/typescript/components/tsdoc-reflection.mjs.map +0 -1
  295. package/dist/typescript/components/tsdoc.cjs +0 -497
  296. package/dist/typescript/components/tsdoc.d.cts +0 -161
  297. package/dist/typescript/components/tsdoc.d.cts.map +0 -1
  298. package/dist/typescript/components/tsdoc.d.mts +0 -161
  299. package/dist/typescript/components/tsdoc.d.mts.map +0 -1
  300. package/dist/typescript/components/tsdoc.mjs +0 -476
  301. package/dist/typescript/components/tsdoc.mjs.map +0 -1
  302. package/dist/typescript/components/type-declaration.cjs +0 -39
  303. package/dist/typescript/components/type-declaration.d.cts +0 -17
  304. package/dist/typescript/components/type-declaration.d.cts.map +0 -1
  305. package/dist/typescript/components/type-declaration.d.mts +0 -17
  306. package/dist/typescript/components/type-declaration.d.mts.map +0 -1
  307. package/dist/typescript/components/type-declaration.mjs +0 -38
  308. package/dist/typescript/components/type-declaration.mjs.map +0 -1
  309. package/dist/typescript/components/type-parameters.cjs +0 -83
  310. package/dist/typescript/components/type-parameters.d.cts +0 -23
  311. package/dist/typescript/components/type-parameters.d.cts.map +0 -1
  312. package/dist/typescript/components/type-parameters.d.mts +0 -23
  313. package/dist/typescript/components/type-parameters.d.mts.map +0 -1
  314. package/dist/typescript/components/type-parameters.mjs +0 -82
  315. package/dist/typescript/components/type-parameters.mjs.map +0 -1
  316. package/dist/typescript/components/typescript-file.cjs +0 -221
  317. package/dist/typescript/components/typescript-file.d.cts +0 -47
  318. package/dist/typescript/components/typescript-file.d.cts.map +0 -1
  319. package/dist/typescript/components/typescript-file.d.mts +0 -47
  320. package/dist/typescript/components/typescript-file.d.mts.map +0 -1
  321. package/dist/typescript/components/typescript-file.mjs +0 -218
  322. package/dist/typescript/components/typescript-file.mjs.map +0 -1
  323. package/dist/typescript/contexts/index.cjs +0 -4
  324. package/dist/typescript/contexts/index.d.cts +0 -2
  325. package/dist/typescript/contexts/index.d.mts +0 -2
  326. package/dist/typescript/contexts/index.mjs +0 -3
  327. package/dist/typescript/contexts/lexical-scope.cjs +0 -26
  328. package/dist/typescript/contexts/lexical-scope.d.cts +0 -14
  329. package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
  330. package/dist/typescript/contexts/lexical-scope.d.mts +0 -14
  331. package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
  332. package/dist/typescript/contexts/lexical-scope.mjs +0 -25
  333. package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
  334. package/dist/typescript/contexts/member-scope.cjs +0 -24
  335. package/dist/typescript/contexts/member-scope.d.cts +0 -19
  336. package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
  337. package/dist/typescript/contexts/member-scope.d.mts +0 -19
  338. package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
  339. package/dist/typescript/contexts/member-scope.mjs +0 -23
  340. package/dist/typescript/contexts/member-scope.mjs.map +0 -1
  341. package/dist/typescript/helpers/get-call-signature-props.cjs +0 -26
  342. package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -14
  343. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
  344. package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -14
  345. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
  346. package/dist/typescript/helpers/get-call-signature-props.mjs +0 -25
  347. package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
  348. package/dist/typescript/helpers/index.cjs +0 -6
  349. package/dist/typescript/helpers/index.d.cts +0 -3
  350. package/dist/typescript/helpers/index.d.mts +0 -3
  351. package/dist/typescript/helpers/index.mjs +0 -4
  352. package/dist/typescript/helpers/utilities.cjs +0 -15
  353. package/dist/typescript/helpers/utilities.d.cts +0 -11
  354. package/dist/typescript/helpers/utilities.d.cts.map +0 -1
  355. package/dist/typescript/helpers/utilities.d.mts +0 -11
  356. package/dist/typescript/helpers/utilities.d.mts.map +0 -1
  357. package/dist/typescript/helpers/utilities.mjs +0 -14
  358. package/dist/typescript/helpers/utilities.mjs.map +0 -1
  359. package/dist/typescript/index.cjs +0 -73
  360. package/dist/typescript/index.d.cts +0 -17
  361. package/dist/typescript/index.d.mts +0 -17
  362. package/dist/typescript/index.mjs +0 -21
  363. package/dist/yaml/components/index.cjs +0 -5
  364. package/dist/yaml/components/index.d.cts +0 -2
  365. package/dist/yaml/components/index.d.mts +0 -2
  366. package/dist/yaml/components/index.mjs +0 -3
  367. package/dist/yaml/components/yaml-file.cjs +0 -149
  368. package/dist/yaml/components/yaml-file.d.cts +0 -32
  369. package/dist/yaml/components/yaml-file.d.cts.map +0 -1
  370. package/dist/yaml/components/yaml-file.d.mts +0 -32
  371. package/dist/yaml/components/yaml-file.d.mts.map +0 -1
  372. package/dist/yaml/components/yaml-file.mjs +0 -147
  373. package/dist/yaml/components/yaml-file.mjs.map +0 -1
  374. package/dist/yaml/index.cjs +0 -6
  375. package/dist/yaml/index.d.cts +0 -2
  376. package/dist/yaml/index.d.mts +0 -2
  377. package/dist/yaml/index.mjs +0 -4
@@ -1,38 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
- let _alloy_js_core = require("@alloy-js/core");
4
-
5
- //#region src/markdown/contexts/markdown-table.ts
6
- /**
7
- * The Powerlines context used in template rendering.
8
- */
9
- const MarkdownTableColumnContext = (0, _alloy_js_core.createNamedContext)("MarkdownTableColumn", {});
10
- /**
11
- * Hook to access the Powerlines Context.
12
- *
13
- * @returns The Context.
14
- */
15
- function useMarkdownTableColumn() {
16
- return (0, _alloy_js_core.useContext)(MarkdownTableColumnContext);
17
- }
18
- /**
19
- * The Powerlines context used in template rendering.
20
- */
21
- const MarkdownTableContext = (0, _alloy_js_core.createContext)({
22
- columns: [],
23
- data: []
24
- });
25
- /**
26
- * Hook to access the Powerlines Context.
27
- *
28
- * @returns The Context.
29
- */
30
- function useMarkdownTable() {
31
- return (0, _alloy_js_core.useContext)(MarkdownTableContext);
32
- }
33
-
34
- //#endregion
35
- exports.MarkdownTableColumnContext = MarkdownTableColumnContext;
36
- exports.MarkdownTableContext = MarkdownTableContext;
37
- exports.useMarkdownTable = useMarkdownTable;
38
- exports.useMarkdownTableColumn = useMarkdownTableColumn;
@@ -1,36 +0,0 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
-
3
- //#region src/markdown/contexts/markdown-table.d.ts
4
- interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
5
- index: number;
6
- name: keyof T;
7
- align: "left" | "right" | "center";
8
- width: number;
9
- }
10
- /**
11
- * The Powerlines context used in template rendering.
12
- */
13
- declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
14
- /**
15
- * Hook to access the Powerlines Context.
16
- *
17
- * @returns The Context.
18
- */
19
- declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
20
- interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
21
- columns: MarkdownTableColumnContextInterface<T>[];
22
- data: T[];
23
- }
24
- /**
25
- * The Powerlines context used in template rendering.
26
- */
27
- declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
28
- /**
29
- * Hook to access the Powerlines Context.
30
- *
31
- * @returns The Context.
32
- */
33
- declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
34
- //#endregion
35
- export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
36
- //# sourceMappingURL=markdown-table.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":";;;UAqBiB,mCAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,KAAA;EACA,IAAA,QAAY,CAAA;EACZ,KAAA;EACA,KAAA;AAAA;;;;cAMW,0BAAA,EAA4B,gBAAA,CAAiB,mCAAA;;;;;;iBAW1C,sBAAA,CAAA,GAAsB,mCAAA,CAAA,MAAA;AAAA,UAMrB,6BAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,OAAA,EAAS,mCAAA,CAAoC,CAAA;EAC7C,IAAA,EAAM,CAAA;AAAA;AArBR;;;AAAA,cA2Ba,oBAAA,EAAsB,gBAAA,CAAiB,6BAAA;;AAhBpD;;;;iBA2BgB,gBAAA,CAAA,GAAgB,6BAAA,CAAA,MAAA"}
@@ -1,36 +0,0 @@
1
- import { ComponentContext } from "@alloy-js/core";
2
-
3
- //#region src/markdown/contexts/markdown-table.d.ts
4
- interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
5
- index: number;
6
- name: keyof T;
7
- align: "left" | "right" | "center";
8
- width: number;
9
- }
10
- /**
11
- * The Powerlines context used in template rendering.
12
- */
13
- declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
14
- /**
15
- * Hook to access the Powerlines Context.
16
- *
17
- * @returns The Context.
18
- */
19
- declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
20
- interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
21
- columns: MarkdownTableColumnContextInterface<T>[];
22
- data: T[];
23
- }
24
- /**
25
- * The Powerlines context used in template rendering.
26
- */
27
- declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
28
- /**
29
- * Hook to access the Powerlines Context.
30
- *
31
- * @returns The Context.
32
- */
33
- declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
34
- //#endregion
35
- export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
36
- //# sourceMappingURL=markdown-table.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":";;;UAqBiB,mCAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,KAAA;EACA,IAAA,QAAY,CAAA;EACZ,KAAA;EACA,KAAA;AAAA;;;;cAMW,0BAAA,EAA4B,gBAAA,CAAiB,mCAAA;;;;;;iBAW1C,sBAAA,CAAA,GAAsB,mCAAA,CAAA,MAAA;AAAA,UAMrB,6BAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,OAAA,EAAS,mCAAA,CAAoC,CAAA;EAC7C,IAAA,EAAM,CAAA;AAAA;AArBR;;;AAAA,cA2Ba,oBAAA,EAAsB,gBAAA,CAAiB,6BAAA;;AAhBpD;;;;iBA2BgB,gBAAA,CAAA,GAAgB,6BAAA,CAAA,MAAA"}
@@ -1,34 +0,0 @@
1
- import { createContext, createNamedContext, useContext } from "@alloy-js/core";
2
-
3
- //#region src/markdown/contexts/markdown-table.ts
4
- /**
5
- * The Powerlines context used in template rendering.
6
- */
7
- const MarkdownTableColumnContext = createNamedContext("MarkdownTableColumn", {});
8
- /**
9
- * Hook to access the Powerlines Context.
10
- *
11
- * @returns The Context.
12
- */
13
- function useMarkdownTableColumn() {
14
- return useContext(MarkdownTableColumnContext);
15
- }
16
- /**
17
- * The Powerlines context used in template rendering.
18
- */
19
- const MarkdownTableContext = createContext({
20
- columns: [],
21
- data: []
22
- });
23
- /**
24
- * Hook to access the Powerlines Context.
25
- *
26
- * @returns The Context.
27
- */
28
- function useMarkdownTable() {
29
- return useContext(MarkdownTableContext);
30
- }
31
-
32
- //#endregion
33
- export { MarkdownTableColumnContext, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn };
34
- //# sourceMappingURL=markdown-table.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-table.mjs","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\n\nexport interface MarkdownTableColumnContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n index: number;\n name: keyof T;\n align: \"left\" | \"right\" | \"center\";\n width: number;\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface> =\n createNamedContext<MarkdownTableColumnContextInterface>(\n \"MarkdownTableColumn\",\n {} as MarkdownTableColumnContextInterface\n );\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTableColumn() {\n return useContext<MarkdownTableColumnContextInterface>(\n MarkdownTableColumnContext\n );\n}\n\nexport interface MarkdownTableContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n columns: MarkdownTableColumnContextInterface<T>[];\n data: T[];\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface> =\n createContext<MarkdownTableContextInterface>({\n columns: [],\n data: []\n });\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTable() {\n return useContext<MarkdownTableContextInterface>(MarkdownTableContext);\n}\n"],"mappings":";;;;;;AAsBA,MAAY,6BAA6B,mBAAW,uBAAA,EAAA,CAAA;;;;;;;AAQlD,QAAA,WAAA,2BAAA;;;;;AAKF,MAAK,uBAAoB,cAAA;CACvB,SAAQ,EAAA;CACR,MAAC,EAAA;;;;;;;AAQH,SAAS,mBAAW;AAClB,QAAE,WAAA,qBAAA"}
@@ -1,20 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_markdown_components_front_matter = require('./components/front-matter.cjs');
3
- const require_markdown_components_heading = require('./components/heading.cjs');
4
- const require_markdown_components_markdown_file = require('./components/markdown-file.cjs');
5
- const require_markdown_contexts_markdown_table = require('./contexts/markdown-table.cjs');
6
- const require_markdown_components_markdown_table = require('./components/markdown-table.cjs');
7
- require('./components/index.cjs');
8
- require('./contexts/index.cjs');
9
-
10
- exports.FrontMatter = require_markdown_components_front_matter.FrontMatter;
11
- exports.Heading = require_markdown_components_heading.Heading;
12
- exports.MarkdownFile = require_markdown_components_markdown_file.MarkdownFile;
13
- exports.MarkdownFileHeader = require_markdown_components_markdown_file.MarkdownFileHeader;
14
- exports.MarkdownTable = require_markdown_components_markdown_table.MarkdownTable;
15
- exports.MarkdownTableColumn = require_markdown_components_markdown_table.MarkdownTableColumn;
16
- exports.MarkdownTableColumnContext = require_markdown_contexts_markdown_table.MarkdownTableColumnContext;
17
- exports.MarkdownTableColumnHeader = require_markdown_components_markdown_table.MarkdownTableColumnHeader;
18
- exports.MarkdownTableContext = require_markdown_contexts_markdown_table.MarkdownTableContext;
19
- exports.useMarkdownTable = require_markdown_contexts_markdown_table.useMarkdownTable;
20
- exports.useMarkdownTableColumn = require_markdown_contexts_markdown_table.useMarkdownTableColumn;
@@ -1,6 +0,0 @@
1
- import { FrontMatter, FrontMatterProps } from "./components/front-matter.cjs";
2
- import { Heading, HeadingProps } from "./components/heading.cjs";
3
- import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps } from "./components/markdown-file.cjs";
4
- import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.cjs";
5
- import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps } from "./components/markdown-table.cjs";
6
- export { FrontMatter, FrontMatterProps, Heading, HeadingProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, useMarkdownTable, useMarkdownTableColumn };
@@ -1,6 +0,0 @@
1
- import { FrontMatter, FrontMatterProps } from "./components/front-matter.mjs";
2
- import { Heading, HeadingProps } from "./components/heading.mjs";
3
- import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps } from "./components/markdown-file.mjs";
4
- import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.mjs";
5
- import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps } from "./components/markdown-table.mjs";
6
- export { FrontMatter, FrontMatterProps, Heading, HeadingProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, useMarkdownTable, useMarkdownTableColumn };
@@ -1,9 +0,0 @@
1
- import { FrontMatter } from "./components/front-matter.mjs";
2
- import { Heading } from "./components/heading.mjs";
3
- import { MarkdownFile, MarkdownFileHeader } from "./components/markdown-file.mjs";
4
- import { MarkdownTableColumnContext, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.mjs";
5
- import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader } from "./components/markdown-table.mjs";
6
- import "./components/index.mjs";
7
- import "./contexts/index.mjs";
8
-
9
- export { FrontMatter, Heading, MarkdownFile, MarkdownFileHeader, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnHeader, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn };
package/dist/render.cjs DELETED
@@ -1,91 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
- const require_core_components_output = require('./core/components/output.cjs');
4
- require('./core/index.cjs');
5
- let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
6
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
- let _alloy_js_core = require("@alloy-js/core");
8
-
9
- //#region src/render.tsx
10
- /**
11
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
12
- *
13
- * @example
14
- * ```tsx
15
- * import { render } from "@powerlines/plugin-alloy/render";
16
- *
17
- * await render(context, <> ... </>);
18
- * ```
19
- *
20
- * @param context - The Powerlines plugin context.
21
- * @param children - The children components to render.
22
- * @returns A promise that resolves when rendering is complete.
23
- */
24
- async function render(context, children) {
25
- const meta = {};
26
- const output = await (0, _alloy_js_core.renderAsync)((0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_output.Output, {
27
- context,
28
- meta,
29
- children
30
- }));
31
- if (!Object.keys(output).length) context.debug("No output files were rendered by Alloy-js component templates.");
32
- else {
33
- context.debug(`Processing ${Object.keys(output).length} rendered output files from Alloy-js component templates.`);
34
- await (0, _alloy_js_core.traverseOutput)(output, {
35
- visitDirectory: (directory) => {
36
- if (context.fs.existsSync(directory.path)) return;
37
- context.fs.mkdirSync(directory.path);
38
- },
39
- visitFile: (file) => {
40
- if ("contents" in file) {
41
- const metadata = meta[file.path] ?? {};
42
- if (metadata.kind === "builtin") {
43
- if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
44
- context.emitBuiltinSync(file.contents, metadata.id, {
45
- skipFormat: metadata.skipFormat,
46
- storage: metadata.storage,
47
- extension: (0, _stryke_path_file_path_fns.findFileExtension)(file.path)
48
- });
49
- } else if (metadata.kind === "entry") context.emitEntrySync(file.contents, file.path, {
50
- skipFormat: metadata.skipFormat,
51
- storage: metadata.storage,
52
- ...metadata.typeDefinition ?? {}
53
- });
54
- else if (metadata.kind === "infrastructure") {
55
- if (!metadata.id) throw new Error(`Infrastructure file "${file.path}" is missing its ID in the render metadata.`);
56
- context.emitInfrastructureSync(file.contents, metadata.id, {
57
- skipFormat: metadata.skipFormat,
58
- storage: metadata.storage,
59
- extension: (0, _stryke_path_file_path_fns.findFileExtension)(file.path)
60
- });
61
- } else context.emitSync(file.contents, file.path, metadata);
62
- } else context.fs.copySync(file.sourcePath, file.path);
63
- }
64
- });
65
- }
66
- }
67
- /**
68
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.
69
- *
70
- * @example
71
- * ```tsx
72
- * import { renderString } from "@powerlines/plugin-alloy/render";
73
- *
74
- * const output = await renderString(context, <> ... </>);
75
- * ```
76
- *
77
- * @param context - The Powerlines plugin context.
78
- * @param children - The children components to render.
79
- * @param options - Optional print tree options.
80
- * @returns The rendered output as a string.
81
- */
82
- function renderString(context, children, options) {
83
- return (0, _alloy_js_core.printTree)((0, _alloy_js_core.renderTree)((0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_output.Output, {
84
- context,
85
- children
86
- })), options);
87
- }
88
-
89
- //#endregion
90
- exports.render = render;
91
- exports.renderString = renderString;
package/dist/render.d.cts DELETED
@@ -1,38 +0,0 @@
1
- import { Children, PrintTreeOptions } from "@alloy-js/core";
2
- import { PluginContext } from "powerlines";
3
-
4
- //#region src/render.d.ts
5
- /**
6
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
7
- *
8
- * @example
9
- * ```tsx
10
- * import { render } from "@powerlines/plugin-alloy/render";
11
- *
12
- * await render(context, <> ... </>);
13
- * ```
14
- *
15
- * @param context - The Powerlines plugin context.
16
- * @param children - The children components to render.
17
- * @returns A promise that resolves when rendering is complete.
18
- */
19
- declare function render<TContext extends PluginContext>(context: TContext, children: Children): Promise<void>;
20
- /**
21
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.
22
- *
23
- * @example
24
- * ```tsx
25
- * import { renderString } from "@powerlines/plugin-alloy/render";
26
- *
27
- * const output = await renderString(context, <> ... </>);
28
- * ```
29
- *
30
- * @param context - The Powerlines plugin context.
31
- * @param children - The children components to render.
32
- * @param options - Optional print tree options.
33
- * @returns The rendered output as a string.
34
- */
35
- declare function renderString<TContext extends PluginContext>(context: TContext, children: Children, options?: PrintTreeOptions): string;
36
- //#endregion
37
- export { render, renderString };
38
- //# sourceMappingURL=render.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.d.cts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;;;AA4CA;;;;;;;;;;;;iBAAsB,MAAA,kBAAwB,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,GAAQ,OAAA;;;;;;AA2FpB;;;;;;;;;;iBAAgB,YAAA,kBAA8B,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,EACV,OAAA,GAAU,gBAAA"}
package/dist/render.d.mts DELETED
@@ -1,38 +0,0 @@
1
- import { Children, PrintTreeOptions } from "@alloy-js/core";
2
- import { PluginContext } from "powerlines";
3
-
4
- //#region src/render.d.ts
5
- /**
6
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
7
- *
8
- * @example
9
- * ```tsx
10
- * import { render } from "@powerlines/plugin-alloy/render";
11
- *
12
- * await render(context, <> ... </>);
13
- * ```
14
- *
15
- * @param context - The Powerlines plugin context.
16
- * @param children - The children components to render.
17
- * @returns A promise that resolves when rendering is complete.
18
- */
19
- declare function render<TContext extends PluginContext>(context: TContext, children: Children): Promise<void>;
20
- /**
21
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.
22
- *
23
- * @example
24
- * ```tsx
25
- * import { renderString } from "@powerlines/plugin-alloy/render";
26
- *
27
- * const output = await renderString(context, <> ... </>);
28
- * ```
29
- *
30
- * @param context - The Powerlines plugin context.
31
- * @param children - The children components to render.
32
- * @param options - Optional print tree options.
33
- * @returns The rendered output as a string.
34
- */
35
- declare function renderString<TContext extends PluginContext>(context: TContext, children: Children, options?: PrintTreeOptions): string;
36
- //#endregion
37
- export { render, renderString };
38
- //# sourceMappingURL=render.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.d.mts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;;;AA4CA;;;;;;;;;;;;iBAAsB,MAAA,kBAAwB,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,GAAQ,OAAA;;;;;;AA2FpB;;;;;;;;;;iBAAgB,YAAA,kBAA8B,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,EACV,OAAA,GAAU,gBAAA"}
package/dist/render.mjs DELETED
@@ -1,89 +0,0 @@
1
- import { Output as Output$1 } from "./core/components/output.mjs";
2
- import "./core/index.mjs";
3
- import { findFileExtension } from "@stryke/path/file-path-fns";
4
- import { createComponent } from "@alloy-js/core/jsx-runtime";
5
- import { printTree, renderAsync, renderTree, traverseOutput } from "@alloy-js/core";
6
-
7
- //#region src/render.tsx
8
- /**
9
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.
10
- *
11
- * @example
12
- * ```tsx
13
- * import { render } from "@powerlines/plugin-alloy/render";
14
- *
15
- * await render(context, <> ... </>);
16
- * ```
17
- *
18
- * @param context - The Powerlines plugin context.
19
- * @param children - The children components to render.
20
- * @returns A promise that resolves when rendering is complete.
21
- */
22
- async function render(context, children) {
23
- const meta = {};
24
- const output = await renderAsync(createComponent(Output$1, {
25
- context,
26
- meta,
27
- children
28
- }));
29
- if (!Object.keys(output).length) context.debug("No output files were rendered by Alloy-js component templates.");
30
- else {
31
- context.debug(`Processing ${Object.keys(output).length} rendered output files from Alloy-js component templates.`);
32
- await traverseOutput(output, {
33
- visitDirectory: (directory) => {
34
- if (context.fs.existsSync(directory.path)) return;
35
- context.fs.mkdirSync(directory.path);
36
- },
37
- visitFile: (file) => {
38
- if ("contents" in file) {
39
- const metadata = meta[file.path] ?? {};
40
- if (metadata.kind === "builtin") {
41
- if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
42
- context.emitBuiltinSync(file.contents, metadata.id, {
43
- skipFormat: metadata.skipFormat,
44
- storage: metadata.storage,
45
- extension: findFileExtension(file.path)
46
- });
47
- } else if (metadata.kind === "entry") context.emitEntrySync(file.contents, file.path, {
48
- skipFormat: metadata.skipFormat,
49
- storage: metadata.storage,
50
- ...metadata.typeDefinition ?? {}
51
- });
52
- else if (metadata.kind === "infrastructure") {
53
- if (!metadata.id) throw new Error(`Infrastructure file "${file.path}" is missing its ID in the render metadata.`);
54
- context.emitInfrastructureSync(file.contents, metadata.id, {
55
- skipFormat: metadata.skipFormat,
56
- storage: metadata.storage,
57
- extension: findFileExtension(file.path)
58
- });
59
- } else context.emitSync(file.contents, file.path, metadata);
60
- } else context.fs.copySync(file.sourcePath, file.path);
61
- }
62
- });
63
- }
64
- }
65
- /**
66
- * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.
67
- *
68
- * @example
69
- * ```tsx
70
- * import { renderString } from "@powerlines/plugin-alloy/render";
71
- *
72
- * const output = await renderString(context, <> ... </>);
73
- * ```
74
- *
75
- * @param context - The Powerlines plugin context.
76
- * @param children - The children components to render.
77
- * @param options - Optional print tree options.
78
- * @returns The rendered output as a string.
79
- */
80
- function renderString(context, children, options) {
81
- return printTree(renderTree(createComponent(Output$1, {
82
- context,
83
- children
84
- })), options);
85
- }
86
-
87
- //#endregion
88
- export { render, renderString };
89
- //# sourceMappingURL=render.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.mjs","names":[],"sources":["../src/render.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n printTree,\n PrintTreeOptions,\n renderAsync,\n renderTree,\n traverseOutput\n} from \"@alloy-js/core\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { PluginContext } from \"powerlines\";\nimport { MetaItem, Output } from \"./core\";\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.\n *\n * @example\n * ```tsx\n * import { render } from \"@powerlines/plugin-alloy/render\";\n *\n * await render(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @returns A promise that resolves when rendering is complete.\n */\nexport async function render<TContext extends PluginContext>(\n context: TContext,\n children: Children\n) {\n const meta = {} as Record<string, MetaItem>;\n const output = await renderAsync(\n <Output<TContext> context={context} meta={meta}>\n {children}\n </Output>\n );\n\n if (!Object.keys(output).length) {\n context.debug(\n \"No output files were rendered by Alloy-js component templates.\"\n );\n } else {\n context.debug(\n `Processing ${\n Object.keys(output).length\n } rendered output files from Alloy-js component templates.`\n );\n\n await traverseOutput(output, {\n visitDirectory: directory => {\n if (context.fs.existsSync(directory.path)) {\n return;\n }\n\n context.fs.mkdirSync(directory.path);\n },\n visitFile: file => {\n if (\"contents\" in file) {\n const metadata = meta[file.path] ?? {};\n if (metadata.kind === \"builtin\") {\n if (!metadata.id) {\n throw new Error(\n `Built-in file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitBuiltinSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else if (metadata.kind === \"entry\") {\n context.emitEntrySync(file.contents, file.path, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n ...(metadata.typeDefinition ?? {})\n });\n } else if (metadata.kind === \"infrastructure\") {\n if (!metadata.id) {\n throw new Error(\n `Infrastructure file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitInfrastructureSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else {\n context.emitSync(file.contents, file.path, metadata);\n }\n } else {\n context.fs.copySync(file.sourcePath, file.path);\n }\n }\n });\n }\n}\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.\n *\n * @example\n * ```tsx\n * import { renderString } from \"@powerlines/plugin-alloy/render\";\n *\n * const output = await renderString(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @param options - Optional print tree options.\n * @returns The rendered output as a string.\n */\nexport function renderString<TContext extends PluginContext>(\n context: TContext,\n children: Children,\n options?: PrintTreeOptions\n) {\n const tree = renderTree(\n <Output<TContext> context={context}>{children}</Output>\n );\n\n return printTree(tree, options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsCA,eAAK,OAAA,SAAA,UAAA;CACJ,MAAA,OAAA,EAAA;CACC,MAAE,SAAa,MAAM,YAAY,gBAAc,UAAA;EACvC;EACN;EACF;EACF,CAAA,CAAA;AACE,KAAA,CAAA,OAAS,KAAQ,OAAA,CAAA,OACjB,SAAU,MAAA,iEAAA;MACV;AACA,UAAU,MAAM,cAAU,OAAQ,KAAQ,OAAC,CAAA,OAAA,2DAAA;AAC3C,QAAM,eAAe,QAAA;GAClB,iBAAiB,cAAS;AACxB,QAAA,QAAQ,GAAA,WAAA,UAAA,KAAA,CACT;;;GAIF,YAAa,SAAA;AACV,QAAG,cAAa,MAAK;KACvB,MAAA,WAAA,KAAA,KAAA,SAAA,EAAA;AACI,SAAA,SAAA,SAAA,WAAA;AACG,UAAA,CAAK,SAAA,GACV,OAAY,IAAA,MAAA,kBAAA,KAAA,KAAA,6CAAA;AAEX,cAAS,gBAAkB,KAAM,UAAG,SAAU,IAAU;OAC3D,YAAA,SAAA;;OAEK,WAAe,kBAAQ,KAAA,KAAA;OAC3B,CAAA;gBACc,SAAG,SAAW,QACxB,SAAM,cAAA,KAAA,UAAA,KAAA,MAAA;MACR,YAAA,SAAA;;MAEA,GAAU,SAAC,kBAAyB,EAAA;MACrC,CAAA;cACc,SAAI,SAAA,kBAAA;AACb,UAAC,CAAA,SAAa,GAChB,OAAM,IAAQ,MAAG,wBAAqB,KAAA,KAAA,6CAAA;AAEpC,cAAK,uBAAa,KAAA,UAAA,SAAA,IAAA;OAChB,YAAU,SAAK;OACf,SAAS,SAAS;OAClB,WAAS,kBAAA,KAAA,KAAA;OACV,CAAC;WAEF,SAAA,SAAA,KAAA,UAAA,KAAA,MAAA,SAAA;UAGF,SAAI,GAAA,SAAY,KAAS,YAAU,KAAA,KAAA;;GAGxC,CAAC;;;;;;;;;;;;;;;;;;AAmBN,SAAc,aAAW,SAAA,UAAuB,SAAI;AAKlD,QAAO,UAJK,WAAA,gBAAA,UAAA;EACF;EACA;EACT,CAAC,CACW,EAAA,QAAA"}
@@ -1,9 +0,0 @@
1
-
2
- //#region src/types/components.ts
3
- /**
4
- * A type that represents the props of a component that can have children.
5
- */
6
- /**
7
- * A type that requires the `children` prop in a component.
8
- */
9
- //#endregion
@@ -1,126 +0,0 @@
1
- import { Children, Context } from "@alloy-js/core";
2
- import { ResolvedEntryTypeDefinition, StoragePreset } from "powerlines";
3
- import { SourceFileContext } from "@alloy-js/typescript";
4
-
5
- //#region src/types/components.d.ts
6
- interface CopyOutputFile {
7
- kind: "file";
8
- path: string;
9
- sourcePath: string;
10
- /**
11
- * The format of the output files
12
- *
13
- * @remarks
14
- * If not specified, the output mode will be determined by the provided \`output.mode\` value.
15
- */
16
- preset?: StoragePreset;
17
- }
18
- interface WriteOutputFile {
19
- kind: "file" | "entry" | "builtin";
20
- path: string;
21
- contents: string;
22
- filetype: string;
23
- /**
24
- * The format of the output files
25
- *
26
- * @remarks
27
- * If not specified, the output mode will be determined by the provided \`output.mode\` value.
28
- */
29
- preset?: StoragePreset;
30
- }
31
- type OutputFile = (WriteOutputFile & {
32
- kind: "file";
33
- }) | (WriteOutputFile & {
34
- kind: "entry";
35
- typeDefinition?: ResolvedEntryTypeDefinition;
36
- }) | (WriteOutputFile & {
37
- kind: "builtin";
38
- id: string;
39
- }) | CopyOutputFile;
40
- interface OutputDirectory {
41
- kind: "directory";
42
- path: string;
43
- contents: (OutputDirectory | OutputFile)[];
44
- }
45
- interface RenderEntryContext {
46
- typeDefinition: ResolvedEntryTypeDefinition;
47
- }
48
- interface RenderBuiltinContext {
49
- id: string;
50
- }
51
- interface RenderOutputContext {
52
- mode?: StoragePreset;
53
- }
54
- interface CopyFileOutputContext {
55
- path?: string;
56
- sourcePath?: string;
57
- }
58
- interface RenderContext extends Context {
59
- meta?: {
60
- copyFile?: CopyFileOutputContext;
61
- /**
62
- * The current context for the built-in module.
63
- */
64
- builtin?: RenderBuiltinContext;
65
- /**
66
- * The current context for the application entrypoint file being rendered.
67
- */
68
- entry?: RenderEntryContext;
69
- /**
70
- * The current context for output rendering.
71
- */
72
- output?: RenderOutputContext;
73
- } & Record<string, any>;
74
- }
75
- /**
76
- * A type that represents the props of a component that can have children.
77
- */
78
- interface ComponentProps {
79
- children?: Children;
80
- }
81
- /**
82
- * A type that requires the `children` prop in a component.
83
- */
84
- type ComponentPropsWithChildren = Omit<ComponentProps, "children"> & Required<Pick<ComponentProps, "children">>;
85
- interface BuiltinSourceFileContext extends SourceFileContext {
86
- /**
87
- * The runtime module identifier.
88
- */
89
- id: string;
90
- }
91
- interface ReflectionOverrideInterface<T> {
92
- name?: string | Children;
93
- type?: string | Children;
94
- extends?: string | false;
95
- defaultValue?: Partial<T>;
96
- }
97
- interface TypescriptFileImportItem {
98
- name: string;
99
- default?: boolean;
100
- alias?: string;
101
- type?: boolean;
102
- }
103
- type TypescriptFileImports = Record<string, null | string | Array<TypescriptFileImportItem | string>>;
104
- interface SourceFileHeaderProps extends ComponentProps {
105
- /**
106
- * If true, disables the ESLint directive at the top of the file.
107
- *
108
- * @defaultValue true
109
- */
110
- disableEslint?: boolean;
111
- /**
112
- * If true, disables the Biome directive at the top of the file.
113
- *
114
- * @defaultValue true
115
- */
116
- disableBiome?: boolean;
117
- /**
118
- * If true, disables the Prettier directive at the top of the file.
119
- *
120
- * @defaultValue false
121
- */
122
- disablePrettier?: boolean;
123
- }
124
- //#endregion
125
- export { BuiltinSourceFileContext, ComponentProps, ComponentPropsWithChildren, CopyFileOutputContext, CopyOutputFile, OutputDirectory, OutputFile, ReflectionOverrideInterface, RenderBuiltinContext, RenderContext, RenderEntryContext, RenderOutputContext, SourceFileHeaderProps, TypescriptFileImportItem, TypescriptFileImports, WriteOutputFile };
126
- //# sourceMappingURL=components.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"components.d.cts","names":[],"sources":["../../src/types/components.ts"],"mappings":";;;;;UAsBiB,cAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;;;;;;;EAQA,MAAA,GAAS,aAAA;AAAA;AAAA,UAGM,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;EAHA;;;;;;EAWA,MAAA,GAAS,aAAA;AAAA;AAAA,KAGC,UAAA,IACP,eAAA;EAAoB,IAAA;AAAA,MACpB,eAAA;EACC,IAAA;EACA,cAAA,GAAiB,2BAAA;AAAA,MAElB,eAAA;EAAoB,IAAA;EAAiB,EAAA;AAAA,KACtC,cAAA;AAAA,UAEa,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA,GAAW,eAAA,GAAkB,UAAA;AAAA;AAAA,UAGd,kBAAA;EACf,cAAA,EAAgB,2BAAA;AAAA;AAAA,UAGD,oBAAA;EACf,EAAA;AAAA;AAAA,UAGe,mBAAA;EACf,IAAA,GAAO,aAAA;AAAA;AAAA,UAGQ,qBAAA;EACf,IAAA;EACA,UAAA;AAAA;AAAA,UAGe,aAAA,SAAsB,OAAA;EACrC,IAAA;IACE,QAAA,GAAW,qBAAA;IAtBgB;;;IA2B3B,OAAA,GAAU,oBAAA;IAxBqB;;;IA6B/B,KAAA,GAAQ,kBAAA;IAzBK;;;IA8Bb,MAAA,GAAS,mBAAA;EAAA,IACP,MAAA;AAAA;;;;UAMW,cAAA;EACf,QAAA,GAAW,QAAA;AAAA;;;;KAMD,0BAAA,GAA6B,IAAA,CAAK,cAAA,gBAC5C,QAAA,CAAS,IAAA,CAAK,cAAA;AAAA,UAEC,wBAAA,SAAiC,iBAAA;;;;EAIhD,EAAA;AAAA;AAAA,UAGe,2BAAA;EACf,IAAA,YAAgB,QAAA;EAChB,IAAA,YAAgB,QAAA;EAChB,OAAA;EACA,YAAA,GAAe,OAAA,CAAQ,CAAA;AAAA;AAAA,UAGR,wBAAA;EACf,IAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;AAAA;AAAA,KAGU,qBAAA,GAAwB,MAAA,yBAElB,KAAA,CAAM,wBAAA;AAAA,UAGP,qBAAA,SAA8B,cAAA;EA1CzC;;;AAMN;;EA0CE,aAAA;EAzCA;;AAMF;;;EA0CE,YAAA;EA1CuC;;;;;EAiDvC,eAAA;AAAA"}