@powerlines/plugin-env 0.15.13 → 0.15.15

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 (268) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +4 -0
  2. package/dist/_virtual/rolldown_runtime.mjs +33 -0
  3. package/dist/babel/plugin.cjs +16 -16
  4. package/dist/babel/plugin.d.mts +2 -2
  5. package/dist/babel/plugin.mjs +7 -7
  6. package/dist/components/docs.cjs +8 -8
  7. package/dist/components/docs.mjs +5 -5
  8. package/dist/components/env.cjs +38 -39
  9. package/dist/components/env.d.mts +2 -2
  10. package/dist/components/env.mjs +11 -11
  11. package/dist/helpers/automd-generator.cjs +4 -4
  12. package/dist/helpers/automd-generator.d.mts +1 -1
  13. package/dist/helpers/automd-generator.mjs +3 -3
  14. package/dist/helpers/load.cjs +12 -13
  15. package/dist/helpers/load.d.mts +2 -2
  16. package/dist/helpers/load.mjs +10 -10
  17. package/dist/helpers/persistence.cjs +23 -23
  18. package/dist/helpers/persistence.d.mts +1 -1
  19. package/dist/helpers/persistence.mjs +7 -7
  20. package/dist/helpers/reflect.cjs +9 -9
  21. package/dist/helpers/reflect.mjs +5 -5
  22. package/dist/helpers/source-file-env.cjs +1 -1
  23. package/dist/helpers/source-file-env.mjs +1 -1
  24. package/dist/index.cjs +28 -26
  25. package/dist/index.d.mts +1 -1
  26. package/dist/index.mjs +25 -25
  27. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/parse-type-definition.cjs +31 -0
  28. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/parse-type-definition.mjs +31 -0
  29. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/to-array.cjs +8 -0
  30. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/to-array.mjs +7 -0
  31. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +6 -0
  32. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +5 -0
  33. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +3 -0
  34. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +5 -0
  35. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +6 -0
  36. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +6 -0
  37. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +1 -0
  38. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +3 -0
  39. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +13 -0
  40. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +13 -0
  41. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +13 -0
  42. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +13 -0
  43. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +12 -0
  44. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +11 -0
  45. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +11 -0
  46. package/dist/node_modules/.pnpm/@stryke_convert@0.6.30/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +12 -0
  47. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/is-parent-path.cjs +10 -0
  48. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/is-parent-path.mjs +10 -0
  49. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/is-type.cjs +13 -0
  50. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/is-type.mjs +13 -0
  51. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/join-paths.cjs +49 -0
  52. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/join-paths.mjs +49 -0
  53. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/regex.cjs +9 -0
  54. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/regex.mjs +5 -0
  55. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/slash.cjs +8 -0
  56. package/dist/node_modules/.pnpm/@stryke_path@0.24.1/node_modules/@stryke/path/dist/slash.mjs +7 -0
  57. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs +346 -0
  58. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs +346 -0
  59. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.cjs +786 -0
  60. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs +786 -0
  61. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.cjs +3 -0
  62. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.mjs +3 -0
  63. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.cjs +23 -0
  64. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs +22 -0
  65. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.cjs +405 -0
  66. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs +404 -0
  67. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.cjs +657 -0
  68. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs +657 -0
  69. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.cjs +1054 -0
  70. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs +1054 -0
  71. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +43 -0
  72. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +42 -0
  73. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +46 -0
  74. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +45 -0
  75. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.cjs +288 -0
  76. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs +285 -0
  77. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.cjs +71 -0
  78. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs +68 -0
  79. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +1013 -0
  80. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +1007 -0
  81. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +23 -0
  82. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +13 -0
  83. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +2698 -0
  84. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +2685 -0
  85. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs +4457 -0
  86. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +4454 -0
  87. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +29 -0
  88. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +29 -0
  89. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +181 -0
  90. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +176 -0
  91. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +22 -0
  92. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +17 -0
  93. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +3967 -0
  94. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +3962 -0
  95. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +11768 -0
  96. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +11763 -0
  97. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +25 -0
  98. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +20 -0
  99. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +20 -0
  100. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +17 -0
  101. package/dist/node_modules/.pnpm/nypm@0.6.2/node_modules/nypm/dist/shared/nypm.CLjaS_sz.cjs +174 -0
  102. package/dist/node_modules/.pnpm/nypm@0.6.2/node_modules/nypm/dist/shared/nypm.CLjaS_sz.mjs +172 -0
  103. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs +13 -0
  104. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs +12 -0
  105. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.cjs +3 -0
  106. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs +3 -0
  107. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +145 -0
  108. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +138 -0
  109. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +127 -0
  110. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +125 -0
  111. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +138 -0
  112. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +136 -0
  113. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +629 -0
  114. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +627 -0
  115. package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/components.d.mts +1 -1
  116. package/dist/{plugin-alloy → packages/plugin-alloy}/src/typescript/components/typescript-file.d.mts +1 -1
  117. package/dist/{plugin-alloy → packages/plugin-alloy}/src/typescript/components/typescript-interface.d.mts +1 -1
  118. package/dist/{powerlines → packages/powerlines}/src/types/build.d.mts +6 -6
  119. package/dist/{powerlines → packages/powerlines}/src/types/config.d.mts +1 -2
  120. package/dist/{powerlines → packages/powerlines}/src/types/context.d.mts +1 -1
  121. package/dist/{powerlines → packages/powerlines}/src/types/tsconfig.d.mts +1 -1
  122. package/dist/powerlines/src/types/context.d.cts +1 -1
  123. package/dist/types/plugin.cjs +19 -18
  124. package/dist/types/plugin.d.mts +6 -6
  125. package/dist/types/plugin.mjs +4 -4
  126. package/dist/types/runtime.cjs +3 -2
  127. package/dist/types/runtime.d.mts +1 -1
  128. package/dist/types/runtime.mjs +1 -1
  129. package/package.json +10 -10
  130. package/dist/deepkit/schemas/reflection.cjs +0 -5368
  131. package/dist/deepkit/schemas/reflection.mjs +0 -5365
  132. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  133. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  134. package/dist/deepkit/src/capnp.cjs +0 -1692
  135. package/dist/deepkit/src/capnp.mjs +0 -1690
  136. package/dist/deepkit/src/esbuild-plugin.cjs +0 -99
  137. package/dist/deepkit/src/esbuild-plugin.mjs +0 -98
  138. package/dist/deepkit/src/reflect-type.cjs +0 -40
  139. package/dist/deepkit/src/reflect-type.mjs +0 -38
  140. package/dist/deepkit/src/resolve-reflections.cjs +0 -23
  141. package/dist/deepkit/src/resolve-reflections.mjs +0 -22
  142. package/dist/deepkit/src/transformer.cjs +0 -92
  143. package/dist/deepkit/src/transformer.mjs +0 -89
  144. package/dist/deepkit/src/transpile.cjs +0 -39
  145. package/dist/deepkit/src/transpile.mjs +0 -37
  146. package/dist/deepkit/src/types.cjs +0 -22
  147. package/dist/deepkit/src/types.mjs +0 -21
  148. package/dist/deepkit/src/utilities.cjs +0 -182
  149. package/dist/deepkit/src/utilities.mjs +0 -181
  150. package/dist/plugin-alloy/src/core/components/output.cjs +0 -45
  151. package/dist/plugin-alloy/src/core/components/output.mjs +0 -44
  152. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
  153. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
  154. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
  155. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
  156. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -136
  157. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -128
  158. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  159. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  160. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -110
  161. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -101
  162. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -23
  163. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -22
  164. package/dist/plugin-alloy/src/index.cjs +0 -106
  165. package/dist/plugin-alloy/src/index.mjs +0 -104
  166. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
  167. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
  168. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
  169. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
  170. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -72
  171. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -71
  172. package/dist/plugin-alloy/src/types/components.cjs +0 -22
  173. package/dist/plugin-alloy/src/types/components.mjs +0 -21
  174. package/dist/plugin-alloy/src/types/plugin.cjs +0 -55
  175. package/dist/plugin-alloy/src/types/plugin.mjs +0 -52
  176. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -57
  177. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -56
  178. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -126
  179. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -124
  180. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -442
  181. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -433
  182. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -212
  183. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -209
  184. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -68
  185. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -67
  186. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
  187. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
  188. package/dist/plugin-automd/src/index.cjs +0 -127
  189. package/dist/plugin-automd/src/index.mjs +0 -124
  190. package/dist/plugin-automd/src/types/plugin.cjs +0 -47
  191. package/dist/plugin-automd/src/types/plugin.mjs +0 -47
  192. package/dist/plugin-automd/src/types/toc.cjs +0 -26
  193. package/dist/plugin-automd/src/types/toc.mjs +0 -25
  194. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -74
  195. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -70
  196. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -71
  197. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -69
  198. package/dist/plugin-babel/src/helpers/filters.cjs +0 -158
  199. package/dist/plugin-babel/src/helpers/filters.mjs +0 -154
  200. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  201. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  202. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -200
  203. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -192
  204. package/dist/plugin-babel/src/helpers/options.cjs +0 -74
  205. package/dist/plugin-babel/src/helpers/options.mjs +0 -71
  206. package/dist/plugin-babel/src/index.cjs +0 -131
  207. package/dist/plugin-babel/src/index.mjs +0 -129
  208. package/dist/plugin-babel/src/types/plugin.cjs +0 -42
  209. package/dist/plugin-babel/src/types/plugin.mjs +0 -39
  210. package/dist/powerlines/src/internal/helpers/hooks.cjs +0 -137
  211. package/dist/powerlines/src/internal/helpers/hooks.mjs +0 -135
  212. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -161
  213. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -159
  214. package/dist/powerlines/src/lib/entry.cjs +0 -203
  215. package/dist/powerlines/src/lib/entry.mjs +0 -201
  216. package/dist/powerlines/src/lib/logger.cjs +0 -108
  217. package/dist/powerlines/src/lib/logger.mjs +0 -106
  218. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -67
  219. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -66
  220. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -49
  221. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -48
  222. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -46
  223. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -45
  224. package/dist/powerlines/src/types/api.cjs +0 -62
  225. package/dist/powerlines/src/types/api.mjs +0 -62
  226. package/dist/powerlines/src/types/babel.cjs +0 -156
  227. package/dist/powerlines/src/types/babel.mjs +0 -147
  228. package/dist/powerlines/src/types/build.cjs +0 -127
  229. package/dist/powerlines/src/types/build.mjs +0 -121
  230. package/dist/powerlines/src/types/commands.cjs +0 -16
  231. package/dist/powerlines/src/types/commands.mjs +0 -15
  232. package/dist/powerlines/src/types/config.cjs +0 -413
  233. package/dist/powerlines/src/types/config.mjs +0 -391
  234. package/dist/powerlines/src/types/context.cjs +0 -381
  235. package/dist/powerlines/src/types/context.mjs +0 -364
  236. package/dist/powerlines/src/types/fs.cjs +0 -78
  237. package/dist/powerlines/src/types/fs.mjs +0 -75
  238. package/dist/powerlines/src/types/hooks.cjs +0 -71
  239. package/dist/powerlines/src/types/hooks.mjs +0 -68
  240. package/dist/powerlines/src/types/index.cjs +0 -11
  241. package/dist/powerlines/src/types/index.mjs +0 -13
  242. package/dist/powerlines/src/types/plugin.cjs +0 -184
  243. package/dist/powerlines/src/types/plugin.mjs +0 -178
  244. package/dist/powerlines/src/types/resolved.cjs +0 -153
  245. package/dist/powerlines/src/types/resolved.mjs +0 -148
  246. package/dist/powerlines/src/types/unplugin.cjs +0 -47
  247. package/dist/powerlines/src/types/unplugin.mjs +0 -46
  248. /package/dist/{deepkit → packages/deepkit}/schemas/reflection.d.mts +0 -0
  249. /package/dist/{deepkit → packages/deepkit}/src/types.d.mts +0 -0
  250. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/core/components/source-file.d.mts +0 -0
  251. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/index.d.mts +0 -0
  252. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/types/plugin.d.mts +0 -0
  253. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/typescript/components/builtin-file.d.mts +0 -0
  254. /package/dist/{plugin-alloy → packages/plugin-alloy}/src/typescript/components/tsdoc.d.mts +0 -0
  255. /package/dist/{plugin-automd → packages/plugin-automd}/src/types/plugin.d.mts +0 -0
  256. /package/dist/{plugin-automd → packages/plugin-automd}/src/types/toc.d.mts +0 -0
  257. /package/dist/{plugin-babel → packages/plugin-babel}/src/types/index.d.mts +0 -0
  258. /package/dist/{plugin-babel → packages/plugin-babel}/src/types/plugin.d.mts +0 -0
  259. /package/dist/{powerlines → packages/powerlines}/src/internal/helpers/hooks.d.mts +0 -0
  260. /package/dist/{powerlines → packages/powerlines}/src/types/api.d.mts +0 -0
  261. /package/dist/{powerlines → packages/powerlines}/src/types/babel.d.mts +0 -0
  262. /package/dist/{powerlines → packages/powerlines}/src/types/commands.d.mts +0 -0
  263. /package/dist/{powerlines → packages/powerlines}/src/types/fs.d.mts +0 -0
  264. /package/dist/{powerlines → packages/powerlines}/src/types/hooks.d.mts +0 -0
  265. /package/dist/{powerlines → packages/powerlines}/src/types/index.d.mts +0 -0
  266. /package/dist/{powerlines → packages/powerlines}/src/types/plugin.d.mts +0 -0
  267. /package/dist/{powerlines → packages/powerlines}/src/types/resolved.d.mts +0 -0
  268. /package/dist/{powerlines → packages/powerlines}/src/types/unplugin.d.mts +0 -0
@@ -1,192 +0,0 @@
1
- import { __ΩImportSpecifier } from "../../../powerlines/src/types/babel.mjs";
2
- import { parseAst } from "./ast-utils.mjs";
3
- import { isString } from "@stryke/type-checks/is-string";
4
- import { NodePath } from "@babel/core";
5
- import * as t from "@babel/types";
6
-
7
- //#region ../plugin-babel/src/helpers/module-helpers.ts
8
- function __assignType(fn, args) {
9
- fn.__type = args;
10
- return fn;
11
- }
12
- /**
13
- * Finds an export in the given Babel AST program by its key.
14
- *
15
- * @param ast - The parsed Babel AST result containing the program body.
16
- * @param key - The name of the export to find (e.g., "default" or a named export).
17
- * @returns The declaration of the export if found, otherwise undefined.
18
- */
19
- function findExport(ast, key) {
20
- const type = key === "default" ? "ExportDefaultDeclaration" : "ExportNamedDeclaration";
21
- for (const node of ast.program.body) if (node.type === type) {
22
- if (key === "default") return node.declaration;
23
- if (node.declaration && "declarations" in node.declaration) {
24
- const declaration = node.declaration.declarations[0];
25
- if (declaration && "name" in declaration.id && declaration.id.name === key) return declaration.init;
26
- }
27
- }
28
- }
29
- findExport.__type = [
30
- "ParseResult",
31
- "ast",
32
- "key",
33
- "findExport",
34
- "Finds an export in the given Babel AST program by its key.",
35
- "P\"w!2\"&2#\"/$?%"
36
- ];
37
- /**
38
- * Lists all exports from the given Babel AST program.
39
- *
40
- * @param codeOrAst - The parsed Babel AST result containing the program body.
41
- * @returns An array of export names, including "default" for default exports.
42
- */
43
- function listExports(codeOrAst) {
44
- return (isString(codeOrAst) ? parseAst(codeOrAst) : codeOrAst).program.body.flatMap(__assignType((i) => {
45
- if (i.type === "ExportDefaultDeclaration") return ["default"];
46
- if (i.type === "ExportNamedDeclaration" && i.declaration && "declarations" in i.declaration) return i.declaration.declarations.map(__assignType((d) => "name" in d.id ? d.id.name : "", [
47
- "d",
48
- "",
49
- "P\"2!\"/\""
50
- ]));
51
- return [];
52
- }, [
53
- "i",
54
- "",
55
- "P\"2!\"/\""
56
- ])).filter(Boolean);
57
- }
58
- listExports.__type = [
59
- "ParseResult",
60
- "codeOrAst",
61
- "listExports",
62
- "Lists all exports from the given Babel AST program.",
63
- "PP\"w!&J2\"\"/#?$"
64
- ];
65
- /**
66
- * Lists all imports from the given Babel AST program.
67
- *
68
- * @param ast - The parsed Babel AST result containing the program body.
69
- * @returns An array of import names, including "default" for default imports.
70
- */
71
- function listImports(ast) {
72
- return ast.program.body.flatMap(__assignType((i) => {
73
- if (i.type === "ImportDeclaration") return i.specifiers.map(__assignType((s) => {
74
- if (s.type === "ImportDefaultSpecifier") return "default";
75
- if (s.type === "ImportSpecifier" && "imported" in s) return s.imported.type === "Identifier" ? s.imported.name : s.imported.value;
76
- return "";
77
- }, [
78
- "s",
79
- "",
80
- "P\"2!\"/\""
81
- ]));
82
- return [];
83
- }, [
84
- "i",
85
- "",
86
- "P\"2!\"/\""
87
- ])).filter(Boolean);
88
- }
89
- listImports.__type = [
90
- "ParseResult",
91
- "ast",
92
- "listImports",
93
- "Lists all imports from the given Babel AST program.",
94
- "PP\"w!!J2\"\"/#?$"
95
- ];
96
- function isImportCall(calleePath) {
97
- return t.isImport(calleePath.node.callee);
98
- }
99
- isImportCall.__type = [
100
- () => NodePath,
101
- "calleePath",
102
- "isImportCall",
103
- "PPP!!J7!2\"\"/#"
104
- ];
105
- /**
106
- * Gets the import declaration for a given name and specifier.
107
- *
108
- * @param specifier - The specifier of the import.
109
- * @param name - The name of the import.
110
- * @param named - Optional named import.
111
- * @returns The import declaration.
112
- */
113
- function getImport(specifier, name, named) {
114
- return t.importDeclaration([t.importSpecifier(t.identifier(name), t.stringLiteral(named || name))], t.stringLiteral(specifier));
115
- }
116
- getImport.__type = [
117
- "specifier",
118
- "name",
119
- "named",
120
- "getImport",
121
- "Gets the import declaration for a given name and specifier.",
122
- "P&2!&2\"&2#8!/$?%"
123
- ];
124
- /**
125
- * Adds an import to the program if it doesn't already exist.
126
- *
127
- * @param path - The current NodePath in the AST.
128
- * @param specifier - The import specifier.
129
- */
130
- function addImport(path, specifier) {
131
- addImportsToProgram(path.scope.getProgramParent().path, specifier);
132
- }
133
- addImport.__type = [
134
- () => NodePath,
135
- "path",
136
- () => __ΩImportSpecifier,
137
- "specifier",
138
- "addImport",
139
- "Adds an import to the program if it doesn't already exist.",
140
- "PP\"7!2\"n#2$\"/%?&"
141
- ];
142
- function isNonNamespacedImport(importDeclPath) {
143
- return importDeclPath.get("specifiers").filter(Boolean).every(__assignType((specifier) => specifier?.isImportSpecifier(), [
144
- "specifier",
145
- "",
146
- "P\"2!\"/\""
147
- ])) && importDeclPath.node.importKind !== "type" && importDeclPath.node.importKind !== "typeof";
148
- }
149
- isNonNamespacedImport.__type = [
150
- () => NodePath,
151
- "importDeclPath",
152
- "isNonNamespacedImport",
153
- "/*\nMatches `import { ... } from <moduleName>;`\nbut not `import * as React from <moduleName>;`\n`import type { Foo } from <moduleName>;`",
154
- "PP!7!2\")/#?$"
155
- ];
156
- function getExistingImports(program) {
157
- const existingImports = (Map.Ω = [["&"], [() => NodePath, "P!7!"]], /* @__PURE__ */ new Map());
158
- program.traverse({ ImportDeclaration: __assignType(function ImportDeclaration(path) {
159
- if (isNonNamespacedImport(path)) existingImports.set(path.node.source.value, path);
160
- }, [
161
- "path",
162
- "ImportDeclaration",
163
- "P\"2!\"/\""
164
- ]) });
165
- return existingImports;
166
- }
167
- getExistingImports.__type = [
168
- () => NodePath,
169
- "program",
170
- () => NodePath,
171
- "getExistingImports",
172
- "PP!7!2\"&P!7#E/$"
173
- ];
174
- function addImportsToProgram(path, specifier) {
175
- /**
176
- * If an existing import of this module exists (ie \`import \{ ... \} from
177
- * '<moduleName>'\`), inject new imported specifiers into the list of
178
- * destructured variables.
179
- */
180
- if (!getExistingImports(path).get(specifier.module)) path.unshiftContainer("body", t.importDeclaration([t.importSpecifier(t.identifier(specifier.name || specifier.imported), t.identifier(specifier.imported))], t.stringLiteral(specifier.module)));
181
- }
182
- addImportsToProgram.__type = [
183
- () => NodePath,
184
- "path",
185
- () => __ΩImportSpecifier,
186
- "specifier",
187
- "addImportsToProgram",
188
- "PP!7!2\"n#2$$/%"
189
- ];
190
-
191
- //#endregion
192
- export { addImport, addImportsToProgram, findExport, getImport, isImportCall, listExports, listImports };
@@ -1,74 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- const require_context = require('../../../powerlines/src/types/context.cjs');
3
- const require_babel = require('../../../powerlines/src/types/babel.cjs');
4
- const require_filters = require('./filters.cjs');
5
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
6
- let chalk = require("chalk");
7
- chalk = require_rolldown_runtime.__toESM(chalk);
8
- let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
9
-
10
- //#region ../plugin-babel/src/helpers/options.ts
11
- function resolvePluginFunction(context, plugin) {
12
- try {
13
- return Array.isArray(plugin) && plugin.length > 0 && plugin[0] ? (0, __stryke_type_checks_is_function.isFunction)(plugin[0]) ? plugin[0](context) : plugin[0] : (0, __stryke_type_checks_is_function.isFunction)(plugin) ? plugin(context) : plugin;
14
- } catch {
15
- return plugin[0];
16
- }
17
- }
18
- resolvePluginFunction.__type = [
19
- () => require_context.__ΩContext,
20
- "context",
21
- "PluginTarget",
22
- "PluginOptions",
23
- "plugin",
24
- () => require_babel.__ΩBabelTransformPluginOptions,
25
- "resolvePluginFunction",
26
- "Pn!2\"P\"\"w#\"FP\"w#\"w$GP\"w#\"w$P&-JGJ2%n&/'"
27
- ];
28
- /**
29
- * Resolve the [Babel](https://babeljs.io/) plugin.
30
- *
31
- * @param context - The context for the transformation.
32
- * @param code - The code to be transformed.
33
- * @param id - The ID of the source file.
34
- * @param plugin - The Babel plugin to resolve.
35
- * @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.
36
- */
37
- function resolveBabelPlugin(context, code, id, plugin) {
38
- if (Array.isArray(plugin) && plugin.length > 0 && plugin[0]) {
39
- if (plugin.length > 2 && plugin[2] && (0, __stryke_type_checks_is_function.isFunction)(plugin[2]) && !plugin[2](code, id)) {
40
- context.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Skipping filtered Babel plugin ${chalk.default.bold.cyanBright(require_filters.getPluginName(plugin) || "unnamed")} for ${id}`);
41
- return;
42
- }
43
- return plugin.length > 2 ? [
44
- resolvePluginFunction(context, plugin),
45
- plugin[1],
46
- plugin[2]
47
- ] : [
48
- resolvePluginFunction(context, plugin),
49
- plugin[1],
50
- null
51
- ];
52
- }
53
- return [
54
- resolvePluginFunction(context, plugin),
55
- {},
56
- null
57
- ];
58
- }
59
- resolveBabelPlugin.__type = [
60
- () => require_context.__ΩContext,
61
- "context",
62
- "code",
63
- "id",
64
- () => require_babel.__ΩBabelTransformPluginOptions,
65
- "plugin",
66
- () => require_babel.__ΩResolvedBabelTransformPluginOptions,
67
- "resolveBabelPlugin",
68
- "Resolve the [Babel](https://babeljs.io/) plugin.",
69
- "Pn!2\"&2#&2$n%2&Pn'-J/(?)"
70
- ];
71
-
72
- //#endregion
73
- exports.resolveBabelPlugin = resolveBabelPlugin;
74
- exports.resolvePluginFunction = resolvePluginFunction;
@@ -1,71 +0,0 @@
1
- import { __ΩContext } from "../../../powerlines/src/types/context.mjs";
2
- import { __ΩBabelTransformPluginOptions, __ΩResolvedBabelTransformPluginOptions } from "../../../powerlines/src/types/babel.mjs";
3
- import { getPluginName } from "./filters.mjs";
4
- import { LogLevelLabel } from "@storm-software/config-tools/types";
5
- import chalk from "chalk";
6
- import { isFunction } from "@stryke/type-checks/is-function";
7
-
8
- //#region ../plugin-babel/src/helpers/options.ts
9
- function resolvePluginFunction(context, plugin) {
10
- try {
11
- return Array.isArray(plugin) && plugin.length > 0 && plugin[0] ? isFunction(plugin[0]) ? plugin[0](context) : plugin[0] : isFunction(plugin) ? plugin(context) : plugin;
12
- } catch {
13
- return plugin[0];
14
- }
15
- }
16
- resolvePluginFunction.__type = [
17
- () => __ΩContext,
18
- "context",
19
- "PluginTarget",
20
- "PluginOptions",
21
- "plugin",
22
- () => __ΩBabelTransformPluginOptions,
23
- "resolvePluginFunction",
24
- "Pn!2\"P\"\"w#\"FP\"w#\"w$GP\"w#\"w$P&-JGJ2%n&/'"
25
- ];
26
- /**
27
- * Resolve the [Babel](https://babeljs.io/) plugin.
28
- *
29
- * @param context - The context for the transformation.
30
- * @param code - The code to be transformed.
31
- * @param id - The ID of the source file.
32
- * @param plugin - The Babel plugin to resolve.
33
- * @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.
34
- */
35
- function resolveBabelPlugin(context, code, id, plugin) {
36
- if (Array.isArray(plugin) && plugin.length > 0 && plugin[0]) {
37
- if (plugin.length > 2 && plugin[2] && isFunction(plugin[2]) && !plugin[2](code, id)) {
38
- context.log(LogLevelLabel.TRACE, `Skipping filtered Babel plugin ${chalk.bold.cyanBright(getPluginName(plugin) || "unnamed")} for ${id}`);
39
- return;
40
- }
41
- return plugin.length > 2 ? [
42
- resolvePluginFunction(context, plugin),
43
- plugin[1],
44
- plugin[2]
45
- ] : [
46
- resolvePluginFunction(context, plugin),
47
- plugin[1],
48
- null
49
- ];
50
- }
51
- return [
52
- resolvePluginFunction(context, plugin),
53
- {},
54
- null
55
- ];
56
- }
57
- resolveBabelPlugin.__type = [
58
- () => __ΩContext,
59
- "context",
60
- "code",
61
- "id",
62
- () => __ΩBabelTransformPluginOptions,
63
- "plugin",
64
- () => __ΩResolvedBabelTransformPluginOptions,
65
- "resolveBabelPlugin",
66
- "Resolve the [Babel](https://babeljs.io/) plugin.",
67
- "Pn!2\"&2#&2$n%2&Pn'-J/(?)"
68
- ];
69
-
70
- //#endregion
71
- export { resolveBabelPlugin, resolvePluginFunction };
@@ -1,131 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_plugin = require('./types/plugin.cjs');
3
- const require_create_plugin = require('./helpers/create-plugin.cjs');
4
- const require_ast_utils = require('./helpers/ast-utils.cjs');
5
- const require_module_helpers = require('./helpers/module-helpers.cjs');
6
- const require_filters = require('./helpers/filters.cjs');
7
- const require_options = require('./helpers/options.cjs');
8
- require('./helpers/index.cjs');
9
- let defu = require("defu");
10
- defu = require_rolldown_runtime.__toESM(defu);
11
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
12
- let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
13
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
14
- let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
15
- let __babel_core = require("@babel/core");
16
-
17
- //#region ../plugin-babel/src/index.ts
18
- function __assignType(fn, args) {
19
- fn.__type = args;
20
- return fn;
21
- }
22
- /**
23
- * Babel plugin for Powerlines.
24
- *
25
- * @param options - The Babel plugin user configuration options.
26
- * @returns A Powerlines plugin that integrates Babel transformations.
27
- */
28
- const plugin = __assignType((options = {}) => {
29
- return {
30
- name: "babel",
31
- config: __assignType(function config() {
32
- if (!(0, __stryke_type_checks_is_set_object.isSetObject)(options)) return;
33
- return { transform: { babel: options } };
34
- }, ["config", "P\"/!"]),
35
- configResolved: {
36
- order: "pre",
37
- handler: __assignType(function handler() {
38
- this.devDependencies["@babel/core"] = "^7.28.4";
39
- this.config.transform.babel = (0, defu.default)(this.config.transform.babel ?? {}, {
40
- plugins: [],
41
- presets: []
42
- });
43
- }, ["handler", "P\"/!"])
44
- },
45
- async transform(code, id) {
46
- if ((0, __stryke_path_is_parent_path.isParentPath)(id, this.powerlinesPath) || code.includes("/* @storm-ignore */") || code.includes("/* @storm-disable */")) {
47
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Skipping Babel transformation for: ${id}`);
48
- return {
49
- code,
50
- id
51
- };
52
- }
53
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Babel transforming file: ${id}`);
54
- const plugins = this.config.transform.babel.plugins.map(__assignType((plugin$1) => require_options.resolveBabelPlugin(this, code, id, plugin$1), [
55
- "plugin",
56
- "",
57
- "P\"2!\"/\""
58
- ])).filter(__assignType((plugin$1, _, arr) => plugin$1 && !require_filters.isDuplicatePlugin(arr, plugin$1), [
59
- "plugin",
60
- "_",
61
- "arr",
62
- "",
63
- "P\"2!\"2\"\"2#\"/$"
64
- ]));
65
- const presets = this.config.transform.babel.presets.map(__assignType((preset) => require_options.resolveBabelPlugin(this, code, id, preset), [
66
- "preset",
67
- "",
68
- "P\"2!\"/\""
69
- ])).filter(__assignType((preset, _, arr) => preset && !require_filters.isDuplicatePlugin(arr, preset), [
70
- "preset",
71
- "_",
72
- "arr",
73
- "",
74
- "P\"2!\"2\"\"2#\"/$"
75
- ]));
76
- if (Array.isArray(plugins) && plugins.length === 0 && Array.isArray(presets) && presets.length === 0) return {
77
- code,
78
- id
79
- };
80
- if ([
81
- "ts",
82
- "cts",
83
- "mts",
84
- "tsx"
85
- ].includes((0, __stryke_path_file_path_fns.findFileExtensionSafe)(id)) && !require_filters.isDuplicatePlugin(plugins, "@babel/plugin-syntax-typescript") && !require_filters.isDuplicatePlugin(presets, "@babel/preset-typescript")) plugins.unshift(["@babel/plugin-syntax-typescript", { isTSX: (0, __stryke_path_file_path_fns.findFileExtension)(id) === ".tsx" }]);
86
- const result = await (0, __babel_core.transformAsync)(code, {
87
- highlightCode: true,
88
- code: true,
89
- ast: false,
90
- cloneInputAst: false,
91
- comments: true,
92
- sourceType: "module",
93
- configFile: false,
94
- babelrc: false,
95
- envName: this.config.mode,
96
- caller: { name: this.config.framework },
97
- ...this.config.transform.babel ?? {},
98
- filename: id,
99
- plugins: plugins.map(__assignType((plugin$1) => {
100
- return Array.isArray(plugin$1) && plugin$1.length >= 2 ? [plugin$1[0], (0, defu.default)(plugin$1.length > 1 && plugin$1[1] ? plugin$1[1] : {}, { options })] : plugin$1;
101
- }, [
102
- "plugin",
103
- "",
104
- "P\"2!\"/\""
105
- ])).filter(Boolean),
106
- presets: presets.map(__assignType((preset) => {
107
- return Array.isArray(preset) && preset.length >= 2 ? [preset[0], (0, defu.default)(preset.length > 1 && preset[1] ? preset[1] : {}, { options })] : preset;
108
- }, [
109
- "preset",
110
- "",
111
- "P\"2!\"/\""
112
- ])).filter(Boolean)
113
- });
114
- if (!result?.code) throw new Error(`Powerlines - Babel plugin failed to compile ${id}`);
115
- return {
116
- code: result.code,
117
- id
118
- };
119
- }
120
- };
121
- }, [
122
- () => require_plugin.__ΩBabelPluginOptions,
123
- "options",
124
- () => ({}),
125
- "",
126
- "Pn!2\">#\"/$"
127
- ]);
128
- var src_default = plugin;
129
-
130
- //#endregion
131
- exports.default = src_default;
@@ -1,129 +0,0 @@
1
- import { __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig } from "./types/plugin.mjs";
2
- import { createBabelPlugin } from "./helpers/create-plugin.mjs";
3
- import { __ΩGenerateFromAstOptions, generateFromAst, parseAst } from "./helpers/ast-utils.mjs";
4
- import { addImport, addImportsToProgram, findExport, getImport, isImportCall, listExports, listImports } from "./helpers/module-helpers.mjs";
5
- import { addPluginFilter, filterPluginByFileId, getPluginName, isDuplicatePlugin } from "./helpers/filters.mjs";
6
- import { resolveBabelPlugin, resolvePluginFunction } from "./helpers/options.mjs";
7
- import "./helpers/index.mjs";
8
- import defu$1 from "defu";
9
- import { LogLevelLabel } from "@storm-software/config-tools/types";
10
- import { isParentPath } from "@stryke/path/is-parent-path";
11
- import { isSetObject } from "@stryke/type-checks/is-set-object";
12
- import { findFileExtension, findFileExtensionSafe } from "@stryke/path/file-path-fns";
13
- import { transformAsync } from "@babel/core";
14
-
15
- //#region ../plugin-babel/src/index.ts
16
- function __assignType(fn, args) {
17
- fn.__type = args;
18
- return fn;
19
- }
20
- /**
21
- * Babel plugin for Powerlines.
22
- *
23
- * @param options - The Babel plugin user configuration options.
24
- * @returns A Powerlines plugin that integrates Babel transformations.
25
- */
26
- const plugin = __assignType((options = {}) => {
27
- return {
28
- name: "babel",
29
- config: __assignType(function config() {
30
- if (!isSetObject(options)) return;
31
- return { transform: { babel: options } };
32
- }, ["config", "P\"/!"]),
33
- configResolved: {
34
- order: "pre",
35
- handler: __assignType(function handler() {
36
- this.devDependencies["@babel/core"] = "^7.28.4";
37
- this.config.transform.babel = defu$1(this.config.transform.babel ?? {}, {
38
- plugins: [],
39
- presets: []
40
- });
41
- }, ["handler", "P\"/!"])
42
- },
43
- async transform(code, id) {
44
- if (isParentPath(id, this.powerlinesPath) || code.includes("/* @storm-ignore */") || code.includes("/* @storm-disable */")) {
45
- this.log(LogLevelLabel.TRACE, `Skipping Babel transformation for: ${id}`);
46
- return {
47
- code,
48
- id
49
- };
50
- }
51
- this.log(LogLevelLabel.TRACE, `Babel transforming file: ${id}`);
52
- const plugins = this.config.transform.babel.plugins.map(__assignType((plugin$1) => resolveBabelPlugin(this, code, id, plugin$1), [
53
- "plugin",
54
- "",
55
- "P\"2!\"/\""
56
- ])).filter(__assignType((plugin$1, _, arr) => plugin$1 && !isDuplicatePlugin(arr, plugin$1), [
57
- "plugin",
58
- "_",
59
- "arr",
60
- "",
61
- "P\"2!\"2\"\"2#\"/$"
62
- ]));
63
- const presets = this.config.transform.babel.presets.map(__assignType((preset) => resolveBabelPlugin(this, code, id, preset), [
64
- "preset",
65
- "",
66
- "P\"2!\"/\""
67
- ])).filter(__assignType((preset, _, arr) => preset && !isDuplicatePlugin(arr, preset), [
68
- "preset",
69
- "_",
70
- "arr",
71
- "",
72
- "P\"2!\"2\"\"2#\"/$"
73
- ]));
74
- if (Array.isArray(plugins) && plugins.length === 0 && Array.isArray(presets) && presets.length === 0) return {
75
- code,
76
- id
77
- };
78
- if ([
79
- "ts",
80
- "cts",
81
- "mts",
82
- "tsx"
83
- ].includes(findFileExtensionSafe(id)) && !isDuplicatePlugin(plugins, "@babel/plugin-syntax-typescript") && !isDuplicatePlugin(presets, "@babel/preset-typescript")) plugins.unshift(["@babel/plugin-syntax-typescript", { isTSX: findFileExtension(id) === ".tsx" }]);
84
- const result = await transformAsync(code, {
85
- highlightCode: true,
86
- code: true,
87
- ast: false,
88
- cloneInputAst: false,
89
- comments: true,
90
- sourceType: "module",
91
- configFile: false,
92
- babelrc: false,
93
- envName: this.config.mode,
94
- caller: { name: this.config.framework },
95
- ...this.config.transform.babel ?? {},
96
- filename: id,
97
- plugins: plugins.map(__assignType((plugin$1) => {
98
- return Array.isArray(plugin$1) && plugin$1.length >= 2 ? [plugin$1[0], defu$1(plugin$1.length > 1 && plugin$1[1] ? plugin$1[1] : {}, { options })] : plugin$1;
99
- }, [
100
- "plugin",
101
- "",
102
- "P\"2!\"/\""
103
- ])).filter(Boolean),
104
- presets: presets.map(__assignType((preset) => {
105
- return Array.isArray(preset) && preset.length >= 2 ? [preset[0], defu$1(preset.length > 1 && preset[1] ? preset[1] : {}, { options })] : preset;
106
- }, [
107
- "preset",
108
- "",
109
- "P\"2!\"/\""
110
- ])).filter(Boolean)
111
- });
112
- if (!result?.code) throw new Error(`Powerlines - Babel plugin failed to compile ${id}`);
113
- return {
114
- code: result.code,
115
- id
116
- };
117
- }
118
- };
119
- }, [
120
- () => __ΩBabelPluginOptions,
121
- "options",
122
- () => ({}),
123
- "",
124
- "Pn!2\">#\"/$"
125
- ]);
126
- var src_default = plugin;
127
-
128
- //#endregion
129
- export { src_default as default };
@@ -1,42 +0,0 @@
1
- const require_context = require('../../../powerlines/src/types/context.cjs');
2
- const require_config = require('../../../powerlines/src/types/config.cjs');
3
- const require_resolved = require('../../../powerlines/src/types/resolved.cjs');
4
-
5
- //#region ../plugin-babel/src/types/plugin.ts
6
- const __ΩPartial = [
7
- "T",
8
- "Partial",
9
- "l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
10
- ];
11
- const __ΩBabelPluginOptions = [
12
- () => __ΩPartial,
13
- () => require_config.__ΩBabelUserConfig,
14
- "BabelPluginOptions",
15
- "n\"o!\"w#y"
16
- ];
17
- const __ΩBabelPluginUserConfig = [
18
- () => require_config.__ΩUserConfig,
19
- "BabelPluginUserConfig",
20
- "n!w\"y"
21
- ];
22
- const __ΩBabelPluginResolvedConfig = [
23
- () => require_resolved.__ΩResolvedConfig,
24
- () => require_resolved.__ΩBabelResolvedConfig,
25
- "babel",
26
- "transform",
27
- "BabelPluginResolvedConfig",
28
- "Pn!Pn\"4#M4$Mw%y"
29
- ];
30
- const __ΩBabelPluginContext = [
31
- () => __ΩBabelPluginResolvedConfig,
32
- "TResolvedConfig",
33
- () => require_context.__ΩPluginContext,
34
- "BabelPluginContext",
35
- "n!c\"e!!o#\"w$y"
36
- ];
37
-
38
- //#endregion
39
- exports.__ΩBabelPluginContext = __ΩBabelPluginContext;
40
- exports.__ΩBabelPluginOptions = __ΩBabelPluginOptions;
41
- exports.__ΩBabelPluginResolvedConfig = __ΩBabelPluginResolvedConfig;
42
- exports.__ΩBabelPluginUserConfig = __ΩBabelPluginUserConfig;
@@ -1,39 +0,0 @@
1
- import { __ΩPluginContext } from "../../../powerlines/src/types/context.mjs";
2
- import { __ΩBabelUserConfig, __ΩUserConfig } from "../../../powerlines/src/types/config.mjs";
3
- import { __ΩBabelResolvedConfig, __ΩResolvedConfig } from "../../../powerlines/src/types/resolved.mjs";
4
-
5
- //#region ../plugin-babel/src/types/plugin.ts
6
- const __ΩPartial = [
7
- "T",
8
- "Partial",
9
- "l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
10
- ];
11
- const __ΩBabelPluginOptions = [
12
- () => __ΩPartial,
13
- () => __ΩBabelUserConfig,
14
- "BabelPluginOptions",
15
- "n\"o!\"w#y"
16
- ];
17
- const __ΩBabelPluginUserConfig = [
18
- () => __ΩUserConfig,
19
- "BabelPluginUserConfig",
20
- "n!w\"y"
21
- ];
22
- const __ΩBabelPluginResolvedConfig = [
23
- () => __ΩResolvedConfig,
24
- () => __ΩBabelResolvedConfig,
25
- "babel",
26
- "transform",
27
- "BabelPluginResolvedConfig",
28
- "Pn!Pn\"4#M4$Mw%y"
29
- ];
30
- const __ΩBabelPluginContext = [
31
- () => __ΩBabelPluginResolvedConfig,
32
- "TResolvedConfig",
33
- () => __ΩPluginContext,
34
- "BabelPluginContext",
35
- "n!c\"e!!o#\"w$y"
36
- ];
37
-
38
- //#endregion
39
- export { __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig };