@powerlines/core 0.10.1 → 0.11.1

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 (438) hide show
  1. package/dist/constants/api.cjs +18 -0
  2. package/dist/constants/api.d.cts +6 -0
  3. package/dist/constants/api.d.cts.map +1 -0
  4. package/dist/constants/api.d.mts +6 -0
  5. package/dist/constants/api.d.mts.map +1 -0
  6. package/dist/constants/api.mjs +16 -0
  7. package/dist/constants/api.mjs.map +1 -0
  8. package/dist/constants/commands.cjs +3 -11
  9. package/dist/constants/commands.d.cts +1 -1
  10. package/dist/constants/commands.d.cts.map +1 -1
  11. package/dist/constants/commands.d.mts +1 -1
  12. package/dist/constants/commands.d.mts.map +1 -1
  13. package/dist/constants/commands.mjs +3 -11
  14. package/dist/constants/commands.mjs.map +1 -1
  15. package/dist/constants/devtools.cjs +23 -0
  16. package/dist/constants/devtools.d.cts +13 -0
  17. package/dist/constants/devtools.d.cts.map +1 -0
  18. package/dist/constants/devtools.d.mts +13 -0
  19. package/dist/constants/devtools.d.mts.map +1 -0
  20. package/dist/constants/devtools.mjs +14 -0
  21. package/dist/constants/devtools.mjs.map +1 -0
  22. package/dist/constants/environments.cjs +1 -0
  23. package/dist/constants/extensions.cjs +21 -0
  24. package/dist/constants/extensions.d.cts +5 -0
  25. package/dist/constants/extensions.d.cts.map +1 -0
  26. package/dist/constants/extensions.d.mts +5 -0
  27. package/dist/constants/extensions.d.mts.map +1 -0
  28. package/dist/constants/extensions.mjs +20 -0
  29. package/dist/constants/extensions.mjs.map +1 -0
  30. package/dist/constants/fs.cjs +1 -0
  31. package/dist/constants/hooks.cjs +1 -0
  32. package/dist/constants/index.cjs +48 -24
  33. package/dist/constants/index.d.cts +5 -1
  34. package/dist/constants/index.d.mts +5 -1
  35. package/dist/constants/index.mjs +6 -2
  36. package/dist/constants/log-level.cjs +90 -0
  37. package/dist/constants/log-level.d.cts +63 -0
  38. package/dist/constants/log-level.d.cts.map +1 -0
  39. package/dist/constants/log-level.d.mts +63 -0
  40. package/dist/constants/log-level.d.mts.map +1 -0
  41. package/dist/constants/log-level.mjs +82 -0
  42. package/dist/constants/log-level.mjs.map +1 -0
  43. package/dist/constants/meta.cjs +1 -0
  44. package/dist/constants/plugin.cjs +3 -2
  45. package/dist/constants/plugin.d.cts +2 -2
  46. package/dist/constants/plugin.d.mts +2 -2
  47. package/dist/context/base-context.cjs +127 -0
  48. package/dist/context/base-context.d.cts +81 -0
  49. package/dist/context/base-context.d.cts.map +1 -0
  50. package/dist/context/base-context.d.mts +81 -0
  51. package/dist/context/base-context.d.mts.map +1 -0
  52. package/dist/context/base-context.mjs +125 -0
  53. package/dist/context/base-context.mjs.map +1 -0
  54. package/dist/context/context.cjs +934 -0
  55. package/dist/context/context.d.cts +369 -0
  56. package/dist/context/context.d.cts.map +1 -0
  57. package/dist/context/context.d.mts +369 -0
  58. package/dist/context/context.d.mts.map +1 -0
  59. package/dist/context/context.mjs +932 -0
  60. package/dist/context/context.mjs.map +1 -0
  61. package/dist/context/environment-context.cjs +219 -0
  62. package/dist/context/environment-context.d.cts +100 -0
  63. package/dist/context/environment-context.d.cts.map +1 -0
  64. package/dist/context/environment-context.d.mts +100 -0
  65. package/dist/context/environment-context.d.mts.map +1 -0
  66. package/dist/context/environment-context.mjs +218 -0
  67. package/dist/context/environment-context.mjs.map +1 -0
  68. package/dist/context/execution-context.cjs +230 -0
  69. package/dist/context/execution-context.d.cts +101 -0
  70. package/dist/context/execution-context.d.cts.map +1 -0
  71. package/dist/context/execution-context.d.mts +101 -0
  72. package/dist/context/execution-context.d.mts.map +1 -0
  73. package/dist/context/execution-context.mjs +228 -0
  74. package/dist/context/execution-context.mjs.map +1 -0
  75. package/dist/context/index.cjs +12 -0
  76. package/dist/context/index.d.cts +6 -0
  77. package/dist/context/index.d.mts +6 -0
  78. package/dist/context/index.mjs +7 -0
  79. package/dist/context/plugin-context.cjs +83 -0
  80. package/dist/context/plugin-context.d.cts +18 -0
  81. package/dist/context/plugin-context.d.cts.map +1 -0
  82. package/dist/context/plugin-context.d.mts +18 -0
  83. package/dist/context/plugin-context.d.mts.map +1 -0
  84. package/dist/context/plugin-context.mjs +82 -0
  85. package/dist/context/plugin-context.mjs.map +1 -0
  86. package/dist/index.cjs +62 -6
  87. package/dist/index.d.cts +23 -11
  88. package/dist/index.d.mts +23 -11
  89. package/dist/index.mjs +17 -5
  90. package/dist/lib/config.cjs +167 -28
  91. package/dist/lib/config.d.cts +95 -14
  92. package/dist/lib/config.d.cts.map +1 -1
  93. package/dist/lib/config.d.mts +95 -14
  94. package/dist/lib/config.d.mts.map +1 -1
  95. package/dist/lib/config.mjs +160 -28
  96. package/dist/lib/config.mjs.map +1 -1
  97. package/dist/lib/context-helpers.cjs +43 -0
  98. package/dist/lib/context-helpers.d.cts +19 -0
  99. package/dist/lib/context-helpers.d.cts.map +1 -0
  100. package/dist/lib/context-helpers.d.mts +19 -0
  101. package/dist/lib/context-helpers.d.mts.map +1 -0
  102. package/dist/lib/context-helpers.mjs +41 -0
  103. package/dist/lib/context-helpers.mjs.map +1 -0
  104. package/dist/lib/entry.cjs +9 -9
  105. package/dist/lib/entry.d.cts +5 -5
  106. package/dist/lib/entry.d.cts.map +1 -1
  107. package/dist/lib/entry.d.mts +5 -5
  108. package/dist/lib/entry.d.mts.map +1 -1
  109. package/dist/lib/entry.mjs +9 -9
  110. package/dist/lib/entry.mjs.map +1 -1
  111. package/dist/lib/environment.cjs +72 -0
  112. package/dist/lib/environment.d.cts +12 -0
  113. package/dist/lib/environment.d.cts.map +1 -0
  114. package/dist/lib/environment.d.mts +12 -0
  115. package/dist/lib/environment.d.mts.map +1 -0
  116. package/dist/lib/environment.mjs +67 -0
  117. package/dist/lib/environment.mjs.map +1 -0
  118. package/dist/lib/events.cjs +43 -0
  119. package/dist/lib/events.d.cts +10 -0
  120. package/dist/lib/events.d.cts.map +1 -0
  121. package/dist/lib/events.d.mts +10 -0
  122. package/dist/lib/events.d.mts.map +1 -0
  123. package/dist/lib/events.mjs +42 -0
  124. package/dist/lib/events.mjs.map +1 -0
  125. package/dist/lib/generate-types.cjs +371 -0
  126. package/dist/lib/generate-types.d.cts +67 -0
  127. package/dist/lib/generate-types.d.cts.map +1 -0
  128. package/dist/lib/generate-types.d.mts +67 -0
  129. package/dist/lib/generate-types.d.mts.map +1 -0
  130. package/dist/lib/generate-types.mjs +368 -0
  131. package/dist/lib/generate-types.mjs.map +1 -0
  132. package/dist/lib/hooks.cjs +152 -0
  133. package/dist/lib/hooks.d.cts +28 -0
  134. package/dist/lib/hooks.d.cts.map +1 -0
  135. package/dist/lib/hooks.d.mts +28 -0
  136. package/dist/lib/hooks.d.mts.map +1 -0
  137. package/dist/lib/hooks.mjs +147 -0
  138. package/dist/lib/hooks.mjs.map +1 -0
  139. package/dist/lib/index.cjs +64 -6
  140. package/dist/lib/index.d.cts +15 -3
  141. package/dist/lib/index.d.mts +15 -3
  142. package/dist/lib/index.mjs +19 -5
  143. package/dist/lib/install-dependencies.cjs +25 -0
  144. package/dist/lib/install-dependencies.d.cts +12 -0
  145. package/dist/lib/install-dependencies.d.cts.map +1 -0
  146. package/dist/lib/install-dependencies.d.mts +12 -0
  147. package/dist/lib/install-dependencies.d.mts.map +1 -0
  148. package/dist/lib/install-dependencies.mjs +24 -0
  149. package/dist/lib/install-dependencies.mjs.map +1 -0
  150. package/dist/lib/meta.cjs +57 -0
  151. package/dist/lib/meta.d.cts +34 -0
  152. package/dist/lib/meta.d.cts.map +1 -0
  153. package/dist/lib/meta.d.mts +34 -0
  154. package/dist/lib/meta.d.mts.map +1 -0
  155. package/dist/lib/meta.mjs +54 -0
  156. package/dist/lib/meta.mjs.map +1 -0
  157. package/dist/lib/plugins.cjs +150 -0
  158. package/dist/lib/plugins.d.cts +40 -0
  159. package/dist/lib/plugins.d.cts.map +1 -0
  160. package/dist/lib/plugins.d.mts +40 -0
  161. package/dist/lib/plugins.d.mts.map +1 -0
  162. package/dist/lib/plugins.mjs +146 -0
  163. package/dist/lib/plugins.mjs.map +1 -0
  164. package/dist/lib/resolver.cjs +35 -0
  165. package/dist/lib/resolver.d.cts +21 -0
  166. package/dist/lib/resolver.d.cts.map +1 -0
  167. package/dist/lib/resolver.d.mts +21 -0
  168. package/dist/lib/resolver.d.mts.map +1 -0
  169. package/dist/lib/resolver.mjs +33 -0
  170. package/dist/lib/resolver.mjs.map +1 -0
  171. package/dist/lib/schemas.cjs +9 -0
  172. package/dist/lib/schemas.d.cts +2 -0
  173. package/dist/lib/schemas.d.mts +2 -0
  174. package/dist/lib/schemas.mjs +3 -0
  175. package/dist/lib/streaming-channel.cjs +260 -0
  176. package/dist/lib/streaming-channel.d.cts +133 -0
  177. package/dist/lib/streaming-channel.d.cts.map +1 -0
  178. package/dist/lib/streaming-channel.d.mts +133 -0
  179. package/dist/lib/streaming-channel.d.mts.map +1 -0
  180. package/dist/lib/streaming-channel.mjs +258 -0
  181. package/dist/lib/streaming-channel.mjs.map +1 -0
  182. package/dist/lib/typescript/index.cjs +16 -0
  183. package/dist/lib/typescript/index.d.cts +3 -0
  184. package/dist/lib/typescript/index.d.mts +3 -0
  185. package/dist/lib/typescript/index.mjs +4 -0
  186. package/dist/lib/typescript/ts-morph.cjs +105 -0
  187. package/dist/lib/typescript/ts-morph.d.cts +38 -0
  188. package/dist/lib/typescript/ts-morph.d.cts.map +1 -0
  189. package/dist/lib/typescript/ts-morph.d.mts +38 -0
  190. package/dist/lib/typescript/ts-morph.d.mts.map +1 -0
  191. package/dist/lib/typescript/ts-morph.mjs +102 -0
  192. package/dist/lib/typescript/ts-morph.mjs.map +1 -0
  193. package/dist/lib/typescript/tsconfig.cjs +253 -0
  194. package/dist/lib/typescript/tsconfig.d.cts +77 -0
  195. package/dist/lib/typescript/tsconfig.d.cts.map +1 -0
  196. package/dist/lib/typescript/tsconfig.d.mts +77 -0
  197. package/dist/lib/typescript/tsconfig.d.mts.map +1 -0
  198. package/dist/lib/typescript/tsconfig.mjs +240 -0
  199. package/dist/lib/typescript/tsconfig.mjs.map +1 -0
  200. package/dist/lib/unplugin/helpers.cjs +2 -2
  201. package/dist/lib/unplugin/module-resolution.cjs +21 -20
  202. package/dist/lib/unplugin/module-resolution.d.cts +10 -2
  203. package/dist/lib/unplugin/module-resolution.d.cts.map +1 -1
  204. package/dist/lib/unplugin/module-resolution.d.mts +10 -2
  205. package/dist/lib/unplugin/module-resolution.d.mts.map +1 -1
  206. package/dist/lib/unplugin/module-resolution.mjs +20 -20
  207. package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
  208. package/dist/lib/unplugin/plugin.cjs +55 -61
  209. package/dist/lib/unplugin/plugin.d.cts +10 -4
  210. package/dist/lib/unplugin/plugin.d.cts.map +1 -1
  211. package/dist/lib/unplugin/plugin.d.mts +10 -4
  212. package/dist/lib/unplugin/plugin.d.mts.map +1 -1
  213. package/dist/lib/unplugin/plugin.mjs +55 -61
  214. package/dist/lib/unplugin/plugin.mjs.map +1 -1
  215. package/dist/lib/utilities/file-header.cjs +2 -2
  216. package/dist/lib/utilities/file-header.mjs +2 -2
  217. package/dist/lib/utilities/file-header.mjs.map +1 -1
  218. package/dist/lib/utilities/format.cjs +16 -8
  219. package/dist/lib/utilities/format.d.cts.map +1 -1
  220. package/dist/lib/utilities/format.d.mts.map +1 -1
  221. package/dist/lib/utilities/format.mjs +15 -8
  222. package/dist/lib/utilities/format.mjs.map +1 -1
  223. package/dist/lib/utilities/index.cjs +2 -2
  224. package/dist/lib/utilities/index.mjs +2 -2
  225. package/dist/lib/utilities/source-file.cjs +1 -1
  226. package/dist/lib/utilities/source-map.cjs +1 -1
  227. package/dist/lib/utilities/write-file.cjs +1 -2
  228. package/dist/lib/utilities/write-file.d.cts +1 -1
  229. package/dist/lib/utilities/write-file.d.cts.map +1 -1
  230. package/dist/lib/utilities/write-file.d.mts +1 -1
  231. package/dist/lib/utilities/write-file.d.mts.map +1 -1
  232. package/dist/lib/utilities/write-file.mjs +1 -2
  233. package/dist/lib/utilities/write-file.mjs.map +1 -1
  234. package/dist/lib/vfs.cjs +1104 -0
  235. package/dist/lib/vfs.d.cts +321 -0
  236. package/dist/lib/vfs.d.cts.map +1 -0
  237. package/dist/lib/vfs.d.mts +321 -0
  238. package/dist/lib/vfs.d.mts.map +1 -0
  239. package/dist/lib/vfs.mjs +1102 -0
  240. package/dist/lib/vfs.mjs.map +1 -0
  241. package/dist/plugin-base.cjs +5 -9
  242. package/dist/plugin-base.mjs +5 -9
  243. package/dist/plugin-base.mjs.map +1 -1
  244. package/dist/plugin-utils/build-helpers.cjs +2 -2
  245. package/dist/plugin-utils/build-helpers.d.cts +2 -2
  246. package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
  247. package/dist/plugin-utils/build-helpers.d.mts +2 -2
  248. package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
  249. package/dist/plugin-utils/build-helpers.mjs +2 -2
  250. package/dist/plugin-utils/build-helpers.mjs.map +1 -1
  251. package/dist/plugin-utils/combine-plugins.d.cts +7 -8
  252. package/dist/plugin-utils/combine-plugins.d.cts.map +1 -1
  253. package/dist/plugin-utils/combine-plugins.d.mts +7 -8
  254. package/dist/plugin-utils/combine-plugins.d.mts.map +1 -1
  255. package/dist/plugin-utils/combine-plugins.mjs.map +1 -1
  256. package/dist/plugin-utils/context-helpers.cjs +29 -16
  257. package/dist/plugin-utils/context-helpers.d.cts +10 -2
  258. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  259. package/dist/plugin-utils/context-helpers.d.mts +10 -2
  260. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  261. package/dist/plugin-utils/context-helpers.mjs +29 -17
  262. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  263. package/dist/plugin-utils/docs-helper.cjs +17 -0
  264. package/dist/plugin-utils/docs-helper.d.cts +11 -0
  265. package/dist/plugin-utils/docs-helper.d.cts.map +1 -0
  266. package/dist/plugin-utils/docs-helper.d.mts +11 -0
  267. package/dist/plugin-utils/docs-helper.d.mts.map +1 -0
  268. package/dist/plugin-utils/docs-helper.mjs +16 -0
  269. package/dist/plugin-utils/docs-helper.mjs.map +1 -0
  270. package/dist/plugin-utils/extend.mjs.map +1 -1
  271. package/dist/plugin-utils/filter.cjs +101 -0
  272. package/dist/plugin-utils/filter.d.cts +16 -0
  273. package/dist/plugin-utils/filter.d.cts.map +1 -0
  274. package/dist/plugin-utils/filter.d.mts +16 -0
  275. package/dist/plugin-utils/filter.d.mts.map +1 -0
  276. package/dist/plugin-utils/filter.mjs +91 -0
  277. package/dist/plugin-utils/filter.mjs.map +1 -0
  278. package/dist/plugin-utils/format-package-json.cjs +1 -1
  279. package/dist/plugin-utils/format-package-json.mjs +1 -1
  280. package/dist/plugin-utils/format-package-json.mjs.map +1 -1
  281. package/dist/plugin-utils/format.cjs +44 -0
  282. package/dist/plugin-utils/format.d.cts +11 -0
  283. package/dist/plugin-utils/format.d.cts.map +1 -0
  284. package/dist/plugin-utils/format.d.mts +11 -0
  285. package/dist/plugin-utils/format.d.mts.map +1 -0
  286. package/dist/plugin-utils/format.mjs +43 -0
  287. package/dist/plugin-utils/format.mjs.map +1 -0
  288. package/dist/plugin-utils/get-config-path.cjs +34 -32
  289. package/dist/plugin-utils/get-config-path.d.cts +4 -1
  290. package/dist/plugin-utils/get-config-path.d.cts.map +1 -1
  291. package/dist/plugin-utils/get-config-path.d.mts +4 -1
  292. package/dist/plugin-utils/get-config-path.d.mts.map +1 -1
  293. package/dist/plugin-utils/get-config-path.mjs +34 -32
  294. package/dist/plugin-utils/get-config-path.mjs.map +1 -1
  295. package/dist/plugin-utils/helpers.cjs +25 -10
  296. package/dist/plugin-utils/helpers.d.cts +31 -24
  297. package/dist/plugin-utils/helpers.d.cts.map +1 -1
  298. package/dist/plugin-utils/helpers.d.mts +31 -24
  299. package/dist/plugin-utils/helpers.d.mts.map +1 -1
  300. package/dist/plugin-utils/helpers.mjs +22 -8
  301. package/dist/plugin-utils/helpers.mjs.map +1 -1
  302. package/dist/plugin-utils/index.cjs +48 -4
  303. package/dist/plugin-utils/index.d.cts +9 -3
  304. package/dist/plugin-utils/index.d.mts +9 -3
  305. package/dist/plugin-utils/index.mjs +11 -5
  306. package/dist/plugin-utils/install.cjs +47 -0
  307. package/dist/plugin-utils/install.d.cts +23 -0
  308. package/dist/plugin-utils/install.d.cts.map +1 -0
  309. package/dist/plugin-utils/install.d.mts +23 -0
  310. package/dist/plugin-utils/install.d.mts.map +1 -0
  311. package/dist/plugin-utils/install.mjs +45 -0
  312. package/dist/plugin-utils/install.mjs.map +1 -0
  313. package/dist/plugin-utils/logging.cjs +605 -0
  314. package/dist/plugin-utils/logging.d.cts +111 -0
  315. package/dist/plugin-utils/logging.d.cts.map +1 -0
  316. package/dist/plugin-utils/logging.d.mts +111 -0
  317. package/dist/plugin-utils/logging.d.mts.map +1 -0
  318. package/dist/plugin-utils/logging.mjs +588 -0
  319. package/dist/plugin-utils/logging.mjs.map +1 -0
  320. package/dist/plugin-utils/merge.cjs +4 -4
  321. package/dist/plugin-utils/merge.d.cts +0 -1
  322. package/dist/plugin-utils/merge.d.cts.map +1 -1
  323. package/dist/plugin-utils/merge.d.mts.map +1 -1
  324. package/dist/plugin-utils/merge.mjs +3 -3
  325. package/dist/plugin-utils/merge.mjs.map +1 -1
  326. package/dist/plugin-utils/modules.cjs +1 -1
  327. package/dist/plugin-utils/modules.mjs +1 -1
  328. package/dist/plugin-utils/modules.mjs.map +1 -1
  329. package/dist/plugin-utils/paths.cjs +18 -4
  330. package/dist/plugin-utils/paths.d.cts +12 -2
  331. package/dist/plugin-utils/paths.d.cts.map +1 -1
  332. package/dist/plugin-utils/paths.d.mts +12 -2
  333. package/dist/plugin-utils/paths.d.mts.map +1 -1
  334. package/dist/plugin-utils/paths.mjs +18 -4
  335. package/dist/plugin-utils/paths.mjs.map +1 -1
  336. package/dist/plugin-utils/virtual.cjs +80 -0
  337. package/dist/plugin-utils/virtual.d.cts +69 -0
  338. package/dist/plugin-utils/virtual.d.cts.map +1 -0
  339. package/dist/plugin-utils/virtual.d.mts +69 -0
  340. package/dist/plugin-utils/virtual.d.mts.map +1 -0
  341. package/dist/plugin-utils/virtual.mjs +73 -0
  342. package/dist/plugin-utils/virtual.mjs.map +1 -0
  343. package/dist/schemas/fs.cjs +232 -0
  344. package/dist/schemas/fs.d.cts +127 -0
  345. package/dist/schemas/fs.d.cts.map +1 -0
  346. package/dist/schemas/fs.d.mts +127 -0
  347. package/dist/schemas/fs.d.mts.map +1 -0
  348. package/dist/schemas/fs.mjs +226 -0
  349. package/dist/schemas/fs.mjs.map +1 -0
  350. package/dist/storage/base.cjs +216 -0
  351. package/dist/storage/base.d.cts +201 -0
  352. package/dist/storage/base.d.cts.map +1 -0
  353. package/dist/storage/base.d.mts +201 -0
  354. package/dist/storage/base.d.mts.map +1 -0
  355. package/dist/storage/base.mjs +215 -0
  356. package/dist/storage/base.mjs.map +1 -0
  357. package/dist/storage/file-system.cjs +180 -0
  358. package/dist/storage/file-system.d.cts +129 -0
  359. package/dist/storage/file-system.d.cts.map +1 -0
  360. package/dist/storage/file-system.d.mts +129 -0
  361. package/dist/storage/file-system.d.mts.map +1 -0
  362. package/dist/storage/file-system.mjs +179 -0
  363. package/dist/storage/file-system.mjs.map +1 -0
  364. package/dist/storage/helpers.cjs +37 -0
  365. package/dist/storage/helpers.d.cts +25 -0
  366. package/dist/storage/helpers.d.cts.map +1 -0
  367. package/dist/storage/helpers.d.mts +25 -0
  368. package/dist/storage/helpers.d.mts.map +1 -0
  369. package/dist/storage/helpers.mjs +34 -0
  370. package/dist/storage/helpers.mjs.map +1 -0
  371. package/dist/storage/index.cjs +12 -0
  372. package/dist/storage/index.d.cts +5 -0
  373. package/dist/storage/index.d.mts +5 -0
  374. package/dist/storage/index.mjs +6 -0
  375. package/dist/storage/virtual.cjs +98 -0
  376. package/dist/storage/virtual.d.cts +80 -0
  377. package/dist/storage/virtual.d.cts.map +1 -0
  378. package/dist/storage/virtual.d.mts +80 -0
  379. package/dist/storage/virtual.d.mts.map +1 -0
  380. package/dist/storage/virtual.mjs +97 -0
  381. package/dist/storage/virtual.mjs.map +1 -0
  382. package/dist/types/api.d.cts +18 -99
  383. package/dist/types/api.d.cts.map +1 -1
  384. package/dist/types/api.d.mts +18 -99
  385. package/dist/types/api.d.mts.map +1 -1
  386. package/dist/types/config.d.cts +239 -141
  387. package/dist/types/config.d.cts.map +1 -1
  388. package/dist/types/config.d.mts +240 -142
  389. package/dist/types/config.d.mts.map +1 -1
  390. package/dist/types/context.d.cts +205 -136
  391. package/dist/types/context.d.cts.map +1 -1
  392. package/dist/types/context.d.mts +208 -139
  393. package/dist/types/context.d.mts.map +1 -1
  394. package/dist/types/fs.d.cts +49 -5
  395. package/dist/types/fs.d.cts.map +1 -1
  396. package/dist/types/fs.d.mts +50 -6
  397. package/dist/types/fs.d.mts.map +1 -1
  398. package/dist/types/hooks.d.cts +26 -38
  399. package/dist/types/hooks.d.cts.map +1 -1
  400. package/dist/types/hooks.d.mts +26 -38
  401. package/dist/types/hooks.d.mts.map +1 -1
  402. package/dist/types/index.d.cts +9 -0
  403. package/dist/types/index.d.mts +8 -8
  404. package/dist/types/logging.d.cts +161 -0
  405. package/dist/types/logging.d.cts.map +1 -0
  406. package/dist/types/logging.d.mts +161 -0
  407. package/dist/types/logging.d.mts.map +1 -0
  408. package/dist/types/plugin.d.cts +23 -24
  409. package/dist/types/plugin.d.cts.map +1 -1
  410. package/dist/types/plugin.d.mts +23 -24
  411. package/dist/types/plugin.d.mts.map +1 -1
  412. package/dist/types/tsconfig.d.cts +15 -12
  413. package/dist/types/tsconfig.d.cts.map +1 -1
  414. package/dist/types/tsconfig.d.mts +16 -13
  415. package/dist/types/tsconfig.d.mts.map +1 -1
  416. package/dist/types/unplugin.d.cts +10 -25
  417. package/dist/types/unplugin.d.cts.map +1 -1
  418. package/dist/types/unplugin.d.mts +10 -25
  419. package/dist/types/unplugin.d.mts.map +1 -1
  420. package/package.json +270 -425
  421. package/schemas/fs.capnp +42 -0
  422. package/dist/lib/logger.cjs +0 -59
  423. package/dist/lib/logger.d.cts +0 -23
  424. package/dist/lib/logger.d.cts.map +0 -1
  425. package/dist/lib/logger.d.mts +0 -23
  426. package/dist/lib/logger.d.mts.map +0 -1
  427. package/dist/lib/logger.mjs +0 -56
  428. package/dist/lib/logger.mjs.map +0 -1
  429. package/dist/types/_internal.cjs +0 -0
  430. package/dist/types/_internal.d.cts +0 -106
  431. package/dist/types/_internal.d.cts.map +0 -1
  432. package/dist/types/_internal.d.mts +0 -106
  433. package/dist/types/_internal.d.mts.map +0 -1
  434. package/dist/types/_internal.mjs +0 -1
  435. package/dist/types/commands.d.cts +0 -13
  436. package/dist/types/commands.d.cts.map +0 -1
  437. package/dist/types/commands.d.mts +0 -13
  438. package/dist/types/commands.d.mts.map +0 -1
@@ -0,0 +1,98 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ const require_storage_base = require('./base.cjs');
4
+ let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
5
+
6
+ //#region src/storage/virtual.ts
7
+ /**
8
+ * Virtual/in-memory storage adapter implementation.
9
+ */
10
+ var VirtualStorageAdapter = class extends require_storage_base.BaseStorageAdapter {
11
+ /**
12
+ * A name identifying the storage adapter type.
13
+ */
14
+ name = "virtual";
15
+ /**
16
+ * The storage preset for the adapter.
17
+ *
18
+ * @remarks
19
+ * This can be used as an alternate way to identify the type of storage being used.
20
+ */
21
+ preset = "virtual";
22
+ /**
23
+ * In-memory data storage.
24
+ */
25
+ data = /* @__PURE__ */ new Map();
26
+ /**
27
+ * Constructor for the VirtualStorageAdapter.
28
+ *
29
+ * @param context - The Powerlines context.
30
+ * @param options - Configuration options for the storage adapter.
31
+ */
32
+ constructor(context, options) {
33
+ super(context, options);
34
+ }
35
+ /**
36
+ * Synchronously checks if a key exists in the storage.
37
+ *
38
+ * @param key - The key to check for existence.
39
+ * @returns Returns `true` if the key exists, otherwise `false`.
40
+ */
41
+ existsSync(key) {
42
+ return this.data.has(this.resolve(key));
43
+ }
44
+ /**
45
+ * Synchronously retrieves the value associated with a given key.
46
+ *
47
+ * @param key - The key whose value is to be retrieved.
48
+ * @returns The value associated with the key, or `null` if the key does not exist.
49
+ */
50
+ getSync(key) {
51
+ return this.data.get(this.resolve(key)) ?? null;
52
+ }
53
+ /**
54
+ * Synchronously sets the value for a given key.
55
+ *
56
+ * @param key - The key to set the value for.
57
+ * @param value - The value to set.
58
+ */
59
+ setSync(key, value) {
60
+ if (!this.isReadOnly && (!this.existsSync(key) || this.overwrite)) this.data.set(this.resolve(key), value);
61
+ }
62
+ /**
63
+ * Synchronously removes a key from the storage.
64
+ *
65
+ * @param key - The key to remove.
66
+ */
67
+ removeSync(key) {
68
+ if (!this.isReadOnly && this.overwrite) this.data.delete(this.resolve(key));
69
+ }
70
+ /**
71
+ * Lists all keys under a given base path synchronously.
72
+ *
73
+ * @param base - The base path to list keys from.
74
+ * @returns An array of keys under the specified base path.
75
+ */
76
+ listSync(base) {
77
+ return [...this.data.keys().filter((key) => !base ? true : (0, _stryke_path_is_parent_path.isParentPath)(key, this.resolve(base)))];
78
+ }
79
+ /**
80
+ * Disposes of the storage adapter, releasing any held resources.
81
+ *
82
+ * @returns A promise that resolves when the disposal is complete.
83
+ */
84
+ async dispose() {
85
+ return this.clear();
86
+ }
87
+ /**
88
+ * Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.
89
+ *
90
+ * @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.
91
+ */
92
+ get overwrite() {
93
+ return !this.isReadOnly;
94
+ }
95
+ };
96
+
97
+ //#endregion
98
+ exports.VirtualStorageAdapter = VirtualStorageAdapter;
@@ -0,0 +1,80 @@
1
+ import { Context } from "../types/context.cjs";
2
+ import { BaseStorageAdapter, StorageAdapterOptions } from "./base.cjs";
3
+
4
+ //#region src/storage/virtual.d.ts
5
+ /**
6
+ * Virtual/in-memory storage adapter implementation.
7
+ */
8
+ declare class VirtualStorageAdapter extends BaseStorageAdapter {
9
+ /**
10
+ * A name identifying the storage adapter type.
11
+ */
12
+ name: string;
13
+ /**
14
+ * The storage preset for the adapter.
15
+ *
16
+ * @remarks
17
+ * This can be used as an alternate way to identify the type of storage being used.
18
+ */
19
+ readonly preset = "virtual";
20
+ /**
21
+ * In-memory data storage.
22
+ */
23
+ protected data: Map<string, any>;
24
+ /**
25
+ * Constructor for the VirtualStorageAdapter.
26
+ *
27
+ * @param context - The Powerlines context.
28
+ * @param options - Configuration options for the storage adapter.
29
+ */
30
+ constructor(context: Context, options?: StorageAdapterOptions);
31
+ /**
32
+ * Synchronously checks if a key exists in the storage.
33
+ *
34
+ * @param key - The key to check for existence.
35
+ * @returns Returns `true` if the key exists, otherwise `false`.
36
+ */
37
+ existsSync(key: string): boolean;
38
+ /**
39
+ * Synchronously retrieves the value associated with a given key.
40
+ *
41
+ * @param key - The key whose value is to be retrieved.
42
+ * @returns The value associated with the key, or `null` if the key does not exist.
43
+ */
44
+ getSync(key: string): string | null;
45
+ /**
46
+ * Synchronously sets the value for a given key.
47
+ *
48
+ * @param key - The key to set the value for.
49
+ * @param value - The value to set.
50
+ */
51
+ setSync(key: string, value: string): void;
52
+ /**
53
+ * Synchronously removes a key from the storage.
54
+ *
55
+ * @param key - The key to remove.
56
+ */
57
+ removeSync(key: string): void;
58
+ /**
59
+ * Lists all keys under a given base path synchronously.
60
+ *
61
+ * @param base - The base path to list keys from.
62
+ * @returns An array of keys under the specified base path.
63
+ */
64
+ listSync(base?: string): string[];
65
+ /**
66
+ * Disposes of the storage adapter, releasing any held resources.
67
+ *
68
+ * @returns A promise that resolves when the disposal is complete.
69
+ */
70
+ dispose(): Promise<void>;
71
+ /**
72
+ * Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.
73
+ *
74
+ * @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.
75
+ */
76
+ protected get overwrite(): boolean;
77
+ }
78
+ //#endregion
79
+ export { VirtualStorageAdapter };
80
+ //# sourceMappingURL=virtual.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtual.d.cts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":";;;;;;AAyBA;cAAa,qBAAA,SAA8B,kBAAA;;;;EAIlC,IAAA;EAuF0B;;;;;;EAAA,SA/ER,MAAA;EAKf;;;EAAA,UAAA,IAAA,EAAI,GAAA;EAQK;;;;;;cAAA,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EA8BxC;;;;;;EApBA,UAAA,CAAW,GAAA;EAwDI;;;;;;EA9Cf,OAAA,CAAQ,GAAA;;;;;;;EAUR,OAAA,CAAQ,GAAA,UAAa,KAAA;;;;;;EAWrB,UAAA,CAAW,GAAA;;;;;;;EAYX,QAAA,CAAS,IAAA;;;;;;EAaM,OAAA,CAAA,GAAW,OAAA;;;;;;gBASV,SAAA,CAAA;AAAA"}
@@ -0,0 +1,80 @@
1
+ import { Context } from "../types/context.mjs";
2
+ import { BaseStorageAdapter, StorageAdapterOptions } from "./base.mjs";
3
+
4
+ //#region src/storage/virtual.d.ts
5
+ /**
6
+ * Virtual/in-memory storage adapter implementation.
7
+ */
8
+ declare class VirtualStorageAdapter extends BaseStorageAdapter {
9
+ /**
10
+ * A name identifying the storage adapter type.
11
+ */
12
+ name: string;
13
+ /**
14
+ * The storage preset for the adapter.
15
+ *
16
+ * @remarks
17
+ * This can be used as an alternate way to identify the type of storage being used.
18
+ */
19
+ readonly preset = "virtual";
20
+ /**
21
+ * In-memory data storage.
22
+ */
23
+ protected data: Map<string, any>;
24
+ /**
25
+ * Constructor for the VirtualStorageAdapter.
26
+ *
27
+ * @param context - The Powerlines context.
28
+ * @param options - Configuration options for the storage adapter.
29
+ */
30
+ constructor(context: Context, options?: StorageAdapterOptions);
31
+ /**
32
+ * Synchronously checks if a key exists in the storage.
33
+ *
34
+ * @param key - The key to check for existence.
35
+ * @returns Returns `true` if the key exists, otherwise `false`.
36
+ */
37
+ existsSync(key: string): boolean;
38
+ /**
39
+ * Synchronously retrieves the value associated with a given key.
40
+ *
41
+ * @param key - The key whose value is to be retrieved.
42
+ * @returns The value associated with the key, or `null` if the key does not exist.
43
+ */
44
+ getSync(key: string): string | null;
45
+ /**
46
+ * Synchronously sets the value for a given key.
47
+ *
48
+ * @param key - The key to set the value for.
49
+ * @param value - The value to set.
50
+ */
51
+ setSync(key: string, value: string): void;
52
+ /**
53
+ * Synchronously removes a key from the storage.
54
+ *
55
+ * @param key - The key to remove.
56
+ */
57
+ removeSync(key: string): void;
58
+ /**
59
+ * Lists all keys under a given base path synchronously.
60
+ *
61
+ * @param base - The base path to list keys from.
62
+ * @returns An array of keys under the specified base path.
63
+ */
64
+ listSync(base?: string): string[];
65
+ /**
66
+ * Disposes of the storage adapter, releasing any held resources.
67
+ *
68
+ * @returns A promise that resolves when the disposal is complete.
69
+ */
70
+ dispose(): Promise<void>;
71
+ /**
72
+ * Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.
73
+ *
74
+ * @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.
75
+ */
76
+ protected get overwrite(): boolean;
77
+ }
78
+ //#endregion
79
+ export { VirtualStorageAdapter };
80
+ //# sourceMappingURL=virtual.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtual.d.mts","names":[],"sources":["../../src/storage/virtual.ts"],"mappings":";;;;;;AAyBA;cAAa,qBAAA,SAA8B,kBAAA;;;;EAIlC,IAAA;EAuF0B;;;;;;EAAA,SA/ER,MAAA;EAKf;;;EAAA,UAAA,IAAA,EAAI,GAAA;EAQK;;;;;;cAAA,OAAA,EAAS,OAAA,EAAS,OAAA,GAAU,qBAAA;EA8BxC;;;;;;EApBA,UAAA,CAAW,GAAA;EAwDI;;;;;;EA9Cf,OAAA,CAAQ,GAAA;;;;;;;EAUR,OAAA,CAAQ,GAAA,UAAa,KAAA;;;;;;EAWrB,UAAA,CAAW,GAAA;;;;;;;EAYX,QAAA,CAAS,IAAA;;;;;;EAaM,OAAA,CAAA,GAAW,OAAA;;;;;;gBASV,SAAA,CAAA;AAAA"}
@@ -0,0 +1,97 @@
1
+ import { BaseStorageAdapter } from "./base.mjs";
2
+ import { isParentPath } from "@stryke/path/is-parent-path";
3
+
4
+ //#region src/storage/virtual.ts
5
+ /**
6
+ * Virtual/in-memory storage adapter implementation.
7
+ */
8
+ var VirtualStorageAdapter = class extends BaseStorageAdapter {
9
+ /**
10
+ * A name identifying the storage adapter type.
11
+ */
12
+ name = "virtual";
13
+ /**
14
+ * The storage preset for the adapter.
15
+ *
16
+ * @remarks
17
+ * This can be used as an alternate way to identify the type of storage being used.
18
+ */
19
+ preset = "virtual";
20
+ /**
21
+ * In-memory data storage.
22
+ */
23
+ data = /* @__PURE__ */ new Map();
24
+ /**
25
+ * Constructor for the VirtualStorageAdapter.
26
+ *
27
+ * @param context - The Powerlines context.
28
+ * @param options - Configuration options for the storage adapter.
29
+ */
30
+ constructor(context, options) {
31
+ super(context, options);
32
+ }
33
+ /**
34
+ * Synchronously checks if a key exists in the storage.
35
+ *
36
+ * @param key - The key to check for existence.
37
+ * @returns Returns `true` if the key exists, otherwise `false`.
38
+ */
39
+ existsSync(key) {
40
+ return this.data.has(this.resolve(key));
41
+ }
42
+ /**
43
+ * Synchronously retrieves the value associated with a given key.
44
+ *
45
+ * @param key - The key whose value is to be retrieved.
46
+ * @returns The value associated with the key, or `null` if the key does not exist.
47
+ */
48
+ getSync(key) {
49
+ return this.data.get(this.resolve(key)) ?? null;
50
+ }
51
+ /**
52
+ * Synchronously sets the value for a given key.
53
+ *
54
+ * @param key - The key to set the value for.
55
+ * @param value - The value to set.
56
+ */
57
+ setSync(key, value) {
58
+ if (!this.isReadOnly && (!this.existsSync(key) || this.overwrite)) this.data.set(this.resolve(key), value);
59
+ }
60
+ /**
61
+ * Synchronously removes a key from the storage.
62
+ *
63
+ * @param key - The key to remove.
64
+ */
65
+ removeSync(key) {
66
+ if (!this.isReadOnly && this.overwrite) this.data.delete(this.resolve(key));
67
+ }
68
+ /**
69
+ * Lists all keys under a given base path synchronously.
70
+ *
71
+ * @param base - The base path to list keys from.
72
+ * @returns An array of keys under the specified base path.
73
+ */
74
+ listSync(base) {
75
+ return [...this.data.keys().filter((key) => !base ? true : isParentPath(key, this.resolve(base)))];
76
+ }
77
+ /**
78
+ * Disposes of the storage adapter, releasing any held resources.
79
+ *
80
+ * @returns A promise that resolves when the disposal is complete.
81
+ */
82
+ async dispose() {
83
+ return this.clear();
84
+ }
85
+ /**
86
+ * Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.
87
+ *
88
+ * @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.
89
+ */
90
+ get overwrite() {
91
+ return !this.isReadOnly;
92
+ }
93
+ };
94
+
95
+ //#endregion
96
+ export { VirtualStorageAdapter };
97
+ //# sourceMappingURL=virtual.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtual.mjs","names":[],"sources":["../../src/storage/virtual.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 { isParentPath } from \"@stryke/path/is-parent-path\";\nimport type { Context } from \"../types/context\";\nimport { BaseStorageAdapter, StorageAdapterOptions } from \"./base\";\n\n/**\n * Virtual/in-memory storage adapter implementation.\n */\nexport class VirtualStorageAdapter extends BaseStorageAdapter {\n /**\n * A name identifying the storage adapter type.\n */\n public name = \"virtual\";\n\n /**\n * The storage preset for the adapter.\n *\n * @remarks\n * This can be used as an alternate way to identify the type of storage being used.\n */\n public override readonly preset = \"virtual\";\n\n /**\n * In-memory data storage.\n */\n protected data = new Map<string, any>();\n\n /**\n * Constructor for the VirtualStorageAdapter.\n *\n * @param context - The Powerlines context.\n * @param options - Configuration options for the storage adapter.\n */\n public constructor(context: Context, options?: StorageAdapterOptions) {\n super(context, options);\n }\n\n /**\n * Synchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns Returns `true` if the key exists, otherwise `false`.\n */\n public existsSync(key: string): boolean {\n return this.data.has(this.resolve(key));\n }\n\n /**\n * Synchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns The value associated with the key, or `null` if the key does not exist.\n */\n public getSync(key: string): string | null {\n return this.data.get(this.resolve(key)) ?? null;\n }\n\n /**\n * Synchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public setSync(key: string, value: string) {\n if (!this.isReadOnly && (!this.existsSync(key) || this.overwrite)) {\n this.data.set(this.resolve(key), value);\n }\n }\n\n /**\n * Synchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public removeSync(key: string) {\n if (!this.isReadOnly && this.overwrite) {\n this.data.delete(this.resolve(key));\n }\n }\n\n /**\n * Lists all keys under a given base path synchronously.\n *\n * @param base - The base path to list keys from.\n * @returns An array of keys under the specified base path.\n */\n public listSync(base?: string): string[] {\n return [\n ...this.data\n .keys()\n .filter(key => (!base ? true : isParentPath(key, this.resolve(base))))\n ];\n }\n\n /**\n * Disposes of the storage adapter, releasing any held resources.\n *\n * @returns A promise that resolves when the disposal is complete.\n */\n public override async dispose(): Promise<void> {\n return this.clear();\n }\n\n /**\n * Determines if the storage adapter should overwrite existing keys based on the provided options and context configuration.\n *\n * @returns `true` if the storage adapter should overwrite existing keys, otherwise `false`.\n */\n protected override get overwrite() {\n return !this.isReadOnly;\n }\n}\n"],"mappings":";;;;;;;AAyBA,IAAa,wBAAb,cAA2C,mBAAmB;;;;CAI5D,AAAO,OAAO;;;;;;;CAQd,AAAyB,SAAS;;;;CAKlC,AAAU,uBAAO,IAAI,KAAkB;;;;;;;CAQvC,AAAO,YAAY,SAAkB,SAAiC;AACpE,QAAM,SAAS,QAAQ;;;;;;;;CASzB,AAAO,WAAW,KAAsB;AACtC,SAAO,KAAK,KAAK,IAAI,KAAK,QAAQ,IAAI,CAAC;;;;;;;;CASzC,AAAO,QAAQ,KAA4B;AACzC,SAAO,KAAK,KAAK,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAI;;;;;;;;CAS7C,AAAO,QAAQ,KAAa,OAAe;AACzC,MAAI,CAAC,KAAK,eAAe,CAAC,KAAK,WAAW,IAAI,IAAI,KAAK,WACrD,MAAK,KAAK,IAAI,KAAK,QAAQ,IAAI,EAAE,MAAM;;;;;;;CAS3C,AAAO,WAAW,KAAa;AAC7B,MAAI,CAAC,KAAK,cAAc,KAAK,UAC3B,MAAK,KAAK,OAAO,KAAK,QAAQ,IAAI,CAAC;;;;;;;;CAUvC,AAAO,SAAS,MAAyB;AACvC,SAAO,CACL,GAAG,KAAK,KACL,MAAM,CACN,QAAO,QAAQ,CAAC,OAAO,OAAO,aAAa,KAAK,KAAK,QAAQ,KAAK,CAAC,CAAE,CACzE;;;;;;;CAQH,MAAsB,UAAyB;AAC7C,SAAO,KAAK,OAAO;;;;;;;CAQrB,IAAuB,YAAY;AACjC,SAAO,CAAC,KAAK"}
@@ -1,103 +1,22 @@
1
- import { CallHookOptions, InferHookParameters, InferHookReturnType } from "./hooks.cjs";
2
- import { APIContext, EnvironmentContext, PluginContext } from "./context.cjs";
3
- import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig, ResolvedConfig } from "./config.cjs";
1
+ import { BASE_EXECUTION_API_METHODS, EXECUTION_API_METHODS } from "../constants/api.cjs";
2
+ import { SUPPORTED_COMMANDS } from "../constants/commands.cjs";
3
+ import { Context } from "./context.cjs";
4
+ import { MaybePromise } from "@stryke/types/base";
5
+ import { ArrayValues } from "@stryke/types/array";
4
6
 
5
7
  //#region src/types/api.d.ts
6
- /**
7
- * Powerlines API Interface
8
- */
9
- interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
10
- /**
11
- * The Powerlines shared API context
12
- */
13
- context: APIContext<TResolvedConfig>;
14
- /**
15
- * Prepare the Powerlines API
16
- *
17
- * @remarks
18
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
19
- *
20
- * @param inlineConfig - The inline configuration for the prepare command
21
- */
22
- prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
23
- /**
24
- * Create a new Powerlines project
25
- *
26
- * @remarks
27
- * This method will create a new Powerlines project in the current directory.
28
- *
29
- * @param inlineConfig - The inline configuration for the new command
30
- * @returns A promise that resolves when the project has been created
31
- */
32
- new: (inlineConfig: NewInlineConfig) => Promise<void>;
33
- /**
34
- * Clean any previously prepared artifacts
35
- *
36
- * @remarks
37
- * This method will remove the previous Powerlines artifacts from the project.
38
- *
39
- * @param inlineConfig - The inline configuration for the clean command
40
- * @returns A promise that resolves when the clean command has completed
41
- */
42
- clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
43
- /**
44
- * Lint the project source code
45
- *
46
- * @param inlineConfig - The inline configuration for the lint command
47
- * @returns A promise that resolves when the lint command has completed
48
- */
49
- lint: (inlineConfig: LintInlineConfig) => Promise<void>;
50
- /**
51
- * Build the project
52
- *
53
- * @remarks
54
- * This method will build the Powerlines project, generating the necessary artifacts.
55
- *
56
- * @param inlineConfig - The inline configuration for the build command
57
- * @returns A promise that resolves when the build command has completed
58
- */
59
- build: (inlineConfig: BuildInlineConfig) => Promise<void>;
60
- /**
61
- * Prepare the documentation for the project
62
- *
63
- * @param inlineConfig - The inline configuration for the docs command
64
- * @returns A promise that resolves when the documentation generation has completed
65
- */
66
- docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
67
- /**
68
- * Deploy the project source code
69
- *
70
- * @remarks
71
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
72
- *
73
- * @param inlineConfig - The inline configuration for the deploy command
74
- */
75
- deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
76
- /**
77
- * Finalization process
78
- *
79
- * @remarks
80
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
81
- *
82
- * @returns A promise that resolves when the finalization process has completed
83
- */
84
- finalize: () => Promise<void>;
85
- /**
86
- * Invokes the configured plugin hooks
87
- *
88
- * @remarks
89
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
90
- *
91
- * @param hook - The hook to call
92
- * @param options - The options to provide to the hook
93
- * @param args - The arguments to pass to the hook
94
- * @returns The result of the hook call
95
- */
96
- callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
97
- environment?: string | EnvironmentContext<TResolvedConfig>;
98
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
99
- }
100
- declare type __ΩAPI = any[];
8
+ type BaseCommandType = ArrayValues<typeof BASE_EXECUTION_API_METHODS> | "finalize";
9
+ type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
10
+ type Commands<TContext extends Context = Context> = Record<CommandType, (this: TContext) => MaybePromise<void>>;
11
+ type BaseExecutionAPIMethods = (typeof BASE_EXECUTION_API_METHODS)[number];
12
+ type PowerlinesExecutionAPIMethods = (typeof EXECUTION_API_METHODS)[number];
13
+ type SupportedCommands = (typeof SUPPORTED_COMMANDS)[number];
14
+ declare type __ΩBaseCommandType = any[];
15
+ declare type __ΩCommandType = any[];
16
+ declare type __ΩCommands = any[];
17
+ declare type __ΩBaseExecutionAPIMethods = any[];
18
+ declare type __ΩPowerlinesExecutionAPIMethods = any[];
19
+ declare type __ΩSupportedCommands = any[];
101
20
  //#endregion
102
- export { API, __ΩAPI };
21
+ export { BaseCommandType, BaseExecutionAPIMethods, CommandType, Commands, PowerlinesExecutionAPIMethods, SupportedCommands, __ΩBaseCommandType, __ΩBaseExecutionAPIMethods, __ΩCommandType, __ΩCommands, __ΩPowerlinesExecutionAPIMethods, __ΩSupportedCommands };
103
22
  //# sourceMappingURL=api.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.cts","names":[],"sources":["../../src/types/api.ts"],"mappings":";;;;;;;AAsCA;UAAiB,GAAA,yBAA4B,cAAA,GAAiB,cAAA;EAA1C;;;EAIlB,OAAA,EAAS,UAAA,CAAW,eAAA;EAAX;;;;;;;;EAUT,OAAA,GACE,YAAA,EACI,mBAAA,GACA,eAAA,GACA,iBAAA,GACA,iBAAA,GACA,gBAAA,GACA,gBAAA,GACA,kBAAA,KACD,OAAA;EAWe;;;;;;;;;EAApB,GAAA,GAAM,YAAA,EAAc,eAAA,KAAoB,OAAA;EAwCE;;;;;;;;;EA7B1C,KAAA,GACE,YAAA,EAAc,iBAAA,GAAoB,mBAAA,KAC/B,OAAA;EAiE0D;;;;;;EAzD/D,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EA0D9B;;;;;;;;;EA/CZ,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;EAjDtC;;;;;;EAyDN,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EAnDrC;;;;;;;;EA6DL,MAAA,GAAS,YAAA,EAAc,kBAAA,KAAuB,OAAA;EArCzC;;;;;;;;EA+CL,QAAA,QAAgB,OAAA;EApBhB;;;;;;;;;;;EAiCA,QAAA,wBACE,IAAA,EAAM,IAAA,EACN,OAAA,EAAS,eAAA;IACP,WAAA,YAAuB,kBAAA,CAAmB,eAAA;EAAA,MAEzC,IAAA,EAAM,mBAAA,CAAoB,aAAA,CAAc,eAAA,GAAkB,IAAA,MAC1D,OAAA,CACH,mBAAA,CAAoB,aAAA,CAAc,eAAA,GAAkB,IAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"api.d.cts","names":[],"sources":["../../src/types/api.ts"],"mappings":";;;;;;;KA2BY,eAAA,GACR,WAAA,QAAmB,0BAAA;AAAA,KAGX,WAAA,GAAc,WAAA,QAAmB,kBAAA;AAAA,KACjC,QAAA,kBAA0B,OAAA,GAAU,OAAA,IAAW,MAAA,CACzD,WAAA,GACC,IAAA,EAAM,QAAA,KAAa,YAAA;AAAA,KAGV,uBAAA,WACF,0BAAA;AAAA,KACE,6BAAA,WACF,qBAAA;AAAA,KACE,iBAAA,WAA4B,kBAAA;AAAA"}
@@ -1,103 +1,22 @@
1
- import { CallHookOptions, InferHookParameters, InferHookReturnType } from "./hooks.mjs";
2
- import { APIContext, EnvironmentContext, PluginContext } from "./context.mjs";
3
- import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig, ResolvedConfig } from "./config.mjs";
1
+ import { BASE_EXECUTION_API_METHODS, EXECUTION_API_METHODS } from "../constants/api.mjs";
2
+ import { SUPPORTED_COMMANDS } from "../constants/commands.mjs";
3
+ import { Context } from "./context.mjs";
4
+ import { MaybePromise } from "@stryke/types/base";
5
+ import { ArrayValues } from "@stryke/types/array";
4
6
 
5
7
  //#region src/types/api.d.ts
6
- /**
7
- * Powerlines API Interface
8
- */
9
- interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
10
- /**
11
- * The Powerlines shared API context
12
- */
13
- context: APIContext<TResolvedConfig>;
14
- /**
15
- * Prepare the Powerlines API
16
- *
17
- * @remarks
18
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
19
- *
20
- * @param inlineConfig - The inline configuration for the prepare command
21
- */
22
- prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
23
- /**
24
- * Create a new Powerlines project
25
- *
26
- * @remarks
27
- * This method will create a new Powerlines project in the current directory.
28
- *
29
- * @param inlineConfig - The inline configuration for the new command
30
- * @returns A promise that resolves when the project has been created
31
- */
32
- new: (inlineConfig: NewInlineConfig) => Promise<void>;
33
- /**
34
- * Clean any previously prepared artifacts
35
- *
36
- * @remarks
37
- * This method will remove the previous Powerlines artifacts from the project.
38
- *
39
- * @param inlineConfig - The inline configuration for the clean command
40
- * @returns A promise that resolves when the clean command has completed
41
- */
42
- clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
43
- /**
44
- * Lint the project source code
45
- *
46
- * @param inlineConfig - The inline configuration for the lint command
47
- * @returns A promise that resolves when the lint command has completed
48
- */
49
- lint: (inlineConfig: LintInlineConfig) => Promise<void>;
50
- /**
51
- * Build the project
52
- *
53
- * @remarks
54
- * This method will build the Powerlines project, generating the necessary artifacts.
55
- *
56
- * @param inlineConfig - The inline configuration for the build command
57
- * @returns A promise that resolves when the build command has completed
58
- */
59
- build: (inlineConfig: BuildInlineConfig) => Promise<void>;
60
- /**
61
- * Prepare the documentation for the project
62
- *
63
- * @param inlineConfig - The inline configuration for the docs command
64
- * @returns A promise that resolves when the documentation generation has completed
65
- */
66
- docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
67
- /**
68
- * Deploy the project source code
69
- *
70
- * @remarks
71
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
72
- *
73
- * @param inlineConfig - The inline configuration for the deploy command
74
- */
75
- deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
76
- /**
77
- * Finalization process
78
- *
79
- * @remarks
80
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
81
- *
82
- * @returns A promise that resolves when the finalization process has completed
83
- */
84
- finalize: () => Promise<void>;
85
- /**
86
- * Invokes the configured plugin hooks
87
- *
88
- * @remarks
89
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
90
- *
91
- * @param hook - The hook to call
92
- * @param options - The options to provide to the hook
93
- * @param args - The arguments to pass to the hook
94
- * @returns The result of the hook call
95
- */
96
- callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
97
- environment?: string | EnvironmentContext<TResolvedConfig>;
98
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
99
- }
100
- declare type __ΩAPI = any[];
8
+ type BaseCommandType = ArrayValues<typeof BASE_EXECUTION_API_METHODS> | "finalize";
9
+ type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
10
+ type Commands<TContext extends Context = Context> = Record<CommandType, (this: TContext) => MaybePromise<void>>;
11
+ type BaseExecutionAPIMethods = (typeof BASE_EXECUTION_API_METHODS)[number];
12
+ type PowerlinesExecutionAPIMethods = (typeof EXECUTION_API_METHODS)[number];
13
+ type SupportedCommands = (typeof SUPPORTED_COMMANDS)[number];
14
+ declare type __ΩBaseCommandType = any[];
15
+ declare type __ΩCommandType = any[];
16
+ declare type __ΩCommands = any[];
17
+ declare type __ΩBaseExecutionAPIMethods = any[];
18
+ declare type __ΩPowerlinesExecutionAPIMethods = any[];
19
+ declare type __ΩSupportedCommands = any[];
101
20
  //#endregion
102
- export { API, __ΩAPI };
21
+ export { BaseCommandType, BaseExecutionAPIMethods, CommandType, Commands, PowerlinesExecutionAPIMethods, SupportedCommands, __ΩBaseCommandType, __ΩBaseExecutionAPIMethods, __ΩCommandType, __ΩCommands, __ΩPowerlinesExecutionAPIMethods, __ΩSupportedCommands };
103
22
  //# sourceMappingURL=api.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.mts","names":[],"sources":["../../src/types/api.ts"],"mappings":";;;;;;;AAsCA;UAAiB,GAAA,yBAA4B,cAAA,GAAiB,cAAA;EAA1C;;;EAIlB,OAAA,EAAS,UAAA,CAAW,eAAA;EAAX;;;;;;;;EAUT,OAAA,GACE,YAAA,EACI,mBAAA,GACA,eAAA,GACA,iBAAA,GACA,iBAAA,GACA,gBAAA,GACA,gBAAA,GACA,kBAAA,KACD,OAAA;EAWe;;;;;;;;;EAApB,GAAA,GAAM,YAAA,EAAc,eAAA,KAAoB,OAAA;EAwCE;;;;;;;;;EA7B1C,KAAA,GACE,YAAA,EAAc,iBAAA,GAAoB,mBAAA,KAC/B,OAAA;EAiE0D;;;;;;EAzD/D,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EA0D9B;;;;;;;;;EA/CZ,KAAA,GAAQ,YAAA,EAAc,iBAAA,KAAsB,OAAA;EAjDtC;;;;;;EAyDN,IAAA,GAAO,YAAA,EAAc,gBAAA,KAAqB,OAAA;EAnDrC;;;;;;;;EA6DL,MAAA,GAAS,YAAA,EAAc,kBAAA,KAAuB,OAAA;EArCzC;;;;;;;;EA+CL,QAAA,QAAgB,OAAA;EApBhB;;;;;;;;;;;EAiCA,QAAA,wBACE,IAAA,EAAM,IAAA,EACN,OAAA,EAAS,eAAA;IACP,WAAA,YAAuB,kBAAA,CAAmB,eAAA;EAAA,MAEzC,IAAA,EAAM,mBAAA,CAAoB,aAAA,CAAc,eAAA,GAAkB,IAAA,MAC1D,OAAA,CACH,mBAAA,CAAoB,aAAA,CAAc,eAAA,GAAkB,IAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"api.d.mts","names":[],"sources":["../../src/types/api.ts"],"mappings":";;;;;;;KA2BY,eAAA,GACR,WAAA,QAAmB,0BAAA;AAAA,KAGX,WAAA,GAAc,WAAA,QAAmB,kBAAA;AAAA,KACjC,QAAA,kBAA0B,OAAA,GAAU,OAAA,IAAW,MAAA,CACzD,WAAA,GACC,IAAA,EAAM,QAAA,KAAa,YAAA;AAAA,KAGV,uBAAA,WACF,0BAAA;AAAA,KACE,6BAAA,WACF,qBAAA;AAAA,KACE,iBAAA,WAA4B,kBAAA;AAAA"}