@powerlines/plugin-alloy 0.26.237 → 0.26.239

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 (334) hide show
  1. package/dist/core/components/index.cjs +1 -9
  2. package/dist/core/components/index.d.cts +1 -5
  3. package/dist/core/components/index.d.mts +1 -5
  4. package/dist/core/components/index.mjs +1 -5
  5. package/dist/core/components/infrastructure-file.cjs +6 -3
  6. package/dist/core/components/infrastructure-file.d.cts +1 -1
  7. package/dist/core/components/infrastructure-file.d.cts.map +1 -1
  8. package/dist/core/components/infrastructure-file.d.mts +1 -1
  9. package/dist/core/components/infrastructure-file.mjs +5 -2
  10. package/dist/core/contexts/index.cjs +1 -11
  11. package/dist/core/contexts/index.d.cts +1 -3
  12. package/dist/core/contexts/index.d.mts +1 -3
  13. package/dist/core/contexts/index.mjs +1 -3
  14. package/dist/core/index.cjs +2 -23
  15. package/dist/core/index.d.cts +2 -10
  16. package/dist/core/index.d.mts +2 -10
  17. package/dist/core/index.mjs +2 -10
  18. package/dist/helpers/capnp.cjs +29 -29
  19. package/dist/helpers/capnp.d.cts +1 -1
  20. package/dist/helpers/capnp.d.cts.map +1 -1
  21. package/dist/helpers/capnp.d.mts +1 -1
  22. package/dist/helpers/capnp.mjs +3 -3
  23. package/dist/index.cjs +10 -2
  24. package/dist/index.d.cts +10 -4
  25. package/dist/index.d.cts.map +1 -1
  26. package/dist/index.d.mts +10 -4
  27. package/dist/index.mjs +10 -2
  28. package/dist/render.cjs +69 -52
  29. package/dist/render.d.cts +34 -5
  30. package/dist/render.d.cts.map +1 -1
  31. package/dist/render.d.mts +34 -5
  32. package/dist/render.mjs +70 -53
  33. package/dist/types/index.d.cts +2 -3
  34. package/dist/types/index.d.mts +2 -3
  35. package/dist/types/plugin.d.cts +7 -4
  36. package/dist/types/plugin.d.cts.map +1 -1
  37. package/dist/types/plugin.d.mts +7 -4
  38. package/dist/typescript/components/builtin-file.cjs +6 -6
  39. package/dist/typescript/components/builtin-file.d.cts +2 -2
  40. package/dist/typescript/components/builtin-file.d.cts.map +1 -1
  41. package/dist/typescript/components/builtin-file.d.mts +2 -2
  42. package/dist/typescript/components/builtin-file.mjs +2 -2
  43. package/dist/typescript/components/entry-file.cjs +2 -2
  44. package/dist/typescript/components/entry-file.d.cts +1 -1
  45. package/dist/typescript/components/entry-file.d.cts.map +1 -1
  46. package/dist/typescript/components/entry-file.d.mts +1 -1
  47. package/dist/typescript/components/entry-file.mjs +1 -1
  48. package/dist/typescript/components/index.cjs +1 -56
  49. package/dist/typescript/components/index.d.cts +1 -12
  50. package/dist/typescript/components/index.d.mts +1 -12
  51. package/dist/typescript/components/index.mjs +1 -12
  52. package/dist/typescript/index.cjs +1 -64
  53. package/dist/typescript/index.d.cts +1 -17
  54. package/dist/typescript/index.d.mts +1 -17
  55. package/dist/typescript/index.mjs +1 -17
  56. package/package.json +20 -641
  57. package/dist/core/components/output.cjs +0 -40
  58. package/dist/core/components/output.d.cts +0 -22
  59. package/dist/core/components/output.d.cts.map +0 -1
  60. package/dist/core/components/output.d.mts +0 -22
  61. package/dist/core/components/output.d.mts.map +0 -1
  62. package/dist/core/components/output.mjs +0 -40
  63. package/dist/core/components/output.mjs.map +0 -1
  64. package/dist/core/components/single-line-comment.cjs +0 -22
  65. package/dist/core/components/single-line-comment.d.cts +0 -19
  66. package/dist/core/components/single-line-comment.d.cts.map +0 -1
  67. package/dist/core/components/single-line-comment.d.mts +0 -19
  68. package/dist/core/components/single-line-comment.d.mts.map +0 -1
  69. package/dist/core/components/single-line-comment.mjs +0 -22
  70. package/dist/core/components/single-line-comment.mjs.map +0 -1
  71. package/dist/core/components/source-file.cjs +0 -64
  72. package/dist/core/components/source-file.d.cts +0 -30
  73. package/dist/core/components/source-file.d.cts.map +0 -1
  74. package/dist/core/components/source-file.d.mts +0 -30
  75. package/dist/core/components/source-file.d.mts.map +0 -1
  76. package/dist/core/components/source-file.mjs +0 -62
  77. package/dist/core/components/source-file.mjs.map +0 -1
  78. package/dist/core/components/spacing.cjs +0 -19
  79. package/dist/core/components/spacing.d.cts +0 -19
  80. package/dist/core/components/spacing.d.cts.map +0 -1
  81. package/dist/core/components/spacing.d.mts +0 -19
  82. package/dist/core/components/spacing.d.mts.map +0 -1
  83. package/dist/core/components/spacing.mjs +0 -19
  84. package/dist/core/components/spacing.mjs.map +0 -1
  85. package/dist/core/contexts/meta.cjs +0 -40
  86. package/dist/core/contexts/meta.d.cts +0 -46
  87. package/dist/core/contexts/meta.d.cts.map +0 -1
  88. package/dist/core/contexts/meta.d.mts +0 -46
  89. package/dist/core/contexts/meta.d.mts.map +0 -1
  90. package/dist/core/contexts/meta.mjs +0 -37
  91. package/dist/core/contexts/meta.mjs.map +0 -1
  92. package/dist/core/contexts/schema.cjs +0 -38
  93. package/dist/core/contexts/schema.d.cts +0 -26
  94. package/dist/core/contexts/schema.d.cts.map +0 -1
  95. package/dist/core/contexts/schema.d.mts +0 -26
  96. package/dist/core/contexts/schema.d.mts.map +0 -1
  97. package/dist/core/contexts/schema.mjs +0 -35
  98. package/dist/core/contexts/schema.mjs.map +0 -1
  99. package/dist/core/helpers/code.cjs +0 -33
  100. package/dist/core/helpers/code.d.cts +0 -28
  101. package/dist/core/helpers/code.d.cts.map +0 -1
  102. package/dist/core/helpers/code.d.mts +0 -28
  103. package/dist/core/helpers/code.d.mts.map +0 -1
  104. package/dist/core/helpers/code.mjs +0 -33
  105. package/dist/core/helpers/code.mjs.map +0 -1
  106. package/dist/core/helpers/index.cjs +0 -4
  107. package/dist/core/helpers/index.d.cts +0 -2
  108. package/dist/core/helpers/index.d.mts +0 -2
  109. package/dist/core/helpers/index.mjs +0 -3
  110. package/dist/hcl/components/block-declaration.cjs +0 -33
  111. package/dist/hcl/components/block-declaration.d.cts +0 -19
  112. package/dist/hcl/components/block-declaration.d.cts.map +0 -1
  113. package/dist/hcl/components/block-declaration.d.mts +0 -19
  114. package/dist/hcl/components/block-declaration.d.mts.map +0 -1
  115. package/dist/hcl/components/block-declaration.mjs +0 -33
  116. package/dist/hcl/components/block-declaration.mjs.map +0 -1
  117. package/dist/hcl/components/hcl-file.cjs +0 -82
  118. package/dist/hcl/components/hcl-file.d.cts +0 -25
  119. package/dist/hcl/components/hcl-file.d.cts.map +0 -1
  120. package/dist/hcl/components/hcl-file.d.mts +0 -25
  121. package/dist/hcl/components/hcl-file.d.mts.map +0 -1
  122. package/dist/hcl/components/hcl-file.mjs +0 -81
  123. package/dist/hcl/components/hcl-file.mjs.map +0 -1
  124. package/dist/hcl/components/index.cjs +0 -11
  125. package/dist/hcl/components/index.d.cts +0 -5
  126. package/dist/hcl/components/index.d.mts +0 -5
  127. package/dist/hcl/components/index.mjs +0 -6
  128. package/dist/hcl/components/packer-file.cjs +0 -28
  129. package/dist/hcl/components/packer-file.d.cts +0 -16
  130. package/dist/hcl/components/packer-file.d.cts.map +0 -1
  131. package/dist/hcl/components/packer-file.d.mts +0 -16
  132. package/dist/hcl/components/packer-file.d.mts.map +0 -1
  133. package/dist/hcl/components/packer-file.mjs +0 -28
  134. package/dist/hcl/components/packer-file.mjs.map +0 -1
  135. package/dist/hcl/components/terraform-file.cjs +0 -29
  136. package/dist/hcl/components/terraform-file.d.cts +0 -17
  137. package/dist/hcl/components/terraform-file.d.cts.map +0 -1
  138. package/dist/hcl/components/terraform-file.d.mts +0 -17
  139. package/dist/hcl/components/terraform-file.d.mts.map +0 -1
  140. package/dist/hcl/components/terraform-file.mjs +0 -29
  141. package/dist/hcl/components/terraform-file.mjs.map +0 -1
  142. package/dist/hcl/index.cjs +0 -12
  143. package/dist/hcl/index.d.cts +0 -6
  144. package/dist/hcl/index.d.mts +0 -6
  145. package/dist/hcl/index.mjs +0 -7
  146. package/dist/markdown/components/alert.cjs +0 -74
  147. package/dist/markdown/components/alert.d.cts +0 -52
  148. package/dist/markdown/components/alert.d.cts.map +0 -1
  149. package/dist/markdown/components/alert.d.mts +0 -52
  150. package/dist/markdown/components/alert.d.mts.map +0 -1
  151. package/dist/markdown/components/alert.mjs +0 -69
  152. package/dist/markdown/components/alert.mjs.map +0 -1
  153. package/dist/markdown/components/front-matter.cjs +0 -30
  154. package/dist/markdown/components/front-matter.d.cts +0 -13
  155. package/dist/markdown/components/front-matter.d.cts.map +0 -1
  156. package/dist/markdown/components/front-matter.d.mts +0 -13
  157. package/dist/markdown/components/front-matter.d.mts.map +0 -1
  158. package/dist/markdown/components/front-matter.mjs +0 -30
  159. package/dist/markdown/components/front-matter.mjs.map +0 -1
  160. package/dist/markdown/components/heading.cjs +0 -23
  161. package/dist/markdown/components/heading.d.cts +0 -17
  162. package/dist/markdown/components/heading.d.cts.map +0 -1
  163. package/dist/markdown/components/heading.d.mts +0 -17
  164. package/dist/markdown/components/heading.d.mts.map +0 -1
  165. package/dist/markdown/components/heading.mjs +0 -23
  166. package/dist/markdown/components/heading.mjs.map +0 -1
  167. package/dist/markdown/components/index.cjs +0 -20
  168. package/dist/markdown/components/index.d.cts +0 -6
  169. package/dist/markdown/components/index.d.mts +0 -6
  170. package/dist/markdown/components/index.mjs +0 -7
  171. package/dist/markdown/components/markdown-file.cjs +0 -146
  172. package/dist/markdown/components/markdown-file.d.cts +0 -25
  173. package/dist/markdown/components/markdown-file.d.cts.map +0 -1
  174. package/dist/markdown/components/markdown-file.d.mts +0 -25
  175. package/dist/markdown/components/markdown-file.d.mts.map +0 -1
  176. package/dist/markdown/components/markdown-file.mjs +0 -145
  177. package/dist/markdown/components/markdown-file.mjs.map +0 -1
  178. package/dist/markdown/components/markdown-table.cjs +0 -106
  179. package/dist/markdown/components/markdown-table.d.cts +0 -37
  180. package/dist/markdown/components/markdown-table.d.cts.map +0 -1
  181. package/dist/markdown/components/markdown-table.d.mts +0 -37
  182. package/dist/markdown/components/markdown-table.d.mts.map +0 -1
  183. package/dist/markdown/components/markdown-table.mjs +0 -104
  184. package/dist/markdown/components/markdown-table.mjs.map +0 -1
  185. package/dist/markdown/contexts/index.cjs +0 -7
  186. package/dist/markdown/contexts/index.d.cts +0 -2
  187. package/dist/markdown/contexts/index.d.mts +0 -2
  188. package/dist/markdown/contexts/index.mjs +0 -3
  189. package/dist/markdown/contexts/markdown-table.cjs +0 -37
  190. package/dist/markdown/contexts/markdown-table.d.cts +0 -35
  191. package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
  192. package/dist/markdown/contexts/markdown-table.d.mts +0 -35
  193. package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
  194. package/dist/markdown/contexts/markdown-table.mjs +0 -34
  195. package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
  196. package/dist/markdown/index.cjs +0 -27
  197. package/dist/markdown/index.d.cts +0 -9
  198. package/dist/markdown/index.d.mts +0 -9
  199. package/dist/markdown/index.mjs +0 -10
  200. package/dist/types/components.cjs +0 -9
  201. package/dist/types/components.d.cts +0 -137
  202. package/dist/types/components.d.cts.map +0 -1
  203. package/dist/types/components.d.mts +0 -137
  204. package/dist/types/components.d.mts.map +0 -1
  205. package/dist/types/components.mjs +0 -10
  206. package/dist/types/components.mjs.map +0 -1
  207. package/dist/typescript/components/class-declaration.cjs +0 -305
  208. package/dist/typescript/components/class-declaration.d.cts +0 -139
  209. package/dist/typescript/components/class-declaration.d.cts.map +0 -1
  210. package/dist/typescript/components/class-declaration.d.mts +0 -139
  211. package/dist/typescript/components/class-declaration.d.mts.map +0 -1
  212. package/dist/typescript/components/class-declaration.mjs +0 -300
  213. package/dist/typescript/components/class-declaration.mjs.map +0 -1
  214. package/dist/typescript/components/dynamic-import-statement.cjs +0 -25
  215. package/dist/typescript/components/dynamic-import-statement.d.cts +0 -30
  216. package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
  217. package/dist/typescript/components/dynamic-import-statement.d.mts +0 -30
  218. package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
  219. package/dist/typescript/components/dynamic-import-statement.mjs +0 -25
  220. package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
  221. package/dist/typescript/components/interface-declaration.cjs +0 -257
  222. package/dist/typescript/components/interface-declaration.d.cts +0 -78
  223. package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
  224. package/dist/typescript/components/interface-declaration.d.mts +0 -78
  225. package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
  226. package/dist/typescript/components/interface-declaration.mjs +0 -254
  227. package/dist/typescript/components/interface-declaration.mjs.map +0 -1
  228. package/dist/typescript/components/object-declaration.cjs +0 -131
  229. package/dist/typescript/components/object-declaration.d.cts +0 -24
  230. package/dist/typescript/components/object-declaration.d.cts.map +0 -1
  231. package/dist/typescript/components/object-declaration.d.mts +0 -24
  232. package/dist/typescript/components/object-declaration.d.mts.map +0 -1
  233. package/dist/typescript/components/object-declaration.mjs +0 -130
  234. package/dist/typescript/components/object-declaration.mjs.map +0 -1
  235. package/dist/typescript/components/property-name.cjs +0 -31
  236. package/dist/typescript/components/property-name.d.cts +0 -21
  237. package/dist/typescript/components/property-name.d.cts.map +0 -1
  238. package/dist/typescript/components/property-name.d.mts +0 -21
  239. package/dist/typescript/components/property-name.d.mts.map +0 -1
  240. package/dist/typescript/components/property-name.mjs +0 -31
  241. package/dist/typescript/components/property-name.mjs.map +0 -1
  242. package/dist/typescript/components/record-expression.cjs +0 -12
  243. package/dist/typescript/components/record-expression.d.cts +0 -9
  244. package/dist/typescript/components/record-expression.d.cts.map +0 -1
  245. package/dist/typescript/components/record-expression.d.mts +0 -9
  246. package/dist/typescript/components/record-expression.d.mts.map +0 -1
  247. package/dist/typescript/components/record-expression.mjs +0 -12
  248. package/dist/typescript/components/record-expression.mjs.map +0 -1
  249. package/dist/typescript/components/tsdoc-schema.cjs +0 -166
  250. package/dist/typescript/components/tsdoc-schema.d.cts +0 -21
  251. package/dist/typescript/components/tsdoc-schema.d.cts.map +0 -1
  252. package/dist/typescript/components/tsdoc-schema.d.mts +0 -21
  253. package/dist/typescript/components/tsdoc-schema.d.mts.map +0 -1
  254. package/dist/typescript/components/tsdoc-schema.mjs +0 -165
  255. package/dist/typescript/components/tsdoc-schema.mjs.map +0 -1
  256. package/dist/typescript/components/tsdoc.cjs +0 -486
  257. package/dist/typescript/components/tsdoc.d.cts +0 -163
  258. package/dist/typescript/components/tsdoc.d.cts.map +0 -1
  259. package/dist/typescript/components/tsdoc.d.mts +0 -163
  260. package/dist/typescript/components/tsdoc.d.mts.map +0 -1
  261. package/dist/typescript/components/tsdoc.mjs +0 -465
  262. package/dist/typescript/components/tsdoc.mjs.map +0 -1
  263. package/dist/typescript/components/type-declaration.cjs +0 -38
  264. package/dist/typescript/components/type-declaration.d.cts +0 -15
  265. package/dist/typescript/components/type-declaration.d.cts.map +0 -1
  266. package/dist/typescript/components/type-declaration.d.mts +0 -15
  267. package/dist/typescript/components/type-declaration.d.mts.map +0 -1
  268. package/dist/typescript/components/type-declaration.mjs +0 -38
  269. package/dist/typescript/components/type-declaration.mjs.map +0 -1
  270. package/dist/typescript/components/type-parameters.cjs +0 -82
  271. package/dist/typescript/components/type-parameters.d.cts +0 -22
  272. package/dist/typescript/components/type-parameters.d.cts.map +0 -1
  273. package/dist/typescript/components/type-parameters.d.mts +0 -22
  274. package/dist/typescript/components/type-parameters.d.mts.map +0 -1
  275. package/dist/typescript/components/type-parameters.mjs +0 -82
  276. package/dist/typescript/components/type-parameters.mjs.map +0 -1
  277. package/dist/typescript/components/typescript-file.cjs +0 -231
  278. package/dist/typescript/components/typescript-file.d.cts +0 -46
  279. package/dist/typescript/components/typescript-file.d.cts.map +0 -1
  280. package/dist/typescript/components/typescript-file.d.mts +0 -46
  281. package/dist/typescript/components/typescript-file.d.mts.map +0 -1
  282. package/dist/typescript/components/typescript-file.mjs +0 -229
  283. package/dist/typescript/components/typescript-file.mjs.map +0 -1
  284. package/dist/typescript/contexts/index.cjs +0 -4
  285. package/dist/typescript/contexts/index.d.cts +0 -2
  286. package/dist/typescript/contexts/index.d.mts +0 -2
  287. package/dist/typescript/contexts/index.mjs +0 -3
  288. package/dist/typescript/contexts/lexical-scope.cjs +0 -25
  289. package/dist/typescript/contexts/lexical-scope.d.cts +0 -12
  290. package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
  291. package/dist/typescript/contexts/lexical-scope.d.mts +0 -12
  292. package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
  293. package/dist/typescript/contexts/lexical-scope.mjs +0 -25
  294. package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
  295. package/dist/typescript/contexts/member-scope.cjs +0 -23
  296. package/dist/typescript/contexts/member-scope.d.cts +0 -18
  297. package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
  298. package/dist/typescript/contexts/member-scope.d.mts +0 -18
  299. package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
  300. package/dist/typescript/contexts/member-scope.mjs +0 -23
  301. package/dist/typescript/contexts/member-scope.mjs.map +0 -1
  302. package/dist/typescript/helpers/get-call-signature-props.cjs +0 -25
  303. package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -13
  304. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
  305. package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -13
  306. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
  307. package/dist/typescript/helpers/get-call-signature-props.mjs +0 -25
  308. package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
  309. package/dist/typescript/helpers/index.cjs +0 -6
  310. package/dist/typescript/helpers/index.d.cts +0 -3
  311. package/dist/typescript/helpers/index.d.mts +0 -3
  312. package/dist/typescript/helpers/index.mjs +0 -4
  313. package/dist/typescript/helpers/utilities.cjs +0 -15
  314. package/dist/typescript/helpers/utilities.d.cts +0 -11
  315. package/dist/typescript/helpers/utilities.d.cts.map +0 -1
  316. package/dist/typescript/helpers/utilities.d.mts +0 -11
  317. package/dist/typescript/helpers/utilities.d.mts.map +0 -1
  318. package/dist/typescript/helpers/utilities.mjs +0 -14
  319. package/dist/typescript/helpers/utilities.mjs.map +0 -1
  320. package/dist/yaml/components/index.cjs +0 -5
  321. package/dist/yaml/components/index.d.cts +0 -2
  322. package/dist/yaml/components/index.d.mts +0 -2
  323. package/dist/yaml/components/index.mjs +0 -3
  324. package/dist/yaml/components/yaml-file.cjs +0 -148
  325. package/dist/yaml/components/yaml-file.d.cts +0 -31
  326. package/dist/yaml/components/yaml-file.d.cts.map +0 -1
  327. package/dist/yaml/components/yaml-file.d.mts +0 -31
  328. package/dist/yaml/components/yaml-file.d.mts.map +0 -1
  329. package/dist/yaml/components/yaml-file.mjs +0 -147
  330. package/dist/yaml/components/yaml-file.mjs.map +0 -1
  331. package/dist/yaml/index.cjs +0 -6
  332. package/dist/yaml/index.d.cts +0 -3
  333. package/dist/yaml/index.d.mts +0 -3
  334. package/dist/yaml/index.mjs +0 -4
@@ -1,229 +0,0 @@
1
- import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
2
- import { SourceFile } from "../../core/components/source-file.mjs";
3
- import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
4
- import { code as code$1 } from "../../core/helpers/code.mjs";
5
- import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
6
- import { For, Scope, Show, SourceDirectoryContext, computed, splitProps, useContext, useScope } from "@alloy-js/core";
7
- import { appendPath } from "@stryke/path/append";
8
- import { titleCase } from "@stryke/string-format/title-case";
9
- import { getFileHeaderWarning } from "powerlines/utils";
10
- import { getUniqueBy } from "@stryke/helpers/get-unique";
11
- import { isString } from "@stryke/type-checks/is-string";
12
- import { ImportStatements, PackageContext, SourceFileContext as SourceFileContext$1, TSModuleScope, getSourceDirectoryData, useSourceFile } from "@alloy-js/typescript";
13
- import { isBoolean } from "@stryke/type-checks/is-boolean";
14
-
15
- //#region src/typescript/components/typescript-file.tsx
16
- /**
17
- * A base component representing a Powerlines generated Typescript source file.
18
- *
19
- * @param props - The properties for the source file.
20
- * @returns The rendered source file component.
21
- */
22
- function TypescriptFile(props) {
23
- const [{ children, path, imports, builtinImports, tsx, header, hashbang }, rest] = splitProps(props, [
24
- "children",
25
- "path",
26
- "imports",
27
- "builtinImports",
28
- "tsx",
29
- "header",
30
- "hashbang"
31
- ]);
32
- const directoryContext = useContext(SourceDirectoryContext);
33
- const sdData = getSourceDirectoryData(directoryContext);
34
- const modulePath = appendPath(path, directoryContext.path);
35
- const scope = new TSModuleScope(modulePath, useScope());
36
- sdData.modules.add(scope);
37
- const pkg = useContext(PackageContext);
38
- if (pkg) pkg.scope.addModule(scope);
39
- if (props.export) {
40
- if (pkg) if (isBoolean(props.export)) pkg.scope.addExport(modulePath, scope);
41
- else pkg.scope.addExport(props.export, scope);
42
- }
43
- return createComponent(SourceFileContext$1.Provider, {
44
- value: { scope },
45
- get children() {
46
- return createComponent(Scope, {
47
- value: scope,
48
- get children() {
49
- return createComponent(SourceFile, mergeProps(rest, {
50
- path: modulePath,
51
- get header() {
52
- return header ?? createComponent(TypescriptFileHeader, {
53
- hashbang,
54
- get children() {
55
- return createComponent(TypescriptFileHeaderImports, {
56
- imports,
57
- builtinImports,
58
- scope
59
- });
60
- }
61
- });
62
- },
63
- filetype: tsx ? "tsx" : "typescript",
64
- children
65
- }));
66
- }
67
- });
68
- }
69
- });
70
- }
71
- /**
72
- * Renders the header for a Powerlines Typescript source file.
73
- *
74
- * @param props - The properties for the source file header.
75
- * @returns The rendered source file header.
76
- */
77
- function TypescriptFileHeader(props) {
78
- const { header, hashbang, disableEslint = true, disableBiome = true, disableOxlint = true, children } = props;
79
- const context = usePowerlinesSafe();
80
- return [
81
- createComponent(Show, {
82
- get when() {
83
- return Boolean(hashbang);
84
- },
85
- get children() {
86
- return [memo(() => hashbang === true ? code$1`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang), createIntrinsic("hbr", {})];
87
- }
88
- }),
89
- createComponent(Show, {
90
- get when() {
91
- return Boolean(header);
92
- },
93
- get children() {
94
- return [header, createIntrinsic("hbr", {})];
95
- }
96
- }),
97
- createIntrinsic("hbr", {}),
98
- createComponent(Show, {
99
- get when() {
100
- return Boolean(disableEslint);
101
- },
102
- get children() {
103
- return [createComponent(SingleLineComment, {
104
- variant: "slash-star",
105
- children: "eslint-disable"
106
- }), createIntrinsic("hbr", {})];
107
- }
108
- }),
109
- createComponent(Show, {
110
- get when() {
111
- return Boolean(disableOxlint);
112
- },
113
- get children() {
114
- return [createComponent(SingleLineComment, {
115
- variant: "slash-star",
116
- children: "oxlint-disable"
117
- }), createIntrinsic("hbr", {})];
118
- }
119
- }),
120
- createComponent(Show, {
121
- get when() {
122
- return Boolean(disableBiome);
123
- },
124
- get children() {
125
- return [createComponent(SingleLineComment, { children: "biome-ignore lint: disable" }), createIntrinsic("hbr", {})];
126
- }
127
- }),
128
- createComponent(Show, {
129
- get when() {
130
- return Boolean(disableEslint) || Boolean(disableBiome) || Boolean(disableOxlint);
131
- },
132
- get children() {
133
- return createIntrinsic("hbr", {});
134
- }
135
- }),
136
- createComponent(Show, {
137
- get when() {
138
- return Boolean(children);
139
- },
140
- get children() {
141
- return [children, createIntrinsic("hbr", {})];
142
- }
143
- }),
144
- createComponent(SingleLineComment, { get children() {
145
- return `Generated by ${titleCase(context?.config?.framework?.name) || "Powerlines"}`;
146
- } }),
147
- createIntrinsic("hbr", {}),
148
- createComponent(SingleLineComment, { get children() {
149
- return getFileHeaderWarning(context);
150
- } }),
151
- createIntrinsic("hbr", {})
152
- ];
153
- }
154
- /**
155
- * Renders the header for a Powerlines Typescript source file.
156
- *
157
- * @param props - The properties for the source file header.
158
- * @returns The rendered source file header.
159
- */
160
- function TypescriptFileHeaderImports(props) {
161
- const { imports: importProps, builtinImports: builtinImportsProps } = props;
162
- const context = usePowerlinesSafe();
163
- const sourceFile = useSourceFile();
164
- const scope = props.scope ?? sourceFile.scope;
165
- const imports = computed(() => {
166
- return Object.fromEntries(Object.entries(importProps ?? {}).map(([module, importItem]) => [module, Array.isArray(importItem) ? getUniqueBy(importItem, (i) => isString(i) ? i : i.alias || i.name) : importItem]));
167
- });
168
- const builtinImports = computed(() => {
169
- return Object.fromEntries(Object.entries(builtinImportsProps ?? {}).map(([module, importItem]) => [module, Array.isArray(importItem) ? getUniqueBy(importItem, (i) => isString(i) ? i : i.alias || i.name) : importItem]));
170
- });
171
- return createComponent(Show, {
172
- get when() {
173
- return scope.importedModules.size > 0 || !!imports.value && Object.keys(imports.value).length > 0 || !!builtinImports.value && Object.keys(builtinImports.value).length > 0;
174
- },
175
- get children() {
176
- return [
177
- createComponent(Show, {
178
- get when() {
179
- return memo(() => !!!!imports.value)() && Object.keys(imports.value).length > 0;
180
- },
181
- get children() {
182
- return createComponent(For, {
183
- get each() {
184
- return Object.entries(imports.value ?? {});
185
- },
186
- hardline: true,
187
- get ender() {
188
- return createIntrinsic("hbr", {});
189
- },
190
- children: ([module, importItem]) => code$1`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => `${i.type ? "type " : ""}${i.alias ? i.alias : i.name}`).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : `${i.type ? "type " : ""}${i.alias ? `${i.name} as ${i.alias}` : i.name}`).join(", ")} }` : "")}`} from "${module}";`
191
- });
192
- }
193
- }),
194
- createComponent(Show, {
195
- get when() {
196
- return memo(() => !!builtinImports.value)() && Object.keys(builtinImports.value).length > 0;
197
- },
198
- get children() {
199
- return createComponent(For, {
200
- get each() {
201
- return Object.entries(builtinImports.value ?? {});
202
- },
203
- hardline: true,
204
- get ender() {
205
- return createIntrinsic("hbr", {});
206
- },
207
- children: ([module, importItem]) => code$1`import ${importItem === null ? "" : isString(importItem) ? importItem : `${importItem.filter((i) => !isString(i) && i.default).map((i) => `${i.type ? "type " : ""}${i.alias ? i.alias : i.name}`).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.filter((i) => isString(i) || !i.default).map((i) => isString(i) ? i : `${i.type ? "type " : ""}${i.alias ? `${i.name} as ${i.alias}` : i.name}`).join(", ")} }` : "")}`} from "${module.includes(":") ? module : `${context?.config?.framework?.name || "powerlines"}:${module}`}";`
208
- });
209
- }
210
- }),
211
- createComponent(Show, {
212
- get when() {
213
- return scope.importedModules.size > 0;
214
- },
215
- get children() {
216
- return createComponent(ImportStatements, { get records() {
217
- return scope.importedModules;
218
- } });
219
- }
220
- }),
221
- createIntrinsic("hbr", {})
222
- ];
223
- }
224
- });
225
- }
226
-
227
- //#endregion
228
- export { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports };
229
- //# sourceMappingURL=typescript-file.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typescript-file.mjs","names":[],"sources":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_typescript_contexts_lexical_scope = require('./lexical-scope.cjs');
3
-
4
- exports.LexicalScope = require_typescript_contexts_lexical_scope.LexicalScope;
@@ -1,2 +0,0 @@
1
- import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue } from "./lexical-scope.cjs";
2
- export { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue };
@@ -1,2 +0,0 @@
1
- import { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue } from "./lexical-scope.mjs";
2
- export { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue };
@@ -1,3 +0,0 @@
1
- import { LexicalScope } from "./lexical-scope.mjs";
2
-
3
- export { LexicalScope };
@@ -1,25 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
- let _alloy_js_core = require("@alloy-js/core");
4
- let _alloy_js_typescript = require("@alloy-js/typescript");
5
-
6
- //#region src/typescript/contexts/lexical-scope.tsx
7
- /**
8
- * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.
9
- */
10
- function LexicalScope(props) {
11
- let scope;
12
- if ("value" in props) {
13
- if (!(props.value instanceof _alloy_js_typescript.TSLexicalScope)) throw new TypeError("LexicalScope value must be a TSLexicalScope instance");
14
- scope = props.value;
15
- } else scope = (0, _alloy_js_typescript.createLexicalScope)(props.name ?? "Lexical scope", props);
16
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Scope, {
17
- value: scope,
18
- get children() {
19
- return props.children;
20
- }
21
- });
22
- }
23
-
24
- //#endregion
25
- exports.LexicalScope = LexicalScope;
@@ -1,12 +0,0 @@
1
- import { ScopePropsWithInfo, ScopePropsWithValue } from "@alloy-js/core";
2
- //#region src/typescript/contexts/lexical-scope.d.ts
3
- interface LexicalScopePropsWithScopeValue extends ScopePropsWithValue {}
4
- interface LexicalScopePropsWithScopeInfo extends ScopePropsWithInfo {}
5
- type LexicalScopeProps = LexicalScopePropsWithScopeValue | LexicalScopePropsWithScopeInfo;
6
- /**
7
- * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.
8
- */
9
- declare function LexicalScope(props: LexicalScopeProps): import("@alloy-js/core").Children;
10
- //#endregion
11
- export { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue };
12
- //# sourceMappingURL=lexical-scope.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexical-scope.d.cts","names":[],"sources":["../../../src/typescript/contexts/lexical-scope.tsx"],"mappings":";;UAqBiB,wCAAwC;UACxC,uCAAuC;KAE5C,oBACR,kCACA;;;;iBAKY,aAAa,OAAO,6CAAiB"}
@@ -1,12 +0,0 @@
1
- import { ScopePropsWithInfo, ScopePropsWithValue } from "@alloy-js/core";
2
- //#region src/typescript/contexts/lexical-scope.d.ts
3
- interface LexicalScopePropsWithScopeValue extends ScopePropsWithValue {}
4
- interface LexicalScopePropsWithScopeInfo extends ScopePropsWithInfo {}
5
- type LexicalScopeProps = LexicalScopePropsWithScopeValue | LexicalScopePropsWithScopeInfo;
6
- /**
7
- * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.
8
- */
9
- declare function LexicalScope(props: LexicalScopeProps): import("@alloy-js/core").Children;
10
- //#endregion
11
- export { LexicalScope, LexicalScopeProps, LexicalScopePropsWithScopeInfo, LexicalScopePropsWithScopeValue };
12
- //# sourceMappingURL=lexical-scope.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexical-scope.d.mts","names":[],"sources":["../../../src/typescript/contexts/lexical-scope.tsx"],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { createComponent } from "@alloy-js/core/jsx-runtime";
2
- import { Scope } from "@alloy-js/core";
3
- import { TSLexicalScope, createLexicalScope } from "@alloy-js/typescript";
4
-
5
- //#region src/typescript/contexts/lexical-scope.tsx
6
- /**
7
- * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.
8
- */
9
- function LexicalScope(props) {
10
- let scope;
11
- if ("value" in props) {
12
- if (!(props.value instanceof TSLexicalScope)) throw new TypeError("LexicalScope value must be a TSLexicalScope instance");
13
- scope = props.value;
14
- } else scope = createLexicalScope(props.name ?? "Lexical scope", props);
15
- return createComponent(Scope, {
16
- value: scope,
17
- get children() {
18
- return props.children;
19
- }
20
- });
21
- }
22
-
23
- //#endregion
24
- export { LexicalScope };
25
- //# sourceMappingURL=lexical-scope.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexical-scope.mjs","names":[],"sources":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
- let _alloy_js_core = require("@alloy-js/core");
4
- let _alloy_js_typescript = require("@alloy-js/typescript");
5
-
6
- //#region src/typescript/contexts/member-scope.tsx
7
- /**
8
- * A member scope for TypeScript. Member declarations will create symbols
9
- * in this scope, which will be added to the owner symbol's members.
10
- */
11
- function MemberScope(props) {
12
- const parentScope = (0, _alloy_js_typescript.useTSLexicalScopeIfPresent)();
13
- const binder = props.ownerSymbol.binder ?? parentScope?.binder;
14
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.MemberScope, {
15
- value: (0, _alloy_js_core.createScope)(_alloy_js_typescript.TSMemberScope, "member-scope", parentScope, props.ownerSymbol, { binder }),
16
- get children() {
17
- return props.children;
18
- }
19
- });
20
- }
21
-
22
- //#endregion
23
- exports.MemberScope = MemberScope;
@@ -1,18 +0,0 @@
1
- import { Children } from "@alloy-js/core";
2
- import { TSOutputSymbol } from "@alloy-js/typescript";
3
- //#region src/typescript/contexts/member-scope.d.ts
4
- interface MemberScopeProps {
5
- children: Children;
6
- /**
7
- * The symbol that this member scope will create member symbols on.
8
- */
9
- ownerSymbol: TSOutputSymbol;
10
- }
11
- /**
12
- * A member scope for TypeScript. Member declarations will create symbols
13
- * in this scope, which will be added to the owner symbol's members.
14
- */
15
- declare function MemberScope(props: MemberScopeProps): Children;
16
- //#endregion
17
- export { MemberScope, MemberScopeProps };
18
- //# sourceMappingURL=member-scope.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"member-scope.d.cts","names":[],"sources":["../../../src/typescript/contexts/member-scope.tsx"],"mappings":";;;UA6BiB;EACf,UAAU;;;;EAKV,aAAa;;;;;;iBAOC,YAAY,OAAO,mBAAgB"}
@@ -1,18 +0,0 @@
1
- import { Children } from "@alloy-js/core";
2
- import { TSOutputSymbol } from "@alloy-js/typescript";
3
- //#region src/typescript/contexts/member-scope.d.ts
4
- interface MemberScopeProps {
5
- children: Children;
6
- /**
7
- * The symbol that this member scope will create member symbols on.
8
- */
9
- ownerSymbol: TSOutputSymbol;
10
- }
11
- /**
12
- * A member scope for TypeScript. Member declarations will create symbols
13
- * in this scope, which will be added to the owner symbol's members.
14
- */
15
- declare function MemberScope(props: MemberScopeProps): Children;
16
- //#endregion
17
- export { MemberScope, MemberScopeProps };
18
- //# sourceMappingURL=member-scope.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"member-scope.d.mts","names":[],"sources":["../../../src/typescript/contexts/member-scope.tsx"],"mappings":""}
@@ -1,23 +0,0 @@
1
- import { createComponent } from "@alloy-js/core/jsx-runtime";
2
- import { MemberScope as MemberScope$1, createScope } from "@alloy-js/core";
3
- import { TSMemberScope, useTSLexicalScopeIfPresent } from "@alloy-js/typescript";
4
-
5
- //#region src/typescript/contexts/member-scope.tsx
6
- /**
7
- * A member scope for TypeScript. Member declarations will create symbols
8
- * in this scope, which will be added to the owner symbol's members.
9
- */
10
- function MemberScope(props) {
11
- const parentScope = useTSLexicalScopeIfPresent();
12
- const binder = props.ownerSymbol.binder ?? parentScope?.binder;
13
- return createComponent(MemberScope$1, {
14
- value: createScope(TSMemberScope, "member-scope", parentScope, props.ownerSymbol, { binder }),
15
- get children() {
16
- return props.children;
17
- }
18
- });
19
- }
20
-
21
- //#endregion
22
- export { MemberScope };
23
- //# sourceMappingURL=member-scope.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"member-scope.mjs","names":[],"sources":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _alloy_js_core = require("@alloy-js/core");
3
-
4
- //#region src/typescript/helpers/get-call-signature-props.ts
5
- /**
6
- * Get the properties for a call signature, applying any defaults as necessary.
7
- *
8
- * @param props - The properties for the call signature.
9
- * @param defaults - Optional default properties to apply to the call signature.
10
- * @returns The properties for the call signature, with defaults applied as necessary.
11
- */
12
- function getCallSignatureProps(props, defaults) {
13
- const [callSignatureProps] = (0, _alloy_js_core.splitProps)(props, [
14
- "parameters",
15
- "parametersChildren",
16
- "typeParameters",
17
- "typeParametersChildren",
18
- "returnType"
19
- ]);
20
- if (!defaults) return callSignatureProps;
21
- return (0, _alloy_js_core.defaultProps)(callSignatureProps, defaults);
22
- }
23
-
24
- //#endregion
25
- exports.getCallSignatureProps = getCallSignatureProps;
@@ -1,13 +0,0 @@
1
- import { CallSignatureProps } from "@alloy-js/typescript";
2
- //#region src/typescript/helpers/get-call-signature-props.d.ts
3
- /**
4
- * Get the properties for a call signature, applying any defaults as necessary.
5
- *
6
- * @param props - The properties for the call signature.
7
- * @param defaults - Optional default properties to apply to the call signature.
8
- * @returns The properties for the call signature, with defaults applied as necessary.
9
- */
10
- declare function getCallSignatureProps(props: CallSignatureProps, defaults?: Partial<CallSignatureProps>): CallSignatureProps;
11
- //#endregion
12
- export { getCallSignatureProps };
13
- //# sourceMappingURL=get-call-signature-props.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-call-signature-props.d.cts","names":[],"sources":["../../../src/typescript/helpers/get-call-signature-props.ts"],"mappings":";;;;;;;;;iBA4BgB,sBACd,OAAO,oBACP,WAAW,QAAQ,sBAAmB"}
@@ -1,13 +0,0 @@
1
- import { CallSignatureProps } from "@alloy-js/typescript";
2
- //#region src/typescript/helpers/get-call-signature-props.d.ts
3
- /**
4
- * Get the properties for a call signature, applying any defaults as necessary.
5
- *
6
- * @param props - The properties for the call signature.
7
- * @param defaults - Optional default properties to apply to the call signature.
8
- * @returns The properties for the call signature, with defaults applied as necessary.
9
- */
10
- declare function getCallSignatureProps(props: CallSignatureProps, defaults?: Partial<CallSignatureProps>): CallSignatureProps;
11
- //#endregion
12
- export { getCallSignatureProps };
13
- //# sourceMappingURL=get-call-signature-props.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-call-signature-props.d.mts","names":[],"sources":["../../../src/typescript/helpers/get-call-signature-props.ts"],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { defaultProps, splitProps } from "@alloy-js/core";
2
-
3
- //#region src/typescript/helpers/get-call-signature-props.ts
4
- /**
5
- * Get the properties for a call signature, applying any defaults as necessary.
6
- *
7
- * @param props - The properties for the call signature.
8
- * @param defaults - Optional default properties to apply to the call signature.
9
- * @returns The properties for the call signature, with defaults applied as necessary.
10
- */
11
- function getCallSignatureProps(props, defaults) {
12
- const [callSignatureProps] = splitProps(props, [
13
- "parameters",
14
- "parametersChildren",
15
- "typeParameters",
16
- "typeParametersChildren",
17
- "returnType"
18
- ]);
19
- if (!defaults) return callSignatureProps;
20
- return defaultProps(callSignatureProps, defaults);
21
- }
22
-
23
- //#endregion
24
- export { getCallSignatureProps };
25
- //# sourceMappingURL=get-call-signature-props.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-call-signature-props.mjs","names":[],"sources":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_typescript_helpers_get_call_signature_props = require('./get-call-signature-props.cjs');
3
- const require_typescript_helpers_utilities = require('./utilities.cjs');
4
-
5
- exports.getCallSignatureProps = require_typescript_helpers_get_call_signature_props.getCallSignatureProps;
6
- exports.isValidJSIdentifier = require_typescript_helpers_utilities.isValidJSIdentifier;
@@ -1,3 +0,0 @@
1
- import { getCallSignatureProps } from "./get-call-signature-props.cjs";
2
- import { isValidJSIdentifier } from "./utilities.cjs";
3
- export { getCallSignatureProps, isValidJSIdentifier };
@@ -1,3 +0,0 @@
1
- import { getCallSignatureProps } from "./get-call-signature-props.mjs";
2
- import { isValidJSIdentifier } from "./utilities.mjs";
3
- export { getCallSignatureProps, isValidJSIdentifier };
@@ -1,4 +0,0 @@
1
- import { getCallSignatureProps } from "./get-call-signature-props.mjs";
2
- import { isValidJSIdentifier } from "./utilities.mjs";
3
-
4
- export { getCallSignatureProps, isValidJSIdentifier };
@@ -1,15 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- //#region src/typescript/helpers/utilities.ts
4
- /**
5
- * Check if a string is a valid JavaScript identifier.
6
- *
7
- * @param identifier - The string to check.
8
- * @returns `true` if the string is a valid JavaScript identifier, `false` otherwise.
9
- */
10
- function isValidJSIdentifier(identifier) {
11
- return /^[\p{ID_Start}$_][\p{ID_Continue}$\u200C\u200D]*$/u.test(identifier);
12
- }
13
-
14
- //#endregion
15
- exports.isValidJSIdentifier = isValidJSIdentifier;
@@ -1,11 +0,0 @@
1
- //#region src/typescript/helpers/utilities.d.ts
2
- /**
3
- * Check if a string is a valid JavaScript identifier.
4
- *
5
- * @param identifier - The string to check.
6
- * @returns `true` if the string is a valid JavaScript identifier, `false` otherwise.
7
- */
8
- declare function isValidJSIdentifier(identifier: string): boolean;
9
- //#endregion
10
- export { isValidJSIdentifier };
11
- //# sourceMappingURL=utilities.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities.d.cts","names":[],"sources":["../../../src/typescript/helpers/utilities.ts"],"mappings":";;;;;;;iBAwBgB,oBAAoB"}
@@ -1,11 +0,0 @@
1
- //#region src/typescript/helpers/utilities.d.ts
2
- /**
3
- * Check if a string is a valid JavaScript identifier.
4
- *
5
- * @param identifier - The string to check.
6
- * @returns `true` if the string is a valid JavaScript identifier, `false` otherwise.
7
- */
8
- declare function isValidJSIdentifier(identifier: string): boolean;
9
- //#endregion
10
- export { isValidJSIdentifier };
11
- //# sourceMappingURL=utilities.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities.d.mts","names":[],"sources":["../../../src/typescript/helpers/utilities.ts"],"mappings":""}
@@ -1,14 +0,0 @@
1
- //#region src/typescript/helpers/utilities.ts
2
- /**
3
- * Check if a string is a valid JavaScript identifier.
4
- *
5
- * @param identifier - The string to check.
6
- * @returns `true` if the string is a valid JavaScript identifier, `false` otherwise.
7
- */
8
- function isValidJSIdentifier(identifier) {
9
- return /^[\p{ID_Start}$_][\p{ID_Continue}$\u200C\u200D]*$/u.test(identifier);
10
- }
11
-
12
- //#endregion
13
- export { isValidJSIdentifier };
14
- //# sourceMappingURL=utilities.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities.mjs","names":[],"sources":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_yaml_components_yaml_file = require('./yaml-file.cjs');
3
-
4
- exports.YamlFile = require_yaml_components_yaml_file.YamlFile;
5
- exports.YamlFileHeader = require_yaml_components_yaml_file.YamlFileHeader;
@@ -1,2 +0,0 @@
1
- import { YamlData, YamlFile, YamlFileHeader, YamlFileProps } from "./yaml-file.cjs";
2
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps };
@@ -1,2 +0,0 @@
1
- import { YamlData, YamlFile, YamlFileHeader, YamlFileProps } from "./yaml-file.mjs";
2
- export { YamlData, YamlFile, YamlFileHeader, YamlFileProps };
@@ -1,3 +0,0 @@
1
- import { YamlFile, YamlFileHeader } from "./yaml-file.mjs";
2
-
3
- export { YamlFile, YamlFileHeader };