@powerlines/core 0.48.32 → 0.48.33

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 (445) hide show
  1. package/dist/{chunk-C_NdSu1c.cjs → _virtual/_rolldown/runtime.cjs} +1 -6
  2. package/dist/constants/api.d.cts +6 -2
  3. package/dist/constants/api.d.cts.map +1 -0
  4. package/dist/constants/api.d.mts +6 -2
  5. package/dist/constants/api.d.mts.map +1 -0
  6. package/dist/constants/commands.d.cts +5 -2
  7. package/dist/constants/commands.d.cts.map +1 -0
  8. package/dist/constants/commands.d.mts +5 -2
  9. package/dist/constants/commands.d.mts.map +1 -0
  10. package/dist/constants/devtools.d.cts +13 -2
  11. package/dist/constants/devtools.d.cts.map +1 -0
  12. package/dist/constants/devtools.d.mts +13 -2
  13. package/dist/constants/devtools.d.mts.map +1 -0
  14. package/dist/constants/environments.d.cts +10 -2
  15. package/dist/constants/environments.d.cts.map +1 -0
  16. package/dist/constants/environments.d.mts +10 -2
  17. package/dist/constants/environments.d.mts.map +1 -0
  18. package/dist/constants/extensions.d.cts +5 -2
  19. package/dist/constants/extensions.d.cts.map +1 -0
  20. package/dist/constants/extensions.d.mts +5 -2
  21. package/dist/constants/extensions.d.mts.map +1 -0
  22. package/dist/constants/fs.d.cts +7 -2
  23. package/dist/constants/fs.d.cts.map +1 -0
  24. package/dist/constants/fs.d.mts +7 -2
  25. package/dist/constants/fs.d.mts.map +1 -0
  26. package/dist/constants/hooks.d.cts +5 -2
  27. package/dist/constants/hooks.d.cts.map +1 -0
  28. package/dist/constants/hooks.d.mts +5 -2
  29. package/dist/constants/hooks.d.mts.map +1 -0
  30. package/dist/constants/index.d.cts +10 -10
  31. package/dist/constants/index.d.mts +10 -10
  32. package/dist/constants/log-level.d.cts +67 -2
  33. package/dist/constants/log-level.d.cts.map +1 -0
  34. package/dist/constants/log-level.d.mts +67 -2
  35. package/dist/constants/log-level.d.mts.map +1 -0
  36. package/dist/constants/meta.d.cts +6 -2
  37. package/dist/constants/meta.d.cts.map +1 -0
  38. package/dist/constants/meta.d.mts +6 -2
  39. package/dist/constants/meta.d.mts.map +1 -0
  40. package/dist/constants/plugin.d.cts +9 -2
  41. package/dist/constants/plugin.d.cts.map +1 -0
  42. package/dist/constants/plugin.d.mts +9 -2
  43. package/dist/constants/plugin.d.mts.map +1 -0
  44. package/dist/context/base-context.cjs +2 -2
  45. package/dist/context/base-context.d.cts +81 -2
  46. package/dist/context/base-context.d.cts.map +1 -0
  47. package/dist/context/base-context.d.mts +81 -2
  48. package/dist/context/base-context.d.mts.map +1 -0
  49. package/dist/context/context.cjs +2 -2
  50. package/dist/context/context.d.cts +373 -2
  51. package/dist/context/context.d.cts.map +1 -0
  52. package/dist/context/context.d.mts +373 -2
  53. package/dist/context/context.d.mts.map +1 -0
  54. package/dist/context/environment-context.d.cts +5 -2
  55. package/dist/context/environment-context.d.cts.map +1 -1
  56. package/dist/context/environment-context.d.mts +5 -2
  57. package/dist/context/environment-context.d.mts.map +1 -1
  58. package/dist/context/execution-context.cjs +2 -2
  59. package/dist/context/execution-context.d.cts +6 -2
  60. package/dist/context/execution-context.d.cts.map +1 -1
  61. package/dist/context/execution-context.d.mts +6 -2
  62. package/dist/context/execution-context.d.mts.map +1 -1
  63. package/dist/context/index.d.cts +2 -2
  64. package/dist/context/index.d.mts +2 -2
  65. package/dist/context/plugin-context.d.cts +3 -1
  66. package/dist/context/plugin-context.d.cts.map +1 -1
  67. package/dist/context/plugin-context.d.mts +3 -1
  68. package/dist/context/plugin-context.d.mts.map +1 -1
  69. package/dist/index.cjs +1 -1
  70. package/dist/index.d.cts +32 -24
  71. package/dist/index.d.mts +32 -24
  72. package/dist/index.mjs +1 -1
  73. package/dist/lib/config.cjs +2 -2
  74. package/dist/lib/config.d.cts +140 -2
  75. package/dist/lib/config.d.cts.map +1 -0
  76. package/dist/lib/config.d.mts +140 -2
  77. package/dist/lib/config.d.mts.map +1 -0
  78. package/dist/lib/context-helpers.d.cts +16 -2
  79. package/dist/lib/context-helpers.d.cts.map +1 -0
  80. package/dist/lib/context-helpers.d.mts +16 -2
  81. package/dist/lib/context-helpers.d.mts.map +1 -0
  82. package/dist/lib/entry.d.cts +47 -2
  83. package/dist/lib/entry.d.cts.map +1 -0
  84. package/dist/lib/entry.d.mts +47 -2
  85. package/dist/lib/entry.d.mts.map +1 -0
  86. package/dist/lib/environment.cjs +2 -2
  87. package/dist/lib/environment.d.cts +2 -1
  88. package/dist/lib/environment.d.cts.map +1 -1
  89. package/dist/lib/environment.d.mts +2 -1
  90. package/dist/lib/environment.d.mts.map +1 -1
  91. package/dist/lib/events.d.cts +10 -2
  92. package/dist/lib/events.d.cts.map +1 -0
  93. package/dist/lib/events.d.mts +10 -2
  94. package/dist/lib/events.d.mts.map +1 -0
  95. package/dist/lib/generate-types.d.cts +66 -2
  96. package/dist/lib/generate-types.d.cts.map +1 -0
  97. package/dist/lib/generate-types.d.mts +66 -2
  98. package/dist/lib/generate-types.d.mts.map +1 -0
  99. package/dist/lib/hooks.cjs +2 -2
  100. package/dist/lib/hooks.d.cts +28 -2
  101. package/dist/lib/hooks.d.cts.map +1 -0
  102. package/dist/lib/hooks.d.mts +28 -2
  103. package/dist/lib/hooks.d.mts.map +1 -0
  104. package/dist/lib/index.cjs +1 -1
  105. package/dist/lib/index.d.cts +23 -23
  106. package/dist/lib/index.d.mts +23 -23
  107. package/dist/lib/index.mjs +1 -1
  108. package/dist/lib/install-dependencies.d.cts +12 -2
  109. package/dist/lib/install-dependencies.d.cts.map +1 -0
  110. package/dist/lib/install-dependencies.d.mts +12 -2
  111. package/dist/lib/install-dependencies.d.mts.map +1 -0
  112. package/dist/lib/meta.d.cts +33 -2
  113. package/dist/lib/meta.d.cts.map +1 -0
  114. package/dist/lib/meta.d.mts +33 -2
  115. package/dist/lib/meta.d.mts.map +1 -0
  116. package/dist/lib/plugins.cjs +2 -2
  117. package/dist/lib/plugins.d.cts +39 -2
  118. package/dist/lib/plugins.d.cts.map +1 -0
  119. package/dist/lib/plugins.d.mts +39 -2
  120. package/dist/lib/plugins.d.mts.map +1 -0
  121. package/dist/lib/resolver.cjs +2 -2
  122. package/dist/lib/resolver.d.cts +20 -2
  123. package/dist/lib/resolver.d.cts.map +1 -0
  124. package/dist/lib/resolver.d.mts +20 -2
  125. package/dist/lib/resolver.d.mts.map +1 -0
  126. package/dist/lib/schemas.cjs +1 -1
  127. package/dist/lib/schemas.d.cts +1 -1
  128. package/dist/lib/schemas.d.mts +1 -1
  129. package/dist/lib/schemas.mjs +1 -1
  130. package/dist/lib/streaming-channel.d.cts +126 -2
  131. package/dist/lib/streaming-channel.d.cts.map +1 -0
  132. package/dist/lib/streaming-channel.d.mts +126 -2
  133. package/dist/lib/streaming-channel.d.mts.map +1 -0
  134. package/dist/lib/typescript/index.d.cts +2 -2
  135. package/dist/lib/typescript/index.d.mts +2 -2
  136. package/dist/lib/typescript/ts-morph.cjs +2 -2
  137. package/dist/lib/typescript/ts-morph.d.cts +38 -2
  138. package/dist/lib/typescript/ts-morph.d.cts.map +1 -0
  139. package/dist/lib/typescript/ts-morph.d.mts +38 -2
  140. package/dist/lib/typescript/ts-morph.d.mts.map +1 -0
  141. package/dist/lib/typescript/tsconfig.cjs +4 -4
  142. package/dist/lib/typescript/tsconfig.d.cts +77 -2
  143. package/dist/lib/typescript/tsconfig.d.cts.map +1 -0
  144. package/dist/lib/typescript/tsconfig.d.mts +77 -2
  145. package/dist/lib/typescript/tsconfig.d.mts.map +1 -0
  146. package/dist/lib/unplugin/helpers.d.cts +23 -2
  147. package/dist/lib/unplugin/helpers.d.cts.map +1 -0
  148. package/dist/lib/unplugin/helpers.d.mts +23 -2
  149. package/dist/lib/unplugin/helpers.d.mts.map +1 -0
  150. package/dist/lib/unplugin/index.d.cts +3 -3
  151. package/dist/lib/unplugin/index.d.mts +3 -3
  152. package/dist/lib/unplugin/module-resolution.cjs +2 -2
  153. package/dist/lib/unplugin/module-resolution.d.cts +41 -2
  154. package/dist/lib/unplugin/module-resolution.d.cts.map +1 -0
  155. package/dist/lib/unplugin/module-resolution.d.mts +41 -2
  156. package/dist/lib/unplugin/module-resolution.d.mts.map +1 -0
  157. package/dist/lib/unplugin/plugin.d.cts +40 -2
  158. package/dist/lib/unplugin/plugin.d.cts.map +1 -0
  159. package/dist/lib/unplugin/plugin.d.mts +40 -2
  160. package/dist/lib/unplugin/plugin.d.mts.map +1 -0
  161. package/dist/lib/utilities/file-header.d.cts +41 -2
  162. package/dist/lib/utilities/file-header.d.cts.map +1 -0
  163. package/dist/lib/utilities/file-header.d.mts +41 -2
  164. package/dist/lib/utilities/file-header.d.mts.map +1 -0
  165. package/dist/lib/utilities/format.cjs +2 -2
  166. package/dist/lib/utilities/format.d.cts +24 -2
  167. package/dist/lib/utilities/format.d.cts.map +1 -0
  168. package/dist/lib/utilities/format.d.mts +24 -2
  169. package/dist/lib/utilities/format.d.mts.map +1 -0
  170. package/dist/lib/utilities/index.d.cts +5 -5
  171. package/dist/lib/utilities/index.d.mts +5 -5
  172. package/dist/lib/utilities/source-file.cjs +2 -2
  173. package/dist/lib/utilities/source-file.d.cts +30 -2
  174. package/dist/lib/utilities/source-file.d.cts.map +1 -0
  175. package/dist/lib/utilities/source-file.d.mts +30 -2
  176. package/dist/lib/utilities/source-file.d.mts.map +1 -0
  177. package/dist/lib/utilities/source-map.cjs +2 -2
  178. package/dist/lib/utilities/source-map.d.cts +16 -2
  179. package/dist/lib/utilities/source-map.d.cts.map +1 -0
  180. package/dist/lib/utilities/source-map.d.mts +16 -2
  181. package/dist/lib/utilities/source-map.d.mts.map +1 -0
  182. package/dist/lib/utilities/write-file.d.cts +15 -2
  183. package/dist/lib/utilities/write-file.d.cts.map +1 -0
  184. package/dist/lib/utilities/write-file.d.mts +15 -2
  185. package/dist/lib/utilities/write-file.d.mts.map +1 -0
  186. package/dist/lib/vfs.cjs +3 -3
  187. package/dist/lib/vfs.d.cts +321 -2
  188. package/dist/lib/vfs.d.cts.map +1 -0
  189. package/dist/lib/vfs.d.mts +321 -2
  190. package/dist/lib/vfs.d.mts.map +1 -0
  191. package/dist/lib/vfs.mjs +1 -1
  192. package/dist/plugin-base.d.cts +3 -1
  193. package/dist/plugin-base.d.cts.map +1 -1
  194. package/dist/plugin-base.d.mts +3 -1
  195. package/dist/plugin-base.d.mts.map +1 -1
  196. package/dist/plugin-utils/build-helpers.d.cts +2 -1
  197. package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
  198. package/dist/plugin-utils/build-helpers.d.mts +2 -1
  199. package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
  200. package/dist/plugin-utils/combine-plugins.d.cts +1 -1
  201. package/dist/plugin-utils/combine-plugins.d.mts +1 -1
  202. package/dist/plugin-utils/context-helpers.d.cts +1 -1
  203. package/dist/plugin-utils/context-helpers.d.mts +1 -1
  204. package/dist/plugin-utils/enable-plugin.d.cts +2 -1
  205. package/dist/plugin-utils/enable-plugin.d.cts.map +1 -1
  206. package/dist/plugin-utils/enable-plugin.d.mts +2 -1
  207. package/dist/plugin-utils/enable-plugin.d.mts.map +1 -1
  208. package/dist/plugin-utils/extend.d.cts +3 -1
  209. package/dist/plugin-utils/extend.d.cts.map +1 -1
  210. package/dist/plugin-utils/extend.d.mts +3 -1
  211. package/dist/plugin-utils/extend.d.mts.map +1 -1
  212. package/dist/plugin-utils/filter.cjs +2 -2
  213. package/dist/plugin-utils/filter.d.cts +1 -1
  214. package/dist/plugin-utils/filter.d.mts +1 -1
  215. package/dist/plugin-utils/format-package-json.d.cts +1 -1
  216. package/dist/plugin-utils/format-package-json.d.mts +1 -1
  217. package/dist/plugin-utils/get-config-path.d.cts +1 -1
  218. package/dist/plugin-utils/get-config-path.d.mts +1 -1
  219. package/dist/plugin-utils/helpers.d.cts +5 -1
  220. package/dist/plugin-utils/helpers.d.cts.map +1 -1
  221. package/dist/plugin-utils/helpers.d.mts +5 -1
  222. package/dist/plugin-utils/helpers.d.mts.map +1 -1
  223. package/dist/plugin-utils/install.d.cts +1 -1
  224. package/dist/plugin-utils/install.d.mts +1 -1
  225. package/dist/plugin-utils/logging.cjs +2 -2
  226. package/dist/plugin-utils/logging.d.cts +3 -1
  227. package/dist/plugin-utils/logging.d.cts.map +1 -1
  228. package/dist/plugin-utils/logging.d.mts +3 -1
  229. package/dist/plugin-utils/logging.d.mts.map +1 -1
  230. package/dist/plugin-utils/merge.cjs +2 -2
  231. package/dist/plugin-utils/merge.d.cts +3 -1
  232. package/dist/plugin-utils/merge.d.cts.map +1 -1
  233. package/dist/plugin-utils/merge.d.mts +3 -1
  234. package/dist/plugin-utils/merge.d.mts.map +1 -1
  235. package/dist/plugin-utils/modules.d.cts +1 -1
  236. package/dist/plugin-utils/modules.d.mts +1 -1
  237. package/dist/plugin-utils/paths.d.cts +1 -1
  238. package/dist/plugin-utils/paths.d.mts +1 -1
  239. package/dist/{fs-C2lru696.cjs → schemas/fs.cjs} +8 -38
  240. package/dist/{schemas-Zvqwdrw_.d.mts → schemas/fs.d.cts} +2 -2
  241. package/dist/schemas/fs.d.cts.map +1 -0
  242. package/dist/{schemas-Zvqwdrw_.d.cts → schemas/fs.d.mts} +2 -2
  243. package/dist/schemas/fs.d.mts.map +1 -0
  244. package/dist/{fs-DqLn15uU.mjs → schemas/fs.mjs} +2 -2
  245. package/dist/schemas/fs.mjs.map +1 -0
  246. package/dist/storage/base.d.cts +2 -1
  247. package/dist/storage/base.d.cts.map +1 -1
  248. package/dist/storage/base.d.mts +2 -1
  249. package/dist/storage/base.d.mts.map +1 -1
  250. package/dist/storage/file-system.d.cts +1 -1
  251. package/dist/storage/file-system.d.mts +1 -1
  252. package/dist/storage/virtual.d.cts +1 -1
  253. package/dist/storage/virtual.d.mts +1 -1
  254. package/dist/types/api.d.cts +16 -0
  255. package/dist/types/api.d.cts.map +1 -0
  256. package/dist/types/api.d.mts +16 -0
  257. package/dist/types/api.d.mts.map +1 -0
  258. package/dist/types/config.d.cts +739 -0
  259. package/dist/types/config.d.cts.map +1 -0
  260. package/dist/types/config.d.mts +739 -0
  261. package/dist/types/config.d.mts.map +1 -0
  262. package/dist/types/context.d.cts +682 -0
  263. package/dist/types/context.d.cts.map +1 -0
  264. package/dist/types/context.d.mts +682 -0
  265. package/dist/types/context.d.mts.map +1 -0
  266. package/dist/types/fs.d.cts +538 -0
  267. package/dist/types/fs.d.cts.map +1 -0
  268. package/dist/types/fs.d.mts +538 -0
  269. package/dist/types/fs.d.mts.map +1 -0
  270. package/dist/types/hooks.d.cts +96 -0
  271. package/dist/types/hooks.d.cts.map +1 -0
  272. package/dist/types/hooks.d.mts +96 -0
  273. package/dist/types/hooks.d.mts.map +1 -0
  274. package/dist/types/index.d.cts +9 -0
  275. package/dist/types/index.d.mts +9 -0
  276. package/dist/types/logging.d.cts +145 -0
  277. package/dist/types/logging.d.cts.map +1 -0
  278. package/dist/types/logging.d.mts +145 -0
  279. package/dist/types/logging.d.mts.map +1 -0
  280. package/dist/types/plugin.d.cts +207 -0
  281. package/dist/types/plugin.d.cts.map +1 -0
  282. package/dist/types/plugin.d.mts +207 -0
  283. package/dist/types/plugin.d.mts.map +1 -0
  284. package/dist/types/tsconfig.d.cts +73 -0
  285. package/dist/types/tsconfig.d.cts.map +1 -0
  286. package/dist/types/tsconfig.d.mts +73 -0
  287. package/dist/types/tsconfig.d.mts.map +1 -0
  288. package/dist/types/unplugin.d.cts +22 -0
  289. package/dist/types/unplugin.d.cts.map +1 -0
  290. package/dist/types/unplugin.d.mts +22 -0
  291. package/dist/types/unplugin.d.mts.map +1 -0
  292. package/package.json +7 -7
  293. package/dist/api-DTCbbtSH.d.cts +0 -6
  294. package/dist/api-DTCbbtSH.d.cts.map +0 -1
  295. package/dist/api-DTCbbtSH.d.mts +0 -6
  296. package/dist/api-DTCbbtSH.d.mts.map +0 -1
  297. package/dist/base-context-BmxgDD3S.d.mts +0 -79
  298. package/dist/base-context-BmxgDD3S.d.mts.map +0 -1
  299. package/dist/base-context-mHoSEqHf.d.cts +0 -79
  300. package/dist/base-context-mHoSEqHf.d.cts.map +0 -1
  301. package/dist/commands-DzGd8pnR.d.cts +0 -5
  302. package/dist/commands-DzGd8pnR.d.cts.map +0 -1
  303. package/dist/commands-DzGd8pnR.d.mts +0 -5
  304. package/dist/commands-DzGd8pnR.d.mts.map +0 -1
  305. package/dist/config-BnV_o0Es.d.cts +0 -2461
  306. package/dist/config-BnV_o0Es.d.cts.map +0 -1
  307. package/dist/config-DKeDSykZ.d.cts +0 -138
  308. package/dist/config-DKeDSykZ.d.cts.map +0 -1
  309. package/dist/config-DbOP5nVu.d.mts +0 -138
  310. package/dist/config-DbOP5nVu.d.mts.map +0 -1
  311. package/dist/config-DboKmDhl.d.mts +0 -2461
  312. package/dist/config-DboKmDhl.d.mts.map +0 -1
  313. package/dist/context-C6oL3mPw.d.mts +0 -368
  314. package/dist/context-C6oL3mPw.d.mts.map +0 -1
  315. package/dist/context-DcY6YqBQ.d.cts +0 -368
  316. package/dist/context-DcY6YqBQ.d.cts.map +0 -1
  317. package/dist/context-helpers-BRt-Eq-v.d.mts +0 -15
  318. package/dist/context-helpers-BRt-Eq-v.d.mts.map +0 -1
  319. package/dist/context-helpers-Cnsku6fQ.d.cts +0 -15
  320. package/dist/context-helpers-Cnsku6fQ.d.cts.map +0 -1
  321. package/dist/devtools-h0du-bSj.d.cts +0 -13
  322. package/dist/devtools-h0du-bSj.d.cts.map +0 -1
  323. package/dist/devtools-h0du-bSj.d.mts +0 -13
  324. package/dist/devtools-h0du-bSj.d.mts.map +0 -1
  325. package/dist/entry-BC_V2K2U.d.cts +0 -46
  326. package/dist/entry-BC_V2K2U.d.cts.map +0 -1
  327. package/dist/entry-CHIaWcmk.d.mts +0 -46
  328. package/dist/entry-CHIaWcmk.d.mts.map +0 -1
  329. package/dist/environments-BYv_kHRG.d.cts +0 -10
  330. package/dist/environments-BYv_kHRG.d.cts.map +0 -1
  331. package/dist/environments-BYv_kHRG.d.mts +0 -10
  332. package/dist/environments-BYv_kHRG.d.mts.map +0 -1
  333. package/dist/events-NA1XM2Vz.d.cts +0 -10
  334. package/dist/events-NA1XM2Vz.d.cts.map +0 -1
  335. package/dist/events-NA1XM2Vz.d.mts +0 -10
  336. package/dist/events-NA1XM2Vz.d.mts.map +0 -1
  337. package/dist/extensions-ctxXzgay.d.cts +0 -5
  338. package/dist/extensions-ctxXzgay.d.cts.map +0 -1
  339. package/dist/extensions-ctxXzgay.d.mts +0 -5
  340. package/dist/extensions-ctxXzgay.d.mts.map +0 -1
  341. package/dist/file-header-Co9oo7aI.d.cts +0 -41
  342. package/dist/file-header-Co9oo7aI.d.cts.map +0 -1
  343. package/dist/file-header-rHqeXgRV.d.mts +0 -41
  344. package/dist/file-header-rHqeXgRV.d.mts.map +0 -1
  345. package/dist/format-Cf-cgZ-s.d.cts +0 -24
  346. package/dist/format-Cf-cgZ-s.d.cts.map +0 -1
  347. package/dist/format-IQPqgWIe.d.mts +0 -24
  348. package/dist/format-IQPqgWIe.d.mts.map +0 -1
  349. package/dist/fs-BzXT5ZPj.d.cts +0 -7
  350. package/dist/fs-BzXT5ZPj.d.cts.map +0 -1
  351. package/dist/fs-BzXT5ZPj.d.mts +0 -7
  352. package/dist/fs-BzXT5ZPj.d.mts.map +0 -1
  353. package/dist/fs-DqLn15uU.mjs.map +0 -1
  354. package/dist/generate-types-CDkVosrS.d.cts +0 -65
  355. package/dist/generate-types-CDkVosrS.d.cts.map +0 -1
  356. package/dist/generate-types-Dw6p3cB_.d.mts +0 -65
  357. package/dist/generate-types-Dw6p3cB_.d.mts.map +0 -1
  358. package/dist/helpers-CrRRFQl5.d.mts +0 -22
  359. package/dist/helpers-CrRRFQl5.d.mts.map +0 -1
  360. package/dist/helpers-DBLIQW3U.d.cts +0 -22
  361. package/dist/helpers-DBLIQW3U.d.cts.map +0 -1
  362. package/dist/hooks-Dhc3ahex.d.cts +0 -5
  363. package/dist/hooks-Dhc3ahex.d.cts.map +0 -1
  364. package/dist/hooks-Dhc3ahex.d.mts +0 -5
  365. package/dist/hooks-Dhc3ahex.d.mts.map +0 -1
  366. package/dist/index-BKZ67WMa.d.cts +0 -1
  367. package/dist/index-BKZ67WMa.d.mts +0 -1
  368. package/dist/index-BVVgDSdq.d.cts +0 -1
  369. package/dist/index-BVVgDSdq.d.mts +0 -1
  370. package/dist/index-Den-MsLx.d.cts +0 -1
  371. package/dist/index-Den-MsLx.d.mts +0 -1
  372. package/dist/index-DmtQKWjk.d.cts +0 -1
  373. package/dist/index-DmtQKWjk.d.mts +0 -1
  374. package/dist/index-LtpXjuJR.d.mts +0 -25
  375. package/dist/index-LtpXjuJR.d.mts.map +0 -1
  376. package/dist/index-_6s0AX1B.d.cts +0 -1
  377. package/dist/index-_6s0AX1B.d.mts +0 -1
  378. package/dist/index-xk4vSgtB.d.cts +0 -25
  379. package/dist/index-xk4vSgtB.d.cts.map +0 -1
  380. package/dist/install-dependencies-CCjZfS9Y.d.mts +0 -12
  381. package/dist/install-dependencies-CCjZfS9Y.d.mts.map +0 -1
  382. package/dist/install-dependencies-CyeYsrfz.d.cts +0 -12
  383. package/dist/install-dependencies-CyeYsrfz.d.cts.map +0 -1
  384. package/dist/log-level-BC8g4BBL.d.cts +0 -67
  385. package/dist/log-level-BC8g4BBL.d.cts.map +0 -1
  386. package/dist/log-level-BC8g4BBL.d.mts +0 -67
  387. package/dist/log-level-BC8g4BBL.d.mts.map +0 -1
  388. package/dist/meta-CdDd2ykC.d.cts +0 -33
  389. package/dist/meta-CdDd2ykC.d.cts.map +0 -1
  390. package/dist/meta-CfTCHU_o.d.mts +0 -33
  391. package/dist/meta-CfTCHU_o.d.mts.map +0 -1
  392. package/dist/meta-QA_SN1j3.d.cts +0 -6
  393. package/dist/meta-QA_SN1j3.d.cts.map +0 -1
  394. package/dist/meta-QA_SN1j3.d.mts +0 -6
  395. package/dist/meta-QA_SN1j3.d.mts.map +0 -1
  396. package/dist/module-resolution-CRMNPsdn.d.mts +0 -40
  397. package/dist/module-resolution-CRMNPsdn.d.mts.map +0 -1
  398. package/dist/module-resolution-D-w-EZaK.d.cts +0 -40
  399. package/dist/module-resolution-D-w-EZaK.d.cts.map +0 -1
  400. package/dist/plugin-B_b7XqaN.d.mts +0 -39
  401. package/dist/plugin-B_b7XqaN.d.mts.map +0 -1
  402. package/dist/plugin-CzV-aFwU.d.cts +0 -39
  403. package/dist/plugin-CzV-aFwU.d.cts.map +0 -1
  404. package/dist/plugin-fhBG7SSQ.d.cts +0 -9
  405. package/dist/plugin-fhBG7SSQ.d.cts.map +0 -1
  406. package/dist/plugin-fhBG7SSQ.d.mts +0 -9
  407. package/dist/plugin-fhBG7SSQ.d.mts.map +0 -1
  408. package/dist/plugins-DfL1fBZi.d.cts +0 -37
  409. package/dist/plugins-DfL1fBZi.d.cts.map +0 -1
  410. package/dist/plugins-zG2X2LA8.d.mts +0 -37
  411. package/dist/plugins-zG2X2LA8.d.mts.map +0 -1
  412. package/dist/resolver-CdBAh8dA.d.mts +0 -19
  413. package/dist/resolver-CdBAh8dA.d.mts.map +0 -1
  414. package/dist/resolver-CfCl--Eh.d.cts +0 -19
  415. package/dist/resolver-CfCl--Eh.d.cts.map +0 -1
  416. package/dist/schemas-Zvqwdrw_.d.cts.map +0 -1
  417. package/dist/schemas-Zvqwdrw_.d.mts.map +0 -1
  418. package/dist/source-file-CLw13fKE.d.mts +0 -30
  419. package/dist/source-file-CLw13fKE.d.mts.map +0 -1
  420. package/dist/source-file-CuuHaBL5.d.cts +0 -30
  421. package/dist/source-file-CuuHaBL5.d.cts.map +0 -1
  422. package/dist/source-map-Cy0aqSpe.d.mts +0 -16
  423. package/dist/source-map-Cy0aqSpe.d.mts.map +0 -1
  424. package/dist/source-map-HU4IoICc.d.cts +0 -16
  425. package/dist/source-map-HU4IoICc.d.cts.map +0 -1
  426. package/dist/streaming-channel-CiyFd_6l.d.cts +0 -126
  427. package/dist/streaming-channel-CiyFd_6l.d.cts.map +0 -1
  428. package/dist/streaming-channel-CiyFd_6l.d.mts +0 -126
  429. package/dist/streaming-channel-CiyFd_6l.d.mts.map +0 -1
  430. package/dist/ts-morph-BGgjbOgM.d.cts +0 -38
  431. package/dist/ts-morph-BGgjbOgM.d.cts.map +0 -1
  432. package/dist/ts-morph-zLvdifpA.d.mts +0 -38
  433. package/dist/ts-morph-zLvdifpA.d.mts.map +0 -1
  434. package/dist/tsconfig-DExoZEQ0.d.cts +0 -75
  435. package/dist/tsconfig-DExoZEQ0.d.cts.map +0 -1
  436. package/dist/tsconfig-De09cBeX.d.mts +0 -75
  437. package/dist/tsconfig-De09cBeX.d.mts.map +0 -1
  438. package/dist/vfs-B9Vhnajc.d.cts +0 -320
  439. package/dist/vfs-B9Vhnajc.d.cts.map +0 -1
  440. package/dist/vfs-Dl6nPqdS.d.mts +0 -320
  441. package/dist/vfs-Dl6nPqdS.d.mts.map +0 -1
  442. package/dist/write-file-BVMnXVPo.d.cts +0 -15
  443. package/dist/write-file-BVMnXVPo.d.cts.map +0 -1
  444. package/dist/write-file-CWf9Xxwd.d.mts +0 -15
  445. package/dist/write-file-CWf9Xxwd.d.mts.map +0 -1
@@ -0,0 +1,739 @@
1
+ import { StoragePort, StoragePreset } from "./fs.cjs";
2
+ import { Plugin } from "./plugin.cjs";
3
+ import { LogFn, LogLevelResolvedConfig, LogLevelUserConfig } from "./logging.cjs";
4
+ import { TSConfig } from "./tsconfig.cjs";
5
+ import { PluginContext } from "./context.cjs";
6
+ import { Format } from "@storm-software/build-tools/types";
7
+ import { StormWorkspaceConfig } from "@storm-software/config/types";
8
+ import { DeepPartial, DeepReadonly, MaybePromise, NonUndefined, RequiredKeys } from "@stryke/types/base";
9
+ import { FileReference, FileReferenceInput } from "@stryke/types/configuration";
10
+ import { AssetGlob } from "@stryke/types/file";
11
+ import { ConfigLayer, ResolvedConfig } from "c12";
12
+ import { CompatibilityDateSpec, CompatibilityDates } from "compatx";
13
+ import { PreviewOptions, ResolvedPreviewOptions } from "vite";
14
+
15
+ //#region src/types/config.d.ts
16
+ /**
17
+ * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
18
+ */
19
+ type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
20
+ type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext> | Plugin<TContext>[]>;
21
+ /**
22
+ * A configuration tuple for a Powerlines plugin.
23
+ */
24
+ type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
25
+ /**
26
+ * A configuration object for a Powerlines plugin.
27
+ */
28
+ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
29
+ plugin: string | PluginFactory<TContext, TOptions>;
30
+ options: TOptions;
31
+ } | {
32
+ plugin: Plugin<TContext>;
33
+ options?: never;
34
+ };
35
+ /**
36
+ * A configuration tuple for a Powerlines plugin.
37
+ */
38
+ type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | PluginConfigTuple<TContext> | PluginConfigObject<TContext> | Promise<PluginConfig<TContext>> | PluginConfig<TContext>[];
39
+ type PartialPlugin<TContext extends PluginContext = PluginContext> = DeepPartial<Plugin<TContext>>;
40
+ type PartialPluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<PartialPlugin<TContext> | PartialPlugin<TContext>[]>;
41
+ type ProjectType = "application" | "library";
42
+ type Mode = "development" | "test" | "production";
43
+ /**
44
+ * The configuration options for resolving modules in a Powerlines project.
45
+ */
46
+ interface ResolveConfig {
47
+ /**
48
+ * List of fields in `package.json` to try when resolving a package's entry point. Note this takes lower precedence than conditional exports resolved from the exports field: if an entry point is successfully resolved from exports, the main field will be ignored.
49
+ *
50
+ * @defaultValue `["browser", "module", "jsnext:main", "jsnext"]`
51
+ *
52
+ * @see https://vite.dev/config/shared-options#resolve-mainfields
53
+ */
54
+ mainFields?: string[];
55
+ /**
56
+ * Array of strings indicating what conditions should be allowed when resolving [conditional exports](https://nodejs.org/api/packages.html#packages_conditional_exports) from a package.
57
+ *
58
+ * @defaultValue `["import", "require", "default"]`
59
+ *
60
+ * @see https://vite.dev/config/shared-options#resolve-conditions
61
+ */
62
+ conditions?: string[];
63
+ /**
64
+ * List of file extensions to try for imports that omit extensions. Note it is NOT recommended to omit extensions for custom import types (e.g. .vue) since it can interfere with IDE and type support.
65
+ *
66
+ * @defaultValue `[".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"]`
67
+ *
68
+ * @see https://vite.dev/config/shared-options#resolve-extensions
69
+ */
70
+ extensions?: string[];
71
+ /**
72
+ * Array of strings indicating what modules should be deduplicated to a single version in the build.
73
+ *
74
+ * @remarks
75
+ * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts. If you have duplicated copies of the same dependency in your app (likely due to hoisting or linked packages in monorepos), use this option to force Powerlines to always resolve listed dependencies to the same copy (from project root).
76
+ *
77
+ * @see https://vite.dev/config/shared-options#resolve-dedupe
78
+ */
79
+ dedupe?: string[];
80
+ /**
81
+ * The alias mappings to use for module resolution during the build process.
82
+ *
83
+ * @remarks
84
+ * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * {
89
+ * alias: {
90
+ * "@utils": "./src/utils",
91
+ * "@components": "./src/components"
92
+ * }
93
+ * }
94
+ * ```
95
+ *
96
+ * @see https://vite.dev/config/shared-options#resolve-alias
97
+ * @see https://github.com/rollup/plugins/tree/master/packages/alias
98
+ */
99
+ alias?: Record<string, string> | Array<{
100
+ find: string | RegExp;
101
+ replacement: string;
102
+ }>;
103
+ /**
104
+ * Enabling this setting causes Powerlines to determine file identity by the original file path (i.e. the path without following symlinks) instead of the real file path (i.e. the path after following symlinks).
105
+ *
106
+ * @defaultValue false
107
+ *
108
+ * @see https://esbuild.github.io/api/#preserve-symlinks
109
+ * @see https://rollupjs.org/configuration-options/#preservesymlinks
110
+ * @see https://webpack.js.org/configuration/resolve/#resolvesymlinks
111
+ * @see https://rolldown.rs/reference/InputOptions.resolve#symlinks
112
+ * @see https://vite.dev/config/shared-options#resolve-preservesymlinks
113
+ */
114
+ preserveSymlinks?: boolean;
115
+ /**
116
+ * A list of modules that should not be bundled, even if they are external dependencies.
117
+ *
118
+ * @remarks
119
+ * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
120
+ */
121
+ external?: (string | RegExp)[];
122
+ /**
123
+ * A list of modules that should always be bundled, even if they are external dependencies.
124
+ */
125
+ noExternal?: (string | RegExp)[];
126
+ /**
127
+ * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
128
+ */
129
+ skipNodeModulesBundle?: boolean;
130
+ }
131
+ interface CopyConfig {
132
+ /**
133
+ * An optional path to a secondary/copied output directory for collecting distributable files prior to publishing/deployment.
134
+ *
135
+ * @remarks
136
+ * This option is useful when a separate directory is needed for collecting distributable files that are copied from the project, such as static assets or other non-code files. When using [Nx monorepo tools](https://nx.dev/), it is common for the {@link OutputConfig.path | project's output} to be copied to the `{workspaceRoot}/dist/{root}` directory, so that all of the monorepo's output is consolidated in a single location.
137
+ */
138
+ path: string;
139
+ /**
140
+ * A list of assets to copy to the output directory
141
+ *
142
+ * @remarks
143
+ * The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
144
+ */
145
+ assets?: Array<string | AssetGlob>;
146
+ }
147
+ interface OutputConfig {
148
+ /**
149
+ * The output directory path for the project build.
150
+ *
151
+ * @remarks
152
+ * If a value is not provided, Powerlines will attempt to:
153
+ * 1. Use the `outDir` value in the `tsconfig.json` file.
154
+ * 2. Use the `dist` directory in the project root directory.
155
+ *
156
+ * @defaultValue "\{root\}/dist"
157
+ */
158
+ path?: string;
159
+ /**
160
+ * Configuration that specifies a secondary/copied output directory for potentially collecting distributable files prior to publishing/deployment.
161
+ *
162
+ * @remarks
163
+ * These options are useful when a separate directory is needed for collecting distributable files that are copied from the project, such as static assets or other non-code files. When using [Nx monorepo tools](https://nx.dev/), it is common for the {@link OutputConfig.path | project's output} to be copied to the `{workspaceRoot}/dist/{root}` directory, so that all of the monorepo's output is consolidated in a single location.
164
+ */
165
+ copy?: CopyConfig | false;
166
+ /**
167
+ * The folder where the generated runtime artifacts will be located
168
+ *
169
+ * @remarks
170
+ * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
171
+ *
172
+ * @defaultValue "\{root\}/.powerlines"
173
+ */
174
+ artifactsPath?: string;
175
+ /**
176
+ * Should typescript declaration modules be generated during the build for the project?
177
+ */
178
+ dts?: boolean;
179
+ /**
180
+ * The path of the generated runtime types declaration file relative to the workspace root.
181
+ *
182
+ * @remarks
183
+ * This value will be set to `true` automatically when {@link OutputConfig.dts | dts} is set to `true`.
184
+ *
185
+ * @defaultValue "\{root\}/powerlines.d.ts"
186
+ */
187
+ types?: string | false;
188
+ /**
189
+ * The module format of the output files
190
+ *
191
+ * @remarks
192
+ * This option can be a single format or an array of formats. If an array is provided, multiple builds will be generated for each format.
193
+ *
194
+ * @defaultValue "esm"
195
+ */
196
+ format?: Format | Format[];
197
+ /**
198
+ * Generate source maps for the output files
199
+ *
200
+ * @remarks
201
+ * This option can be a boolean or a string specifying the type of source map to generate. If set to `true`, external source maps will be generated. If set to `"inline"`, source maps will be included in the output files as data URIs. If set to `"hidden"`, external source maps will be generated but not referenced in the output files.
202
+ */
203
+ sourceMap?: boolean | "inline" | "hidden";
204
+ /**
205
+ * Minify the output files
206
+ *
207
+ * @remarks
208
+ * This option can be a boolean or a string specifying the type of minification to apply. If set to `true`, the output files will be minified. If set to `"terser"`, the Terser minifier will be used. If set to `"esbuild"`, the esbuild minifier will be used.
209
+ *
210
+ * @defaultValue false
211
+ */
212
+ minify?: boolean;
213
+ /**
214
+ * Control whether built-in Node.js module imports use the `node:` protocol.
215
+ *
216
+ * @remarks
217
+ * If no option is provided, built-in module imports are not transformed. The following options are available for this setting:
218
+ * - `true`: Add the node: prefix to built-in module imports.
219
+ * - `"strip"`: Remove the node: prefix from built-in module imports.
220
+ *
221
+ * @see https://tsdown.dev/reference/api/Interface.InlineConfig#nodeprotocol
222
+ * @see https://nodejs.org/api/esm.html#node-imports
223
+ */
224
+ nodeProtocol?: "strip" | true;
225
+ /**
226
+ * Whether to overwrite previously generated files in the artifacts directory during the build process.
227
+ *
228
+ * @remarks
229
+ * When set to `true`, Powerlines will overwrite any existing files in the artifacts directory with the newly generated files during the build process. When set to `false`, Powerlines will skip generating files that already exist in the artifacts directory, which can help speed up the build process by avoiding unnecessary file writes. This option is only relevant when the {@link OutputConfig.storage | storage option} is configured to use an adapter that writes files to the local file system. If using a `virtual` storage adapter, this option has no effect.
230
+ *
231
+ * @defaultValue true
232
+ */
233
+ overwrite?: boolean;
234
+ /**
235
+ * A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
236
+ *
237
+ * @remarks
238
+ * If a string preset is provided, it must be one of the following values:
239
+ * - `"fs"`: Uses the local file system for storage.
240
+ * - `"virtual"`: Uses an in-memory virtual file system for storage.
241
+ *
242
+ * If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
243
+ *
244
+ * @defaultValue "virtual"
245
+ */
246
+ storage?: StoragePort | StoragePreset;
247
+ }
248
+ interface FrameworkOptions {
249
+ /**
250
+ * The name of the framework
251
+ *
252
+ * @remarks
253
+ * This value is used to identify the framework in logs, error messages, and other places where the framework's name is needed.
254
+ *
255
+ * @defaultValue "powerlines"
256
+ */
257
+ name: string;
258
+ /**
259
+ * The version of the framework
260
+ *
261
+ * @remarks
262
+ * This value is used to identify the version of the framework in logs, error messages, and other places where the framework's version is needed.
263
+ *
264
+ * @defaultValue "0.0.1"
265
+ */
266
+ version?: string;
267
+ /**
268
+ * The organization or author of the framework
269
+ *
270
+ * @defaultValue "storm-software"
271
+ */
272
+ orgId: string;
273
+ }
274
+ interface Options {
275
+ /**
276
+ * The current working directory the Powerlines processes should operate in
277
+ *
278
+ * @remarks
279
+ * If not provided, the {@link WorkspaceConfig.workspaceRoot | workspace root} will be used as the current working directory. If the workspace root cannot be determined, the process's current working directory will be used.
280
+ */
281
+ cwd?: string;
282
+ /**
283
+ * The log level label indicating the severity of the log message, or a more detailed log level configuration object that allows for specifying different log levels for different categories of logs.
284
+ *
285
+ * @remarks
286
+ * The log level determines the minimum severity of messages that will be logged. For example, if the log level is set to `LogLevel.INFO`, then messages with a severity of `INFO`, `WARN`, and `ERROR` will be logged, while messages with a severity of `DEBUG` and `TRACE` will be ignored. Setting the log level to `LogLevel.SILENT` will disable all logging. Alternatively, you can provide a more detailed configuration object that allows you to specify different log levels for different categories of logs, providing granular control over the logging behavior for different aspects of the system.
287
+ *
288
+ * @defaultValue "info"
289
+ */
290
+ logLevel?: LogLevelUserConfig;
291
+ /**
292
+ * Details about the framework being used in the current execution, which can be used by plugins and other parts of the system to customize behavior based on the framework.
293
+ */
294
+ framework?: FrameworkOptions;
295
+ }
296
+ interface BaseExecutionOptions extends RequiredKeys<Options, "cwd"> {
297
+ /**
298
+ * The root directory of the project
299
+ */
300
+ root: string;
301
+ }
302
+ interface ExecutionOptions extends BaseExecutionOptions {
303
+ /**
304
+ * A unique identifier for the current execution instance, which can be used for logging and other purposes to distinguish between different executions in the same process.
305
+ */
306
+ executionId?: string;
307
+ /**
308
+ * The index of the current execution instance among all configured instances in the Powerlines process
309
+ */
310
+ configIndex?: number;
311
+ /**
312
+ * A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
313
+ *
314
+ * @remarks
315
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
316
+ */
317
+ configFile: string;
318
+ /**
319
+ * A logging function provided by the code invoking the Powerlines execution process, which can be used for logging messages during the build process instead of the default Powerlines logger.
320
+ *
321
+ * @remarks
322
+ * Providing a custom logging function allows you to integrate Powerlines logging with your own logging system or to customize the logging behavior, such as formatting log messages differently or sending logs to an external service. If a custom logging function is not provided, Powerlines will use its default logger implementation.
323
+ *
324
+ * @important
325
+ * This function cannot be provided by the Powerlines engine, as it is not serializable. It must be passed directly to the execution context when creating it, and will not be preserved if the context is cloned or serialized.
326
+ */
327
+ logFn?: LogFn;
328
+ }
329
+ interface Config {
330
+ /**
331
+ * Defines entries and location(s) of entry modules for the bundle. Relative paths are resolved based on the `root` option.
332
+ */
333
+ input?: FileReferenceInput | FileReferenceInput[] | Record<string, FileReferenceInput | FileReferenceInput[]>;
334
+ /**
335
+ * Configuration for the output files generated by processing the source code
336
+ */
337
+ output?: OutputConfig;
338
+ /**
339
+ * The date to use for compatibility checks
340
+ *
341
+ * @remarks
342
+ * This date can be used by plugins and build processes to determine compatibility with certain features or APIs. It is recommended to set this date to the date when the project was last known to be compatible with the desired features or APIs. If no value is provided, the latest compatibility date will be used.
343
+ *
344
+ * @see https://developers.cloudflare.com/pages/platform/compatibility-dates/
345
+ * @see https://docs.netlify.com/configure-builds/get-started/#set-a-compatibility-date
346
+ * @see https://github.com/unjs/compatx
347
+ */
348
+ compatibilityDate?: CompatibilityDateSpec;
349
+ /**
350
+ * The log level label indicating the severity of the log message, or a more detailed log level configuration object that allows for specifying different log levels for different categories of logs.
351
+ *
352
+ * @remarks
353
+ * The log level determines the minimum severity of messages that will be logged. For example, if the log level is set to `LogLevel.INFO`, then messages with a severity of `INFO`, `WARN`, and `ERROR` will be logged, while messages with a severity of `DEBUG` and `TRACE` will be ignored. Setting the log level to `LogLevel.SILENT` will disable all logging. Alternatively, you can provide a more detailed configuration object that allows you to specify different log levels for different categories of logs, providing granular control over the logging behavior for different aspects of the system.
354
+ *
355
+ * @defaultValue "info"
356
+ */
357
+ logLevel?: LogLevelUserConfig;
358
+ /**
359
+ * Configuration for module resolution during processing of the source code
360
+ */
361
+ resolve?: ResolveConfig;
362
+ /**
363
+ * The platform to build the project for
364
+ *
365
+ * @defaultValue "neutral"
366
+ */
367
+ platform?: "node" | "browser" | "neutral";
368
+ /**
369
+ * Define global constant replacements. Entries will be defined as globals during dev and statically replaced during build.
370
+ *
371
+ * @remarks
372
+ * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
373
+ *
374
+ * @example
375
+ * ```ts
376
+ * {
377
+ * define: {
378
+ * __VERSION__: '"1.0.0"',
379
+ * __DEV__: 'process.env.NODE_ENV !== "production"'
380
+ * }
381
+ * }
382
+ * ```
383
+ *
384
+ * @see https://esbuild.github.io/api/#define
385
+ * @see https://vitejs.dev/config/build-options.html#define
386
+ * @see https://github.com/rollup/plugins/tree/master/packages/replace
387
+ */
388
+ define?: Record<string, any>;
389
+ /**
390
+ * Global variables that will have import statements injected where necessary
391
+ *
392
+ * @remarks
393
+ * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
394
+ *
395
+ * @example
396
+ * ```ts
397
+ * {
398
+ * inject: {
399
+ * process: 'process/browser',
400
+ * Buffer: ['buffer', 'Buffer'],
401
+ * }
402
+ * }
403
+ * ```
404
+ *
405
+ * @see https://github.com/rollup/plugins/tree/master/packages/inject
406
+ */
407
+ inject?: Record<string, string | string[]>;
408
+ /**
409
+ * The path to the tsconfig file to be used by the compiler
410
+ *
411
+ * @remarks
412
+ * If a value is not provided, the plugin will attempt to find the `tsconfig.json` file in the project root directory. The parsed tsconfig compiler options will be merged with the {@link Options.tsconfigRaw} value (if provided).
413
+ *
414
+ * @defaultValue "\{projectRoot\}/tsconfig.json"
415
+ */
416
+ tsconfig?: string;
417
+ /**
418
+ * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
419
+ *
420
+ * @see https://www.typescriptlang.org/tsconfig
421
+ *
422
+ * @remarks
423
+ * If populated, this option takes higher priority than `tsconfig`
424
+ */
425
+ tsconfigRaw?: TSConfig;
426
+ }
427
+ interface EnvironmentConfig extends Config {
428
+ /**
429
+ * Configuration options for the preview server
430
+ */
431
+ preview?: PreviewOptions;
432
+ /**
433
+ * A flag indicating whether the build is for a Server-Side Rendering environment.
434
+ */
435
+ ssr?: boolean;
436
+ /**
437
+ * The runtime environment for the build, which can be used by plugins to determine how to process the source code and generate runtime artifacts.
438
+ *
439
+ * @remarks
440
+ * This option can be used to specify the target runtime environment for the build, such as "nodejs", "browser", "workerd", or "edge". Plugins can use this information to determine how to process the source code and generate runtime artifacts that are compatible with the specified environment. If no value is provided, plugins will need to determine the runtime environment based on other factors, such as the presence of certain dependencies or configuration options.
441
+ */
442
+ runtime?: "nodejs" | "browser" | "workerd" | "edge";
443
+ /**
444
+ * Define if this environment is used for Server-Side Rendering
445
+ *
446
+ * @defaultValue "server" (if it isn't the client environment)
447
+ */
448
+ consumer?: "client" | "server";
449
+ }
450
+ interface UserConfig extends Config {
451
+ /**
452
+ * The name of the project
453
+ */
454
+ name?: string;
455
+ /**
456
+ * The project display title
457
+ *
458
+ * @remarks
459
+ * This option is used in documentation generation and other places where a human-readable title is needed.
460
+ */
461
+ title?: string;
462
+ /**
463
+ * A description of the project
464
+ *
465
+ * @remarks
466
+ * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
467
+ */
468
+ description?: string;
469
+ /**
470
+ * The organization or author of the project
471
+ *
472
+ * @remarks
473
+ * If this option is not provided, the build process will try to use the \`author\` value from the \`package.json\` file. If the \`author\` value cannot be determined, the {@link name | name configuration} will be used.
474
+ */
475
+ organization?: string;
476
+ /**
477
+ * Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
478
+ *
479
+ * @defaultValue "production"
480
+ */
481
+ mode?: Mode;
482
+ /**
483
+ * The type of project being built
484
+ *
485
+ * @defaultValue "application"
486
+ */
487
+ projectType?: ProjectType;
488
+ /**
489
+ * Should the Powerlines processes automatically install missing package dependencies?
490
+ *
491
+ * @remarks
492
+ * When set to `true`, Powerlines will attempt to install any missing dependencies using the package manager detected in the project (e.g., npm, yarn, pnpm). This can be useful for ensuring that all required packages are available during the build and preparation phases.
493
+ *
494
+ * @defaultValue false
495
+ */
496
+ autoInstall?: boolean;
497
+ /**
498
+ * Should the compiler processes skip any improvements that make use of cache?
499
+ *
500
+ * @defaultValue false
501
+ */
502
+ skipCache?: boolean;
503
+ /**
504
+ * A list of resolvable paths to plugins used during the build process
505
+ */
506
+ plugins?: PluginConfig<any>[];
507
+ /**
508
+ * Environment-specific configurations
509
+ */
510
+ environments?: Record<string, EnvironmentConfig>;
511
+ /**
512
+ * Should a single `build` process be ran for each environment?
513
+ *
514
+ * @remarks
515
+ * This option determines how environments are managed during the `build` process. The available options are:
516
+ *
517
+ * - `false`: A separate build is ran for each environment.
518
+ * - `true`: A single build is ran for all environments.
519
+ *
520
+ * @defaultValue false
521
+ */
522
+ singleBuild?: boolean;
523
+ }
524
+ type ConfigParams = BaseExecutionOptions & Pick<Required<UserConfig>, "mode"> & {
525
+ /**
526
+ * A string identifier for the Powerlines command being executed
527
+ */
528
+ command: string;
529
+ };
530
+ type UserConfigFnObject = (env: ConfigParams) => UserConfig | UserConfig[];
531
+ type UserConfigFnPromise = (env: ConfigParams) => Promise<UserConfig | UserConfig[]>;
532
+ type UserConfigFn = (env: ConfigParams) => UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]>;
533
+ type UserConfigExport = UserConfig | UserConfig[] | Promise<UserConfig | UserConfig[]> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
534
+ type ParsedUserConfig = ResolvedConfig<UserConfig> & {
535
+ /**
536
+ * The path to the user configuration file, if it exists.
537
+ *
538
+ * @remarks
539
+ * This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
540
+ */
541
+ configFile?: ConfigLayer<UserConfig>["configFile"];
542
+ };
543
+ type InlineConfigPaths = {
544
+ /**
545
+ * The root directory of the project
546
+ */
547
+ root: string;
548
+ /**
549
+ * A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
550
+ *
551
+ * @remarks
552
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
553
+ */
554
+ configFile?: string;
555
+ } | {
556
+ /**
557
+ * The root directory of the project
558
+ */
559
+ root?: string;
560
+ /**
561
+ * A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
562
+ *
563
+ * @remarks
564
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
565
+ */
566
+ configFile?: string;
567
+ };
568
+ /**
569
+ * The configuration provided while executing Powerlines commands.
570
+ */
571
+ type InlineConfig<TUserConfig extends UserConfig = UserConfig> = DeepPartial<TUserConfig> & {
572
+ /**
573
+ * The root directory of the project
574
+ */
575
+ root?: string;
576
+ /**
577
+ * A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
578
+ *
579
+ * @remarks
580
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
581
+ */
582
+ configFile?: string;
583
+ /**
584
+ * A string identifier for the Powerlines command being executed
585
+ */
586
+ command: string;
587
+ /**
588
+ * Additional arguments provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed.
589
+ */
590
+ additionalArgs?: Record<string, string | string[]>;
591
+ /**
592
+ * Details about the framework being used in the current execution, which can be used by plugins and other parts of the system to customize behavior based on the framework.
593
+ *
594
+ * @remarks
595
+ * This should only be used by framework plugins to ensure the correct framework name is applied
596
+ *
597
+ * @internal
598
+ */
599
+ framework?: FrameworkOptions;
600
+ };
601
+ type CreateInlineConfig<TUserConfig extends UserConfig = UserConfig> = RequiredKeys<InlineConfig<TUserConfig>, "root"> & {
602
+ /**
603
+ * The package name (from the \`package.json\`) for the project that will be used in the \`create\` command to create a new project based on this configuration
604
+ */
605
+ packageName?: string;
606
+ };
607
+ type CleanInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig>;
608
+ type PrepareInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig>;
609
+ type TypesInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig>;
610
+ type BuildInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig>;
611
+ type LintInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig>;
612
+ type TestInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig>;
613
+ type DocsInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig>;
614
+ type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig>;
615
+ interface ResolvedEntryFileReference extends FileReference {
616
+ /**
617
+ * The user provided entry point in the source code
618
+ */
619
+ input?: FileReference;
620
+ /**
621
+ * An optional name to use in the package export during the build process
622
+ */
623
+ output?: string;
624
+ }
625
+ type ResolvedEnvironmentConfig = RequiredKeys<Omit<EnvironmentConfig, "preview">, "input" | "consumer" | "ssr"> & {
626
+ /**
627
+ * A string identifier for the environment used by the system and plugins to determine which environment-specific configuration to use during the build process.
628
+ */
629
+ id: string;
630
+ /**
631
+ * The name of the environment provided by the user in the {@link UserConfig.environments | environments} configuration.
632
+ */
633
+ name: string;
634
+ /**
635
+ * Configuration options for the preview server
636
+ */
637
+ preview?: ResolvedPreviewOptions;
638
+ };
639
+ /**
640
+ * The configuration options for resolving modules in a Powerlines project.
641
+ */
642
+ type ResolvedResolveConfig = Required<Omit<ResolveConfig, "external" | "noExternal">> & {
643
+ /**
644
+ * A list of modules that should not be bundled, even if they are external dependencies.
645
+ *
646
+ * @remarks
647
+ * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
648
+ */
649
+ external?: string[];
650
+ /**
651
+ * A list of modules that should always be bundled, even if they are external dependencies.
652
+ */
653
+ noExternal?: string[];
654
+ };
655
+ type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
656
+ type ResolvedCopyConfig = Required<Omit<CopyConfig, "assets">> & {
657
+ assets: ResolvedAssetGlob[];
658
+ };
659
+ type ResolvedOutputConfig = Required<Omit<OutputConfig, "copy" | "storage">> & Pick<OutputConfig, "storage"> & {
660
+ copy: ResolvedCopyConfig | false;
661
+ };
662
+ /**
663
+ * The base resolved configuration options for a Powerlines project, after being processed and normalized by the configuration loading process.
664
+ */
665
+ type ResolvedConfig$1<TUserConfig extends UserConfig = UserConfig, TExecutionOptions extends ExecutionOptions = ExecutionOptions> = Omit<TExecutionOptions, "logLevel"> & Omit<RequiredKeys<TUserConfig, "input" | "name" | "title" | "plugins" | "mode" | "input" | "tsconfig" | "platform" | "projectType">, "compatibilityDate" | "output" | "resolve" | "logLevel" | "environments"> & {
666
+ /**
667
+ * The configuration options read from a configuration file on disk, which may be used to resolve the final configuration for the context. This typically includes the user configuration options defined in the `powerlines.config.ts` file, as well as any inline configuration options provided during execution.
668
+ */
669
+ readonly userConfig: DeepReadonly<TUserConfig>;
670
+ /**
671
+ * The configuration options provided by plugins added by the user (and other plugins)
672
+ */
673
+ readonly inlineConfig: DeepReadonly<InlineConfig<TUserConfig>>;
674
+ /**
675
+ * The configuration options that were provided by Powerlines plugins, which may have been merged with the user configuration and modified by the configuration loading process.
676
+ */
677
+ readonly pluginConfig: DeepReadonly<DeepPartial<TUserConfig>>;
678
+ /**
679
+ * A string identifier for the Powerlines command being executed.
680
+ */
681
+ readonly command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
682
+ /**
683
+ * A path to a custom configuration file to be used instead of the default `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
684
+ *
685
+ * @remarks
686
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
687
+ */
688
+ readonly configFile: string;
689
+ /**
690
+ * The output configuration options to use for the build process
691
+ */
692
+ output: ResolvedOutputConfig;
693
+ /**
694
+ * Configuration for module resolution during processing of the source code
695
+ */
696
+ resolve: ResolvedResolveConfig;
697
+ /**
698
+ * The date to use for compatibility checks
699
+ *
700
+ * @remarks
701
+ * This date can be used by plugins and build processes to determine compatibility with certain features or APIs. It is recommended to set this date to the date when the project was last known to be compatible with the desired features or APIs.
702
+ *
703
+ * @see https://developers.cloudflare.com/pages/platform/compatibility-dates/
704
+ * @see https://docs.netlify.com/configure-builds/get-started/#set-a-compatibility-date
705
+ * @see https://github.com/unjs/compatx
706
+ */
707
+ compatibilityDate: CompatibilityDates;
708
+ /**
709
+ * The log level label indicating the severity of the log message, or a more detailed log level configuration object that allows for specifying different log levels for different categories of logs.
710
+ *
711
+ * @remarks
712
+ * The log level determines the minimum severity of messages that will be logged. For example, if the log level is set to `LogLevel.INFO`, then messages with a severity of `INFO`, `WARN`, and `ERROR` will be logged, while messages with a severity of `DEBUG` and `TRACE` will be ignored. Setting the log level to `LogLevel.SILENT` will disable all logging. Alternatively, you can provide a more detailed configuration object that allows you to specify different log levels for different categories of logs, providing granular control over the logging behavior for different aspects of the system.
713
+ */
714
+ logLevel: LogLevelResolvedConfig;
715
+ /**
716
+ * Environment-specific configurations
717
+ */
718
+ environments: Record<string, ResolvedEnvironmentConfig>;
719
+ };
720
+ type InferOverridableConfig<TResolvedConfig extends ResolvedConfig$1 = ResolvedConfig$1> = DeepPartial<Omit<TResolvedConfig, "userConfig" | "inlineConfig" | "pluginConfig" | "cwd" | "configFile" | "command">>;
721
+ /**
722
+ * The resolved configuration options for a Powerlines environment, after being processed and normalized by the configuration loading process.
723
+ */
724
+ type EnvironmentResolvedConfig<TResolvedConfig extends ResolvedConfig$1 = ResolvedConfig$1> = TResolvedConfig & {
725
+ /**
726
+ * The configuration provided when initializing the Powerlines API.
727
+ *
728
+ * @remarks
729
+ * This configuration is used during the initialization of the Powerlines API.
730
+ */
731
+ readonly environmentConfig: DeepReadonly<EnvironmentConfig>;
732
+ /**
733
+ * The resolved configuration options for the environment, which may include additional properties or modifications made during the configuration loading process.
734
+ */
735
+ environment: ResolvedEnvironmentConfig;
736
+ };
737
+ //#endregion
738
+ export { BaseExecutionOptions, BuildInlineConfig, CleanInlineConfig, Config, ConfigParams, CopyConfig, CreateInlineConfig, DeployInlineConfig, DocsInlineConfig, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, FrameworkOptions, InferOverridableConfig, InlineConfig, InlineConfigPaths, LintInlineConfig, Mode, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig$1 as ResolvedConfig, ResolvedCopyConfig, ResolvedEntryFileReference, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise, WorkspaceConfig };
739
+ //# sourceMappingURL=config.d.cts.map