@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,137 +0,0 @@
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 __storm_software_config_tools_types = require("@storm-software/config-tools/types");
6
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
7
- let __stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
8
- let chalk = require("chalk");
9
- chalk = require_rolldown_runtime.__toESM(chalk);
10
- let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
11
- let __stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
12
-
13
- //#region ../powerlines/src/internal/helpers/hooks.ts
14
- function __assignType(fn, args) {
15
- fn.__type = args;
16
- return fn;
17
- }
18
- const __ΩCallHookOptions = [
19
- () => require_context.__ΩSelectHooksOptions,
20
- true,
21
- "sequential",
22
- true,
23
- "Whether to call the hooks sequentially or in parallel.",
24
- "first",
25
- "result",
26
- "merge",
27
- "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.",
28
- "merge",
29
- "last",
30
- false,
31
- "previousResult",
32
- "",
33
- "asNextParam",
34
- "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",
35
- false,
36
- "CallHookOptions",
37
- "Pn!PPP.\"4#8>$?%MPP.&4'>(?)MPP.*.+J4'8>(?)P.,P\"2-!/.J4/8?0MJKP.14#?%MJKw2y"
38
- ];
39
- const mergeResults = (0, defu.createDefu)(__assignType((obj, key, value) => {
40
- if ((0, __stryke_type_checks_is_string.isString)(obj[key]) && (0, __stryke_type_checks_is_string.isString)(value)) {
41
- obj[key] = `${obj[key] || ""}\n${value || ""}`.trim();
42
- return true;
43
- }
44
- return false;
45
- }, [
46
- "obj",
47
- "key",
48
- "value",
49
- "",
50
- "P\"2!\"g2\"\"2#\"/$"
51
- ]));
52
- /**
53
- * Calls a hook with the given context, options, and arguments.
54
- *
55
- * @param context - The context to use when calling the hook.
56
- * @param key - The hook to call.
57
- * @param options - Options for calling the hook.
58
- * @param args - Arguments to pass to the hook.
59
- * @returns The return value of the hook.
60
- */
61
- async function callHook(context, key, options, ...args) {
62
- const hooks = context.selectHooks(key, options);
63
- if (hooks.length > 0) {
64
- context.log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, ` 🧩 Calling plugin hook: ${chalk.default.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)}`);
65
- const invokeHook = __assignType(async (hook, hookArgs) => {
66
- return Reflect.apply(hook.handler, hook.context, hookArgs);
67
- }, [
68
- "hook",
69
- () => require_hooks.__ΩInferHookParameters,
70
- () => require_context.__ΩPluginContext,
71
- () => context,
72
- () => require_context.__ΩEnvironmentContext,
73
- () => args,
74
- () => require_hooks.__ΩInferHookParameters,
75
- () => require_context.__ΩPluginContext,
76
- () => args,
77
- () => require_hooks.__ΩInferHookParameters,
78
- () => require_context.__ΩPluginContext,
79
- "hookArgs",
80
- "",
81
- "P!2!Pdi$h!!o%\"qe!!!jPdi&h!!o(\"\"o'#qe!!!jo#\"Pdi)\"o+\"h!!o*#qe!!!jo\"#2,\"/-"
82
- ]);
83
- let results = [];
84
- if (options?.sequential === false) results = await Promise.all(hooks.map(__assignType(async (hook) => {
85
- if (!(0, __stryke_type_checks_is_function.isFunction)(hook.handler)) throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
86
- return invokeHook(hook, [...args]);
87
- }, [
88
- "hook",
89
- "",
90
- "P\"2!\"/\""
91
- ])));
92
- else for (const hook of hooks) {
93
- if (!(0, __stryke_type_checks_is_function.isFunction)(hook.handler)) throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
94
- if (options?.result === "first" || options?.asNextParam === false) {
95
- results.push(await Promise.resolve(invokeHook(hook, [...args])));
96
- if (options?.result === "first" && (0, __stryke_type_checks_is_set.isSet)(results[results.length - 1])) break;
97
- } else {
98
- const sequenceArgs = [...args];
99
- 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];
100
- const result = await Promise.resolve(invokeHook(hook, [...sequenceArgs]));
101
- if (result) {
102
- if (options?.result === "last") results = [result];
103
- 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()];
104
- else if ((0, __stryke_type_checks_is_object.isObject)(result)) results = [mergeResults(result, results[0] ?? {})];
105
- }
106
- }
107
- }
108
- const definedResults = results.filter(__assignType((result) => (0, __stryke_type_checks_is_set.isSet)(result), [
109
- "result",
110
- "",
111
- "P\"2!!/\""
112
- ]));
113
- if (definedResults.length > 0) {
114
- let mergedResult = void 0;
115
- for (const result of definedResults) mergedResult = (0, defu.defu)(result, mergedResult ?? {});
116
- return mergedResult;
117
- }
118
- }
119
- }
120
- callHook.__type = [
121
- () => require_context.__ΩEnvironmentContext,
122
- "context",
123
- "key",
124
- () => __ΩCallHookOptions,
125
- "options",
126
- () => require_hooks.__ΩInferHookParameters,
127
- () => require_context.__ΩPluginContext,
128
- "args",
129
- () => require_hooks.__ΩInferHookReturnType,
130
- () => require_context.__ΩPluginContext,
131
- "callHook",
132
- "Calls a hook with the given context, options, and arguments.",
133
- "P\"o!\"2\"\"2#n$2%\"o'\"\"o&#@2(P\"o*\"\"o)#-J`/+?,"
134
- ];
135
-
136
- //#endregion
137
- exports.__ΩCallHookOptions = __ΩCallHookOptions;
@@ -1,135 +0,0 @@
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 { LogLevelLabel } from "@storm-software/config-tools/types";
5
- import { isString } from "@stryke/type-checks/is-string";
6
- import { isSet } from "@stryke/type-checks/is-set";
7
- import chalk from "chalk";
8
- import { isFunction } from "@stryke/type-checks/is-function";
9
- import { isObject } from "@stryke/type-checks/is-object";
10
-
11
- //#region ../powerlines/src/internal/helpers/hooks.ts
12
- function __assignType(fn, args) {
13
- fn.__type = args;
14
- return fn;
15
- }
16
- const __ΩCallHookOptions = [
17
- () => __ΩSelectHooksOptions,
18
- true,
19
- "sequential",
20
- true,
21
- "Whether to call the hooks sequentially or in parallel.",
22
- "first",
23
- "result",
24
- "merge",
25
- "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.",
26
- "merge",
27
- "last",
28
- false,
29
- "previousResult",
30
- "",
31
- "asNextParam",
32
- "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",
33
- false,
34
- "CallHookOptions",
35
- "Pn!PPP.\"4#8>$?%MPP.&4'>(?)MPP.*.+J4'8>(?)P.,P\"2-!/.J4/8?0MJKP.14#?%MJKw2y"
36
- ];
37
- const mergeResults = createDefu(__assignType((obj, key, value) => {
38
- if (isString(obj[key]) && isString(value)) {
39
- obj[key] = `${obj[key] || ""}\n${value || ""}`.trim();
40
- return true;
41
- }
42
- return false;
43
- }, [
44
- "obj",
45
- "key",
46
- "value",
47
- "",
48
- "P\"2!\"g2\"\"2#\"/$"
49
- ]));
50
- /**
51
- * Calls a hook with the given context, options, and arguments.
52
- *
53
- * @param context - The context to use when calling the hook.
54
- * @param key - The hook to call.
55
- * @param options - Options for calling the hook.
56
- * @param args - Arguments to pass to the hook.
57
- * @returns The return value of the hook.
58
- */
59
- async function callHook(context, key, options, ...args) {
60
- const hooks = context.selectHooks(key, options);
61
- if (hooks.length > 0) {
62
- context.log(LogLevelLabel.DEBUG, ` 🧩 Calling plugin hook: ${chalk.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)}`);
63
- const invokeHook = __assignType(async (hook, hookArgs) => {
64
- return Reflect.apply(hook.handler, hook.context, hookArgs);
65
- }, [
66
- "hook",
67
- () => __ΩInferHookParameters,
68
- () => __ΩPluginContext,
69
- () => context,
70
- () => __ΩEnvironmentContext,
71
- () => args,
72
- () => __ΩInferHookParameters,
73
- () => __ΩPluginContext,
74
- () => args,
75
- () => __ΩInferHookParameters,
76
- () => __ΩPluginContext,
77
- "hookArgs",
78
- "",
79
- "P!2!Pdi$h!!o%\"qe!!!jPdi&h!!o(\"\"o'#qe!!!jo#\"Pdi)\"o+\"h!!o*#qe!!!jo\"#2,\"/-"
80
- ]);
81
- let results = [];
82
- if (options?.sequential === false) results = await Promise.all(hooks.map(__assignType(async (hook) => {
83
- if (!isFunction(hook.handler)) throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
84
- return invokeHook(hook, [...args]);
85
- }, [
86
- "hook",
87
- "",
88
- "P\"2!\"/\""
89
- ])));
90
- else for (const hook of hooks) {
91
- if (!isFunction(hook.handler)) throw new Error(`Plugin hook handler for hook "${key}" is not a function.`);
92
- if (options?.result === "first" || options?.asNextParam === false) {
93
- results.push(await Promise.resolve(invokeHook(hook, [...args])));
94
- if (options?.result === "first" && isSet(results[results.length - 1])) break;
95
- } else {
96
- const sequenceArgs = [...args];
97
- if (results.length > 0 && sequenceArgs.length > 0) sequenceArgs[0] = isFunction(options.asNextParam) ? await Promise.resolve(options.asNextParam(results[0])) : results[0];
98
- const result = await Promise.resolve(invokeHook(hook, [...sequenceArgs]));
99
- if (result) {
100
- if (options?.result === "last") results = [result];
101
- else if (isString(result)) results = [`${isString(results[0]) ? results[0] || "" : ""}\n${result || ""}`.trim()];
102
- else if (isObject(result)) results = [mergeResults(result, results[0] ?? {})];
103
- }
104
- }
105
- }
106
- const definedResults = results.filter(__assignType((result) => isSet(result), [
107
- "result",
108
- "",
109
- "P\"2!!/\""
110
- ]));
111
- if (definedResults.length > 0) {
112
- let mergedResult = void 0;
113
- for (const result of definedResults) mergedResult = defu(result, mergedResult ?? {});
114
- return mergedResult;
115
- }
116
- }
117
- }
118
- callHook.__type = [
119
- () => __ΩEnvironmentContext,
120
- "context",
121
- "key",
122
- () => __ΩCallHookOptions,
123
- "options",
124
- () => __ΩInferHookParameters,
125
- () => __ΩPluginContext,
126
- "args",
127
- () => __ΩInferHookReturnType,
128
- () => __ΩPluginContext,
129
- "callHook",
130
- "Calls a hook with the given context, options, and arguments.",
131
- "P\"o!\"2\"\"2#n$2%\"o'\"\"o&#@2(P\"o*\"\"o)#-J`/+?,"
132
- ];
133
-
134
- //#endregion
135
- export { __ΩCallHookOptions };
@@ -1,161 +0,0 @@
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.input ?? entry)] = require_entry.resolveEntryInputFile(context, entry.input ?? entry);
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.builtins.reduce(__assignType((ret, id) => {
99
- if (!ret[id]) {
100
- const path = context.fs.ids[id];
101
- if (path) ret[id] = path;
102
- }
103
- return ret;
104
- }, [
105
- "ret",
106
- "id",
107
- "",
108
- "P\"2!\"2\"\"/#"
109
- ]), context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias.reduce(__assignType((ret, alias) => {
110
- if (!ret[alias.find.toString()]) ret[alias.find.toString()] = alias.replacement;
111
- return ret;
112
- }, [
113
- "ret",
114
- "alias",
115
- "",
116
- "P\"2!\"2\"\"/#"
117
- ]), {}) : context.config.build.alias : {}),
118
- 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
119
- }, context.config.build.variant === "esbuild" ? (0, __stryke_helpers_omit.omit)(context.config.build.override, [
120
- "alias",
121
- "inject",
122
- "external",
123
- "noExternal",
124
- "skipNodeModulesBundle",
125
- "extensions"
126
- ]) : {}, context.config.build.variant === "esbuild" ? (0, __stryke_helpers_omit.omit)(context.config.build, [
127
- "alias",
128
- "inject",
129
- "external",
130
- "noExternal",
131
- "skipNodeModulesBundle",
132
- "extensions",
133
- "variant",
134
- "override"
135
- ]) : {}, {
136
- mainFields: context.config.build.mainFields,
137
- conditions: context.config.build.conditions,
138
- define: context.config.build.define,
139
- resolveExtensions: context.config.build.extensions,
140
- packages: context.config.build.skipNodeModulesBundle ? "external" : context.config.build.variant === "esbuild" ? context.config.build.packages : void 0,
141
- format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
142
- platform: context.config.build.platform,
143
- treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
144
- outdir: context.config.output.buildPath,
145
- tsconfig: context.tsconfig.tsconfigFilePath,
146
- minify: context.config.mode !== "development",
147
- metafile: context.config.mode === "development",
148
- sourcemap: context.config.mode === "development"
149
- }, DEFAULT_ESBUILD_CONFIG);
150
- }
151
- extractESBuildConfig.__type = [
152
- () => require_context.__ΩContext,
153
- "context",
154
- "BuildOptions",
155
- "extractESBuildConfig",
156
- "Resolves the esbuild options.",
157
- "Pn!2\"\"w#/$?%"
158
- ];
159
-
160
- //#endregion
161
- exports.extractESBuildConfig = extractESBuildConfig;
@@ -1,159 +0,0 @@
1
- import { __ΩContext } from "../../types/context.mjs";
2
- import { __ΩESBuildResolvedBuildConfig } from "../../types/build.mjs";
3
- import { resolveEntryInputFile, 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.input ?? entry)] = resolveEntryInputFile(context, entry.input ?? entry);
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.builtins.reduce(__assignType((ret, id) => {
97
- if (!ret[id]) {
98
- const path = context.fs.ids[id];
99
- if (path) ret[id] = path;
100
- }
101
- return ret;
102
- }, [
103
- "ret",
104
- "id",
105
- "",
106
- "P\"2!\"2\"\"/#"
107
- ]), context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias.reduce(__assignType((ret, alias) => {
108
- if (!ret[alias.find.toString()]) ret[alias.find.toString()] = alias.replacement;
109
- return ret;
110
- }, [
111
- "ret",
112
- "alias",
113
- "",
114
- "P\"2!\"2\"\"/#"
115
- ]), {}) : context.config.build.alias : {}),
116
- inject: inject && Object.keys(inject).length > 0 ? [joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.artifactsPath, "inject-shim.js")] : void 0
117
- }, context.config.build.variant === "esbuild" ? omit(context.config.build.override, [
118
- "alias",
119
- "inject",
120
- "external",
121
- "noExternal",
122
- "skipNodeModulesBundle",
123
- "extensions"
124
- ]) : {}, context.config.build.variant === "esbuild" ? omit(context.config.build, [
125
- "alias",
126
- "inject",
127
- "external",
128
- "noExternal",
129
- "skipNodeModulesBundle",
130
- "extensions",
131
- "variant",
132
- "override"
133
- ]) : {}, {
134
- mainFields: context.config.build.mainFields,
135
- conditions: context.config.build.conditions,
136
- define: context.config.build.define,
137
- resolveExtensions: context.config.build.extensions,
138
- packages: context.config.build.skipNodeModulesBundle ? "external" : context.config.build.variant === "esbuild" ? context.config.build.packages : void 0,
139
- format: Array.isArray(context.config.output.format) ? context.config.output.format[0] : context.config.output.format,
140
- platform: context.config.build.platform,
141
- treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
142
- outdir: context.config.output.buildPath,
143
- tsconfig: context.tsconfig.tsconfigFilePath,
144
- minify: context.config.mode !== "development",
145
- metafile: context.config.mode === "development",
146
- sourcemap: context.config.mode === "development"
147
- }, DEFAULT_ESBUILD_CONFIG);
148
- }
149
- extractESBuildConfig.__type = [
150
- () => __ΩContext,
151
- "context",
152
- "BuildOptions",
153
- "extractESBuildConfig",
154
- "Resolves the esbuild options.",
155
- "Pn!2\"\"w#/$?%"
156
- ];
157
-
158
- //#endregion
159
- export { extractESBuildConfig };