@powerlines/core 0.48.27 → 0.48.28

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 (506) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +14 -0
  2. package/dist/_virtual/_rolldown/runtime.mjs +26 -0
  3. package/dist/constants/api.test.cjs +42 -0
  4. package/dist/constants/api.test.d.cts +1 -0
  5. package/dist/constants/api.test.d.mts +2 -0
  6. package/dist/constants/api.test.mjs +44 -0
  7. package/dist/constants/api.test.mjs.map +1 -0
  8. package/dist/constants/commands.test.cjs +29 -0
  9. package/dist/constants/commands.test.d.cts +1 -0
  10. package/dist/constants/commands.test.d.mts +2 -0
  11. package/dist/constants/commands.test.mjs +31 -0
  12. package/dist/constants/commands.test.mjs.map +1 -0
  13. package/dist/constants/devtools.test.cjs +46 -0
  14. package/dist/constants/devtools.test.d.cts +1 -0
  15. package/dist/constants/devtools.test.d.mts +2 -0
  16. package/dist/constants/devtools.test.mjs +48 -0
  17. package/dist/constants/devtools.test.mjs.map +1 -0
  18. package/dist/constants/environments.test.cjs +34 -0
  19. package/dist/constants/environments.test.d.cts +1 -0
  20. package/dist/constants/environments.test.d.mts +2 -0
  21. package/dist/constants/environments.test.mjs +36 -0
  22. package/dist/constants/environments.test.mjs.map +1 -0
  23. package/dist/constants/extensions.test.cjs +35 -0
  24. package/dist/constants/extensions.test.d.cts +1 -0
  25. package/dist/constants/extensions.test.d.mts +2 -0
  26. package/dist/constants/extensions.test.mjs +37 -0
  27. package/dist/constants/extensions.test.mjs.map +1 -0
  28. package/dist/constants/fs.test.cjs +34 -0
  29. package/dist/constants/fs.test.d.cts +1 -0
  30. package/dist/constants/fs.test.d.mts +2 -0
  31. package/dist/constants/fs.test.mjs +36 -0
  32. package/dist/constants/fs.test.mjs.map +1 -0
  33. package/dist/constants/hooks.test.cjs +29 -0
  34. package/dist/constants/hooks.test.d.cts +1 -0
  35. package/dist/constants/hooks.test.d.mts +2 -0
  36. package/dist/constants/hooks.test.mjs +31 -0
  37. package/dist/constants/hooks.test.mjs.map +1 -0
  38. package/dist/constants/log-level.test.cjs +76 -0
  39. package/dist/constants/log-level.test.d.cts +1 -0
  40. package/dist/constants/log-level.test.d.mts +2 -0
  41. package/dist/constants/log-level.test.mjs +78 -0
  42. package/dist/constants/log-level.test.mjs.map +1 -0
  43. package/dist/constants/meta.test.cjs +33 -0
  44. package/dist/constants/meta.test.d.cts +1 -0
  45. package/dist/constants/meta.test.d.mts +2 -0
  46. package/dist/constants/meta.test.mjs +35 -0
  47. package/dist/constants/meta.test.mjs.map +1 -0
  48. package/dist/constants/plugin.test.cjs +59 -0
  49. package/dist/constants/plugin.test.d.cts +1 -0
  50. package/dist/constants/plugin.test.d.mts +2 -0
  51. package/dist/constants/plugin.test.mjs +61 -0
  52. package/dist/constants/plugin.test.mjs.map +1 -0
  53. package/dist/context/base-context.cjs +8 -1
  54. package/dist/context/base-context.d.cts.map +1 -1
  55. package/dist/context/base-context.d.mts.map +1 -1
  56. package/dist/context/base-context.mjs +3 -1
  57. package/dist/context/base-context.mjs.map +1 -1
  58. package/dist/context/base-context.test.cjs +23 -0
  59. package/dist/context/base-context.test.d.cts +1 -0
  60. package/dist/context/base-context.test.d.mts +2 -0
  61. package/dist/context/base-context.test.mjs +25 -0
  62. package/dist/context/base-context.test.mjs.map +1 -0
  63. package/dist/context/context.cjs +8 -1
  64. package/dist/context/context.d.cts.map +1 -1
  65. package/dist/context/context.d.mts.map +1 -1
  66. package/dist/context/context.mjs +3 -1
  67. package/dist/context/context.mjs.map +1 -1
  68. package/dist/context/context.test.cjs +23 -0
  69. package/dist/context/context.test.d.cts +1 -0
  70. package/dist/context/context.test.d.mts +2 -0
  71. package/dist/context/context.test.mjs +25 -0
  72. package/dist/context/context.test.mjs.map +1 -0
  73. package/dist/context/environment-context.cjs +9 -1
  74. package/dist/context/environment-context.d.cts.map +1 -1
  75. package/dist/context/environment-context.d.mts.map +1 -1
  76. package/dist/context/environment-context.mjs +3 -1
  77. package/dist/context/environment-context.mjs.map +1 -1
  78. package/dist/context/environment-context.test.cjs +23 -0
  79. package/dist/context/environment-context.test.d.cts +1 -0
  80. package/dist/context/environment-context.test.d.mts +2 -0
  81. package/dist/context/environment-context.test.mjs +25 -0
  82. package/dist/context/environment-context.test.mjs.map +1 -0
  83. package/dist/context/execution-context.cjs +8 -1
  84. package/dist/context/execution-context.d.cts.map +1 -1
  85. package/dist/context/execution-context.d.mts.map +1 -1
  86. package/dist/context/execution-context.mjs +3 -1
  87. package/dist/context/execution-context.mjs.map +1 -1
  88. package/dist/context/execution-context.test.cjs +23 -0
  89. package/dist/context/execution-context.test.d.cts +1 -0
  90. package/dist/context/execution-context.test.d.mts +2 -0
  91. package/dist/context/execution-context.test.mjs +25 -0
  92. package/dist/context/execution-context.test.mjs.map +1 -0
  93. package/dist/context/plugin-context.cjs +9 -1
  94. package/dist/context/plugin-context.d.cts.map +1 -1
  95. package/dist/context/plugin-context.d.mts.map +1 -1
  96. package/dist/context/plugin-context.mjs +3 -1
  97. package/dist/context/plugin-context.mjs.map +1 -1
  98. package/dist/context/plugin-context.test.cjs +23 -0
  99. package/dist/context/plugin-context.test.d.cts +1 -0
  100. package/dist/context/plugin-context.test.d.mts +2 -0
  101. package/dist/context/plugin-context.test.mjs +25 -0
  102. package/dist/context/plugin-context.test.mjs.map +1 -0
  103. package/dist/lib/config.cjs +18 -0
  104. package/dist/lib/config.mjs +14 -1
  105. package/dist/lib/config.mjs.map +1 -1
  106. package/dist/lib/config.test.cjs +23 -0
  107. package/dist/lib/config.test.d.cts +1 -0
  108. package/dist/lib/config.test.d.mts +2 -0
  109. package/dist/lib/config.test.mjs +25 -0
  110. package/dist/lib/config.test.mjs.map +1 -0
  111. package/dist/lib/context-helpers.cjs +11 -0
  112. package/dist/lib/context-helpers.d.cts.map +1 -1
  113. package/dist/lib/context-helpers.d.mts.map +1 -1
  114. package/dist/lib/context-helpers.mjs +6 -1
  115. package/dist/lib/context-helpers.mjs.map +1 -1
  116. package/dist/lib/context-helpers.test.cjs +23 -0
  117. package/dist/lib/context-helpers.test.d.cts +1 -0
  118. package/dist/lib/context-helpers.test.d.mts +2 -0
  119. package/dist/lib/context-helpers.test.mjs +25 -0
  120. package/dist/lib/context-helpers.test.mjs.map +1 -0
  121. package/dist/lib/entry.cjs +16 -0
  122. package/dist/lib/entry.d.cts.map +1 -1
  123. package/dist/lib/entry.d.mts.map +1 -1
  124. package/dist/lib/entry.mjs +11 -1
  125. package/dist/lib/entry.mjs.map +1 -1
  126. package/dist/lib/entry.test.cjs +23 -0
  127. package/dist/lib/entry.test.d.cts +1 -0
  128. package/dist/lib/entry.test.d.mts +2 -0
  129. package/dist/lib/entry.test.mjs +25 -0
  130. package/dist/lib/entry.test.mjs.map +1 -0
  131. package/dist/lib/environment.cjs +12 -0
  132. package/dist/lib/environment.d.cts.map +1 -1
  133. package/dist/lib/environment.d.mts.map +1 -1
  134. package/dist/lib/environment.mjs +8 -1
  135. package/dist/lib/environment.mjs.map +1 -1
  136. package/dist/lib/environment.test.cjs +23 -0
  137. package/dist/lib/environment.test.d.cts +1 -0
  138. package/dist/lib/environment.test.d.mts +2 -0
  139. package/dist/lib/environment.test.mjs +25 -0
  140. package/dist/lib/environment.test.mjs.map +1 -0
  141. package/dist/lib/events.cjs +9 -1
  142. package/dist/lib/events.d.cts.map +1 -1
  143. package/dist/lib/events.d.mts.map +1 -1
  144. package/dist/lib/events.mjs +4 -1
  145. package/dist/lib/events.mjs.map +1 -1
  146. package/dist/lib/events.test.cjs +23 -0
  147. package/dist/lib/events.test.d.cts +1 -0
  148. package/dist/lib/events.test.d.mts +2 -0
  149. package/dist/lib/events.test.mjs +25 -0
  150. package/dist/lib/events.test.mjs.map +1 -0
  151. package/dist/lib/generate-types.cjs +12 -0
  152. package/dist/lib/generate-types.d.cts.map +1 -1
  153. package/dist/lib/generate-types.d.mts.map +1 -1
  154. package/dist/lib/generate-types.mjs +7 -1
  155. package/dist/lib/generate-types.mjs.map +1 -1
  156. package/dist/lib/generate-types.test.cjs +23 -0
  157. package/dist/lib/generate-types.test.d.cts +1 -0
  158. package/dist/lib/generate-types.test.d.mts +2 -0
  159. package/dist/lib/generate-types.test.mjs +25 -0
  160. package/dist/lib/generate-types.test.mjs.map +1 -0
  161. package/dist/lib/hooks.cjs +12 -0
  162. package/dist/lib/hooks.d.cts.map +1 -1
  163. package/dist/lib/hooks.d.mts.map +1 -1
  164. package/dist/lib/hooks.mjs +8 -1
  165. package/dist/lib/hooks.mjs.map +1 -1
  166. package/dist/lib/hooks.test.cjs +23 -0
  167. package/dist/lib/hooks.test.d.cts +1 -0
  168. package/dist/lib/hooks.test.d.mts +2 -0
  169. package/dist/lib/hooks.test.mjs +25 -0
  170. package/dist/lib/hooks.test.mjs.map +1 -0
  171. package/dist/lib/install-dependencies.cjs +9 -1
  172. package/dist/lib/install-dependencies.d.cts.map +1 -1
  173. package/dist/lib/install-dependencies.d.mts.map +1 -1
  174. package/dist/lib/install-dependencies.mjs +3 -1
  175. package/dist/lib/install-dependencies.mjs.map +1 -1
  176. package/dist/lib/install-dependencies.test.cjs +23 -0
  177. package/dist/lib/install-dependencies.test.d.cts +1 -0
  178. package/dist/lib/install-dependencies.test.d.mts +2 -0
  179. package/dist/lib/install-dependencies.test.mjs +25 -0
  180. package/dist/lib/install-dependencies.test.mjs.map +1 -0
  181. package/dist/lib/meta.test.cjs +35 -0
  182. package/dist/lib/meta.test.d.cts +1 -0
  183. package/dist/lib/meta.test.d.mts +2 -0
  184. package/dist/lib/meta.test.mjs +37 -0
  185. package/dist/lib/meta.test.mjs.map +1 -0
  186. package/dist/lib/plugins.cjs +11 -0
  187. package/dist/lib/plugins.d.cts.map +1 -1
  188. package/dist/lib/plugins.d.mts.map +1 -1
  189. package/dist/lib/plugins.mjs +7 -1
  190. package/dist/lib/plugins.mjs.map +1 -1
  191. package/dist/lib/plugins.test.cjs +23 -0
  192. package/dist/lib/plugins.test.d.cts +1 -0
  193. package/dist/lib/plugins.test.d.mts +2 -0
  194. package/dist/lib/plugins.test.mjs +25 -0
  195. package/dist/lib/plugins.test.mjs.map +1 -0
  196. package/dist/lib/resolver.cjs +8 -1
  197. package/dist/lib/resolver.mjs +3 -1
  198. package/dist/lib/resolver.mjs.map +1 -1
  199. package/dist/lib/resolver.test.cjs +23 -0
  200. package/dist/lib/resolver.test.d.cts +1 -0
  201. package/dist/lib/resolver.test.d.mts +2 -0
  202. package/dist/lib/resolver.test.mjs +25 -0
  203. package/dist/lib/resolver.test.mjs.map +1 -0
  204. package/dist/lib/streaming-channel.cjs +12 -1
  205. package/dist/lib/streaming-channel.d.cts.map +1 -1
  206. package/dist/lib/streaming-channel.d.mts.map +1 -1
  207. package/dist/lib/streaming-channel.mjs +6 -1
  208. package/dist/lib/streaming-channel.mjs.map +1 -1
  209. package/dist/lib/streaming-channel.test.cjs +23 -0
  210. package/dist/lib/streaming-channel.test.d.cts +1 -0
  211. package/dist/lib/streaming-channel.test.d.mts +2 -0
  212. package/dist/lib/streaming-channel.test.mjs +25 -0
  213. package/dist/lib/streaming-channel.test.mjs.map +1 -0
  214. package/dist/lib/typescript/ts-morph.cjs +11 -1
  215. package/dist/lib/typescript/ts-morph.d.cts.map +1 -1
  216. package/dist/lib/typescript/ts-morph.d.mts.map +1 -1
  217. package/dist/lib/typescript/ts-morph.mjs +6 -1
  218. package/dist/lib/typescript/ts-morph.mjs.map +1 -1
  219. package/dist/lib/typescript/ts-morph.test.cjs +23 -0
  220. package/dist/lib/typescript/ts-morph.test.d.cts +1 -0
  221. package/dist/lib/typescript/ts-morph.test.d.mts +2 -0
  222. package/dist/lib/typescript/ts-morph.test.mjs +25 -0
  223. package/dist/lib/typescript/ts-morph.test.mjs.map +1 -0
  224. package/dist/lib/typescript/tsconfig.cjs +19 -1
  225. package/dist/lib/typescript/tsconfig.d.cts.map +1 -1
  226. package/dist/lib/typescript/tsconfig.d.mts.map +1 -1
  227. package/dist/lib/typescript/tsconfig.mjs +14 -1
  228. package/dist/lib/typescript/tsconfig.mjs.map +1 -1
  229. package/dist/lib/typescript/tsconfig.test.cjs +23 -0
  230. package/dist/lib/typescript/tsconfig.test.d.cts +1 -0
  231. package/dist/lib/typescript/tsconfig.test.d.mts +2 -0
  232. package/dist/lib/typescript/tsconfig.test.mjs +25 -0
  233. package/dist/lib/typescript/tsconfig.test.mjs.map +1 -0
  234. package/dist/lib/unplugin/helpers.cjs +11 -0
  235. package/dist/lib/unplugin/helpers.d.cts.map +1 -1
  236. package/dist/lib/unplugin/helpers.d.mts.map +1 -1
  237. package/dist/lib/unplugin/helpers.mjs +6 -1
  238. package/dist/lib/unplugin/helpers.mjs.map +1 -1
  239. package/dist/lib/unplugin/helpers.test.cjs +23 -0
  240. package/dist/lib/unplugin/helpers.test.d.cts +1 -0
  241. package/dist/lib/unplugin/helpers.test.d.mts +2 -0
  242. package/dist/lib/unplugin/helpers.test.mjs +25 -0
  243. package/dist/lib/unplugin/helpers.test.mjs.map +1 -0
  244. package/dist/lib/unplugin/module-resolution.cjs +8 -1
  245. package/dist/lib/unplugin/module-resolution.d.cts.map +1 -1
  246. package/dist/lib/unplugin/module-resolution.d.mts.map +1 -1
  247. package/dist/lib/unplugin/module-resolution.mjs +3 -1
  248. package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
  249. package/dist/lib/unplugin/module-resolution.test.cjs +23 -0
  250. package/dist/lib/unplugin/module-resolution.test.d.cts +1 -0
  251. package/dist/lib/unplugin/module-resolution.test.d.mts +2 -0
  252. package/dist/lib/unplugin/module-resolution.test.mjs +25 -0
  253. package/dist/lib/unplugin/module-resolution.test.mjs.map +1 -0
  254. package/dist/lib/unplugin/plugin.cjs +12 -1
  255. package/dist/lib/unplugin/plugin.d.cts.map +1 -1
  256. package/dist/lib/unplugin/plugin.d.mts.map +1 -1
  257. package/dist/lib/unplugin/plugin.mjs +6 -1
  258. package/dist/lib/unplugin/plugin.mjs.map +1 -1
  259. package/dist/lib/unplugin/plugin.test.cjs +23 -0
  260. package/dist/lib/unplugin/plugin.test.d.cts +1 -0
  261. package/dist/lib/unplugin/plugin.test.d.mts +2 -0
  262. package/dist/lib/unplugin/plugin.test.mjs +25 -0
  263. package/dist/lib/unplugin/plugin.test.mjs.map +1 -0
  264. package/dist/lib/utilities/file-header.cjs +13 -0
  265. package/dist/lib/utilities/file-header.mjs +8 -1
  266. package/dist/lib/utilities/file-header.mjs.map +1 -1
  267. package/dist/lib/utilities/file-header.test.cjs +23 -0
  268. package/dist/lib/utilities/file-header.test.d.cts +1 -0
  269. package/dist/lib/utilities/file-header.test.d.mts +2 -0
  270. package/dist/lib/utilities/file-header.test.mjs +25 -0
  271. package/dist/lib/utilities/file-header.test.mjs.map +1 -0
  272. package/dist/lib/utilities/format.cjs +11 -1
  273. package/dist/lib/utilities/format.mjs +6 -1
  274. package/dist/lib/utilities/format.mjs.map +1 -1
  275. package/dist/lib/utilities/format.test.cjs +23 -0
  276. package/dist/lib/utilities/format.test.d.cts +1 -0
  277. package/dist/lib/utilities/format.test.d.mts +2 -0
  278. package/dist/lib/utilities/format.test.mjs +25 -0
  279. package/dist/lib/utilities/format.test.mjs.map +1 -0
  280. package/dist/lib/utilities/source-file.cjs +12 -1
  281. package/dist/lib/utilities/source-file.mjs +7 -1
  282. package/dist/lib/utilities/source-file.mjs.map +1 -1
  283. package/dist/lib/utilities/source-file.test.cjs +23 -0
  284. package/dist/lib/utilities/source-file.test.d.cts +1 -0
  285. package/dist/lib/utilities/source-file.test.d.mts +2 -0
  286. package/dist/lib/utilities/source-file.test.mjs +25 -0
  287. package/dist/lib/utilities/source-file.test.mjs.map +1 -0
  288. package/dist/lib/utilities/source-map.cjs +8 -1
  289. package/dist/lib/utilities/source-map.mjs +3 -1
  290. package/dist/lib/utilities/source-map.mjs.map +1 -1
  291. package/dist/lib/utilities/source-map.test.cjs +23 -0
  292. package/dist/lib/utilities/source-map.test.d.cts +1 -0
  293. package/dist/lib/utilities/source-map.test.d.mts +2 -0
  294. package/dist/lib/utilities/source-map.test.mjs +25 -0
  295. package/dist/lib/utilities/source-map.test.mjs.map +1 -0
  296. package/dist/lib/utilities/write-file.cjs +9 -1
  297. package/dist/lib/utilities/write-file.mjs +3 -1
  298. package/dist/lib/utilities/write-file.mjs.map +1 -1
  299. package/dist/lib/utilities/write-file.test.cjs +23 -0
  300. package/dist/lib/utilities/write-file.test.d.cts +1 -0
  301. package/dist/lib/utilities/write-file.test.d.mts +2 -0
  302. package/dist/lib/utilities/write-file.test.mjs +25 -0
  303. package/dist/lib/utilities/write-file.test.mjs.map +1 -0
  304. package/dist/lib/vfs.cjs +8 -1
  305. package/dist/lib/vfs.d.cts.map +1 -1
  306. package/dist/lib/vfs.d.mts.map +1 -1
  307. package/dist/lib/vfs.mjs +3 -1
  308. package/dist/lib/vfs.mjs.map +1 -1
  309. package/dist/lib/vfs.test.cjs +23 -0
  310. package/dist/lib/vfs.test.d.cts +1 -0
  311. package/dist/lib/vfs.test.d.mts +2 -0
  312. package/dist/lib/vfs.test.mjs +25 -0
  313. package/dist/lib/vfs.test.mjs.map +1 -0
  314. package/dist/plugin-base.cjs +12 -1
  315. package/dist/plugin-base.mjs +6 -1
  316. package/dist/plugin-base.mjs.map +1 -1
  317. package/dist/plugin-base.test.cjs +23 -0
  318. package/dist/plugin-base.test.d.cts +1 -0
  319. package/dist/plugin-base.test.d.mts +2 -0
  320. package/dist/plugin-base.test.mjs +25 -0
  321. package/dist/plugin-base.test.mjs.map +1 -0
  322. package/dist/plugin-utils/build-helpers.cjs +8 -0
  323. package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
  324. package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
  325. package/dist/plugin-utils/build-helpers.mjs +3 -1
  326. package/dist/plugin-utils/build-helpers.mjs.map +1 -1
  327. package/dist/plugin-utils/build-helpers.test.cjs +23 -0
  328. package/dist/plugin-utils/build-helpers.test.d.cts +1 -0
  329. package/dist/plugin-utils/build-helpers.test.d.mts +2 -0
  330. package/dist/plugin-utils/build-helpers.test.mjs +25 -0
  331. package/dist/plugin-utils/build-helpers.test.mjs.map +1 -0
  332. package/dist/plugin-utils/combine-plugins.cjs +12 -1
  333. package/dist/plugin-utils/combine-plugins.mjs +6 -1
  334. package/dist/plugin-utils/combine-plugins.mjs.map +1 -1
  335. package/dist/plugin-utils/combine-plugins.test.cjs +23 -0
  336. package/dist/plugin-utils/combine-plugins.test.d.cts +1 -0
  337. package/dist/plugin-utils/combine-plugins.test.d.mts +2 -0
  338. package/dist/plugin-utils/combine-plugins.test.mjs +25 -0
  339. package/dist/plugin-utils/combine-plugins.test.mjs.map +1 -0
  340. package/dist/plugin-utils/context-helpers.cjs +13 -0
  341. package/dist/plugin-utils/context-helpers.mjs +8 -1
  342. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  343. package/dist/plugin-utils/context-helpers.test.cjs +23 -0
  344. package/dist/plugin-utils/context-helpers.test.d.cts +1 -0
  345. package/dist/plugin-utils/context-helpers.test.d.mts +2 -0
  346. package/dist/plugin-utils/context-helpers.test.mjs +25 -0
  347. package/dist/plugin-utils/context-helpers.test.mjs.map +1 -0
  348. package/dist/plugin-utils/docs-helper.cjs +8 -0
  349. package/dist/plugin-utils/docs-helper.mjs +3 -1
  350. package/dist/plugin-utils/docs-helper.mjs.map +1 -1
  351. package/dist/plugin-utils/docs-helper.test.cjs +23 -0
  352. package/dist/plugin-utils/docs-helper.test.d.cts +1 -0
  353. package/dist/plugin-utils/docs-helper.test.d.mts +2 -0
  354. package/dist/plugin-utils/docs-helper.test.mjs +25 -0
  355. package/dist/plugin-utils/docs-helper.test.mjs.map +1 -0
  356. package/dist/plugin-utils/enable-plugin.cjs +9 -1
  357. package/dist/plugin-utils/enable-plugin.d.cts.map +1 -1
  358. package/dist/plugin-utils/enable-plugin.d.mts.map +1 -1
  359. package/dist/plugin-utils/enable-plugin.mjs +3 -1
  360. package/dist/plugin-utils/enable-plugin.mjs.map +1 -1
  361. package/dist/plugin-utils/enable-plugin.test.cjs +23 -0
  362. package/dist/plugin-utils/enable-plugin.test.d.cts +1 -0
  363. package/dist/plugin-utils/enable-plugin.test.d.mts +2 -0
  364. package/dist/plugin-utils/enable-plugin.test.mjs +25 -0
  365. package/dist/plugin-utils/enable-plugin.test.mjs.map +1 -0
  366. package/dist/plugin-utils/extend.cjs +9 -1
  367. package/dist/plugin-utils/extend.d.cts.map +1 -1
  368. package/dist/plugin-utils/extend.d.mts.map +1 -1
  369. package/dist/plugin-utils/extend.mjs +3 -1
  370. package/dist/plugin-utils/extend.mjs.map +1 -1
  371. package/dist/plugin-utils/extend.test.cjs +23 -0
  372. package/dist/plugin-utils/extend.test.d.cts +1 -0
  373. package/dist/plugin-utils/extend.test.d.mts +2 -0
  374. package/dist/plugin-utils/extend.test.mjs +25 -0
  375. package/dist/plugin-utils/extend.test.mjs.map +1 -0
  376. package/dist/plugin-utils/filter.cjs +17 -0
  377. package/dist/plugin-utils/filter.mjs +13 -1
  378. package/dist/plugin-utils/filter.mjs.map +1 -1
  379. package/dist/plugin-utils/filter.test.cjs +23 -0
  380. package/dist/plugin-utils/filter.test.d.cts +1 -0
  381. package/dist/plugin-utils/filter.test.d.mts +2 -0
  382. package/dist/plugin-utils/filter.test.mjs +25 -0
  383. package/dist/plugin-utils/filter.test.mjs.map +1 -0
  384. package/dist/plugin-utils/format-package-json.cjs +9 -1
  385. package/dist/plugin-utils/format-package-json.mjs +3 -1
  386. package/dist/plugin-utils/format-package-json.mjs.map +1 -1
  387. package/dist/plugin-utils/format-package-json.test.cjs +23 -0
  388. package/dist/plugin-utils/format-package-json.test.d.cts +1 -0
  389. package/dist/plugin-utils/format-package-json.test.d.mts +2 -0
  390. package/dist/plugin-utils/format-package-json.test.mjs +25 -0
  391. package/dist/plugin-utils/format-package-json.test.mjs.map +1 -0
  392. package/dist/plugin-utils/format.cjs +9 -1
  393. package/dist/plugin-utils/format.mjs +3 -1
  394. package/dist/plugin-utils/format.mjs.map +1 -1
  395. package/dist/plugin-utils/format.test.cjs +23 -0
  396. package/dist/plugin-utils/format.test.d.cts +1 -0
  397. package/dist/plugin-utils/format.test.d.mts +2 -0
  398. package/dist/plugin-utils/format.test.mjs +25 -0
  399. package/dist/plugin-utils/format.test.mjs.map +1 -0
  400. package/dist/plugin-utils/get-config-path.cjs +9 -1
  401. package/dist/plugin-utils/get-config-path.mjs +3 -1
  402. package/dist/plugin-utils/get-config-path.mjs.map +1 -1
  403. package/dist/plugin-utils/get-config-path.test.cjs +23 -0
  404. package/dist/plugin-utils/get-config-path.test.d.cts +1 -0
  405. package/dist/plugin-utils/get-config-path.test.d.mts +2 -0
  406. package/dist/plugin-utils/get-config-path.test.mjs +25 -0
  407. package/dist/plugin-utils/get-config-path.test.mjs.map +1 -0
  408. package/dist/plugin-utils/helpers.cjs +25 -0
  409. package/dist/plugin-utils/helpers.d.cts.map +1 -1
  410. package/dist/plugin-utils/helpers.d.mts.map +1 -1
  411. package/dist/plugin-utils/helpers.mjs +20 -1
  412. package/dist/plugin-utils/helpers.mjs.map +1 -1
  413. package/dist/plugin-utils/helpers.test.cjs +23 -0
  414. package/dist/plugin-utils/helpers.test.d.cts +1 -0
  415. package/dist/plugin-utils/helpers.test.d.mts +2 -0
  416. package/dist/plugin-utils/helpers.test.mjs +25 -0
  417. package/dist/plugin-utils/helpers.test.mjs.map +1 -0
  418. package/dist/plugin-utils/install.cjs +12 -1
  419. package/dist/plugin-utils/install.mjs +6 -1
  420. package/dist/plugin-utils/install.mjs.map +1 -1
  421. package/dist/plugin-utils/install.test.cjs +23 -0
  422. package/dist/plugin-utils/install.test.d.cts +1 -0
  423. package/dist/plugin-utils/install.test.d.mts +2 -0
  424. package/dist/plugin-utils/install.test.mjs +25 -0
  425. package/dist/plugin-utils/install.test.mjs.map +1 -0
  426. package/dist/plugin-utils/logging.cjs +24 -0
  427. package/dist/plugin-utils/logging.mjs +20 -1
  428. package/dist/plugin-utils/logging.mjs.map +1 -1
  429. package/dist/plugin-utils/logging.test.cjs +23 -0
  430. package/dist/plugin-utils/logging.test.d.cts +1 -0
  431. package/dist/plugin-utils/logging.test.d.mts +2 -0
  432. package/dist/plugin-utils/logging.test.mjs +25 -0
  433. package/dist/plugin-utils/logging.test.mjs.map +1 -0
  434. package/dist/plugin-utils/merge.cjs +11 -1
  435. package/dist/plugin-utils/merge.d.cts.map +1 -1
  436. package/dist/plugin-utils/merge.d.mts.map +1 -1
  437. package/dist/plugin-utils/merge.mjs +6 -1
  438. package/dist/plugin-utils/merge.mjs.map +1 -1
  439. package/dist/plugin-utils/merge.test.cjs +23 -0
  440. package/dist/plugin-utils/merge.test.d.cts +1 -0
  441. package/dist/plugin-utils/merge.test.d.mts +2 -0
  442. package/dist/plugin-utils/merge.test.mjs +25 -0
  443. package/dist/plugin-utils/merge.test.mjs.map +1 -0
  444. package/dist/plugin-utils/modules.cjs +9 -1
  445. package/dist/plugin-utils/modules.mjs +4 -1
  446. package/dist/plugin-utils/modules.mjs.map +1 -1
  447. package/dist/plugin-utils/modules.test.cjs +23 -0
  448. package/dist/plugin-utils/modules.test.d.cts +1 -0
  449. package/dist/plugin-utils/modules.test.d.mts +2 -0
  450. package/dist/plugin-utils/modules.test.mjs +25 -0
  451. package/dist/plugin-utils/modules.test.mjs.map +1 -0
  452. package/dist/plugin-utils/paths.cjs +8 -0
  453. package/dist/plugin-utils/paths.mjs +3 -1
  454. package/dist/plugin-utils/paths.mjs.map +1 -1
  455. package/dist/plugin-utils/paths.test.cjs +23 -0
  456. package/dist/plugin-utils/paths.test.d.cts +1 -0
  457. package/dist/plugin-utils/paths.test.d.mts +2 -0
  458. package/dist/plugin-utils/paths.test.mjs +25 -0
  459. package/dist/plugin-utils/paths.test.mjs.map +1 -0
  460. package/dist/plugin-utils/virtual.cjs +17 -1
  461. package/dist/plugin-utils/virtual.mjs +12 -1
  462. package/dist/plugin-utils/virtual.mjs.map +1 -1
  463. package/dist/plugin-utils/virtual.test.cjs +23 -0
  464. package/dist/plugin-utils/virtual.test.d.cts +1 -0
  465. package/dist/plugin-utils/virtual.test.d.mts +2 -0
  466. package/dist/plugin-utils/virtual.test.mjs +25 -0
  467. package/dist/plugin-utils/virtual.test.mjs.map +1 -0
  468. package/dist/schemas/fs.d.cts.map +1 -1
  469. package/dist/schemas/fs.d.mts.map +1 -1
  470. package/dist/storage/base.cjs +9 -1
  471. package/dist/storage/base.d.cts.map +1 -1
  472. package/dist/storage/base.d.mts.map +1 -1
  473. package/dist/storage/base.mjs +3 -1
  474. package/dist/storage/base.mjs.map +1 -1
  475. package/dist/storage/base.test.cjs +23 -0
  476. package/dist/storage/base.test.d.cts +1 -0
  477. package/dist/storage/base.test.d.mts +2 -0
  478. package/dist/storage/base.test.mjs +25 -0
  479. package/dist/storage/base.test.mjs.map +1 -0
  480. package/dist/storage/file-system.cjs +9 -1
  481. package/dist/storage/file-system.mjs +3 -1
  482. package/dist/storage/file-system.mjs.map +1 -1
  483. package/dist/storage/file-system.test.cjs +23 -0
  484. package/dist/storage/file-system.test.d.cts +1 -0
  485. package/dist/storage/file-system.test.d.mts +2 -0
  486. package/dist/storage/file-system.test.mjs +25 -0
  487. package/dist/storage/file-system.test.mjs.map +1 -0
  488. package/dist/storage/helpers.cjs +12 -0
  489. package/dist/storage/helpers.mjs +7 -1
  490. package/dist/storage/helpers.mjs.map +1 -1
  491. package/dist/storage/helpers.test.cjs +23 -0
  492. package/dist/storage/helpers.test.d.cts +1 -0
  493. package/dist/storage/helpers.test.d.mts +2 -0
  494. package/dist/storage/helpers.test.mjs +25 -0
  495. package/dist/storage/helpers.test.mjs.map +1 -0
  496. package/dist/storage/virtual.cjs +9 -1
  497. package/dist/storage/virtual.d.cts.map +1 -1
  498. package/dist/storage/virtual.d.mts.map +1 -1
  499. package/dist/storage/virtual.mjs +3 -1
  500. package/dist/storage/virtual.mjs.map +1 -1
  501. package/dist/storage/virtual.test.cjs +23 -0
  502. package/dist/storage/virtual.test.d.cts +1 -0
  503. package/dist/storage/virtual.test.d.mts +2 -0
  504. package/dist/storage/virtual.test.mjs +25 -0
  505. package/dist/storage/virtual.test.mjs.map +1 -0
  506. package/package.json +257 -17
@@ -0,0 +1,23 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ const require_plugin_utils_install = require('./install.cjs');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/plugin-utils/install.test.ts
13
+ (0, vitest.describe)("base/core/src/plugin-utils/install.ts", () => {
14
+ (0, vitest.it)("loads module exports", () => {
15
+ (0, vitest.expect)(require_plugin_utils_install.install_exports).toBeDefined();
16
+ (0, vitest.expect)(typeof require_plugin_utils_install.install_exports).toBe("object");
17
+ });
18
+ (0, vitest.it)("has at least one runtime export", () => {
19
+ (0, vitest.expect)(Object.keys(require_plugin_utils_install.install_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
@@ -0,0 +1,25 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ import { install_exports } from "./install.mjs";
10
+ import { describe, expect, it } from "vitest";
11
+
12
+ //#region src/plugin-utils/install.test.ts
13
+ describe("base/core/src/plugin-utils/install.ts", () => {
14
+ it("loads module exports", () => {
15
+ expect(install_exports).toBeDefined();
16
+ expect(typeof install_exports).toBe("object");
17
+ });
18
+ it("has at least one runtime export", () => {
19
+ expect(Object.keys(install_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
24
+ export { };
25
+ //# sourceMappingURL=install.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.test.mjs","names":["moduleExports"],"sources":["../../src/plugin-utils/install.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./install\";\n\ndescribe(\"base/core/src/plugin-utils/install.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,+CAA+C;CACtD,GAAG,8BAA8B;EAC/B,OAAOA,eAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,eAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,eAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
@@ -23,6 +23,24 @@ let chalk = require("chalk");
23
23
  chalk = require_runtime.__toESM(chalk, 1);
24
24
 
25
25
  //#region src/plugin-utils/logging.ts
26
+ var logging_exports = /* @__PURE__ */ require_runtime.__exportAll({
27
+ colorBackground: () => colorBackground,
28
+ colorText: () => colorText,
29
+ consoleLog: () => consoleLog,
30
+ consoleLogger: () => consoleLogger,
31
+ createLogFn: () => createLogFn,
32
+ createLogger: () => createLogger,
33
+ extendLogFn: () => extendLogFn,
34
+ extendLogger: () => extendLogger,
35
+ getTextColor: () => getTextColor,
36
+ isValidLogLevel: () => isValidLogLevel,
37
+ isValidLogLevelConfig: () => isValidLogLevelConfig,
38
+ isVerbose: () => isVerbose,
39
+ resolveLogLevel: () => resolveLogLevel,
40
+ withCustomLogger: () => withCustomLogger,
41
+ withLogFn: () => withLogFn,
42
+ withLogger: () => withLogger
43
+ });
26
44
  /**
27
45
  * Determines if the provided log level is considered verbose (debug or trace).
28
46
  *
@@ -597,6 +615,12 @@ exports.getTextColor = getTextColor;
597
615
  exports.isValidLogLevel = isValidLogLevel;
598
616
  exports.isValidLogLevelConfig = isValidLogLevelConfig;
599
617
  exports.isVerbose = isVerbose;
618
+ Object.defineProperty(exports, 'logging_exports', {
619
+ enumerable: true,
620
+ get: function () {
621
+ return logging_exports;
622
+ }
623
+ });
600
624
  exports.resolveLogLevel = resolveLogLevel;
601
625
  exports.withCustomLogger = withCustomLogger;
602
626
  exports.withLogFn = withLogFn;
@@ -6,6 +6,7 @@ import __tsdown_shims_url from 'node:url'
6
6
  const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
+ import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
9
10
  import { DEFAULT_ENVIRONMENT } from "../constants/environments.mjs";
10
11
  import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels } from "../constants/log-level.mjs";
11
12
  import { kebabCase } from "@stryke/string-format/kebab-case";
@@ -20,6 +21,24 @@ import { uuid } from "@stryke/unique-id/uuid";
20
21
  import chalk from "chalk";
21
22
 
22
23
  //#region src/plugin-utils/logging.ts
24
+ var logging_exports = /* @__PURE__ */ __exportAll({
25
+ colorBackground: () => colorBackground,
26
+ colorText: () => colorText,
27
+ consoleLog: () => consoleLog,
28
+ consoleLogger: () => consoleLogger,
29
+ createLogFn: () => createLogFn,
30
+ createLogger: () => createLogger,
31
+ extendLogFn: () => extendLogFn,
32
+ extendLogger: () => extendLogger,
33
+ getTextColor: () => getTextColor,
34
+ isValidLogLevel: () => isValidLogLevel,
35
+ isValidLogLevelConfig: () => isValidLogLevelConfig,
36
+ isVerbose: () => isVerbose,
37
+ resolveLogLevel: () => resolveLogLevel,
38
+ withCustomLogger: () => withCustomLogger,
39
+ withLogFn: () => withLogFn,
40
+ withLogger: () => withLogger
41
+ });
23
42
  /**
24
43
  * Determines if the provided log level is considered verbose (debug or trace).
25
44
  *
@@ -582,5 +601,5 @@ const extendLogger = (logger, options) => {
582
601
  };
583
602
 
584
603
  //#endregion
585
- export { colorBackground, colorText, consoleLog, consoleLogger, createLogFn, createLogger, extendLogFn, extendLogger, getTextColor, isValidLogLevel, isValidLogLevelConfig, isVerbose, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
604
+ export { colorBackground, colorText, consoleLog, consoleLogger, createLogFn, createLogger, extendLogFn, extendLogger, getTextColor, isValidLogLevel, isValidLogLevelConfig, isVerbose, logging_exports, resolveLogLevel, withCustomLogger, withLogFn, withLogger };
586
605
  //# sourceMappingURL=logging.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"logging.mjs","names":["defu"],"sources":["../../src/plugin-utils/logging.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getLogFn, getLogLevel } from \"@storm-software/config-tools/logger\";\nimport { getColor } from \"@storm-software/config-tools/utilities/colors\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { RequiredKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport chalk, { ChalkInstance } from \"chalk\";\nimport { defu } from \"defu\";\nimport { DEFAULT_ENVIRONMENT } from \"../constants/environments\";\nimport {\n DEFAULT_DEVELOPMENT_LOG_LEVEL,\n DEFAULT_PRODUCTION_LOG_LEVEL,\n DEFAULT_TEST_LOG_LEVEL,\n LOG_CATEGORIES_ARRAY,\n LOG_LEVELS,\n LogCategories,\n LogLevels\n} from \"../constants/log-level\";\nimport { Mode } from \"../types/config\";\nimport { UnresolvedContext } from \"../types/context\";\nimport type {\n CustomLogger,\n CustomLoggerMessage,\n LogCategory,\n LogFn,\n LogFnMeta,\n LogFnOptions,\n Logger,\n LoggerMessage,\n LoggerOptions,\n LogLevel,\n LogLevelResolvedConfig,\n LogLevelUserConfig,\n LogMeta\n} from \"../types/logging\";\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevel - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(logLevel: string): boolean;\n\n/**\n * Determines if the provided context is considered verbose (debug or trace).\n *\n * @param context - The context to check, which contains the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(context: UnresolvedContext): boolean;\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevelOrContext - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(\n logLevelOrContext: string | UnresolvedContext\n): boolean {\n const level = isString(logLevelOrContext)\n ? logLevelOrContext\n : logLevelOrContext.config.logLevel;\n\n return level === \"debug\" || level === \"trace\";\n}\n\n/**\n * Resolves the log level configuration based on the provided log level and mode, returning a complete LogLevelResolvedConfig object that specifies the log level for each log category.\n *\n * @param logLevel - The user-provided log level configuration, which can be a string or an object specifying log levels for each category.\n * @param mode - The current mode of the application (e.g., \"development\", \"test\", \"production\"), which determines the default log levels.\n * @returns A LogLevelResolvedConfig object specifying the log level for each log category.\n */\nexport function resolveLogLevel(\n logLevel?: LogLevelUserConfig,\n mode?: Mode\n): LogLevelResolvedConfig {\n if (logLevel === \"trace\") {\n return {\n general: \"trace\",\n fs: \"trace\",\n performance: \"trace\",\n communication: \"trace\",\n plugins: \"trace\",\n hooks: \"trace\",\n env: \"trace\",\n rpc: \"trace\",\n config: \"trace\",\n babel: \"trace\"\n };\n } else if (logLevel === \"silent\") {\n return {\n general: \"silent\",\n fs: \"silent\",\n performance: \"silent\",\n communication: \"silent\",\n plugins: \"silent\",\n hooks: \"silent\",\n env: \"silent\",\n rpc: \"silent\",\n config: \"silent\",\n babel: \"silent\"\n };\n }\n\n let defaultLogLevel: LogLevelResolvedConfig;\n if (mode === \"development\") {\n defaultLogLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;\n } else if (mode === \"test\") {\n defaultLogLevel = DEFAULT_TEST_LOG_LEVEL;\n } else {\n defaultLogLevel = DEFAULT_PRODUCTION_LOG_LEVEL;\n }\n\n if (isSetString(logLevel)) {\n return {\n general: logLevel,\n fs: defaultLogLevel.fs,\n performance: logLevel,\n communication: defaultLogLevel.communication,\n plugins: logLevel,\n hooks: logLevel,\n env: defaultLogLevel.env,\n rpc: defaultLogLevel.rpc,\n config: defaultLogLevel.config,\n babel: logLevel\n };\n } else if (isSetObject(logLevel)) {\n if (\n Object.values(logLevel).filter(level => isSetString(level)).length ===\n LOG_CATEGORIES_ARRAY.length\n ) {\n return logLevel as LogLevelResolvedConfig;\n }\n\n return defu(logLevel, defaultLogLevel) as LogLevelResolvedConfig;\n }\n\n return defaultLogLevel;\n}\n\nconst colors = [\n chalk.green,\n chalk.greenBright,\n chalk.red,\n chalk.redBright,\n chalk.cyan,\n chalk.cyanBright,\n chalk.yellow,\n chalk.yellowBright,\n chalk.magenta,\n chalk.magentaBright\n] as const;\n\nconst BRAND_COLOR = getColor(\"brand\");\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const getTextColor = (text: string): ChalkInstance => {\n let code = 0;\n for (let i = 0; i < text.length; ++i) {\n code += text.charCodeAt(i);\n }\n\n return colors[code % colors.length] ?? chalk.cyanBright;\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorText = (text: string): string => {\n const title = titleCase(text);\n\n return getTextColor(title)(title);\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorBackground = (text: string): string => {\n const title = titleCase(text);\n\n return chalk.inverse(getTextColor(title)(` ${title} `));\n};\n\nexport const consoleLog = (meta: LogMeta, ...args: string[]) =>\n getLogFn(\n getLogLevel(\n meta.category === LogCategories.PERFORMANCE ? \"performance\" : meta.type\n ),\n {\n logLevel: \"all\"\n }\n )(\n `${meta.name ? chalk.bold.hex(BRAND_COLOR)(kebabCase(meta.name)) : \"\"}${meta.name ? chalk.grey(\" > \") : \"\"}${\n meta.command\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.command)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.environment && kebabCase(meta.environment) !== DEFAULT_ENVIRONMENT\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.environment)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.plugin\n ? `${chalk.bold.hex(BRAND_COLOR)(meta.plugin)}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.source\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.source)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.category &&\n meta.category !== LogCategories.GENERAL &&\n meta.category !== LogCategories.PERFORMANCE\n ? `${colorBackground(kebabCase(meta.category))} `\n : \"\"\n }${args.join(\" \")} `.trim()\n );\n\nexport function isValidLogLevel(logLevel: LogLevel, type: LogLevel): boolean {\n if (logLevel === LogLevels.SILENT) {\n return false;\n }\n\n return LOG_LEVELS.indexOf(logLevel) >= LOG_LEVELS.indexOf(type);\n}\n\nexport function isValidLogLevelConfig(\n type: LogLevel,\n logLevel: LogLevelResolvedConfig,\n category: LogCategory = LogCategories.GENERAL\n): boolean {\n return isValidLogLevel(logLevel[category], type);\n}\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogFn = (name: string, options: LogFnOptions): LogFn => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (meta: LogFnMeta | LogLevel, ...args: string[]) => {\n const logMeta = isSetObject(meta)\n ? {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n ...meta,\n name\n }\n : {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n type: meta,\n name\n };\n\n if (\n logMeta.$$ipc ||\n isValidLogLevelConfig(\n logMeta.type,\n logLevel,\n logMeta.category ? logMeta.category : LogCategories.GENERAL\n )\n ) {\n consoleLog(logMeta, ...args);\n }\n };\n};\n\nconst validateLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback: (message: LoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage | Error) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n },\n message\n }\n : message instanceof Error || message.error\n ? {\n name,\n plugin: options.plugin,\n message: `${\n (message instanceof Error ? message : message.error)?.message\n ? (message instanceof Error ? message : message.error)?.name\n ? `[${\n (message instanceof Error ? message : message.error)?.name\n }]: ${message.message || (message instanceof Error ? message : message.error)?.message}`\n : message.message ||\n (message instanceof Error ? message : message.error)\n ?.message\n : message.message\n ? message.message\n : JSON.stringify(message)\n }${\n (message instanceof Error ? message : message.error)?.stack\n ? `\nStack Trace: ${(message instanceof Error ? message : message.error)?.stack}`\n : \"\"\n }`,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n }\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...options,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback(params);\n }\n };\n};\n\nconst validateCustomLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback?: (message: string | LoggerMessage) => void,\n customCallback?: (message: CustomLoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now()\n },\n message\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback?.(params);\n customCallback?.(params);\n }\n };\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param secondaryLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogger = (logger: Logger, secondaryLogger: Logger): Logger => {\n const options = { ...secondaryLogger.options, ...logger.options };\n\n const result = {\n options,\n error: validateLogger(\n \"error\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.error?.(message);\n secondaryLogger.error?.(message);\n }\n ),\n warn: validateLogger(\n \"warn\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.warn?.(message);\n secondaryLogger.warn?.(message);\n }\n ),\n info: validateLogger(\n \"info\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.info?.(message);\n secondaryLogger.info?.(message);\n }\n ),\n debug: validateLogger(\n \"debug\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.debug?.(message);\n secondaryLogger.debug?.(message);\n }\n ),\n trace: validateLogger(\n \"trace\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.trace?.(message);\n secondaryLogger.trace?.(message);\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param logFn - The custom logging function to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logging function, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogFn = (logger: Logger, logFn: LogFn): Logger => {\n const result = {\n options: logger.options,\n error: validateLogger(\n \"error\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.error?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"error\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n warn: validateLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.warn?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"warn\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n info: validateLogger(\n \"info\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.info?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"info\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n debug: validateLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.debug?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"debug\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n trace: validateLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.trace?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"trace\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param customLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withCustomLogger = (\n logger: Logger,\n customLogger: CustomLogger\n): Logger => {\n const result = {\n options: logger.options,\n error: validateCustomLogger(\n \"error\",\n logger.options.name,\n logger.options,\n logger.error.bind(logger),\n customLogger.error?.bind(customLogger)\n ),\n warn: validateCustomLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n logger.warn.bind(logger),\n customLogger.warn?.bind(customLogger)\n ),\n info: validateCustomLogger(\n \"info\",\n logger.options.name,\n logger.options,\n logger.info.bind(logger),\n customLogger.info?.bind(customLogger)\n ),\n debug: validateCustomLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n logger.debug.bind(logger),\n customLogger.debug?.bind(customLogger)\n ),\n trace: validateCustomLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n logger.trace.bind(logger),\n customLogger.trace?.bind(customLogger)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\nexport const consoleLogger: LogFn = (meta: LogFnMeta, message: string) =>\n consoleLog(\n {\n type: isSetString(meta) ? meta : meta.type,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...(isSetObject(meta) ? meta : {})\n },\n message\n );\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogger = (\n name: string | undefined,\n options: LoggerOptions,\n callback: LogFn = consoleLogger\n): Logger => {\n const result = {\n options: { name, ...options },\n error: validateLogger(\"error\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"error\" }, data.message)\n ),\n warn: validateLogger(\"warn\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"warn\" }, data.message)\n ),\n info: validateLogger(\"info\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"info\" }, data.message)\n ),\n debug: validateLogger(\"debug\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"debug\" }, data.message)\n ),\n trace: validateLogger(\"trace\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"trace\" }, data.message)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Extend a logging function with a specific name, adding a colored badge to the log output.\n *\n * @param logFn - The original logging function to extend.\n * @param options - The overlay metadata to use for the badge in the log output.\n * @returns A new logging function that includes the badge in its output.\n */\nexport const extendLogFn = (logFn: LogFn, options: LogFnOptions): LogFn => {\n return (meta, ...args) =>\n options.source || options.category\n ? logFn(\n isSetObject(meta)\n ? { ...options, ...meta }\n : { ...options, type: meta },\n `${colorBackground(String(options.source || options.category))} ${args\n .filter(Boolean)\n .map(arg => String(arg).trim())\n .join(\" \")} `\n )\n : logFn(meta, ...args);\n};\n\n/**\n * Extend a logger with a specific name and options, adding a colored badge to the log output for each log message generated by the logger.\n *\n * @param logger - The original logger to extend.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the extended logger.\n * @returns A new logger that includes the badge in its output for each log message.\n */\nexport const extendLogger = (\n logger: Logger,\n options: LoggerOptions\n): Logger => {\n const opts = { ...logger.options, ...options } as RequiredKeys<\n LoggerOptions,\n \"name\"\n >;\n\n const result = {\n options: opts,\n error: validateLogger(\"error\", opts.name, opts, logger.error.bind(logger)),\n warn: validateLogger(\"warn\", opts.name, opts, logger.warn.bind(logger)),\n info: validateLogger(\"info\", opts.name, opts, logger.info.bind(logger)),\n debug: validateLogger(\"debug\", opts.name, opts, logger.debug.bind(logger)),\n trace: validateLogger(\"trace\", opts.name, opts, logger.trace.bind(logger))\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA,SAAgB,UACd,mBACS;CACT,MAAM,QAAQ,SAAS,iBAAiB,IACpC,oBACA,kBAAkB,OAAO;CAE7B,OAAO,UAAU,WAAW,UAAU;AACxC;;;;;;;;AASA,SAAgB,gBACd,UACA,MACwB;CACxB,IAAI,aAAa,SACf,OAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,eAAe;EACf,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACR,OAAO;CACT;MACK,IAAI,aAAa,UACtB,OAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,eAAe;EACf,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACR,OAAO;CACT;CAGF,IAAI;CACJ,IAAI,SAAS,eACX,kBAAkB;MACb,IAAI,SAAS,QAClB,kBAAkB;MAElB,kBAAkB;CAGpB,IAAI,YAAY,QAAQ,GACtB,OAAO;EACL,SAAS;EACT,IAAI,gBAAgB;EACpB,aAAa;EACb,eAAe,gBAAgB;EAC/B,SAAS;EACT,OAAO;EACP,KAAK,gBAAgB;EACrB,KAAK,gBAAgB;EACrB,QAAQ,gBAAgB;EACxB,OAAO;CACT;MACK,IAAI,YAAY,QAAQ,GAAG;EAChC,IACE,OA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IACnB;GACF,KAAK;IACH,OAAO,KAAK,OAAO;IACnB;GACF,KAAK;IACH,OAAO,MAAM,OAAO;IACpB;GACF,KAAK;IACH,OAAO,MAAM,OAAO;IACpB;GACF,KAAK,UACH;GACF;IACE,OAAO,KAAK,OAAO;IACnB;EACJ;CACF;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"logging.mjs","names":["defu"],"sources":["../../src/plugin-utils/logging.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getLogFn, getLogLevel } from \"@storm-software/config-tools/logger\";\nimport { getColor } from \"@storm-software/config-tools/utilities/colors\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { RequiredKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport chalk, { ChalkInstance } from \"chalk\";\nimport { defu } from \"defu\";\nimport { DEFAULT_ENVIRONMENT } from \"../constants/environments\";\nimport {\n DEFAULT_DEVELOPMENT_LOG_LEVEL,\n DEFAULT_PRODUCTION_LOG_LEVEL,\n DEFAULT_TEST_LOG_LEVEL,\n LOG_CATEGORIES_ARRAY,\n LOG_LEVELS,\n LogCategories,\n LogLevels\n} from \"../constants/log-level\";\nimport { Mode } from \"../types/config\";\nimport { UnresolvedContext } from \"../types/context\";\nimport type {\n CustomLogger,\n CustomLoggerMessage,\n LogCategory,\n LogFn,\n LogFnMeta,\n LogFnOptions,\n Logger,\n LoggerMessage,\n LoggerOptions,\n LogLevel,\n LogLevelResolvedConfig,\n LogLevelUserConfig,\n LogMeta\n} from \"../types/logging\";\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevel - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(logLevel: string): boolean;\n\n/**\n * Determines if the provided context is considered verbose (debug or trace).\n *\n * @param context - The context to check, which contains the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(context: UnresolvedContext): boolean;\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevelOrContext - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(\n logLevelOrContext: string | UnresolvedContext\n): boolean {\n const level = isString(logLevelOrContext)\n ? logLevelOrContext\n : logLevelOrContext.config.logLevel;\n\n return level === \"debug\" || level === \"trace\";\n}\n\n/**\n * Resolves the log level configuration based on the provided log level and mode, returning a complete LogLevelResolvedConfig object that specifies the log level for each log category.\n *\n * @param logLevel - The user-provided log level configuration, which can be a string or an object specifying log levels for each category.\n * @param mode - The current mode of the application (e.g., \"development\", \"test\", \"production\"), which determines the default log levels.\n * @returns A LogLevelResolvedConfig object specifying the log level for each log category.\n */\nexport function resolveLogLevel(\n logLevel?: LogLevelUserConfig,\n mode?: Mode\n): LogLevelResolvedConfig {\n if (logLevel === \"trace\") {\n return {\n general: \"trace\",\n fs: \"trace\",\n performance: \"trace\",\n communication: \"trace\",\n plugins: \"trace\",\n hooks: \"trace\",\n env: \"trace\",\n rpc: \"trace\",\n config: \"trace\",\n babel: \"trace\"\n };\n } else if (logLevel === \"silent\") {\n return {\n general: \"silent\",\n fs: \"silent\",\n performance: \"silent\",\n communication: \"silent\",\n plugins: \"silent\",\n hooks: \"silent\",\n env: \"silent\",\n rpc: \"silent\",\n config: \"silent\",\n babel: \"silent\"\n };\n }\n\n let defaultLogLevel: LogLevelResolvedConfig;\n if (mode === \"development\") {\n defaultLogLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;\n } else if (mode === \"test\") {\n defaultLogLevel = DEFAULT_TEST_LOG_LEVEL;\n } else {\n defaultLogLevel = DEFAULT_PRODUCTION_LOG_LEVEL;\n }\n\n if (isSetString(logLevel)) {\n return {\n general: logLevel,\n fs: defaultLogLevel.fs,\n performance: logLevel,\n communication: defaultLogLevel.communication,\n plugins: logLevel,\n hooks: logLevel,\n env: defaultLogLevel.env,\n rpc: defaultLogLevel.rpc,\n config: defaultLogLevel.config,\n babel: logLevel\n };\n } else if (isSetObject(logLevel)) {\n if (\n Object.values(logLevel).filter(level => isSetString(level)).length ===\n LOG_CATEGORIES_ARRAY.length\n ) {\n return logLevel as LogLevelResolvedConfig;\n }\n\n return defu(logLevel, defaultLogLevel) as LogLevelResolvedConfig;\n }\n\n return defaultLogLevel;\n}\n\nconst colors = [\n chalk.green,\n chalk.greenBright,\n chalk.red,\n chalk.redBright,\n chalk.cyan,\n chalk.cyanBright,\n chalk.yellow,\n chalk.yellowBright,\n chalk.magenta,\n chalk.magentaBright\n] as const;\n\nconst BRAND_COLOR = getColor(\"brand\");\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const getTextColor = (text: string): ChalkInstance => {\n let code = 0;\n for (let i = 0; i < text.length; ++i) {\n code += text.charCodeAt(i);\n }\n\n return colors[code % colors.length] ?? chalk.cyanBright;\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorText = (text: string): string => {\n const title = titleCase(text);\n\n return getTextColor(title)(title);\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorBackground = (text: string): string => {\n const title = titleCase(text);\n\n return chalk.inverse(getTextColor(title)(` ${title} `));\n};\n\nexport const consoleLog = (meta: LogMeta, ...args: string[]) =>\n getLogFn(\n getLogLevel(\n meta.category === LogCategories.PERFORMANCE ? \"performance\" : meta.type\n ),\n {\n logLevel: \"all\"\n }\n )(\n `${meta.name ? chalk.bold.hex(BRAND_COLOR)(kebabCase(meta.name)) : \"\"}${meta.name ? chalk.grey(\" > \") : \"\"}${\n meta.command\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.command)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.environment && kebabCase(meta.environment) !== DEFAULT_ENVIRONMENT\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.environment)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.plugin\n ? `${chalk.bold.hex(BRAND_COLOR)(meta.plugin)}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.source\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.source)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.category &&\n meta.category !== LogCategories.GENERAL &&\n meta.category !== LogCategories.PERFORMANCE\n ? `${colorBackground(kebabCase(meta.category))} `\n : \"\"\n }${args.join(\" \")} `.trim()\n );\n\nexport function isValidLogLevel(logLevel: LogLevel, type: LogLevel): boolean {\n if (logLevel === LogLevels.SILENT) {\n return false;\n }\n\n return LOG_LEVELS.indexOf(logLevel) >= LOG_LEVELS.indexOf(type);\n}\n\nexport function isValidLogLevelConfig(\n type: LogLevel,\n logLevel: LogLevelResolvedConfig,\n category: LogCategory = LogCategories.GENERAL\n): boolean {\n return isValidLogLevel(logLevel[category], type);\n}\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogFn = (name: string, options: LogFnOptions): LogFn => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (meta: LogFnMeta | LogLevel, ...args: string[]) => {\n const logMeta = isSetObject(meta)\n ? {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n ...meta,\n name\n }\n : {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n type: meta,\n name\n };\n\n if (\n logMeta.$$ipc ||\n isValidLogLevelConfig(\n logMeta.type,\n logLevel,\n logMeta.category ? logMeta.category : LogCategories.GENERAL\n )\n ) {\n consoleLog(logMeta, ...args);\n }\n };\n};\n\nconst validateLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback: (message: LoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage | Error) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n },\n message\n }\n : message instanceof Error || message.error\n ? {\n name,\n plugin: options.plugin,\n message: `${\n (message instanceof Error ? message : message.error)?.message\n ? (message instanceof Error ? message : message.error)?.name\n ? `[${\n (message instanceof Error ? message : message.error)?.name\n }]: ${message.message || (message instanceof Error ? message : message.error)?.message}`\n : message.message ||\n (message instanceof Error ? message : message.error)\n ?.message\n : message.message\n ? message.message\n : JSON.stringify(message)\n }${\n (message instanceof Error ? message : message.error)?.stack\n ? `\nStack Trace: ${(message instanceof Error ? message : message.error)?.stack}`\n : \"\"\n }`,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n }\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...options,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback(params);\n }\n };\n};\n\nconst validateCustomLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback?: (message: string | LoggerMessage) => void,\n customCallback?: (message: CustomLoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now()\n },\n message\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback?.(params);\n customCallback?.(params);\n }\n };\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param secondaryLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogger = (logger: Logger, secondaryLogger: Logger): Logger => {\n const options = { ...secondaryLogger.options, ...logger.options };\n\n const result = {\n options,\n error: validateLogger(\n \"error\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.error?.(message);\n secondaryLogger.error?.(message);\n }\n ),\n warn: validateLogger(\n \"warn\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.warn?.(message);\n secondaryLogger.warn?.(message);\n }\n ),\n info: validateLogger(\n \"info\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.info?.(message);\n secondaryLogger.info?.(message);\n }\n ),\n debug: validateLogger(\n \"debug\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.debug?.(message);\n secondaryLogger.debug?.(message);\n }\n ),\n trace: validateLogger(\n \"trace\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.trace?.(message);\n secondaryLogger.trace?.(message);\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param logFn - The custom logging function to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logging function, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogFn = (logger: Logger, logFn: LogFn): Logger => {\n const result = {\n options: logger.options,\n error: validateLogger(\n \"error\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.error?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"error\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n warn: validateLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.warn?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"warn\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n info: validateLogger(\n \"info\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.info?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"info\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n debug: validateLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.debug?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"debug\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n trace: validateLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.trace?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"trace\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param customLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withCustomLogger = (\n logger: Logger,\n customLogger: CustomLogger\n): Logger => {\n const result = {\n options: logger.options,\n error: validateCustomLogger(\n \"error\",\n logger.options.name,\n logger.options,\n logger.error.bind(logger),\n customLogger.error?.bind(customLogger)\n ),\n warn: validateCustomLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n logger.warn.bind(logger),\n customLogger.warn?.bind(customLogger)\n ),\n info: validateCustomLogger(\n \"info\",\n logger.options.name,\n logger.options,\n logger.info.bind(logger),\n customLogger.info?.bind(customLogger)\n ),\n debug: validateCustomLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n logger.debug.bind(logger),\n customLogger.debug?.bind(customLogger)\n ),\n trace: validateCustomLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n logger.trace.bind(logger),\n customLogger.trace?.bind(customLogger)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\nexport const consoleLogger: LogFn = (meta: LogFnMeta, message: string) =>\n consoleLog(\n {\n type: isSetString(meta) ? meta : meta.type,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...(isSetObject(meta) ? meta : {})\n },\n message\n );\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogger = (\n name: string | undefined,\n options: LoggerOptions,\n callback: LogFn = consoleLogger\n): Logger => {\n const result = {\n options: { name, ...options },\n error: validateLogger(\"error\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"error\" }, data.message)\n ),\n warn: validateLogger(\"warn\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"warn\" }, data.message)\n ),\n info: validateLogger(\"info\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"info\" }, data.message)\n ),\n debug: validateLogger(\"debug\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"debug\" }, data.message)\n ),\n trace: validateLogger(\"trace\", name, { name, ...options }, data =>\n callback({ ...data.meta, type: \"trace\" }, data.message)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Extend a logging function with a specific name, adding a colored badge to the log output.\n *\n * @param logFn - The original logging function to extend.\n * @param options - The overlay metadata to use for the badge in the log output.\n * @returns A new logging function that includes the badge in its output.\n */\nexport const extendLogFn = (logFn: LogFn, options: LogFnOptions): LogFn => {\n return (meta, ...args) =>\n options.source || options.category\n ? logFn(\n isSetObject(meta)\n ? { ...options, ...meta }\n : { ...options, type: meta },\n `${colorBackground(String(options.source || options.category))} ${args\n .filter(Boolean)\n .map(arg => String(arg).trim())\n .join(\" \")} `\n )\n : logFn(meta, ...args);\n};\n\n/**\n * Extend a logger with a specific name and options, adding a colored badge to the log output for each log message generated by the logger.\n *\n * @param logger - The original logger to extend.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the extended logger.\n * @returns A new logger that includes the badge in its output for each log message.\n */\nexport const extendLogger = (\n logger: Logger,\n options: LoggerOptions\n): Logger => {\n const opts = { ...logger.options, ...options } as RequiredKeys<\n LoggerOptions,\n \"name\"\n >;\n\n const result = {\n options: opts,\n error: validateLogger(\"error\", opts.name, opts, logger.error.bind(logger)),\n warn: validateLogger(\"warn\", opts.name, opts, logger.warn.bind(logger)),\n info: validateLogger(\"info\", opts.name, opts, logger.info.bind(logger)),\n debug: validateLogger(\"debug\", opts.name, opts, logger.debug.bind(logger)),\n trace: validateLogger(\"trace\", opts.name, opts, logger.trace.bind(logger))\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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O,QAAQ,UAAU,QAAQ,QAAQ,CAAC,EAAE,GAAG,KAC/D,OAAO,OAAO,EACd,KAAI,QAAO,OAAO,GAAG,EAAE,KAAK,CAAC,EAC7B,KAAK,GAAG,EAAE,EACf,IACA,MAAM,MAAM,GAAG,IAAI;AAC3B;;;;;;;;AASA,MAAa,gBACX,QACA,YACW;CACX,MAAM,OAAO;EAAE,GAAG,OAAO;EAAS,GAAG;CAAQ;CAK7C,MAAM,SAAS;EACb,SAAS;EACT,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,MAAM,CAAC;EACzE,MAAM,eAAe,QAAQ,KAAK,MAAM,MAAM,OAAO,KAAK,KAAK,MAAM,CAAC;EACtE,MAAM,eAAe,QAAQ,KAAK,MAAM,MAAM,OAAO,KAAK,KAAK,MAAM,CAAC;EACtE,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,MAAM,CAAC;EACzE,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,MAAM,CAAC;CAC3E;CAEA,OAAO,OAAO,MAAgB,YAAoC;EAChE,QAAQ,MAAR;GACE,KAAK;IACH,OAAO,MAAM,OAAO;IACpB;GACF,KAAK;IACH,OAAO,KAAK,OAAO;IACnB;GACF,KAAK;IACH,OAAO,KAAK,OAAO;IACnB;GACF,KAAK;IACH,OAAO,MAAM,OAAO;IACpB;GACF,KAAK;IACH,OAAO,MAAM,OAAO;IACpB;GACF,KAAK,UACH;GACF;IACE,OAAO,KAAK,OAAO;IACnB;EACJ;CACF;CAEA,OAAO;AACT"}
@@ -0,0 +1,23 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ const require_plugin_utils_logging = require('./logging.cjs');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/plugin-utils/logging.test.ts
13
+ (0, vitest.describe)("base/core/src/plugin-utils/logging.ts", () => {
14
+ (0, vitest.it)("loads module exports", () => {
15
+ (0, vitest.expect)(require_plugin_utils_logging.logging_exports).toBeDefined();
16
+ (0, vitest.expect)(typeof require_plugin_utils_logging.logging_exports).toBe("object");
17
+ });
18
+ (0, vitest.it)("has at least one runtime export", () => {
19
+ (0, vitest.expect)(Object.keys(require_plugin_utils_logging.logging_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
@@ -0,0 +1,25 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ import { logging_exports } from "./logging.mjs";
10
+ import { describe, expect, it } from "vitest";
11
+
12
+ //#region src/plugin-utils/logging.test.ts
13
+ describe("base/core/src/plugin-utils/logging.ts", () => {
14
+ it("loads module exports", () => {
15
+ expect(logging_exports).toBeDefined();
16
+ expect(typeof logging_exports).toBe("object");
17
+ });
18
+ it("has at least one runtime export", () => {
19
+ expect(Object.keys(logging_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
24
+ export { };
25
+ //# sourceMappingURL=logging.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.test.mjs","names":["moduleExports"],"sources":["../../src/plugin-utils/logging.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./logging\";\n\ndescribe(\"base/core/src/plugin-utils/logging.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,+CAA+C;CACtD,GAAG,8BAA8B;EAC/B,OAAOA,eAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,eAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,eAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
@@ -18,6 +18,10 @@ let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
18
18
  let _stryke_type_checks_is_set_array = require("@stryke/type-checks/is-set-array");
19
19
 
20
20
  //#region src/plugin-utils/merge.ts
21
+ var merge_exports = /* @__PURE__ */ require_runtime.__exportAll({
22
+ merge: () => merge,
23
+ mergeConfig: () => mergeConfig
24
+ });
21
25
  const mergePlugin = (0, defu.createDefu)((obj, key, value) => {
22
26
  if (require_plugin_utils_helpers.isPluginHook(obj[key]) && require_plugin_utils_helpers.isPluginHook(value)) {
23
27
  obj[key] = {
@@ -83,4 +87,10 @@ const mergeConfig = (0, defu.createDefu)((obj, key, value) => {
83
87
 
84
88
  //#endregion
85
89
  exports.merge = merge;
86
- exports.mergeConfig = mergeConfig;
90
+ exports.mergeConfig = mergeConfig;
91
+ Object.defineProperty(exports, 'merge_exports', {
92
+ enumerable: true,
93
+ get: function () {
94
+ return merge_exports;
95
+ }
96
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"merge.d.cts","names":[],"sources":["../../src/plugin-utils/merge.ts"],"mappings":";;;;KAgCY,WAAA,kBACO,aAAA,mBACA,MAAA,CAAO,QAAA,IAAY,aAAA,CAAc,QAAA,oBACjC,MAAA,CAAO,QAAA,IAAY,aAAA,CAAc,QAAA,KAElD,QAAA,SAAiB,MAAA,CAAO,QAAA,IACpB,MAAA,CAAO,QAAA,IACP,QAAA,SAAiB,MAAA,CAAO,QAAA,IACtB,MAAA,CAAO,QAAA,IACP,aAAA,CAAc,QAAA;;;;;AATtB;;;iBAwCgB,KAAA,kBAAuB,aAAA,GAAgB,aAAA,CAAA,CACrD,OAAA,EAAS,MAAA,CAAO,QAAA,IAAY,aAAA,CAAc,QAAA,GAC1C,OAAA,EAAS,MAAA,CAAO,QAAA,IAAY,aAAA,CAAc,QAAA,IACzC,WAAA,CAAY,QAAA,SAAiB,OAAA,SAAgB,OAAA;;;;;;;;;;;;;;;;;cAwBnC,WAAA,MAuCH,OAAA,gBAAuB,cAAc"}
1
+ {"version":3,"file":"merge.d.cts","names":[],"sources":["../../src/plugin-utils/merge.ts"],"mappings":";;;;KAgCY,WAAA,kBACO,aAAA,mBACA,MAAA,CAAO,QAAA,IAAY,aAAA,CAAc,QAAA,oBACjC,MAAA,CAAO,QAAA,IAAY,aAAA,CAAc,QAAA,KAElD,QAAA,SAAiB,MAAA,CAAO,QAAA,IACpB,MAAA,CAAO,QAAA,IACP,QAAA,SAAiB,MAAA,CAAO,QAAA,IACtB,MAAA,CAAO,QAAA,IACP,aAAA,CAAc,QAAA;;;;;AATtB;;;iBAwCgB,KAAA,kBAAuB,aAAA,GAAgB,aAAA,EACrD,OAAA,EAAS,MAAA,CAAO,QAAA,IAAY,aAAA,CAAc,QAAA,GAC1C,OAAA,EAAS,MAAA,CAAO,QAAA,IAAY,aAAA,CAAc,QAAA,IACzC,WAAA,CAAY,QAAA,SAAiB,OAAA,SAAgB,OAAA;;;;;;;;;;;;;;;;;cAwBnC,WAAA,MAuCH,OAAA,gBAAuB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"merge.d.mts","names":[],"sources":["../../src/plugin-utils/merge.ts"],"mappings":";;;;;;KAgCY,WAAA,kBACO,aAAA,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HIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
+ import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
9
10
  import { getHookHandler, isPluginHook } from "./helpers.mjs";
10
11
  import defu, { createDefu } from "defu";
11
12
  import { isSetString } from "@stryke/type-checks/is-set-string";
@@ -15,6 +16,10 @@ import { getUnique } from "@stryke/helpers/get-unique";
15
16
  import { isSetArray } from "@stryke/type-checks/is-set-array";
16
17
 
17
18
  //#region src/plugin-utils/merge.ts
19
+ var merge_exports = /* @__PURE__ */ __exportAll({
20
+ merge: () => merge,
21
+ mergeConfig: () => mergeConfig
22
+ });
18
23
  const mergePlugin = createDefu((obj, key, value) => {
19
24
  if (isPluginHook(obj[key]) && isPluginHook(value)) {
20
25
  obj[key] = {
@@ -79,5 +84,5 @@ const mergeConfig = createDefu((obj, key, value) => {
79
84
  });
80
85
 
81
86
  //#endregion
82
- export { merge, mergeConfig };
87
+ export { merge, mergeConfig, merge_exports };
83
88
  //# sourceMappingURL=merge.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge.mjs","names":[],"sources":["../../src/plugin-utils/merge.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport defu, { createDefu } from \"defu\";\nimport type {\n PartialPlugin,\n Plugin,\n PluginContext,\n ResolvedConfig\n} from \"../types\";\nimport { getHookHandler, isPluginHook } from \"./helpers\";\n\nexport type MergeResult<\n TContext extends PluginContext,\n TPluginA extends Plugin<TContext> | PartialPlugin<TContext>,\n TPluginB extends Plugin<TContext> | PartialPlugin<TContext>\n> =\n TPluginA extends Plugin<TContext>\n ? Plugin<TContext>\n : TPluginB extends Plugin<TContext>\n ? Plugin<TContext>\n : PartialPlugin<TContext>;\n\nconst mergePlugin = createDefu((obj, key, value) => {\n if (isPluginHook(obj[key]) && isPluginHook(value)) {\n obj[key] = {\n ...obj[key],\n ...value,\n handler: async (...params: any[]) => {\n const [resultA, resultB] = await Promise.all([\n // eslint-disable-next-line ts/no-unsafe-call\n (getHookHandler(obj[key]) as any)(...params),\n // eslint-disable-next-line ts/no-unsafe-call\n (getHookHandler(value) as any)(...params)\n ]);\n\n return resultB && resultA ? defu(resultA, resultB) : resultA || resultB;\n }\n };\n return true;\n }\n\n return false;\n});\n\n/**\n * Merges two {@link Plugin | plugins} or {@link PartialPlugin | partial plugins} together.\n *\n * @param pluginA - The first {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.\n * @param pluginB - The second {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.\n * @returns The merged {@link Plugin | plugin} or {@link PartialPlugin | partial plugin}.\n */\nexport function merge<TContext extends PluginContext = PluginContext>(\n pluginA: Plugin<TContext> | PartialPlugin<TContext>,\n pluginB: Plugin<TContext> | PartialPlugin<TContext>\n): MergeResult<TContext, typeof pluginA, typeof pluginB> {\n return mergePlugin(pluginA, pluginB) as MergeResult<\n TContext,\n typeof pluginA,\n typeof pluginB\n >;\n}\n\n/**\n * Merges two configuration objects together, with special handling for string values.\n * If the value from the second object is a non-empty string, it will overwrite the value from the first object.\n *\n * @example\n * ```ts\n * const configA = { name: \"Default\", version: \"1.0.0\" };\n * const configB = { name: \"Custom\", description: \"A custom config\" };\n * const mergedConfig = mergeConfig(configA, configB);\n * // Result: { name: \"Custom\", version: \"1.0.0\", description: \"A custom config\" }\n * ```\n *\n * @param objA - The first configuration object.\n * @param objB - The second configuration object.\n * @returns The merged configuration object.\n */\nexport const mergeConfig = createDefu((obj, key, value) => {\n type TValue = (typeof obj)[typeof key];\n\n if (key === \"input\" && isSet(value)) {\n if (isString(obj[key]) && Array.isArray(value) && value.length === 0) {\n return true;\n }\n\n obj[key] = value;\n if (isSetArray(obj[key])) {\n obj[key] = getUnique(obj[key]) as TValue;\n }\n\n return true;\n }\n\n if (key === \"compatibilityDate\" && isSetString(value)) {\n obj[key] = value;\n return true;\n }\n\n if (\n (key === \"format\" || key === \"output.format\") &&\n (isSetString(value) || isSetArray(value))\n ) {\n obj[key] = value;\n if (isSetArray(obj[key])) {\n obj[key] = getUnique(obj[key]) as TValue;\n }\n\n return true;\n }\n\n if (!isSet(obj[key]) && isString(value)) {\n obj[key] = value;\n return true;\n }\n\n return false;\n}) as (...configs: unknown[]) => ResolvedConfig;\n"],"mappings":";;;;;;;;;;;;;;;;;AA2CA,MAAM,cAAc,YAAY,KAAK,KAAK,UAAU;CAClD,IAAI,aAAa,IAAI,IAAI,KAAK,aAAa,KAAK,GAAG;EACjD,IAAI,OAAO;GACT,GAAG,IAAI;GACP,GAAG;GACH,SAAS,OAAO,GAAG,WAAkB;IACnC,MAAM,CAAC,SAAS,WAAW,MAAM,QAAQ,IAAI,CAE1C,eAAe,IAAI,IAAI,EAAU,GAAG,MAAM,GAE1C,eAAe,KAAK,EAAU,GAAG,MAAM,CAC1C,CAAC;IAED,OAAO,WAAW,UAAU,KAAK,SAAS,OAAO,IAAI,WAAW;GAClE;EACF;EACA,OAAO;CACT;CAEA,OAAO;AACT,CAAC;;;;;;;;AASD,SAAgB,MACd,SACA,SACuD;CACvD,OAAO,YAAY,SAAS,OAAO;AAKrC;;;;;;;;;;;;;;;;;AAkBA,MAAa,cAAc,YAAY,KAAK,KAAK,UAAU;CAGzD,IAAI,QAAQ,WAAW,MAAM,KAAK,GAAG;EACnC,IAAI,SAAS,IAAI,IAAI,KAAK,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW,GACjE,OAAO;EAGT,IAAI,OAAO;EACX,IAAI,WAAW,IAAI,IAAI,GACrB,IAAI,OAAO,UAAU,IAAI,IAAI;EAG/B,OAAO;CACT;CAEA,IAAI,QAAQ,uBAAuB,YAAY,KAAK,GAAG;EACrD,IAAI,OAAO;EACX,OAAO;CACT;CAEA,KACG,QAAQ,YAAY,QAAQ,qBAC5B,YAAY,KAAK,KAAK,WAAW,KAAK,IACvC;EACA,IAAI,OAAO;EACX,IAAI,WAAW,IAAI,IAAI,GACrB,IAAI,OAAO,UAAU,IAAI,IAAI;EAG/B,OAAO;CACT;CAEA,IAAI,CAAC,MAAM,IAAI,IAAI,KAAK,SAAS,KAAK,GAAG;EACvC,IAAI,OAAO;EACX,OAAO;CACT;CAEA,OAAO;AACT,CAAC"}
1
+ {"version":3,"file":"merge.mjs","names":[],"sources":["../../src/plugin-utils/merge.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { isSetArray } from \"@stryke/type-checks/is-set-array\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport defu, { createDefu } from \"defu\";\nimport type {\n PartialPlugin,\n Plugin,\n PluginContext,\n ResolvedConfig\n} from \"../types\";\nimport { getHookHandler, isPluginHook } from \"./helpers\";\n\nexport type MergeResult<\n TContext extends PluginContext,\n TPluginA extends Plugin<TContext> | PartialPlugin<TContext>,\n TPluginB extends Plugin<TContext> | PartialPlugin<TContext>\n> =\n TPluginA extends Plugin<TContext>\n ? Plugin<TContext>\n : TPluginB extends Plugin<TContext>\n ? Plugin<TContext>\n : PartialPlugin<TContext>;\n\nconst mergePlugin = createDefu((obj, key, value) => {\n if (isPluginHook(obj[key]) && isPluginHook(value)) {\n obj[key] = {\n ...obj[key],\n ...value,\n handler: async (...params: any[]) => {\n const [resultA, resultB] = await Promise.all([\n // eslint-disable-next-line ts/no-unsafe-call\n (getHookHandler(obj[key]) as any)(...params),\n // eslint-disable-next-line ts/no-unsafe-call\n (getHookHandler(value) as any)(...params)\n ]);\n\n return resultB && resultA ? defu(resultA, resultB) : resultA || resultB;\n }\n };\n return true;\n }\n\n return false;\n});\n\n/**\n * Merges two {@link Plugin | plugins} or {@link PartialPlugin | partial plugins} together.\n *\n * @param pluginA - The first {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.\n * @param pluginB - The second {@link Plugin | plugin} or {@link PartialPlugin | partial plugin} to merge.\n * @returns The merged {@link Plugin | plugin} or {@link PartialPlugin | partial plugin}.\n */\nexport function merge<TContext extends PluginContext = PluginContext>(\n pluginA: Plugin<TContext> | PartialPlugin<TContext>,\n pluginB: Plugin<TContext> | PartialPlugin<TContext>\n): MergeResult<TContext, typeof pluginA, typeof pluginB> {\n return mergePlugin(pluginA, pluginB) as MergeResult<\n TContext,\n typeof pluginA,\n typeof pluginB\n >;\n}\n\n/**\n * Merges two configuration objects together, with special handling for string values.\n * If the value from the second object is a non-empty string, it will overwrite the value from the first object.\n *\n * @example\n * ```ts\n * const configA = { name: \"Default\", version: \"1.0.0\" };\n * const configB = { name: \"Custom\", description: \"A custom config\" };\n * const mergedConfig = mergeConfig(configA, configB);\n * // Result: { name: \"Custom\", version: \"1.0.0\", description: \"A custom config\" }\n * ```\n *\n * @param objA - The first configuration object.\n * @param objB - The second configuration object.\n * @returns The merged configuration object.\n */\nexport const mergeConfig = createDefu((obj, key, value) => {\n type TValue = (typeof obj)[typeof key];\n\n if (key === \"input\" && isSet(value)) {\n if (isString(obj[key]) && Array.isArray(value) && value.length === 0) {\n return true;\n }\n\n obj[key] = value;\n if (isSetArray(obj[key])) {\n obj[key] = getUnique(obj[key]) as TValue;\n }\n\n return true;\n }\n\n if (key === \"compatibilityDate\" && isSetString(value)) {\n obj[key] = value;\n return true;\n }\n\n if (\n (key === \"format\" || key === \"output.format\") &&\n (isSetString(value) || isSetArray(value))\n ) {\n obj[key] = value;\n if (isSetArray(obj[key])) {\n obj[key] = getUnique(obj[key]) as TValue;\n }\n\n return true;\n }\n\n if (!isSet(obj[key]) && isString(value)) {\n obj[key] = value;\n return true;\n }\n\n return false;\n}) as (...configs: unknown[]) => ResolvedConfig;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,cAAc,YAAY,KAAK,KAAK,UAAU;CAClD,IAAI,aAAa,IAAI,IAAI,KAAK,aAAa,KAAK,GAAG;EACjD,IAAI,OAAO;GACT,GAAG,IAAI;GACP,GAAG;GACH,SAAS,OAAO,GAAG,WAAkB;IACnC,MAAM,CAAC,SAAS,WAAW,MAAM,QAAQ,IAAI,CAE1C,eAAe,IAAI,IAAI,EAAU,GAAG,MAAM,GAE1C,eAAe,KAAK,EAAU,GAAG,MAAM,CAC1C,CAAC;IAED,OAAO,WAAW,UAAU,KAAK,SAAS,OAAO,IAAI,WAAW;GAClE;EACF;EACA,OAAO;CACT;CAEA,OAAO;AACT,CAAC;;;;;;;;AASD,SAAgB,MACd,SACA,SACuD;CACvD,OAAO,YAAY,SAAS,OAAO;AAKrC;;;;;;;;;;;;;;;;;AAkBA,MAAa,cAAc,YAAY,KAAK,KAAK,UAAU;CAGzD,IAAI,QAAQ,WAAW,MAAM,KAAK,GAAG;EACnC,IAAI,SAAS,IAAI,IAAI,KAAK,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW,GACjE,OAAO;EAGT,IAAI,OAAO;EACX,IAAI,WAAW,IAAI,IAAI,GACrB,IAAI,OAAO,UAAU,IAAI,IAAI;EAG/B,OAAO;CACT;CAEA,IAAI,QAAQ,uBAAuB,YAAY,KAAK,GAAG;EACrD,IAAI,OAAO;EACX,OAAO;CACT;CAEA,KACG,QAAQ,YAAY,QAAQ,qBAC5B,YAAY,KAAK,KAAK,WAAW,KAAK,IACvC;EACA,IAAI,OAAO;EACX,IAAI,WAAW,IAAI,IAAI,GACrB,IAAI,OAAO,UAAU,IAAI,IAAI;EAG/B,OAAO;CACT;CAEA,IAAI,CAAC,MAAM,IAAI,IAAI,KAAK,SAAS,KAAK,GAAG;EACvC,IAAI,OAAO;EACX,OAAO;CACT;CAEA,OAAO;AACT,CAAC"}
@@ -0,0 +1,23 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ const require_plugin_utils_merge = require('./merge.cjs');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/plugin-utils/merge.test.ts
13
+ (0, vitest.describe)("base/core/src/plugin-utils/merge.ts", () => {
14
+ (0, vitest.it)("loads module exports", () => {
15
+ (0, vitest.expect)(require_plugin_utils_merge.merge_exports).toBeDefined();
16
+ (0, vitest.expect)(typeof require_plugin_utils_merge.merge_exports).toBe("object");
17
+ });
18
+ (0, vitest.it)("has at least one runtime export", () => {
19
+ (0, vitest.expect)(Object.keys(require_plugin_utils_merge.merge_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
@@ -0,0 +1,25 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ import { merge_exports } from "./merge.mjs";
10
+ import { describe, expect, it } from "vitest";
11
+
12
+ //#region src/plugin-utils/merge.test.ts
13
+ describe("base/core/src/plugin-utils/merge.ts", () => {
14
+ it("loads module exports", () => {
15
+ expect(merge_exports).toBeDefined();
16
+ expect(typeof merge_exports).toBe("object");
17
+ });
18
+ it("has at least one runtime export", () => {
19
+ expect(Object.keys(merge_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion
24
+ export { };
25
+ //# sourceMappingURL=merge.test.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.test.mjs","names":["moduleExports"],"sources":["../../src/plugin-utils/merge.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./merge\";\n\ndescribe(\"base/core/src/plugin-utils/merge.ts\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n\n it(\"has at least one runtime export\", () => {\n expect(Object.keys(moduleExports).length).toBeGreaterThan(0);\n });\n});\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,6CAA6C;CACpD,GAAG,8BAA8B;EAC/B,OAAOA,aAAa,EAAE,YAAY;EAClC,OAAO,OAAOA,aAAa,EAAE,KAAK,QAAQ;CAC5C,CAAC;CAED,GAAG,yCAAyC;EAC1C,OAAO,OAAO,KAAKA,aAAa,EAAE,MAAM,EAAE,gBAAgB,CAAC;CAC7D,CAAC;AACH,CAAC"}
@@ -7,8 +7,10 @@ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPat
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
9
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
10
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
10
11
 
11
12
  //#region src/plugin-utils/modules.ts
13
+ var modules_exports = /* @__PURE__ */ require_runtime.__exportAll({ isBuiltinModule: () => isBuiltinModule });
12
14
  /**
13
15
  * Determine if a module ID is a built-in Powerlines module ID.
14
16
  *
@@ -22,4 +24,10 @@ function isBuiltinModule(context, moduleName) {
22
24
  }
23
25
 
24
26
  //#endregion
25
- exports.isBuiltinModule = isBuiltinModule;
27
+ exports.isBuiltinModule = isBuiltinModule;
28
+ Object.defineProperty(exports, 'modules_exports', {
29
+ enumerable: true,
30
+ get: function () {
31
+ return modules_exports;
32
+ }
33
+ });
@@ -6,7 +6,10 @@ import __tsdown_shims_url from 'node:url'
6
6
  const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
7
  const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
8
 
9
+ import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
10
+
9
11
  //#region src/plugin-utils/modules.ts
12
+ var modules_exports = /* @__PURE__ */ __exportAll({ isBuiltinModule: () => isBuiltinModule });
10
13
  /**
11
14
  * Determine if a module ID is a built-in Powerlines module ID.
12
15
  *
@@ -20,5 +23,5 @@ function isBuiltinModule(context, moduleName) {
20
23
  }
21
24
 
22
25
  //#endregion
23
- export { isBuiltinModule };
26
+ export { isBuiltinModule, modules_exports };
24
27
  //# sourceMappingURL=modules.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"modules.mjs","names":[],"sources":["../../src/plugin-utils/modules.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Context } from \"../types/context\";\n\n/**\n * Determine if a module ID is a built-in Powerlines module ID.\n *\n * @param context - The Powerlines context.\n * @param moduleName - The name of the module to check.\n * @returns `true` if the module is a built-in module, otherwise `false`.\n */\nexport function isBuiltinModule(context: Context, moduleName: string): boolean {\n const prefix: string = context.config?.framework?.name || \"powerlines\";\n\n return (\n moduleName.startsWith(`${prefix.replace(/:$/, \"\")}:`) ||\n Object.keys(context.fs.metadata)\n .filter(key => context.fs.metadata[key]?.type === \"builtin\")\n .includes(moduleName)\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2BA,SAAgB,gBAAgB,SAAkB,YAA6B;CAC7E,MAAM,SAAiB,QAAQ,QAAQ,WAAW,QAAQ;CAE1D,OACE,WAAW,WAAW,GAAG,OAAO,QAAQ,MAAM,EAAE,EAAE,EAAE,KACpD,OAAO,KAAK,QAAQ,GAAG,QAAQ,EAC5B,QAAO,QAAO,QAAQ,GAAG,SAAS,MAAM,SAAS,SAAS,EAC1D,SAAS,UAAU;AAE1B"}
1
+ {"version":3,"file":"modules.mjs","names":[],"sources":["../../src/plugin-utils/modules.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Context } from \"../types/context\";\n\n/**\n * Determine if a module ID is a built-in Powerlines module ID.\n *\n * @param context - The Powerlines context.\n * @param moduleName - The name of the module to check.\n * @returns `true` if the module is a built-in module, otherwise `false`.\n */\nexport function isBuiltinModule(context: Context, moduleName: string): boolean {\n const prefix: string = context.config?.framework?.name || \"powerlines\";\n\n return (\n moduleName.startsWith(`${prefix.replace(/:$/, \"\")}:`) ||\n Object.keys(context.fs.metadata)\n .filter(key => context.fs.metadata[key]?.type === \"builtin\")\n .includes(moduleName)\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2BA,SAAgB,gBAAgB,SAAkB,YAA6B;CAC7E,MAAM,SAAiB,QAAQ,QAAQ,WAAW,QAAQ;CAE1D,OACE,WAAW,WAAW,GAAG,OAAO,QAAQ,MAAM,EAAE,EAAE,EAAE,KACpD,OAAO,KAAK,QAAQ,GAAG,QAAQ,EAC5B,QAAO,QAAO,QAAQ,GAAG,SAAS,MAAM,SAAS,SAAS,EAC1D,SAAS,UAAU;AAE1B"}
@@ -0,0 +1,23 @@
1
+
2
+
3
+ import __tsdown_shims_path from 'node:path'
4
+ import __tsdown_shims_url from 'node:url'
5
+
6
+ const __TSDOWN_SHIM_FILENAME__ = /* @__PURE__ */ __tsdown_shims_url.fileURLToPath(import.meta.url)
7
+ const __TSDOWN_SHIM_DIRNAME__ = /* @__PURE__ */ __tsdown_shims_path.dirname(__TSDOWN_SHIM_FILENAME__)
8
+
9
+ const require_plugin_utils_modules = require('./modules.cjs');
10
+ let vitest = require("vitest");
11
+
12
+ //#region src/plugin-utils/modules.test.ts
13
+ (0, vitest.describe)("base/core/src/plugin-utils/modules.ts", () => {
14
+ (0, vitest.it)("loads module exports", () => {
15
+ (0, vitest.expect)(require_plugin_utils_modules.modules_exports).toBeDefined();
16
+ (0, vitest.expect)(typeof require_plugin_utils_modules.modules_exports).toBe("object");
17
+ });
18
+ (0, vitest.it)("has at least one runtime export", () => {
19
+ (0, vitest.expect)(Object.keys(require_plugin_utils_modules.modules_exports).length).toBeGreaterThan(0);
20
+ });
21
+ });
22
+
23
+ //#endregion