@powerlines/plugin-env 0.15.121 → 0.15.122

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 (277) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +0 -4
  2. package/dist/babel/plugin.cjs +11 -11
  3. package/dist/babel/plugin.d.mts +2 -2
  4. package/dist/babel/plugin.mjs +5 -5
  5. package/dist/components/docs.cjs +8 -8
  6. package/dist/components/docs.d.mts +1 -1
  7. package/dist/components/docs.mjs +4 -4
  8. package/dist/components/env.cjs +43 -42
  9. package/dist/components/env.d.mts +2 -2
  10. package/dist/components/env.mjs +11 -11
  11. package/dist/deepkit/schemas/reflection.cjs +5426 -0
  12. package/dist/deepkit/schemas/reflection.mjs +5423 -0
  13. package/dist/deepkit/schemas/reflection2.cjs +4112 -0
  14. package/dist/deepkit/schemas/reflection2.mjs +4110 -0
  15. package/dist/deepkit/src/capnp.cjs +1692 -0
  16. package/dist/deepkit/src/capnp.mjs +1690 -0
  17. package/dist/deepkit/src/esbuild-plugin.cjs +99 -0
  18. package/dist/deepkit/src/esbuild-plugin.mjs +98 -0
  19. package/dist/deepkit/src/reflect-type.cjs +40 -0
  20. package/dist/deepkit/src/reflect-type.mjs +38 -0
  21. package/dist/deepkit/src/resolve-reflections.cjs +23 -0
  22. package/dist/deepkit/src/resolve-reflections.mjs +22 -0
  23. package/dist/deepkit/src/transformer.cjs +92 -0
  24. package/dist/deepkit/src/transformer.mjs +89 -0
  25. package/dist/deepkit/src/transpile.cjs +39 -0
  26. package/dist/deepkit/src/transpile.mjs +37 -0
  27. package/dist/deepkit/src/types.cjs +22 -0
  28. package/dist/deepkit/src/types.mjs +21 -0
  29. package/dist/deepkit/src/utilities.cjs +184 -0
  30. package/dist/deepkit/src/utilities.mjs +183 -0
  31. package/dist/helpers/automd-generator.cjs +4 -4
  32. package/dist/helpers/automd-generator.d.mts +1 -1
  33. package/dist/helpers/automd-generator.mjs +2 -2
  34. package/dist/helpers/docs-helper.cjs +3 -2
  35. package/dist/helpers/docs-helper.mjs +1 -1
  36. package/dist/helpers/load.cjs +15 -14
  37. package/dist/helpers/load.mjs +10 -10
  38. package/dist/helpers/persistence.cjs +23 -23
  39. package/dist/helpers/persistence.d.mts +1 -1
  40. package/dist/helpers/persistence.mjs +5 -5
  41. package/dist/helpers/reflect.cjs +9 -9
  42. package/dist/helpers/reflect.mjs +3 -3
  43. package/dist/helpers/source-file-env.cjs +1 -1
  44. package/dist/helpers/source-file-env.mjs +1 -1
  45. package/dist/index.cjs +24 -26
  46. package/dist/index.d.mts +1 -1
  47. package/dist/index.mjs +14 -14
  48. package/dist/plugin-alloy/src/core/components/output.cjs +43 -0
  49. package/dist/plugin-alloy/src/core/components/output.mjs +42 -0
  50. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +22 -0
  51. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +21 -0
  52. package/dist/plugin-alloy/src/core/components/source-file.cjs +64 -0
  53. package/dist/plugin-alloy/src/core/components/source-file.mjs +62 -0
  54. package/dist/plugin-alloy/src/core/contexts/context.cjs +134 -0
  55. package/dist/plugin-alloy/src/core/contexts/context.mjs +126 -0
  56. package/dist/plugin-alloy/src/core/contexts/index.cjs +2 -0
  57. package/dist/plugin-alloy/src/core/contexts/index.mjs +4 -0
  58. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +110 -0
  59. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +101 -0
  60. package/dist/plugin-alloy/src/helpers/refkey.cjs +23 -0
  61. package/dist/plugin-alloy/src/helpers/refkey.mjs +22 -0
  62. package/dist/plugin-alloy/src/index.cjs +105 -0
  63. package/dist/plugin-alloy/src/index.mjs +103 -0
  64. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +115 -0
  65. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +114 -0
  66. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +39 -0
  67. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +38 -0
  68. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +72 -0
  69. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +71 -0
  70. package/dist/plugin-alloy/src/types/components.cjs +22 -0
  71. package/dist/{packages/plugin-alloy → plugin-alloy}/src/types/components.d.mts +1 -1
  72. package/dist/plugin-alloy/src/types/components.mjs +21 -0
  73. package/dist/plugin-alloy/src/types/plugin.cjs +53 -0
  74. package/dist/plugin-alloy/src/types/plugin.mjs +50 -0
  75. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +62 -0
  76. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +61 -0
  77. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +131 -0
  78. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +129 -0
  79. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +451 -0
  80. package/dist/{packages/plugin-alloy → plugin-alloy}/src/typescript/components/tsdoc.d.mts +1 -1
  81. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +442 -0
  82. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +216 -0
  83. package/dist/{packages/plugin-alloy → plugin-alloy}/src/typescript/components/typescript-file.d.mts +1 -1
  84. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +213 -0
  85. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +72 -0
  86. package/dist/{packages/plugin-alloy → plugin-alloy}/src/typescript/components/typescript-interface.d.mts +1 -1
  87. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +71 -0
  88. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +124 -0
  89. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +123 -0
  90. package/dist/plugin-automd/src/index.cjs +127 -0
  91. package/dist/plugin-automd/src/index.mjs +124 -0
  92. package/dist/plugin-automd/src/types/plugin.cjs +47 -0
  93. package/dist/plugin-automd/src/types/plugin.mjs +47 -0
  94. package/dist/plugin-automd/src/types/toc.cjs +26 -0
  95. package/dist/plugin-automd/src/types/toc.mjs +25 -0
  96. package/dist/plugin-babel/src/helpers/ast-utils.cjs +74 -0
  97. package/dist/plugin-babel/src/helpers/ast-utils.mjs +70 -0
  98. package/dist/plugin-babel/src/helpers/create-plugin.cjs +71 -0
  99. package/dist/plugin-babel/src/helpers/create-plugin.mjs +69 -0
  100. package/dist/plugin-babel/src/helpers/filters.cjs +158 -0
  101. package/dist/plugin-babel/src/helpers/filters.mjs +154 -0
  102. package/dist/plugin-babel/src/helpers/index.cjs +5 -0
  103. package/dist/plugin-babel/src/helpers/index.mjs +7 -0
  104. package/dist/plugin-babel/src/helpers/module-helpers.cjs +200 -0
  105. package/dist/plugin-babel/src/helpers/module-helpers.mjs +192 -0
  106. package/dist/plugin-babel/src/helpers/options.cjs +73 -0
  107. package/dist/plugin-babel/src/helpers/options.mjs +70 -0
  108. package/dist/plugin-babel/src/index.cjs +125 -0
  109. package/dist/plugin-babel/src/index.mjs +123 -0
  110. package/dist/plugin-babel/src/types/plugin.cjs +42 -0
  111. package/dist/plugin-babel/src/types/plugin.mjs +39 -0
  112. package/dist/powerlines/src/internal/helpers/hooks.cjs +136 -0
  113. package/dist/powerlines/src/internal/helpers/hooks.mjs +134 -0
  114. package/dist/powerlines/src/lib/build/esbuild.cjs +142 -0
  115. package/dist/powerlines/src/lib/build/esbuild.mjs +140 -0
  116. package/dist/powerlines/src/lib/constants/environments.cjs +6 -0
  117. package/dist/powerlines/src/lib/constants/environments.mjs +5 -0
  118. package/dist/powerlines/src/lib/entry.cjs +195 -0
  119. package/dist/powerlines/src/lib/entry.mjs +194 -0
  120. package/dist/powerlines/src/lib/logger.cjs +108 -0
  121. package/dist/powerlines/src/lib/logger.mjs +106 -0
  122. package/dist/powerlines/src/lib/unplugin/helpers.cjs +41 -0
  123. package/dist/powerlines/src/lib/unplugin/helpers.mjs +40 -0
  124. package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +98 -0
  125. package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +97 -0
  126. package/dist/powerlines/src/lib/unplugin/plugin.cjs +139 -0
  127. package/dist/powerlines/src/lib/unplugin/plugin.mjs +138 -0
  128. package/dist/powerlines/src/lib/utilities/bundle.cjs +74 -0
  129. package/dist/powerlines/src/lib/utilities/bundle.mjs +72 -0
  130. package/dist/powerlines/src/lib/utilities/resolve.cjs +69 -0
  131. package/dist/powerlines/src/lib/utilities/resolve.mjs +68 -0
  132. package/dist/powerlines/src/lib/utilities/source-file.cjs +68 -0
  133. package/dist/powerlines/src/lib/utilities/source-file.mjs +66 -0
  134. package/dist/powerlines/src/plugin-utils/paths.cjs +46 -0
  135. package/dist/powerlines/src/plugin-utils/paths.mjs +45 -0
  136. package/dist/powerlines/src/types/api.cjs +62 -0
  137. package/dist/powerlines/src/types/api.mjs +62 -0
  138. package/dist/powerlines/src/types/babel.cjs +156 -0
  139. package/dist/powerlines/src/types/babel.mjs +147 -0
  140. package/dist/powerlines/src/types/build.cjs +127 -0
  141. package/dist/{packages/powerlines → powerlines}/src/types/build.d.mts +6 -6
  142. package/dist/powerlines/src/types/build.mjs +121 -0
  143. package/dist/powerlines/src/types/commands.cjs +16 -0
  144. package/dist/powerlines/src/types/commands.mjs +15 -0
  145. package/dist/powerlines/src/types/config.cjs +420 -0
  146. package/dist/{packages/powerlines → powerlines}/src/types/config.d.mts +2 -1
  147. package/dist/powerlines/src/types/config.mjs +397 -0
  148. package/dist/powerlines/src/types/context.cjs +388 -0
  149. package/dist/{packages/powerlines → powerlines}/src/types/context.d.mts +2 -2
  150. package/dist/powerlines/src/types/context.mjs +371 -0
  151. package/dist/powerlines/src/types/fs.cjs +78 -0
  152. package/dist/powerlines/src/types/fs.mjs +75 -0
  153. package/dist/powerlines/src/types/hooks.cjs +71 -0
  154. package/dist/powerlines/src/types/hooks.mjs +68 -0
  155. package/dist/powerlines/src/types/index.cjs +11 -0
  156. package/dist/powerlines/src/types/index.mjs +13 -0
  157. package/dist/powerlines/src/types/plugin.cjs +184 -0
  158. package/dist/{packages/powerlines → powerlines}/src/types/plugin.d.mts +1 -1
  159. package/dist/powerlines/src/types/plugin.mjs +178 -0
  160. package/dist/powerlines/src/types/resolved.cjs +149 -0
  161. package/dist/powerlines/src/types/resolved.mjs +144 -0
  162. package/dist/{packages/powerlines → powerlines}/src/types/tsconfig.d.mts +1 -1
  163. package/dist/powerlines/src/types/unplugin.cjs +64 -0
  164. package/dist/{packages/powerlines → powerlines}/src/types/unplugin.d.mts +1 -1
  165. package/dist/powerlines/src/types/unplugin.mjs +62 -0
  166. package/dist/types/plugin.cjs +18 -19
  167. package/dist/types/plugin.d.mts +6 -6
  168. package/dist/types/plugin.mjs +4 -4
  169. package/package.json +7 -7
  170. package/dist/_virtual/rolldown_runtime.mjs +0 -33
  171. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/parse-type-definition.cjs +0 -37
  172. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/parse-type-definition.mjs +0 -37
  173. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/to-array.cjs +0 -15
  174. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/to-array.mjs +0 -14
  175. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +0 -15
  176. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +0 -14
  177. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -3
  178. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -5
  179. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +0 -6
  180. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +0 -6
  181. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -1
  182. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -3
  183. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +0 -19
  184. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +0 -19
  185. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +0 -63
  186. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +0 -63
  187. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +0 -12
  188. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +0 -11
  189. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +0 -15
  190. package/dist/node_modules/.pnpm/@stryke_convert@0.6.35/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +0 -16
  191. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/is-parent-path.cjs +0 -32
  192. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/is-parent-path.mjs +0 -32
  193. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/is-type.cjs +0 -28
  194. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/is-type.mjs +0 -28
  195. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/join-paths.cjs +0 -106
  196. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/join-paths.mjs +0 -106
  197. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/regex.cjs +0 -12
  198. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/regex.mjs +0 -8
  199. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/slash.cjs +0 -15
  200. package/dist/node_modules/.pnpm/@stryke_path@0.26.0/node_modules/@stryke/path/dist/slash.mjs +0 -14
  201. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs +0 -346
  202. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs +0 -346
  203. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.cjs +0 -786
  204. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs +0 -786
  205. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.cjs +0 -3
  206. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.mjs +0 -3
  207. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.cjs +0 -23
  208. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs +0 -22
  209. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.cjs +0 -405
  210. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs +0 -404
  211. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.cjs +0 -657
  212. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs +0 -657
  213. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.cjs +0 -1054
  214. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs +0 -1054
  215. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +0 -43
  216. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +0 -42
  217. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +0 -46
  218. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +0 -45
  219. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.cjs +0 -288
  220. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs +0 -285
  221. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.cjs +0 -71
  222. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs +0 -68
  223. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +0 -1013
  224. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +0 -1007
  225. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +0 -23
  226. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +0 -13
  227. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +0 -2698
  228. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +0 -2685
  229. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs +0 -4457
  230. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +0 -4454
  231. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +0 -29
  232. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +0 -29
  233. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -181
  234. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -176
  235. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +0 -22
  236. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +0 -17
  237. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +0 -3967
  238. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +0 -3962
  239. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +0 -11768
  240. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +0 -11763
  241. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +0 -25
  242. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +0 -20
  243. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +0 -20
  244. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +0 -17
  245. package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.cjs +0 -194
  246. package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.mjs +0 -191
  247. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs +0 -13
  248. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs +0 -12
  249. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.cjs +0 -3
  250. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs +0 -3
  251. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +0 -145
  252. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -138
  253. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +0 -127
  254. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +0 -125
  255. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +0 -138
  256. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +0 -136
  257. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +0 -629
  258. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +0 -627
  259. /package/dist/{packages/deepkit → deepkit}/schemas/reflection.d.mts +0 -0
  260. /package/dist/{packages/deepkit → deepkit}/src/types.d.mts +0 -0
  261. /package/dist/{packages/plugin-alloy → plugin-alloy}/src/core/components/source-file.d.mts +0 -0
  262. /package/dist/{packages/plugin-alloy → plugin-alloy}/src/markdown/components/markdown-file.d.mts +0 -0
  263. /package/dist/{packages/plugin-alloy → plugin-alloy}/src/types/index.d.mts +0 -0
  264. /package/dist/{packages/plugin-alloy → plugin-alloy}/src/types/plugin.d.mts +0 -0
  265. /package/dist/{packages/plugin-alloy → plugin-alloy}/src/typescript/components/builtin-file.d.mts +0 -0
  266. /package/dist/{packages/plugin-automd → plugin-automd}/src/types/plugin.d.mts +0 -0
  267. /package/dist/{packages/plugin-automd → plugin-automd}/src/types/toc.d.mts +0 -0
  268. /package/dist/{packages/plugin-babel → plugin-babel}/src/types/index.d.mts +0 -0
  269. /package/dist/{packages/plugin-babel → plugin-babel}/src/types/plugin.d.mts +0 -0
  270. /package/dist/{packages/powerlines → powerlines}/src/internal/helpers/hooks.d.mts +0 -0
  271. /package/dist/{packages/powerlines → powerlines}/src/types/api.d.mts +0 -0
  272. /package/dist/{packages/powerlines → powerlines}/src/types/babel.d.mts +0 -0
  273. /package/dist/{packages/powerlines → powerlines}/src/types/commands.d.mts +0 -0
  274. /package/dist/{packages/powerlines → powerlines}/src/types/fs.d.mts +0 -0
  275. /package/dist/{packages/powerlines → powerlines}/src/types/hooks.d.mts +0 -0
  276. /package/dist/{packages/powerlines → powerlines}/src/types/index.d.mts +0 -0
  277. /package/dist/{packages/powerlines → powerlines}/src/types/resolved.d.mts +0 -0
@@ -0,0 +1,136 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_context = require('../../types/context.cjs');
3
+ const require_hooks = require('../../types/hooks.cjs');
4
+ let defu = require("defu");
5
+ let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
6
+ let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
7
+ let __stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
8
+ let __stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
9
+ let chalk = require("chalk");
10
+ chalk = require_rolldown_runtime.__toESM(chalk);
11
+
12
+ //#region ../powerlines/src/internal/helpers/hooks.ts
13
+ function __assignType(fn, args) {
14
+ fn.__type = args;
15
+ return fn;
16
+ }
17
+ const __ΩCallHookOptions = [
18
+ () => require_context.__ΩSelectHooksOptions,
19
+ true,
20
+ "sequential",
21
+ true,
22
+ "Whether to call the hooks sequentially or in parallel.",
23
+ "first",
24
+ "result",
25
+ "merge",
26
+ "How to handle multiple return values from hooks.\n- \"merge\": Merge all non-undefined return values (if they are objects).\n- \"first\": Return the first non-undefined value.",
27
+ "merge",
28
+ "last",
29
+ false,
30
+ "previousResult",
31
+ "",
32
+ "asNextParam",
33
+ "An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter",
34
+ false,
35
+ "CallHookOptions",
36
+ "Pn!PPP.\"4#8>$?%MPP.&4'>(?)MPP.*.+J4'8>(?)P.,P\"2-!/.J4/8?0MJKP.14#?%MJKw2y"
37
+ ];
38
+ const mergeResults = (0, defu.createDefu)(__assignType((obj, key, value) => {
39
+ if ((0, __stryke_type_checks_is_string.isString)(obj[key]) && (0, __stryke_type_checks_is_string.isString)(value)) {
40
+ obj[key] = `${obj[key] || ""}\n${value || ""}`.trim();
41
+ return true;
42
+ }
43
+ return false;
44
+ }, [
45
+ "obj",
46
+ "key",
47
+ "value",
48
+ "",
49
+ "P\"2!\"g2\"\"2#\"/$"
50
+ ]));
51
+ /**
52
+ * Calls a hook with the given context, options, and arguments.
53
+ *
54
+ * @param context - The context to use when calling the hook.
55
+ * @param key - The hook to call.
56
+ * @param options - Options for calling the hook.
57
+ * @param args - Arguments to pass to the hook.
58
+ * @returns The return value of the hook.
59
+ */
60
+ async function callHook(context, key, options, ...args) {
61
+ const hooks = context.selectHooks(key, options);
62
+ if (hooks.length > 0) {
63
+ context.debug(` 🧩 Calling plugin hook: ${chalk.default.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)}`);
64
+ const invokeHook = __assignType(async (hook, hookArgs) => {
65
+ return Reflect.apply(hook.handler, hook.context, hookArgs);
66
+ }, [
67
+ "hook",
68
+ () => require_hooks.__ΩInferHookParameters,
69
+ () => require_context.__ΩPluginContext,
70
+ () => context,
71
+ () => require_context.__ΩEnvironmentContext,
72
+ () => args,
73
+ () => require_hooks.__ΩInferHookParameters,
74
+ () => require_context.__ΩPluginContext,
75
+ () => args,
76
+ () => require_hooks.__ΩInferHookParameters,
77
+ () => require_context.__ΩPluginContext,
78
+ "hookArgs",
79
+ "",
80
+ "P!2!Pdi$h!!o%\"qe!!!jPdi&h!!o(\"\"o'#qe!!!jo#\"Pdi)\"o+\"h!!o*#qe!!!jo\"#2,\"/-"
81
+ ]);
82
+ let results = [];
83
+ if (options?.sequential === false) results = await Promise.all(hooks.map(__assignType(async (hook) => {
84
+ if (!(0, __stryke_type_checks_is_function.isFunction)(hook.handler)) throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
85
+ return invokeHook(hook, [...args]);
86
+ }, [
87
+ "hook",
88
+ "",
89
+ "P\"2!\"/\""
90
+ ])));
91
+ else for (const hook of hooks) {
92
+ if (!(0, __stryke_type_checks_is_function.isFunction)(hook.handler)) throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
93
+ if (options?.result === "first" || options?.asNextParam === false) {
94
+ results.push(await Promise.resolve(invokeHook(hook, [...args])));
95
+ if (options?.result === "first" && (0, __stryke_type_checks_is_set.isSet)(results[results.length - 1])) break;
96
+ } else {
97
+ const sequenceArgs = [...args];
98
+ if (results.length > 0 && sequenceArgs.length > 0) sequenceArgs[0] = (0, __stryke_type_checks_is_function.isFunction)(options.asNextParam) ? await Promise.resolve(options.asNextParam(results[0])) : results[0];
99
+ const result = await Promise.resolve(invokeHook(hook, [...sequenceArgs]));
100
+ if (result) {
101
+ if (options?.result === "last") results = [result];
102
+ else if ((0, __stryke_type_checks_is_string.isString)(result)) results = [`${(0, __stryke_type_checks_is_string.isString)(results[0]) ? results[0] || "" : ""}\n${result || ""}`.trim()];
103
+ else if ((0, __stryke_type_checks_is_object.isObject)(result)) results = [mergeResults(result, results[0] ?? {})];
104
+ }
105
+ }
106
+ }
107
+ const definedResults = results.filter(__assignType((result) => (0, __stryke_type_checks_is_set.isSet)(result), [
108
+ "result",
109
+ "",
110
+ "P\"2!!/\""
111
+ ]));
112
+ if (definedResults.length > 0) {
113
+ let mergedResult = void 0;
114
+ for (const result of definedResults) mergedResult = (0, defu.defu)(result, mergedResult ?? {});
115
+ return mergedResult;
116
+ }
117
+ }
118
+ }
119
+ callHook.__type = [
120
+ () => require_context.__ΩEnvironmentContext,
121
+ "context",
122
+ "key",
123
+ () => __ΩCallHookOptions,
124
+ "options",
125
+ () => require_hooks.__ΩInferHookParameters,
126
+ () => require_context.__ΩPluginContext,
127
+ "args",
128
+ () => require_hooks.__ΩInferHookReturnType,
129
+ () => require_context.__ΩPluginContext,
130
+ "callHook",
131
+ "Calls a hook with the given context, options, and arguments.",
132
+ "P\"o!\"2\"\"2#n$2%\"o'\"\"o&#@2(P\"o*\"\"o)#-J`/+?,"
133
+ ];
134
+
135
+ //#endregion
136
+ exports.__ΩCallHookOptions = __ΩCallHookOptions;
@@ -0,0 +1,134 @@
1
+ import { __ΩEnvironmentContext, __ΩPluginContext, __ΩSelectHooksOptions } from "../../types/context.mjs";
2
+ import { __ΩInferHookParameters, __ΩInferHookReturnType } from "../../types/hooks.mjs";
3
+ import { createDefu, defu } from "defu";
4
+ import { isString } from "@stryke/type-checks/is-string";
5
+ import { isFunction } from "@stryke/type-checks/is-function";
6
+ import { isObject } from "@stryke/type-checks/is-object";
7
+ import { isSet } from "@stryke/type-checks/is-set";
8
+ import chalk from "chalk";
9
+
10
+ //#region ../powerlines/src/internal/helpers/hooks.ts
11
+ function __assignType(fn, args) {
12
+ fn.__type = args;
13
+ return fn;
14
+ }
15
+ const __ΩCallHookOptions = [
16
+ () => __ΩSelectHooksOptions,
17
+ true,
18
+ "sequential",
19
+ true,
20
+ "Whether to call the hooks sequentially or in parallel.",
21
+ "first",
22
+ "result",
23
+ "merge",
24
+ "How to handle multiple return values from hooks.\n- \"merge\": Merge all non-undefined return values (if they are objects).\n- \"first\": Return the first non-undefined value.",
25
+ "merge",
26
+ "last",
27
+ false,
28
+ "previousResult",
29
+ "",
30
+ "asNextParam",
31
+ "An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter",
32
+ false,
33
+ "CallHookOptions",
34
+ "Pn!PPP.\"4#8>$?%MPP.&4'>(?)MPP.*.+J4'8>(?)P.,P\"2-!/.J4/8?0MJKP.14#?%MJKw2y"
35
+ ];
36
+ const mergeResults = createDefu(__assignType((obj, key, value) => {
37
+ if (isString(obj[key]) && isString(value)) {
38
+ obj[key] = `${obj[key] || ""}\n${value || ""}`.trim();
39
+ return true;
40
+ }
41
+ return false;
42
+ }, [
43
+ "obj",
44
+ "key",
45
+ "value",
46
+ "",
47
+ "P\"2!\"g2\"\"2#\"/$"
48
+ ]));
49
+ /**
50
+ * Calls a hook with the given context, options, and arguments.
51
+ *
52
+ * @param context - The context to use when calling the hook.
53
+ * @param key - The hook to call.
54
+ * @param options - Options for calling the hook.
55
+ * @param args - Arguments to pass to the hook.
56
+ * @returns The return value of the hook.
57
+ */
58
+ async function callHook(context, key, options, ...args) {
59
+ const hooks = context.selectHooks(key, options);
60
+ if (hooks.length > 0) {
61
+ context.debug(` 🧩 Calling plugin hook: ${chalk.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)}`);
62
+ const invokeHook = __assignType(async (hook, hookArgs) => {
63
+ return Reflect.apply(hook.handler, hook.context, hookArgs);
64
+ }, [
65
+ "hook",
66
+ () => __ΩInferHookParameters,
67
+ () => __ΩPluginContext,
68
+ () => context,
69
+ () => __ΩEnvironmentContext,
70
+ () => args,
71
+ () => __ΩInferHookParameters,
72
+ () => __ΩPluginContext,
73
+ () => args,
74
+ () => __ΩInferHookParameters,
75
+ () => __ΩPluginContext,
76
+ "hookArgs",
77
+ "",
78
+ "P!2!Pdi$h!!o%\"qe!!!jPdi&h!!o(\"\"o'#qe!!!jo#\"Pdi)\"o+\"h!!o*#qe!!!jo\"#2,\"/-"
79
+ ]);
80
+ let results = [];
81
+ if (options?.sequential === false) results = await Promise.all(hooks.map(__assignType(async (hook) => {
82
+ if (!isFunction(hook.handler)) throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
83
+ return invokeHook(hook, [...args]);
84
+ }, [
85
+ "hook",
86
+ "",
87
+ "P\"2!\"/\""
88
+ ])));
89
+ else for (const hook of hooks) {
90
+ if (!isFunction(hook.handler)) throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
91
+ if (options?.result === "first" || options?.asNextParam === false) {
92
+ results.push(await Promise.resolve(invokeHook(hook, [...args])));
93
+ if (options?.result === "first" && isSet(results[results.length - 1])) break;
94
+ } else {
95
+ const sequenceArgs = [...args];
96
+ if (results.length > 0 && sequenceArgs.length > 0) sequenceArgs[0] = isFunction(options.asNextParam) ? await Promise.resolve(options.asNextParam(results[0])) : results[0];
97
+ const result = await Promise.resolve(invokeHook(hook, [...sequenceArgs]));
98
+ if (result) {
99
+ if (options?.result === "last") results = [result];
100
+ else if (isString(result)) results = [`${isString(results[0]) ? results[0] || "" : ""}\n${result || ""}`.trim()];
101
+ else if (isObject(result)) results = [mergeResults(result, results[0] ?? {})];
102
+ }
103
+ }
104
+ }
105
+ const definedResults = results.filter(__assignType((result) => isSet(result), [
106
+ "result",
107
+ "",
108
+ "P\"2!!/\""
109
+ ]));
110
+ if (definedResults.length > 0) {
111
+ let mergedResult = void 0;
112
+ for (const result of definedResults) mergedResult = defu(result, mergedResult ?? {});
113
+ return mergedResult;
114
+ }
115
+ }
116
+ }
117
+ callHook.__type = [
118
+ () => __ΩEnvironmentContext,
119
+ "context",
120
+ "key",
121
+ () => __ΩCallHookOptions,
122
+ "options",
123
+ () => __ΩInferHookParameters,
124
+ () => __ΩPluginContext,
125
+ "args",
126
+ () => __ΩInferHookReturnType,
127
+ () => __ΩPluginContext,
128
+ "callHook",
129
+ "Calls a hook with the given context, options, and arguments.",
130
+ "P\"o!\"2\"\"2#n$2%\"o'\"\"o&#@2(P\"o*\"\"o)#-J`/+?,"
131
+ ];
132
+
133
+ //#endregion
134
+ export { __ΩCallHookOptions };
@@ -0,0 +1,142 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
+ const require_context = require('../../types/context.cjs');
3
+ const require_build = require('../../types/build.cjs');
4
+ const require_entry = require('../entry.cjs');
5
+ let __stryke_path_join_paths = require("@stryke/path/join-paths");
6
+ let defu = require("defu");
7
+ defu = require_rolldown_runtime.__toESM(defu);
8
+ let __stryke_helpers_omit = require("@stryke/helpers/omit");
9
+ let __stryke_path_replace = require("@stryke/path/replace");
10
+ let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
11
+ let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
12
+
13
+ //#region ../powerlines/src/lib/build/esbuild.ts
14
+ function __assignType(fn, args) {
15
+ fn.__type = args;
16
+ return fn;
17
+ }
18
+ const DEFAULT_ESBUILD_CONFIG = {
19
+ target: "esnext",
20
+ platform: "neutral",
21
+ format: "esm",
22
+ write: true,
23
+ minify: true,
24
+ sourcemap: false,
25
+ bundle: true,
26
+ treeShaking: true,
27
+ keepNames: true,
28
+ splitting: true,
29
+ logLevel: "silent"
30
+ };
31
+ /**
32
+ * Resolves the entry options for esbuild.
33
+ *
34
+ * @param context - The build context.
35
+ * @param entryPoints - The entry points to resolve.
36
+ * @returns The resolved entry options.
37
+ */
38
+ function resolveESBuildEntry(context, entryPoints = []) {
39
+ return entryPoints.reduce(__assignType((ret, entry) => {
40
+ if ((0, __stryke_type_checks_is_string.isString)(entry)) ret[(0, __stryke_path_replace.replaceExtension)((0, __stryke_path_replace.replacePath)(entry, context.config.sourceRoot || context.config.projectRoot))] = (0, __stryke_path_replace.replacePath)(entry, context.config.sourceRoot || context.config.projectRoot);
41
+ else ret[entry.output || require_entry.resolveEntryOutput(context, entry)] = entry.file;
42
+ return ret;
43
+ }, [
44
+ "ret",
45
+ "entry",
46
+ "",
47
+ "P\"2!\"2\"\"/#"
48
+ ]), {});
49
+ }
50
+ resolveESBuildEntry.__type = [
51
+ () => require_context.__ΩContext,
52
+ "context",
53
+ "ResolvedEntryTypeDefinition",
54
+ "entryPoints",
55
+ () => [],
56
+ () => require_build.__ΩESBuildResolvedBuildConfig,
57
+ "entryPoints",
58
+ "resolveESBuildEntry",
59
+ "Resolves the entry options for esbuild.",
60
+ "Pn!2\"P\"w#F&FJ2$>%n&.'f/(?)"
61
+ ];
62
+ /**
63
+ * Resolves the esbuild options.
64
+ *
65
+ * @param context - The build context.
66
+ * @returns The resolved esbuild options.
67
+ */
68
+ function extractESBuildConfig(context) {
69
+ const inject = context.config.build.override.inject ?? context.config.build.inject;
70
+ if (inject && Object.keys(inject).length > 0) context.fs.writeSync((0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js"), Object.entries(inject).map(__assignType(([key, value]) => {
71
+ if (value) if (Array.isArray(value)) {
72
+ if ((0, __stryke_string_format_camel_case.camelCase)(key) !== key) {
73
+ if (value.length === 1) return `
74
+ import ${(0, __stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
75
+ export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
76
+ else if (value.length > 1) return `
77
+ import ${value[1] === "*" ? `* as ${(0, __stryke_string_format_camel_case.camelCase)(key)}` : `{ ${value[1]} as ${(0, __stryke_string_format_camel_case.camelCase)(key)} }`} from "${value[0]}";
78
+ export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
79
+ } else if (value.length === 1) return `
80
+ import ${key} from "${value[0]}";
81
+ export { ${key} };`;
82
+ else if (value.length > 1) return `
83
+ import ${value[1] === "*" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from "${value[0]}";
84
+ export { ${key} };`;
85
+ } else if ((0, __stryke_string_format_camel_case.camelCase)(key) !== key) return `
86
+ import ${(0, __stryke_string_format_camel_case.camelCase)(key)} from "${value[0]}";
87
+ export { ${(0, __stryke_string_format_camel_case.camelCase)(key)} as "${key}" }`;
88
+ else return `
89
+ import ${key} from "${value}";
90
+ export { ${key} };`;
91
+ return "";
92
+ }, [
93
+ "param0",
94
+ "",
95
+ "P\"2!\"/\""
96
+ ])).join("\n"));
97
+ return (0, defu.default)({
98
+ alias: context.alias,
99
+ inject: inject && Object.keys(inject).length > 0 ? [(0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js")] : void 0
100
+ }, context.config.build.variant === "esbuild" ? (0, __stryke_helpers_omit.omit)(context.config.build.override, [
101
+ "alias",
102
+ "inject",
103
+ "external",
104
+ "noExternal",
105
+ "skipNodeModulesBundle",
106
+ "extensions"
107
+ ]) : {}, context.config.build.variant === "esbuild" ? (0, __stryke_helpers_omit.omit)(context.config.build, [
108
+ "alias",
109
+ "inject",
110
+ "external",
111
+ "noExternal",
112
+ "skipNodeModulesBundle",
113
+ "extensions",
114
+ "variant",
115
+ "override"
116
+ ]) : {}, {
117
+ mainFields: context.config.build.mainFields,
118
+ conditions: context.config.build.conditions,
119
+ define: context.config.build.define,
120
+ resolveExtensions: context.config.build.extensions,
121
+ packages: context.config.build.skipNodeModulesBundle ? "external" : context.config.build.variant === "esbuild" ? context.config.build.packages : void 0,
122
+ format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
123
+ platform: context.config.build.platform,
124
+ treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
125
+ outdir: context.config.output.buildPath,
126
+ tsconfig: context.tsconfig.tsconfigFilePath,
127
+ minify: context.config.mode !== "development",
128
+ metafile: context.config.mode === "development",
129
+ sourcemap: context.config.mode === "development"
130
+ }, DEFAULT_ESBUILD_CONFIG);
131
+ }
132
+ extractESBuildConfig.__type = [
133
+ () => require_context.__ΩContext,
134
+ "context",
135
+ "BuildOptions",
136
+ "extractESBuildConfig",
137
+ "Resolves the esbuild options.",
138
+ "Pn!2\"\"w#/$?%"
139
+ ];
140
+
141
+ //#endregion
142
+ exports.extractESBuildConfig = extractESBuildConfig;
@@ -0,0 +1,140 @@
1
+ import { __ΩContext } from "../../types/context.mjs";
2
+ import { __ΩESBuildResolvedBuildConfig } from "../../types/build.mjs";
3
+ import { resolveEntryOutput } from "../entry.mjs";
4
+ import { joinPaths } from "@stryke/path/join-paths";
5
+ import defu$1 from "defu";
6
+ import { omit } from "@stryke/helpers/omit";
7
+ import { replaceExtension, replacePath } from "@stryke/path/replace";
8
+ import { camelCase } from "@stryke/string-format/camel-case";
9
+ import { isString } from "@stryke/type-checks/is-string";
10
+
11
+ //#region ../powerlines/src/lib/build/esbuild.ts
12
+ function __assignType(fn, args) {
13
+ fn.__type = args;
14
+ return fn;
15
+ }
16
+ const DEFAULT_ESBUILD_CONFIG = {
17
+ target: "esnext",
18
+ platform: "neutral",
19
+ format: "esm",
20
+ write: true,
21
+ minify: true,
22
+ sourcemap: false,
23
+ bundle: true,
24
+ treeShaking: true,
25
+ keepNames: true,
26
+ splitting: true,
27
+ logLevel: "silent"
28
+ };
29
+ /**
30
+ * Resolves the entry options for esbuild.
31
+ *
32
+ * @param context - The build context.
33
+ * @param entryPoints - The entry points to resolve.
34
+ * @returns The resolved entry options.
35
+ */
36
+ function resolveESBuildEntry(context, entryPoints = []) {
37
+ return entryPoints.reduce(__assignType((ret, entry) => {
38
+ if (isString(entry)) ret[replaceExtension(replacePath(entry, context.config.sourceRoot || context.config.projectRoot))] = replacePath(entry, context.config.sourceRoot || context.config.projectRoot);
39
+ else ret[entry.output || resolveEntryOutput(context, entry)] = entry.file;
40
+ return ret;
41
+ }, [
42
+ "ret",
43
+ "entry",
44
+ "",
45
+ "P\"2!\"2\"\"/#"
46
+ ]), {});
47
+ }
48
+ resolveESBuildEntry.__type = [
49
+ () => __ΩContext,
50
+ "context",
51
+ "ResolvedEntryTypeDefinition",
52
+ "entryPoints",
53
+ () => [],
54
+ () => __ΩESBuildResolvedBuildConfig,
55
+ "entryPoints",
56
+ "resolveESBuildEntry",
57
+ "Resolves the entry options for esbuild.",
58
+ "Pn!2\"P\"w#F&FJ2$>%n&.'f/(?)"
59
+ ];
60
+ /**
61
+ * Resolves the esbuild options.
62
+ *
63
+ * @param context - The build context.
64
+ * @returns The resolved esbuild options.
65
+ */
66
+ function extractESBuildConfig(context) {
67
+ const inject = context.config.build.override.inject ?? context.config.build.inject;
68
+ if (inject && Object.keys(inject).length > 0) context.fs.writeSync(joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js"), Object.entries(inject).map(__assignType(([key, value]) => {
69
+ if (value) if (Array.isArray(value)) {
70
+ if (camelCase(key) !== key) {
71
+ if (value.length === 1) return `
72
+ import ${camelCase(key)} from "${value[0]}";
73
+ export { ${camelCase(key)} as "${key}" }`;
74
+ else if (value.length > 1) return `
75
+ import ${value[1] === "*" ? `* as ${camelCase(key)}` : `{ ${value[1]} as ${camelCase(key)} }`} from "${value[0]}";
76
+ export { ${camelCase(key)} as "${key}" }`;
77
+ } else if (value.length === 1) return `
78
+ import ${key} from "${value[0]}";
79
+ export { ${key} };`;
80
+ else if (value.length > 1) return `
81
+ import ${value[1] === "*" ? `* as ${key}` : `{ ${value[1]} as ${key} }`} from "${value[0]}";
82
+ export { ${key} };`;
83
+ } else if (camelCase(key) !== key) return `
84
+ import ${camelCase(key)} from "${value[0]}";
85
+ export { ${camelCase(key)} as "${key}" }`;
86
+ else return `
87
+ import ${key} from "${value}";
88
+ export { ${key} };`;
89
+ return "";
90
+ }, [
91
+ "param0",
92
+ "",
93
+ "P\"2!\"/\""
94
+ ])).join("\n"));
95
+ return defu$1({
96
+ alias: context.alias,
97
+ inject: inject && Object.keys(inject).length > 0 ? [joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js")] : void 0
98
+ }, context.config.build.variant === "esbuild" ? omit(context.config.build.override, [
99
+ "alias",
100
+ "inject",
101
+ "external",
102
+ "noExternal",
103
+ "skipNodeModulesBundle",
104
+ "extensions"
105
+ ]) : {}, context.config.build.variant === "esbuild" ? omit(context.config.build, [
106
+ "alias",
107
+ "inject",
108
+ "external",
109
+ "noExternal",
110
+ "skipNodeModulesBundle",
111
+ "extensions",
112
+ "variant",
113
+ "override"
114
+ ]) : {}, {
115
+ mainFields: context.config.build.mainFields,
116
+ conditions: context.config.build.conditions,
117
+ define: context.config.build.define,
118
+ resolveExtensions: context.config.build.extensions,
119
+ packages: context.config.build.skipNodeModulesBundle ? "external" : context.config.build.variant === "esbuild" ? context.config.build.packages : void 0,
120
+ format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
121
+ platform: context.config.build.platform,
122
+ treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
123
+ outdir: context.config.output.buildPath,
124
+ tsconfig: context.tsconfig.tsconfigFilePath,
125
+ minify: context.config.mode !== "development",
126
+ metafile: context.config.mode === "development",
127
+ sourcemap: context.config.mode === "development"
128
+ }, DEFAULT_ESBUILD_CONFIG);
129
+ }
130
+ extractESBuildConfig.__type = [
131
+ () => __ΩContext,
132
+ "context",
133
+ "BuildOptions",
134
+ "extractESBuildConfig",
135
+ "Resolves the esbuild options.",
136
+ "Pn!2\"\"w#/$?%"
137
+ ];
138
+
139
+ //#endregion
140
+ export { extractESBuildConfig };
@@ -0,0 +1,6 @@
1
+
2
+ //#region ../powerlines/src/lib/constants/environments.ts
3
+ const DEFAULT_ENVIRONMENT = "default";
4
+
5
+ //#endregion
6
+ exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT;
@@ -0,0 +1,5 @@
1
+ //#region ../powerlines/src/lib/constants/environments.ts
2
+ const DEFAULT_ENVIRONMENT = "default";
3
+
4
+ //#endregion
5
+ export { DEFAULT_ENVIRONMENT };