powerlines 0.23.7 → 0.23.10

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 (235) hide show
  1. package/dist/{api-DxPACGY4.d.ts → api-5H3zEedD.d.ts} +1 -1
  2. package/dist/{api--9pVSIbm.d.cts → api-B77aqxGC.d.cts} +1 -1
  3. package/dist/api.cjs +2 -2
  4. package/dist/api.d.cts +2 -2
  5. package/dist/api.d.ts +2 -2
  6. package/dist/api.js +1 -1
  7. package/dist/astro.cjs +4 -4
  8. package/dist/astro.d.cts +8 -6
  9. package/dist/astro.d.ts +8 -6
  10. package/dist/astro.js +3 -3
  11. package/dist/{chunk-CSSV6ES3.js → chunk-3W5CN3M3.js} +1 -1
  12. package/dist/{chunk-V732KPW6.cjs → chunk-4EIGDACJ.cjs} +34 -20
  13. package/dist/{chunk-32NXGMLQ.cjs → chunk-4TBQYHPZ.cjs} +3 -3
  14. package/dist/{chunk-QXTSQTX5.js → chunk-7G7OFGGH.js} +1 -1
  15. package/dist/{chunk-NVNBOUXL.js → chunk-MUNYXQYT.js} +34 -20
  16. package/dist/{chunk-ZUQDWAUO.cjs → chunk-PR3JGGAL.cjs} +2 -2
  17. package/dist/{chunk-I7G24RUE.cjs → chunk-SNHUEYEP.cjs} +2 -2
  18. package/dist/{chunk-6CYDJ53Z.js → chunk-SS5AXCGJ.js} +1 -1
  19. package/dist/{chunk-4TAIQVJG.cjs → chunk-WBC2XOMT.cjs} +2 -2
  20. package/dist/{chunk-RQAKTG6M.js → chunk-ZIWN73GA.js} +1 -1
  21. package/dist/config.d.cts +2 -2
  22. package/dist/config.d.ts +2 -2
  23. package/dist/esbuild.cjs +6 -6
  24. package/dist/esbuild.d.cts +5 -4
  25. package/dist/esbuild.d.ts +5 -4
  26. package/dist/esbuild.js +3 -3
  27. package/dist/farm.cjs +3 -3
  28. package/dist/farm.d.cts +9 -7
  29. package/dist/farm.d.ts +9 -7
  30. package/dist/farm.js +2 -2
  31. package/dist/index.cjs +14 -14
  32. package/dist/index.d.cts +2 -2
  33. package/dist/index.d.ts +2 -2
  34. package/dist/index.js +2 -2
  35. package/dist/lib/{api-Bwwdt0YR.d.cts → api-Cm51oVbC.d.cts} +1 -1
  36. package/dist/lib/{api-BJ7F7DmT.d.ts → api-mja4jirh.d.ts} +1 -1
  37. package/dist/lib/build/esbuild.d.cts +1 -1
  38. package/dist/lib/build/esbuild.d.ts +1 -1
  39. package/dist/lib/build/index.d.cts +3 -3
  40. package/dist/lib/build/index.d.ts +3 -3
  41. package/dist/lib/build/rolldown.d.cts +1 -1
  42. package/dist/lib/build/rolldown.d.ts +1 -1
  43. package/dist/lib/build/rollup.d.cts +1 -1
  44. package/dist/lib/build/rollup.d.ts +1 -1
  45. package/dist/lib/build/rspack.d.cts +1 -1
  46. package/dist/lib/build/rspack.d.ts +1 -1
  47. package/dist/lib/build/tsup.d.cts +1 -1
  48. package/dist/lib/build/tsup.d.ts +1 -1
  49. package/dist/lib/build/unbuild.d.cts +3 -3
  50. package/dist/lib/build/unbuild.d.ts +3 -3
  51. package/dist/lib/build/vite.d.cts +1 -1
  52. package/dist/lib/build/vite.d.ts +1 -1
  53. package/dist/lib/build/webpack.d.cts +1 -1
  54. package/dist/lib/build/webpack.d.ts +1 -1
  55. package/dist/lib/{chunk-7XHBIYIN.cjs → chunk-7VJ42H2I.cjs} +0 -16
  56. package/dist/lib/{chunk-YH5GOJS3.js → chunk-FQLZZYYO.js} +1 -16
  57. package/dist/lib/{chunk-SZH2DJOG.js → chunk-HNOAMIRO.js} +3 -3
  58. package/dist/lib/{chunk-EJTGOYSI.cjs → chunk-I6TJUFA6.cjs} +10 -10
  59. package/dist/lib/chunk-K3NBD5LL.cjs +75 -0
  60. package/dist/lib/{chunk-EN4XP4D5.js → chunk-OJ5XFCZN.js} +1 -1
  61. package/dist/lib/{chunk-NVUXGMU5.cjs → chunk-QABAD5RE.cjs} +32 -9
  62. package/dist/lib/{chunk-CCGA6ZHZ.cjs → chunk-RBSNQFLF.cjs} +16 -16
  63. package/dist/lib/{chunk-NDKPSA3I.js → chunk-VDPCG3RR.js} +3 -3
  64. package/dist/lib/{chunk-27RAXIPT.cjs → chunk-VLOUSKRX.cjs} +6 -6
  65. package/dist/lib/chunk-XBM7FHNK.js +68 -0
  66. package/dist/lib/{chunk-764HUXP3.js → chunk-XG4CC73V.js} +27 -4
  67. package/dist/lib/{config-CFZYRPQj.d.ts → config-7Q2dBjJE.d.ts} +6 -0
  68. package/dist/lib/{config-CxONCKEx.d.cts → config-BnJpgcGr.d.cts} +6 -0
  69. package/dist/lib/config-file.cjs +3 -3
  70. package/dist/lib/config-file.d.cts +3 -2
  71. package/dist/lib/config-file.d.ts +3 -2
  72. package/dist/lib/config-file.js +1 -1
  73. package/dist/lib/contexts/api-context.cjs +6 -6
  74. package/dist/lib/contexts/api-context.d.cts +3 -3
  75. package/dist/lib/contexts/api-context.d.ts +3 -3
  76. package/dist/lib/contexts/api-context.js +5 -5
  77. package/dist/lib/contexts/context.cjs +4 -4
  78. package/dist/lib/contexts/context.d.cts +10 -3
  79. package/dist/lib/contexts/context.d.ts +10 -3
  80. package/dist/lib/contexts/context.js +3 -3
  81. package/dist/lib/contexts/environment-context.cjs +5 -5
  82. package/dist/lib/contexts/environment-context.d.cts +3 -3
  83. package/dist/lib/contexts/environment-context.d.ts +3 -3
  84. package/dist/lib/contexts/environment-context.js +4 -4
  85. package/dist/lib/contexts/index.cjs +8 -8
  86. package/dist/lib/contexts/index.d.cts +3 -3
  87. package/dist/lib/contexts/index.d.ts +3 -3
  88. package/dist/lib/contexts/index.js +5 -5
  89. package/dist/lib/contexts/plugin-context.d.cts +3 -3
  90. package/dist/lib/contexts/plugin-context.d.ts +3 -3
  91. package/dist/lib/entry.d.cts +1 -1
  92. package/dist/lib/entry.d.ts +1 -1
  93. package/dist/lib/index.cjs +19 -23
  94. package/dist/lib/index.d.cts +5 -5
  95. package/dist/lib/index.d.ts +5 -5
  96. package/dist/lib/index.js +6 -6
  97. package/dist/lib/{internal-kEzuoIrl.d.ts → internal-BEygquYh.d.ts} +2 -2
  98. package/dist/lib/{internal-9D9Up5pT.d.cts → internal-BeR8fOB1.d.cts} +2 -2
  99. package/dist/lib/logger.d.cts +1 -1
  100. package/dist/lib/logger.d.ts +1 -1
  101. package/dist/lib/typescript/compiler-host.d.cts +1 -1
  102. package/dist/lib/typescript/compiler-host.d.ts +1 -1
  103. package/dist/lib/typescript/import-transformer.d.cts +1 -1
  104. package/dist/lib/typescript/import-transformer.d.ts +1 -1
  105. package/dist/lib/typescript/index.d.cts +1 -1
  106. package/dist/lib/typescript/index.d.ts +1 -1
  107. package/dist/lib/typescript/program.d.cts +1 -1
  108. package/dist/lib/typescript/program.d.ts +1 -1
  109. package/dist/lib/typescript/ts-morph.d.cts +1 -1
  110. package/dist/lib/typescript/ts-morph.d.ts +1 -1
  111. package/dist/lib/unplugin/factory.cjs +7 -7
  112. package/dist/lib/unplugin/factory.d.cts +3 -3
  113. package/dist/lib/unplugin/factory.d.ts +3 -3
  114. package/dist/lib/unplugin/factory.js +6 -6
  115. package/dist/lib/unplugin/helpers.d.cts +1 -1
  116. package/dist/lib/unplugin/helpers.d.ts +1 -1
  117. package/dist/lib/unplugin/index.cjs +7 -7
  118. package/dist/lib/unplugin/index.d.cts +3 -3
  119. package/dist/lib/unplugin/index.d.ts +3 -3
  120. package/dist/lib/unplugin/index.js +6 -6
  121. package/dist/lib/unplugin/plugin.d.cts +3 -3
  122. package/dist/lib/unplugin/plugin.d.ts +3 -3
  123. package/dist/lib/unplugin/resolve-id.d.cts +1 -1
  124. package/dist/lib/unplugin/resolve-id.d.ts +1 -1
  125. package/dist/lib/{unplugin-tmNrQvUk.d.ts → unplugin-CbbNDduM.d.ts} +2 -2
  126. package/dist/lib/{unplugin-BdLs3dwd.d.cts → unplugin-ppAOzR__.d.cts} +2 -2
  127. package/dist/lib/utilities/bundle.d.cts +1 -1
  128. package/dist/lib/utilities/bundle.d.ts +1 -1
  129. package/dist/lib/utilities/cache.d.cts +1 -1
  130. package/dist/lib/utilities/cache.d.ts +1 -1
  131. package/dist/lib/utilities/file-header.d.cts +1 -1
  132. package/dist/lib/utilities/file-header.d.ts +1 -1
  133. package/dist/lib/utilities/index.cjs +7 -11
  134. package/dist/lib/utilities/index.d.cts +2 -2
  135. package/dist/lib/utilities/index.d.ts +2 -2
  136. package/dist/lib/utilities/index.js +1 -1
  137. package/dist/lib/utilities/meta.cjs +7 -11
  138. package/dist/lib/utilities/meta.d.cts +2 -3
  139. package/dist/lib/utilities/meta.d.ts +2 -3
  140. package/dist/lib/utilities/meta.js +1 -1
  141. package/dist/lib/utilities/resolve-path.d.cts +1 -1
  142. package/dist/lib/utilities/resolve-path.d.ts +1 -1
  143. package/dist/lib/utilities/resolve.d.cts +1 -1
  144. package/dist/lib/utilities/resolve.d.ts +1 -1
  145. package/dist/lib/utilities/source-file.d.cts +1 -1
  146. package/dist/lib/utilities/source-file.d.ts +1 -1
  147. package/dist/lib/utilities/source-map.d.cts +1 -1
  148. package/dist/lib/utilities/source-map.d.ts +1 -1
  149. package/dist/lib/utilities/worker.d.cts +1 -1
  150. package/dist/lib/utilities/worker.d.ts +1 -1
  151. package/dist/lib/utilities/write-file.d.cts +1 -1
  152. package/dist/lib/utilities/write-file.d.ts +1 -1
  153. package/dist/next.cjs +4 -4
  154. package/dist/next.js +3 -3
  155. package/dist/nuxt.cjs +7 -7
  156. package/dist/nuxt.d.cts +12 -6
  157. package/dist/nuxt.d.ts +12 -6
  158. package/dist/nuxt.js +5 -5
  159. package/dist/plugin-utils/{context-DRFZE3XI.d.ts → context-Cg11S-CE.d.cts} +6 -0
  160. package/dist/plugin-utils/{context-DRFZE3XI.d.cts → context-Cg11S-CE.d.ts} +6 -0
  161. package/dist/plugin-utils/context-helpers.d.cts +1 -1
  162. package/dist/plugin-utils/context-helpers.d.ts +1 -1
  163. package/dist/plugin-utils/enforce.d.cts +1 -1
  164. package/dist/plugin-utils/enforce.d.ts +1 -1
  165. package/dist/plugin-utils/extend.d.cts +1 -1
  166. package/dist/plugin-utils/extend.d.ts +1 -1
  167. package/dist/plugin-utils/get-config-path.d.cts +1 -1
  168. package/dist/plugin-utils/get-config-path.d.ts +1 -1
  169. package/dist/plugin-utils/helpers.d.cts +1 -1
  170. package/dist/plugin-utils/helpers.d.ts +1 -1
  171. package/dist/plugin-utils/index.d.cts +1 -1
  172. package/dist/plugin-utils/index.d.ts +1 -1
  173. package/dist/plugin-utils/merge.d.cts +1 -1
  174. package/dist/plugin-utils/merge.d.ts +1 -1
  175. package/dist/plugin-utils/paths.d.cts +1 -1
  176. package/dist/plugin-utils/paths.d.ts +1 -1
  177. package/dist/{resolved-DKFZ11S7.d.ts → resolved-B3BSdXCt.d.ts} +13 -1
  178. package/dist/{resolved-C00CJgsk.d.cts → resolved-DGrpILrS.d.cts} +13 -1
  179. package/dist/rolldown.cjs +3 -3
  180. package/dist/rolldown.d.cts +3 -3
  181. package/dist/rolldown.d.ts +3 -3
  182. package/dist/rolldown.js +2 -2
  183. package/dist/rollup.cjs +3 -3
  184. package/dist/rollup.d.cts +3 -3
  185. package/dist/rollup.d.ts +3 -3
  186. package/dist/rollup.js +2 -2
  187. package/dist/rspack.cjs +3 -3
  188. package/dist/rspack.d.cts +3 -3
  189. package/dist/rspack.d.ts +3 -3
  190. package/dist/rspack.js +2 -2
  191. package/dist/tsup.cjs +4 -4
  192. package/dist/tsup.d.cts +3 -2
  193. package/dist/tsup.d.ts +3 -2
  194. package/dist/tsup.js +3 -3
  195. package/dist/types/api.d.cts +2 -2
  196. package/dist/types/api.d.ts +2 -2
  197. package/dist/types/babel.d.cts +1 -1
  198. package/dist/types/babel.d.ts +1 -1
  199. package/dist/types/commands.d.cts +1 -1
  200. package/dist/types/commands.d.ts +1 -1
  201. package/dist/types/config.d.cts +1 -1
  202. package/dist/types/config.d.ts +1 -1
  203. package/dist/types/context.d.cts +1 -1
  204. package/dist/types/context.d.ts +1 -1
  205. package/dist/types/hooks.d.cts +1 -1
  206. package/dist/types/hooks.d.ts +1 -1
  207. package/dist/types/index.d.cts +2 -2
  208. package/dist/types/index.d.ts +2 -2
  209. package/dist/types/internal.d.cts +2 -2
  210. package/dist/types/internal.d.ts +2 -2
  211. package/dist/types/plugin.d.cts +1 -1
  212. package/dist/types/plugin.d.ts +1 -1
  213. package/dist/types/resolved.d.cts +1 -1
  214. package/dist/types/resolved.d.ts +1 -1
  215. package/dist/types/unplugin.d.cts +2 -2
  216. package/dist/types/unplugin.d.ts +2 -2
  217. package/dist/unloader.cjs +3 -3
  218. package/dist/unloader.d.cts +5 -4
  219. package/dist/unloader.d.ts +5 -4
  220. package/dist/unloader.js +2 -2
  221. package/dist/unplugin.cjs +7 -7
  222. package/dist/unplugin.d.cts +2 -2
  223. package/dist/unplugin.d.ts +2 -2
  224. package/dist/unplugin.js +3 -3
  225. package/dist/vite.cjs +6 -6
  226. package/dist/vite.d.cts +5 -4
  227. package/dist/vite.d.ts +5 -4
  228. package/dist/vite.js +3 -3
  229. package/dist/webpack.cjs +6 -6
  230. package/dist/webpack.d.cts +3 -3
  231. package/dist/webpack.d.ts +3 -3
  232. package/dist/webpack.js +3 -3
  233. package/package.json +10 -9
  234. package/dist/lib/chunk-XW5TELHB.cjs +0 -67
  235. package/dist/lib/chunk-ZPIKFR7Z.js +0 -60
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
4
+ var getConfig = require('@storm-software/config-tools/get-config');
5
+ var exists = require('@stryke/fs/exists');
6
+ var append = require('@stryke/path/append');
7
+ var joinPaths = require('@stryke/path/join-paths');
8
+ var replace = require('@stryke/path/replace');
9
+ var isFunction = require('@stryke/type-checks/is-function');
10
+ var isSetObject = require('@stryke/type-checks/is-set-object');
11
+ var c12 = require('c12');
12
+ var defu = require('defu');
13
+
14
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
+
16
+ var defu__default = /*#__PURE__*/_interopDefault(defu);
17
+
18
+ async function loadWorkspaceConfig(workspaceRoot, cwd) {
19
+ return defu__default.default({
20
+ workspaceRoot
21
+ }, await getConfig.getWorkspaceConfig(true, {
22
+ cwd,
23
+ workspaceRoot,
24
+ useDefault: true
25
+ }));
26
+ }
27
+ chunkUSNT2KNT_cjs.__name(loadWorkspaceConfig, "loadWorkspaceConfig");
28
+ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
29
+ let resolvedUserConfig = {};
30
+ let resolvedUserConfigFile;
31
+ if (configFile) {
32
+ resolvedUserConfigFile = exists.existsSync(replace.replacePath(configFile, projectRoot)) ? replace.replacePath(configFile, projectRoot) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot))) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot)) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile) : void 0;
33
+ }
34
+ if (!resolvedUserConfigFile) {
35
+ resolvedUserConfigFile = exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
36
+ }
37
+ if (resolvedUserConfigFile) {
38
+ const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
39
+ if (resolved) {
40
+ let config = {};
41
+ if (isFunction.isFunction(resolved)) {
42
+ config = await Promise.resolve(resolved({
43
+ command,
44
+ mode,
45
+ isSsrBuild: false,
46
+ isPreview: false
47
+ }));
48
+ }
49
+ if (isSetObject.isSetObject(config)) {
50
+ resolvedUserConfig = {
51
+ ...config,
52
+ config,
53
+ configFile: resolvedUserConfigFile
54
+ };
55
+ }
56
+ }
57
+ }
58
+ const result = await c12.loadConfig({
59
+ cwd: projectRoot,
60
+ name: framework,
61
+ envName: mode,
62
+ globalRc: true,
63
+ packageJson: true,
64
+ dotenv: true,
65
+ jiti
66
+ });
67
+ return defu__default.default(resolvedUserConfig, isSetObject.isSetObject(result?.config) ? {
68
+ ...result.config,
69
+ ...result
70
+ } : {});
71
+ }
72
+ chunkUSNT2KNT_cjs.__name(loadUserConfigFile, "loadUserConfigFile");
73
+
74
+ exports.loadUserConfigFile = loadUserConfigFile;
75
+ exports.loadWorkspaceConfig = loadWorkspaceConfig;
@@ -1,5 +1,5 @@
1
1
  import { createPluginContext } from './chunk-KFJCWNVG.js';
2
- import { PowerlinesContext, isPlugin, isPluginHook, isHookExternal, addPluginHook, getHookHandler } from './chunk-764HUXP3.js';
2
+ import { PowerlinesContext, isPlugin, isPluginHook, isHookExternal, addPluginHook, getHookHandler } from './chunk-XG4CC73V.js';
3
3
  import { __name } from './chunk-SHUYVCID.js';
4
4
  import { resolvePackage } from '@stryke/fs/resolve';
5
5
  import { isFunction } from '@stryke/type-checks/is-function';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk7XHBIYIN_cjs = require('./chunk-7XHBIYIN.cjs');
4
- var chunkXW5TELHB_cjs = require('./chunk-XW5TELHB.cjs');
3
+ var chunk7VJ42H2I_cjs = require('./chunk-7VJ42H2I.cjs');
4
+ var chunkK3NBD5LL_cjs = require('./chunk-K3NBD5LL.cjs');
5
5
  var chunkJA4HSQRN_cjs = require('./chunk-JA4HSQRN.cjs');
6
6
  var chunkISBHXSDH_cjs = require('./chunk-ISBHXSDH.cjs');
7
7
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
@@ -12,6 +12,7 @@ var exists = require('@stryke/fs/exists');
12
12
  var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
13
13
  var json = require('@stryke/fs/json');
14
14
  var resolve = require('@stryke/fs/resolve');
15
+ var hashFiles = require('@stryke/hash/hash-files');
15
16
  var murmurhash = require('@stryke/hash/murmurhash');
16
17
  var getUnique = require('@stryke/helpers/get-unique');
17
18
  var omit = require('@stryke/helpers/omit');
@@ -70,6 +71,7 @@ var _fs__default = /*#__PURE__*/_interopDefault(_fs);
70
71
 
71
72
  function resolveOptions(options) {
72
73
  return defu2__default.default(options, {
74
+ debug: options.logLevel === "trace",
73
75
  interopDefault: true,
74
76
  fsCache: options.mode !== "development" ? joinPaths.joinPaths(options.cacheDir, "jiti") : false,
75
77
  moduleCache: options.mode !== "development"
@@ -1999,7 +2001,7 @@ var PowerlinesContext = class _PowerlinesContext {
1999
2001
  * @returns A promise that resolves to the new context.
2000
2002
  */
2001
2003
  static async from(workspaceRoot, config) {
2002
- const context = new _PowerlinesContext(await chunkXW5TELHB_cjs.loadWorkspaceConfig(workspaceRoot, config.root));
2004
+ const context = new _PowerlinesContext(await chunkK3NBD5LL_cjs.loadWorkspaceConfig(workspaceRoot, config.root));
2003
2005
  await context.withUserConfig(config);
2004
2006
  context.powerlinesPath = await resolve.resolvePackage("powerlines");
2005
2007
  if (!context.powerlinesPath) {
@@ -2096,10 +2098,10 @@ var PowerlinesContext = class _PowerlinesContext {
2096
2098
  workspaceRoot: this.workspaceConfig?.workspaceRoot,
2097
2099
  projectRoot: this.config?.projectRoot
2098
2100
  }, {
2099
- maxLength: chunk7XHBIYIN_cjs.PROJECT_ROOT_HASH_LENGTH
2101
+ maxLength: chunk7VJ42H2I_cjs.PROJECT_ROOT_HASH_LENGTH
2100
2102
  }),
2101
2103
  configHash: murmurhash.murmurhash(this.config, {
2102
- maxLength: chunk7XHBIYIN_cjs.CACHE_HASH_LENGTH
2104
+ maxLength: chunk7VJ42H2I_cjs.CACHE_HASH_LENGTH
2103
2105
  })
2104
2106
  };
2105
2107
  }
@@ -2159,7 +2161,7 @@ var PowerlinesContext = class _PowerlinesContext {
2159
2161
  * Get the path to the data directory for the project
2160
2162
  */
2161
2163
  get dataPath() {
2162
- return join.joinPaths(this.envPaths.data, "projects", chunk7XHBIYIN_cjs.getPrefixedProjectRootHash(this.config.name, this.meta.projectRootHash));
2164
+ return join.joinPaths(this.envPaths.data, "projects", chunk7VJ42H2I_cjs.getPrefixedProjectRootHash(this.config.name, this.meta.projectRootHash));
2163
2165
  }
2164
2166
  /**
2165
2167
  * Get the path to the cache directory for the project
@@ -2169,7 +2171,7 @@ var PowerlinesContext = class _PowerlinesContext {
2169
2171
  checksum: this.#checksum,
2170
2172
  config: this.meta.configHash
2171
2173
  }, {
2172
- maxLength: chunk7XHBIYIN_cjs.CACHE_HASH_LENGTH
2174
+ maxLength: chunk7VJ42H2I_cjs.CACHE_HASH_LENGTH
2173
2175
  }));
2174
2176
  }
2175
2177
  /**
@@ -2356,6 +2358,26 @@ var PowerlinesContext = class _PowerlinesContext {
2356
2358
  */
2357
2359
  logFn;
2358
2360
  /**
2361
+ * Generates a checksum representing the current context state
2362
+ *
2363
+ * @param root - The root directory of the project to generate the checksum for
2364
+ * @returns A promise that resolves to a string representing the checksum
2365
+ */
2366
+ async generateChecksum(root = this.config.projectRoot) {
2367
+ this.#checksum = await hashFiles.hashDirectory(root, {
2368
+ ignore: [
2369
+ "node_modules",
2370
+ ".git",
2371
+ ".nx",
2372
+ ".cache",
2373
+ ".storm",
2374
+ "tmp",
2375
+ "dist"
2376
+ ]
2377
+ });
2378
+ return this.#checksum;
2379
+ }
2380
+ /**
2359
2381
  * Initialize the context with the provided configuration options
2360
2382
  *
2361
2383
  * @param config - The partial user configuration to use for initialization.
@@ -2387,15 +2409,16 @@ var PowerlinesContext = class _PowerlinesContext {
2387
2409
  if (exists.existsSync(packageJsonPath)) {
2388
2410
  this.packageJson = await json.readJsonFile(packageJsonPath);
2389
2411
  }
2390
- this.#checksum = await chunk7XHBIYIN_cjs.getChecksum(cacheKey.projectRoot);
2412
+ this.#checksum = await this.generateChecksum(cacheKey.projectRoot);
2391
2413
  this.resolver = createResolver({
2392
2414
  workspaceRoot: this.workspaceConfig.workspaceRoot,
2393
2415
  projectRoot: cacheKey.projectRoot,
2394
2416
  cacheDir: this.cachePath,
2395
2417
  mode: cacheKey.mode,
2418
+ logLevel: config.logLevel || this.config?.logLevel || this.workspaceConfig.logLevel || "info",
2396
2419
  skipCache: cacheKey.skipCache
2397
2420
  });
2398
- const userConfig = await chunkXW5TELHB_cjs.loadUserConfigFile(cacheKey.projectRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
2421
+ const userConfig = await chunkK3NBD5LL_cjs.loadUserConfigFile(cacheKey.projectRoot, this.workspaceConfig.workspaceRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
2399
2422
  this.mergeUserConfig(userConfig.config);
2400
2423
  configCache.set(cacheKey, {
2401
2424
  projectJson: this.projectJson,
@@ -4,10 +4,10 @@ var chunk2NZADVP5_cjs = require('./chunk-2NZADVP5.cjs');
4
4
  var chunk4NHFXDTQ_cjs = require('./chunk-4NHFXDTQ.cjs');
5
5
  var chunkZBDVQVUK_cjs = require('./chunk-ZBDVQVUK.cjs');
6
6
  var chunkBQU53ZNB_cjs = require('./chunk-BQU53ZNB.cjs');
7
- var chunk27RAXIPT_cjs = require('./chunk-27RAXIPT.cjs');
7
+ var chunkVLOUSKRX_cjs = require('./chunk-VLOUSKRX.cjs');
8
8
  var chunkB3EE3VHZ_cjs = require('./chunk-B3EE3VHZ.cjs');
9
- var chunkNVUXGMU5_cjs = require('./chunk-NVUXGMU5.cjs');
10
- var chunk7XHBIYIN_cjs = require('./chunk-7XHBIYIN.cjs');
9
+ var chunkQABAD5RE_cjs = require('./chunk-QABAD5RE.cjs');
10
+ var chunk7VJ42H2I_cjs = require('./chunk-7VJ42H2I.cjs');
11
11
  var chunkJA4HSQRN_cjs = require('./chunk-JA4HSQRN.cjs');
12
12
  var chunk3OCI4TH7_cjs = require('./chunk-3OCI4TH7.cjs');
13
13
  var chunkISBHXSDH_cjs = require('./chunk-ISBHXSDH.cjs');
@@ -476,7 +476,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
476
476
  * Initialize the Powerlines API
477
477
  */
478
478
  static async from(workspaceRoot, config) {
479
- const api = new _PowerlinesAPI(await chunk27RAXIPT_cjs.PowerlinesAPIContext.from(workspaceRoot, config));
479
+ const api = new _PowerlinesAPI(await chunkVLOUSKRX_cjs.PowerlinesAPIContext.from(workspaceRoot, config));
480
480
  api.#context.$$internal.api = api;
481
481
  for (const plugin of api.context.config.plugins ?? []) {
482
482
  await api.#addPlugin(plugin);
@@ -523,8 +523,8 @@ ${context.entry.map((entry) => `- ${entry.input.file || entry.file}${entry.outpu
523
523
  context.log(types.LogLevelLabel.TRACE, `Powerlines configuration has been resolved:
524
524
 
525
525
  ${console.formatLogMessage(context.config)}`);
526
- context.fs[chunkNVUXGMU5_cjs.__VFS_PATCH__]();
527
- await chunk7XHBIYIN_cjs.writeMetaFile(context);
526
+ context.fs[chunkQABAD5RE_cjs.__VFS_PATCH__]();
527
+ await chunk7VJ42H2I_cjs.writeMetaFile(context);
528
528
  context.persistedMeta = context.meta;
529
529
  if (!exists.existsSync(context.cachePath)) {
530
530
  await helpers.createDirectory(context.cachePath);
@@ -654,8 +654,8 @@ ${formatTypes(generatedTypes)}
654
654
  throw new Error("Failed to parse the TypeScript configuration file.");
655
655
  }
656
656
  await this.callPostHook(context, "prepare");
657
- await chunk7XHBIYIN_cjs.writeMetaFile(context);
658
- context.fs[chunkNVUXGMU5_cjs.__VFS_REVERT__]();
657
+ await chunk7VJ42H2I_cjs.writeMetaFile(context);
658
+ context.fs[chunkQABAD5RE_cjs.__VFS_REVERT__]();
659
659
  });
660
660
  this.context.log(types.LogLevelLabel.INFO, "Powerlines API has been prepared successfully");
661
661
  }
@@ -828,7 +828,7 @@ ${formatTypes(generatedTypes)}
828
828
  this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution started");
829
829
  await this.#executeEnvironments(async (context) => {
830
830
  await this.callHook(context, "finalize");
831
- context.fs[chunkNVUXGMU5_cjs.__VFS_REVERT__]();
831
+ context.fs[chunkQABAD5RE_cjs.__VFS_REVERT__]();
832
832
  await context.fs.dispose();
833
833
  });
834
834
  this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution completed");
@@ -993,11 +993,11 @@ ${formatTypes(generatedTypes)}
993
993
  if (isPromise.isPromiseLike(config)) {
994
994
  awaited = await Promise.resolve(config);
995
995
  }
996
- if (!chunkNVUXGMU5_cjs.isPluginConfig(awaited)) {
996
+ if (!chunkQABAD5RE_cjs.isPluginConfig(awaited)) {
997
997
  throw new Error(`Invalid plugin specified in the configuration - ${JSON.stringify(awaited)}. Please ensure the value is a plugin name, an object with the \`plugin\` and \`props\` properties, or an instance of \`Plugin\`.`);
998
998
  }
999
999
  let plugin;
1000
- if (chunkNVUXGMU5_cjs.isPlugin(awaited)) {
1000
+ if (chunkQABAD5RE_cjs.isPlugin(awaited)) {
1001
1001
  plugin = awaited;
1002
1002
  } else if (isFunction.isFunction(awaited)) {
1003
1003
  plugin = await Promise.resolve(awaited());
@@ -1008,10 +1008,10 @@ ${formatTypes(generatedTypes)}
1008
1008
  } else {
1009
1009
  plugin = resolved;
1010
1010
  }
1011
- } else if (chunkNVUXGMU5_cjs.isPluginConfigTuple(awaited) || chunkNVUXGMU5_cjs.isPluginConfigObject(awaited)) {
1011
+ } else if (chunkQABAD5RE_cjs.isPluginConfigTuple(awaited) || chunkQABAD5RE_cjs.isPluginConfigObject(awaited)) {
1012
1012
  let pluginConfig;
1013
1013
  let pluginOptions;
1014
- if (chunkNVUXGMU5_cjs.isPluginConfigTuple(awaited)) {
1014
+ if (chunkQABAD5RE_cjs.isPluginConfigTuple(awaited)) {
1015
1015
  pluginConfig = awaited[0];
1016
1016
  pluginOptions = awaited?.length === 2 ? awaited[1] : void 0;
1017
1017
  } else {
@@ -1027,17 +1027,17 @@ ${formatTypes(generatedTypes)}
1027
1027
  }
1028
1028
  } else if (isFunction.isFunction(pluginConfig)) {
1029
1029
  plugin = await Promise.resolve(pluginConfig(pluginOptions));
1030
- } else if (chunkNVUXGMU5_cjs.isPlugin(pluginConfig)) {
1030
+ } else if (chunkQABAD5RE_cjs.isPlugin(pluginConfig)) {
1031
1031
  plugin = pluginConfig;
1032
1032
  }
1033
1033
  }
1034
1034
  if (!plugin) {
1035
1035
  throw new Error(`The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`);
1036
1036
  }
1037
- if (!chunkNVUXGMU5_cjs.isPlugin(plugin)) {
1037
+ if (!chunkQABAD5RE_cjs.isPlugin(plugin)) {
1038
1038
  throw new Error(`The plugin option ${JSON.stringify(plugin)} does not export a valid module. This configuration must point to a valid Powerlines plugin module.`);
1039
1039
  }
1040
- if (chunkNVUXGMU5_cjs.checkDedupe(plugin, this.context.plugins)) {
1040
+ if (chunkQABAD5RE_cjs.checkDedupe(plugin, this.context.plugins)) {
1041
1041
  this.context.log(types.LogLevelLabel.TRACE, `Duplicate ${chalk2__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
1042
1042
  return null;
1043
1043
  }
@@ -2,10 +2,10 @@ import { writeFile } from './chunk-TANQDHYY.js';
2
2
  import { getFileHeader } from './chunk-GANVMM73.js';
3
3
  import { handleResolveId } from './chunk-G7S5PIAC.js';
4
4
  import { getParsedTypeScriptConfig, getTsconfigFilePath, isIncludeMatchFound } from './chunk-YOENMDZY.js';
5
- import { PowerlinesAPIContext } from './chunk-SZH2DJOG.js';
5
+ import { PowerlinesAPIContext } from './chunk-HNOAMIRO.js';
6
6
  import { callHook } from './chunk-KFJCWNVG.js';
7
- import { __VFS_PATCH__, __VFS_REVERT__, isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-764HUXP3.js';
8
- import { writeMetaFile } from './chunk-YH5GOJS3.js';
7
+ import { __VFS_PATCH__, __VFS_REVERT__, isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-XG4CC73V.js';
8
+ import { writeMetaFile } from './chunk-FQLZZYYO.js';
9
9
  import { createLog } from './chunk-ENRLU4UR.js';
10
10
  import { getString } from './chunk-M263EZ4F.js';
11
11
  import { replacePathTokens } from './chunk-XZFEHPYE.js';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkEJTGOYSI_cjs = require('./chunk-EJTGOYSI.cjs');
4
- var chunkNVUXGMU5_cjs = require('./chunk-NVUXGMU5.cjs');
5
- var chunkXW5TELHB_cjs = require('./chunk-XW5TELHB.cjs');
3
+ var chunkI6TJUFA6_cjs = require('./chunk-I6TJUFA6.cjs');
4
+ var chunkQABAD5RE_cjs = require('./chunk-QABAD5RE.cjs');
5
+ var chunkK3NBD5LL_cjs = require('./chunk-K3NBD5LL.cjs');
6
6
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
7
7
  var types = require('@storm-software/config-tools/types');
8
8
  var toArray = require('@stryke/convert/to-array');
@@ -64,7 +64,7 @@ function createDefaultEnvironment(userConfig) {
64
64
  chunkUSNT2KNT_cjs.__name(createDefaultEnvironment, "createDefaultEnvironment");
65
65
 
66
66
  // src/lib/contexts/api-context.ts
67
- var PowerlinesAPIContext = class _PowerlinesAPIContext extends chunkNVUXGMU5_cjs.PowerlinesContext {
67
+ var PowerlinesAPIContext = class _PowerlinesAPIContext extends chunkQABAD5RE_cjs.PowerlinesContext {
68
68
  static {
69
69
  chunkUSNT2KNT_cjs.__name(this, "PowerlinesAPIContext");
70
70
  }
@@ -79,7 +79,7 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends chunkNVUXGMU5_cjs
79
79
  * @returns A promise that resolves to the new context.
80
80
  */
81
81
  static async from(workspaceRoot, config) {
82
- const context = new _PowerlinesAPIContext(await chunkXW5TELHB_cjs.loadWorkspaceConfig(workspaceRoot, config.root));
82
+ const context = new _PowerlinesAPIContext(await chunkK3NBD5LL_cjs.loadWorkspaceConfig(workspaceRoot, config.root));
83
83
  await context.withUserConfig(config);
84
84
  context.powerlinesPath = await resolve.resolvePackage("powerlines");
85
85
  if (!context.powerlinesPath) {
@@ -127,7 +127,7 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends chunkNVUXGMU5_cjs
127
127
  if (this.environments[environment.name]) {
128
128
  context = this.environments[environment.name];
129
129
  } else {
130
- context = await chunkEJTGOYSI_cjs.PowerlinesEnvironmentContext.fromConfig(this.workspaceConfig, this.config);
130
+ context = await chunkI6TJUFA6_cjs.PowerlinesEnvironmentContext.fromConfig(this.workspaceConfig, this.config);
131
131
  }
132
132
  if (isSetObject.isSetObject(this.config.inlineConfig)) {
133
133
  await context.withInlineConfig(this.config.inlineConfig);
@@ -0,0 +1,68 @@
1
+ import { __name } from './chunk-SHUYVCID.js';
2
+ import { getWorkspaceConfig } from '@storm-software/config-tools/get-config';
3
+ import { existsSync } from '@stryke/fs/exists';
4
+ import { appendPath } from '@stryke/path/append';
5
+ import { joinPaths } from '@stryke/path/join-paths';
6
+ import { replacePath } from '@stryke/path/replace';
7
+ import { isFunction } from '@stryke/type-checks/is-function';
8
+ import { isSetObject } from '@stryke/type-checks/is-set-object';
9
+ import { loadConfig } from 'c12';
10
+ import defu from 'defu';
11
+
12
+ async function loadWorkspaceConfig(workspaceRoot, cwd) {
13
+ return defu({
14
+ workspaceRoot
15
+ }, await getWorkspaceConfig(true, {
16
+ cwd,
17
+ workspaceRoot,
18
+ useDefault: true
19
+ }));
20
+ }
21
+ __name(loadWorkspaceConfig, "loadWorkspaceConfig");
22
+ async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
23
+ let resolvedUserConfig = {};
24
+ let resolvedUserConfigFile;
25
+ if (configFile) {
26
+ resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot)) ? replacePath(configFile, projectRoot) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), replacePath(configFile, projectRoot))) ? joinPaths(appendPath(projectRoot, workspaceRoot), replacePath(configFile, projectRoot)) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile) : void 0;
27
+ }
28
+ if (!resolvedUserConfigFile) {
29
+ resolvedUserConfigFile = existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
30
+ }
31
+ if (resolvedUserConfigFile) {
32
+ const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
33
+ if (resolved) {
34
+ let config = {};
35
+ if (isFunction(resolved)) {
36
+ config = await Promise.resolve(resolved({
37
+ command,
38
+ mode,
39
+ isSsrBuild: false,
40
+ isPreview: false
41
+ }));
42
+ }
43
+ if (isSetObject(config)) {
44
+ resolvedUserConfig = {
45
+ ...config,
46
+ config,
47
+ configFile: resolvedUserConfigFile
48
+ };
49
+ }
50
+ }
51
+ }
52
+ const result = await loadConfig({
53
+ cwd: projectRoot,
54
+ name: framework,
55
+ envName: mode,
56
+ globalRc: true,
57
+ packageJson: true,
58
+ dotenv: true,
59
+ jiti
60
+ });
61
+ return defu(resolvedUserConfig, isSetObject(result?.config) ? {
62
+ ...result.config,
63
+ ...result
64
+ } : {});
65
+ }
66
+ __name(loadUserConfigFile, "loadUserConfigFile");
67
+
68
+ export { loadUserConfigFile, loadWorkspaceConfig };
@@ -1,5 +1,5 @@
1
- import { CACHE_HASH_LENGTH, PROJECT_ROOT_HASH_LENGTH, getPrefixedProjectRootHash, getChecksum } from './chunk-YH5GOJS3.js';
2
- import { loadWorkspaceConfig, loadUserConfigFile } from './chunk-ZPIKFR7Z.js';
1
+ import { CACHE_HASH_LENGTH, PROJECT_ROOT_HASH_LENGTH, getPrefixedProjectRootHash } from './chunk-FQLZZYYO.js';
2
+ import { loadWorkspaceConfig, loadUserConfigFile } from './chunk-XBM7FHNK.js';
3
3
  import { extendLog, createLog } from './chunk-ENRLU4UR.js';
4
4
  import { resolveEntriesSync, getUniqueEntries } from './chunk-XZFEHPYE.js';
5
5
  import { __name } from './chunk-SHUYVCID.js';
@@ -10,6 +10,7 @@ import { existsSync } from '@stryke/fs/exists';
10
10
  import { relativeToWorkspaceRoot } from '@stryke/fs/get-workspace-root';
11
11
  import { readJsonFile } from '@stryke/fs/json';
12
12
  import { resolvePackage } from '@stryke/fs/resolve';
13
+ import { hashDirectory } from '@stryke/hash/hash-files';
13
14
  import { murmurhash } from '@stryke/hash/murmurhash';
14
15
  import { getUnique } from '@stryke/helpers/get-unique';
15
16
  import { omit } from '@stryke/helpers/omit';
@@ -44,6 +45,7 @@ import { Union } from 'unionfs';
44
45
 
45
46
  function resolveOptions(options) {
46
47
  return defu2(options, {
48
+ debug: options.logLevel === "trace",
47
49
  interopDefault: true,
48
50
  fsCache: options.mode !== "development" ? joinPaths$1(options.cacheDir, "jiti") : false,
49
51
  moduleCache: options.mode !== "development"
@@ -2330,6 +2332,26 @@ var PowerlinesContext = class _PowerlinesContext {
2330
2332
  */
2331
2333
  logFn;
2332
2334
  /**
2335
+ * Generates a checksum representing the current context state
2336
+ *
2337
+ * @param root - The root directory of the project to generate the checksum for
2338
+ * @returns A promise that resolves to a string representing the checksum
2339
+ */
2340
+ async generateChecksum(root = this.config.projectRoot) {
2341
+ this.#checksum = await hashDirectory(root, {
2342
+ ignore: [
2343
+ "node_modules",
2344
+ ".git",
2345
+ ".nx",
2346
+ ".cache",
2347
+ ".storm",
2348
+ "tmp",
2349
+ "dist"
2350
+ ]
2351
+ });
2352
+ return this.#checksum;
2353
+ }
2354
+ /**
2333
2355
  * Initialize the context with the provided configuration options
2334
2356
  *
2335
2357
  * @param config - The partial user configuration to use for initialization.
@@ -2361,15 +2383,16 @@ var PowerlinesContext = class _PowerlinesContext {
2361
2383
  if (existsSync(packageJsonPath)) {
2362
2384
  this.packageJson = await readJsonFile(packageJsonPath);
2363
2385
  }
2364
- this.#checksum = await getChecksum(cacheKey.projectRoot);
2386
+ this.#checksum = await this.generateChecksum(cacheKey.projectRoot);
2365
2387
  this.resolver = createResolver({
2366
2388
  workspaceRoot: this.workspaceConfig.workspaceRoot,
2367
2389
  projectRoot: cacheKey.projectRoot,
2368
2390
  cacheDir: this.cachePath,
2369
2391
  mode: cacheKey.mode,
2392
+ logLevel: config.logLevel || this.config?.logLevel || this.workspaceConfig.logLevel || "info",
2370
2393
  skipCache: cacheKey.skipCache
2371
2394
  });
2372
- const userConfig = await loadUserConfigFile(cacheKey.projectRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
2395
+ const userConfig = await loadUserConfigFile(cacheKey.projectRoot, this.workspaceConfig.workspaceRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
2373
2396
  this.mergeUserConfig(userConfig.config);
2374
2397
  configCache.set(cacheKey, {
2375
2398
  projectJson: this.projectJson,
@@ -1166,6 +1166,12 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
1166
1166
  * @returns A logger function
1167
1167
  */
1168
1168
  extendLog: (name: string) => LogFn;
1169
+ /**
1170
+ * Generates a checksum representing the current context state
1171
+ *
1172
+ * @returns A promise that resolves to a string representing the checksum
1173
+ */
1174
+ generateChecksum: () => Promise<string>;
1169
1175
  }
1170
1176
  type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
1171
1177
  /**
@@ -1166,6 +1166,12 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
1166
1166
  * @returns A logger function
1167
1167
  */
1168
1168
  extendLog: (name: string) => LogFn;
1169
+ /**
1170
+ * Generates a checksum representing the current context state
1171
+ *
1172
+ * @returns A promise that resolves to a string representing the checksum
1173
+ */
1174
+ generateChecksum: () => Promise<string>;
1169
1175
  }
1170
1176
  type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
1171
1177
  /**
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkXW5TELHB_cjs = require('./chunk-XW5TELHB.cjs');
3
+ var chunkK3NBD5LL_cjs = require('./chunk-K3NBD5LL.cjs');
4
4
  require('./chunk-USNT2KNT.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "loadUserConfigFile", {
9
9
  enumerable: true,
10
- get: function () { return chunkXW5TELHB_cjs.loadUserConfigFile; }
10
+ get: function () { return chunkK3NBD5LL_cjs.loadUserConfigFile; }
11
11
  });
12
12
  Object.defineProperty(exports, "loadWorkspaceConfig", {
13
13
  enumerable: true,
14
- get: function () { return chunkXW5TELHB_cjs.loadWorkspaceConfig; }
14
+ get: function () { return chunkK3NBD5LL_cjs.loadWorkspaceConfig; }
15
15
  });
@@ -1,5 +1,5 @@
1
1
  import { Jiti } from 'jiti';
2
- import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-CxONCKEx.cjs';
2
+ import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-BnJpgcGr.cjs';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
@@ -43,6 +43,7 @@ declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promis
43
43
  * Loads the user configuration file for the project.
44
44
  *
45
45
  * @param projectRoot - The root directory of the project.
46
+ * @param workspaceRoot - The root directory of the workspace.
46
47
  * @param jiti - An instance of Jiti to resolve modules from
47
48
  * @param command - The {@link PowerlinesCommand} string associated with the current running process
48
49
  * @param mode - The mode in which the project is running (default is "production").
@@ -50,7 +51,7 @@ declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promis
50
51
  * @param framework - The framework name to use for default configuration file names.
51
52
  * @returns A promise that resolves to the resolved user configuration.
52
53
  */
53
- declare function loadUserConfigFile(projectRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
54
+ declare function loadUserConfigFile(projectRoot: string, workspaceRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
54
55
  declare type __ΩPartiallyResolvedContext = any[];
55
56
 
56
57
  export { type PartiallyResolvedContext, type __ΩPartiallyResolvedContext, loadUserConfigFile, loadWorkspaceConfig };
@@ -1,5 +1,5 @@
1
1
  import { Jiti } from 'jiti';
2
- import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-CFZYRPQj.js';
2
+ import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-7Q2dBjJE.js';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
@@ -43,6 +43,7 @@ declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promis
43
43
  * Loads the user configuration file for the project.
44
44
  *
45
45
  * @param projectRoot - The root directory of the project.
46
+ * @param workspaceRoot - The root directory of the workspace.
46
47
  * @param jiti - An instance of Jiti to resolve modules from
47
48
  * @param command - The {@link PowerlinesCommand} string associated with the current running process
48
49
  * @param mode - The mode in which the project is running (default is "production").
@@ -50,7 +51,7 @@ declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promis
50
51
  * @param framework - The framework name to use for default configuration file names.
51
52
  * @returns A promise that resolves to the resolved user configuration.
52
53
  */
53
- declare function loadUserConfigFile(projectRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
54
+ declare function loadUserConfigFile(projectRoot: string, workspaceRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
54
55
  declare type __ΩPartiallyResolvedContext = any[];
55
56
 
56
57
  export { type PartiallyResolvedContext, type __ΩPartiallyResolvedContext, loadUserConfigFile, loadWorkspaceConfig };
@@ -1,2 +1,2 @@
1
- export { loadUserConfigFile, loadWorkspaceConfig } from './chunk-ZPIKFR7Z.js';
1
+ export { loadUserConfigFile, loadWorkspaceConfig } from './chunk-XBM7FHNK.js';
2
2
  import './chunk-SHUYVCID.js';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunk27RAXIPT_cjs = require('../chunk-27RAXIPT.cjs');
4
- require('../chunk-EJTGOYSI.cjs');
3
+ var chunkVLOUSKRX_cjs = require('../chunk-VLOUSKRX.cjs');
4
+ require('../chunk-I6TJUFA6.cjs');
5
5
  require('../chunk-B3EE3VHZ.cjs');
6
- require('../chunk-NVUXGMU5.cjs');
7
- require('../chunk-7XHBIYIN.cjs');
8
- require('../chunk-XW5TELHB.cjs');
6
+ require('../chunk-QABAD5RE.cjs');
7
+ require('../chunk-7VJ42H2I.cjs');
8
+ require('../chunk-K3NBD5LL.cjs');
9
9
  require('../chunk-JA4HSQRN.cjs');
10
10
  require('../chunk-ISBHXSDH.cjs');
11
11
  require('../chunk-USNT2KNT.cjs');
@@ -14,5 +14,5 @@ require('../chunk-USNT2KNT.cjs');
14
14
 
15
15
  Object.defineProperty(exports, "PowerlinesAPIContext", {
16
16
  enumerable: true,
17
- get: function () { return chunk27RAXIPT_cjs.PowerlinesAPIContext; }
17
+ get: function () { return chunkVLOUSKRX_cjs.PowerlinesAPIContext; }
18
18
  });
@@ -1,4 +1,4 @@
1
- import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-CxONCKEx.cjs';
1
+ import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-BnJpgcGr.cjs';
2
2
  import { PowerlinesContext } from './context.cjs';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
@@ -28,8 +28,8 @@ import '@stryke/types/array';
28
28
  import '../tsconfig-Bz-CiFqD.cjs';
29
29
  import '@stryke/types/tsconfig';
30
30
  import 'typescript';
31
- import '../internal-9D9Up5pT.cjs';
32
- import '../api-Bwwdt0YR.cjs';
31
+ import '../internal-BeR8fOB1.cjs';
32
+ import '../api-Cm51oVbC.cjs';
33
33
 
34
34
  declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements APIContext<TResolvedConfig> {
35
35
  #private;