powerlines 0.23.9 → 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 (82) hide show
  1. package/dist/api.cjs +2 -2
  2. package/dist/api.js +1 -1
  3. package/dist/astro.cjs +4 -4
  4. package/dist/astro.js +3 -3
  5. package/dist/babel-types.d.ts +292 -0
  6. package/dist/{chunk-UYJXRMS3.js → chunk-3W5CN3M3.js} +1 -1
  7. package/dist/{chunk-6ZKM7WOB.cjs → chunk-4EIGDACJ.cjs} +12 -10
  8. package/dist/{chunk-FJWXCUGQ.cjs → chunk-4TBQYHPZ.cjs} +3 -3
  9. package/dist/{chunk-RKMUBSYG.js → chunk-7G7OFGGH.js} +1 -1
  10. package/dist/{chunk-FDEGM4CR.js → chunk-MUNYXQYT.js} +12 -10
  11. package/dist/{chunk-G5K3I7JU.cjs → chunk-PR3JGGAL.cjs} +2 -2
  12. package/dist/{chunk-ITL6JGKX.cjs → chunk-SNHUEYEP.cjs} +2 -2
  13. package/dist/{chunk-S47BU5QR.js → chunk-SS5AXCGJ.js} +1 -1
  14. package/dist/{chunk-2QLM4MYP.cjs → chunk-WBC2XOMT.cjs} +2 -2
  15. package/dist/{chunk-KOBCKTHY.js → chunk-ZIWN73GA.js} +1 -1
  16. package/dist/esbuild.cjs +6 -6
  17. package/dist/esbuild.js +3 -3
  18. package/dist/farm.cjs +3 -3
  19. package/dist/farm.js +2 -2
  20. package/dist/index.cjs +14 -14
  21. package/dist/index.js +2 -2
  22. package/dist/lib/{chunk-7XHBIYIN.cjs → chunk-7VJ42H2I.cjs} +0 -16
  23. package/dist/lib/{chunk-YH5GOJS3.js → chunk-FQLZZYYO.js} +1 -16
  24. package/dist/lib/{chunk-OI7EHXNE.js → chunk-HNOAMIRO.js} +3 -3
  25. package/dist/lib/{chunk-B3DJ4CXY.cjs → chunk-I6TJUFA6.cjs} +10 -10
  26. package/dist/lib/chunk-K3NBD5LL.cjs +75 -0
  27. package/dist/lib/{chunk-AHONHQGB.js → chunk-OJ5XFCZN.js} +1 -1
  28. package/dist/lib/{chunk-LQEGZT5U.cjs → chunk-QABAD5RE.cjs} +10 -8
  29. package/dist/lib/{chunk-3KR6TYGW.cjs → chunk-RBSNQFLF.cjs} +16 -16
  30. package/dist/lib/{chunk-BGGENJH4.js → chunk-VDPCG3RR.js} +3 -3
  31. package/dist/lib/{chunk-SMZ672RP.cjs → chunk-VLOUSKRX.cjs} +6 -6
  32. package/dist/lib/chunk-XBM7FHNK.js +68 -0
  33. package/dist/lib/{chunk-63MH3ERQ.js → chunk-XG4CC73V.js} +4 -2
  34. package/dist/lib/config-file.cjs +3 -3
  35. package/dist/lib/config-file.js +1 -1
  36. package/dist/lib/contexts/api-context.cjs +6 -6
  37. package/dist/lib/contexts/api-context.js +5 -5
  38. package/dist/lib/contexts/context.cjs +4 -4
  39. package/dist/lib/contexts/context.js +3 -3
  40. package/dist/lib/contexts/environment-context.cjs +5 -5
  41. package/dist/lib/contexts/environment-context.js +4 -4
  42. package/dist/lib/contexts/index.cjs +8 -8
  43. package/dist/lib/contexts/index.js +5 -5
  44. package/dist/lib/index.cjs +19 -23
  45. package/dist/lib/index.d.cts +1 -1
  46. package/dist/lib/index.d.ts +1 -1
  47. package/dist/lib/index.js +6 -6
  48. package/dist/lib/unplugin/factory.cjs +7 -7
  49. package/dist/lib/unplugin/factory.js +6 -6
  50. package/dist/lib/unplugin/index.cjs +7 -7
  51. package/dist/lib/unplugin/index.js +6 -6
  52. package/dist/lib/utilities/index.cjs +7 -11
  53. package/dist/lib/utilities/index.d.cts +1 -1
  54. package/dist/lib/utilities/index.d.ts +1 -1
  55. package/dist/lib/utilities/index.js +1 -1
  56. package/dist/lib/utilities/meta.cjs +7 -11
  57. package/dist/lib/utilities/meta.d.cts +1 -2
  58. package/dist/lib/utilities/meta.d.ts +1 -2
  59. package/dist/lib/utilities/meta.js +1 -1
  60. package/dist/next.cjs +4 -4
  61. package/dist/next.js +3 -3
  62. package/dist/nuxt.cjs +6 -6
  63. package/dist/nuxt.js +4 -4
  64. package/dist/rolldown.cjs +3 -3
  65. package/dist/rolldown.js +2 -2
  66. package/dist/rollup.cjs +3 -3
  67. package/dist/rollup.js +2 -2
  68. package/dist/rspack.cjs +3 -3
  69. package/dist/rspack.js +2 -2
  70. package/dist/tsup.cjs +4 -4
  71. package/dist/tsup.js +3 -3
  72. package/dist/unloader.cjs +3 -3
  73. package/dist/unloader.js +2 -2
  74. package/dist/unplugin.cjs +7 -7
  75. package/dist/unplugin.js +3 -3
  76. package/dist/vite.cjs +6 -6
  77. package/dist/vite.js +3 -3
  78. package/dist/webpack.cjs +6 -6
  79. package/dist/webpack.js +3 -3
  80. package/package.json +3 -2
  81. package/dist/lib/chunk-7JAGT5GC.cjs +0 -74
  82. package/dist/lib/chunk-PVCAB6BZ.js +0 -67
package/dist/index.cjs CHANGED
@@ -14,14 +14,14 @@ require('./chunk-7GYTTM4M.cjs');
14
14
  var chunkXP7OML7S_cjs = require('./chunk-XP7OML7S.cjs');
15
15
  require('./chunk-HQFZ64VC.cjs');
16
16
  var chunkBUR2JQ6G_cjs = require('./chunk-BUR2JQ6G.cjs');
17
- var chunk6ZKM7WOB_cjs = require('./chunk-6ZKM7WOB.cjs');
17
+ var chunk4EIGDACJ_cjs = require('./chunk-4EIGDACJ.cjs');
18
18
  var chunkETKZMGLN_cjs = require('./chunk-ETKZMGLN.cjs');
19
19
  var chunkPAMSESZV_cjs = require('./chunk-PAMSESZV.cjs');
20
20
  var chunkAYKZK666_cjs = require('./chunk-AYKZK666.cjs');
21
21
  require('./chunk-USNT2KNT.cjs');
22
22
 
23
23
  // src/index.ts
24
- var index_default = chunk6ZKM7WOB_cjs.PowerlinesAPI;
24
+ var index_default = chunk4EIGDACJ_cjs.PowerlinesAPI;
25
25
 
26
26
  Object.defineProperty(exports, "LogLevel", {
27
27
  enumerable: true,
@@ -33,51 +33,51 @@ Object.defineProperty(exports, "defineConfig", {
33
33
  });
34
34
  Object.defineProperty(exports, "AssetData", {
35
35
  enumerable: true,
36
- get: function () { return chunk6ZKM7WOB_cjs.AssetData; }
36
+ get: function () { return chunk4EIGDACJ_cjs.AssetData; }
37
37
  });
38
38
  Object.defineProperty(exports, "ChunkData", {
39
39
  enumerable: true,
40
- get: function () { return chunk6ZKM7WOB_cjs.ChunkData; }
40
+ get: function () { return chunk4EIGDACJ_cjs.ChunkData; }
41
41
  });
42
42
  Object.defineProperty(exports, "FileData", {
43
43
  enumerable: true,
44
- get: function () { return chunk6ZKM7WOB_cjs.FileData; }
44
+ get: function () { return chunk4EIGDACJ_cjs.FileData; }
45
45
  });
46
46
  Object.defineProperty(exports, "FileId", {
47
47
  enumerable: true,
48
- get: function () { return chunk6ZKM7WOB_cjs.FileId; }
48
+ get: function () { return chunk4EIGDACJ_cjs.FileId; }
49
49
  });
50
50
  Object.defineProperty(exports, "FileMetadata", {
51
51
  enumerable: true,
52
- get: function () { return chunk6ZKM7WOB_cjs.FileMetadata; }
52
+ get: function () { return chunk4EIGDACJ_cjs.FileMetadata; }
53
53
  });
54
54
  Object.defineProperty(exports, "FileMetadata_KeyValuePair", {
55
55
  enumerable: true,
56
- get: function () { return chunk6ZKM7WOB_cjs.FileMetadata_KeyValuePair; }
56
+ get: function () { return chunk4EIGDACJ_cjs.FileMetadata_KeyValuePair; }
57
57
  });
58
58
  Object.defineProperty(exports, "FileSystem", {
59
59
  enumerable: true,
60
- get: function () { return chunk6ZKM7WOB_cjs.FileSystem; }
60
+ get: function () { return chunk4EIGDACJ_cjs.FileSystem; }
61
61
  });
62
62
  Object.defineProperty(exports, "FileType", {
63
63
  enumerable: true,
64
- get: function () { return chunk6ZKM7WOB_cjs.FileType; }
64
+ get: function () { return chunk4EIGDACJ_cjs.FileType; }
65
65
  });
66
66
  Object.defineProperty(exports, "PowerlinesAPI", {
67
67
  enumerable: true,
68
- get: function () { return chunk6ZKM7WOB_cjs.PowerlinesAPI; }
68
+ get: function () { return chunk4EIGDACJ_cjs.PowerlinesAPI; }
69
69
  });
70
70
  Object.defineProperty(exports, "PrebuiltData", {
71
71
  enumerable: true,
72
- get: function () { return chunk6ZKM7WOB_cjs.PrebuiltData; }
72
+ get: function () { return chunk4EIGDACJ_cjs.PrebuiltData; }
73
73
  });
74
74
  Object.defineProperty(exports, "PreserveSignatureType", {
75
75
  enumerable: true,
76
- get: function () { return chunk6ZKM7WOB_cjs.PreserveSignatureType; }
76
+ get: function () { return chunk4EIGDACJ_cjs.PreserveSignatureType; }
77
77
  });
78
78
  Object.defineProperty(exports, "_capnpFileId", {
79
79
  enumerable: true,
80
- get: function () { return chunk6ZKM7WOB_cjs._capnpFileId; }
80
+ get: function () { return chunk4EIGDACJ_cjs._capnpFileId; }
81
81
  });
82
82
  Object.defineProperty(exports, "PLUGIN_NON_HOOK_FIELDS", {
83
83
  enumerable: true,
package/dist/index.js CHANGED
@@ -10,8 +10,8 @@ import './chunk-DRXFQCNC.js';
10
10
  export { LogLevel } from './chunk-W5X3ZEZ5.js';
11
11
  import './chunk-JGB5YQ2U.js';
12
12
  export { defineConfig } from './chunk-CJSGAITR.js';
13
- import { PowerlinesAPI } from './chunk-FDEGM4CR.js';
14
- export { AssetData, ChunkData, FileData, FileId, FileMetadata, FileMetadata_KeyValuePair, FileSystem, FileType, PowerlinesAPI, PrebuiltData, PreserveSignatureType, _capnpFileId } from './chunk-FDEGM4CR.js';
13
+ import { PowerlinesAPI } from './chunk-MUNYXQYT.js';
14
+ export { AssetData, ChunkData, FileData, FileId, FileMetadata, FileMetadata_KeyValuePair, FileSystem, FileType, PowerlinesAPI, PrebuiltData, PreserveSignatureType, _capnpFileId } from './chunk-MUNYXQYT.js';
15
15
  export { PLUGIN_NON_HOOK_FIELDS } from './chunk-JQCWV4DT.js';
16
16
  export { SUPPORTED_COMMANDS } from './chunk-JKBJF3UI.js';
17
17
  export { __VFS_PATCH__, __VFS_REVERT__ } from './chunk-VT7NVLLU.js';
@@ -6,7 +6,6 @@ var exists = require('@stryke/fs/exists');
6
6
  var json = require('@stryke/fs/json');
7
7
  var listFiles = require('@stryke/fs/list-files');
8
8
  var removeFile = require('@stryke/fs/remove-file');
9
- var hashFiles = require('@stryke/hash/hash-files');
10
9
  var getUnique = require('@stryke/helpers/get-unique');
11
10
  var filePathFns = require('@stryke/path/file-path-fns');
12
11
  var joinPaths = require('@stryke/path/join-paths');
@@ -43,20 +42,6 @@ async function discoverTemplates(context, paths = []) {
43
42
  }, []));
44
43
  }
45
44
  chunkUSNT2KNT_cjs.__name(discoverTemplates, "discoverTemplates");
46
- async function getChecksum(path) {
47
- return hashFiles.hashDirectory(path, {
48
- ignore: [
49
- "node_modules",
50
- ".git",
51
- ".nx",
52
- ".cache",
53
- ".storm",
54
- "tmp",
55
- "dist"
56
- ]
57
- });
58
- }
59
- chunkUSNT2KNT_cjs.__name(getChecksum, "getChecksum");
60
45
  async function getPersistedMeta(context) {
61
46
  const metaFilePath = joinPaths.joinPaths(context.dataPath, "meta.json");
62
47
  if (exists.existsSync(metaFilePath)) {
@@ -83,7 +68,6 @@ chunkUSNT2KNT_cjs.__name(writeMetaFile, "writeMetaFile");
83
68
  exports.CACHE_HASH_LENGTH = CACHE_HASH_LENGTH;
84
69
  exports.PROJECT_ROOT_HASH_LENGTH = PROJECT_ROOT_HASH_LENGTH;
85
70
  exports.discoverTemplates = discoverTemplates;
86
- exports.getChecksum = getChecksum;
87
71
  exports.getPersistedMeta = getPersistedMeta;
88
72
  exports.getPrefixedProjectRootHash = getPrefixedProjectRootHash;
89
73
  exports.writeMetaFile = writeMetaFile;
@@ -4,7 +4,6 @@ import { existsSync } from '@stryke/fs/exists';
4
4
  import { readJsonFile } from '@stryke/fs/json';
5
5
  import { listFiles } from '@stryke/fs/list-files';
6
6
  import { removeFile } from '@stryke/fs/remove-file';
7
- import { hashDirectory } from '@stryke/hash/hash-files';
8
7
  import { getUnique } from '@stryke/helpers/get-unique';
9
8
  import { hasFileExtension } from '@stryke/path/file-path-fns';
10
9
  import { joinPaths } from '@stryke/path/join-paths';
@@ -41,20 +40,6 @@ async function discoverTemplates(context, paths = []) {
41
40
  }, []));
42
41
  }
43
42
  __name(discoverTemplates, "discoverTemplates");
44
- async function getChecksum(path) {
45
- return hashDirectory(path, {
46
- ignore: [
47
- "node_modules",
48
- ".git",
49
- ".nx",
50
- ".cache",
51
- ".storm",
52
- "tmp",
53
- "dist"
54
- ]
55
- });
56
- }
57
- __name(getChecksum, "getChecksum");
58
43
  async function getPersistedMeta(context) {
59
44
  const metaFilePath = joinPaths(context.dataPath, "meta.json");
60
45
  if (existsSync(metaFilePath)) {
@@ -78,4 +63,4 @@ async function writeMetaFile(context) {
78
63
  }
79
64
  __name(writeMetaFile, "writeMetaFile");
80
65
 
81
- export { CACHE_HASH_LENGTH, PROJECT_ROOT_HASH_LENGTH, discoverTemplates, getChecksum, getPersistedMeta, getPrefixedProjectRootHash, writeMetaFile };
66
+ export { CACHE_HASH_LENGTH, PROJECT_ROOT_HASH_LENGTH, discoverTemplates, getPersistedMeta, getPrefixedProjectRootHash, writeMetaFile };
@@ -1,6 +1,6 @@
1
- import { PowerlinesEnvironmentContext } from './chunk-AHONHQGB.js';
2
- import { PowerlinesContext } from './chunk-63MH3ERQ.js';
3
- import { loadWorkspaceConfig } from './chunk-PVCAB6BZ.js';
1
+ import { PowerlinesEnvironmentContext } from './chunk-OJ5XFCZN.js';
2
+ import { PowerlinesContext } from './chunk-XG4CC73V.js';
3
+ import { loadWorkspaceConfig } from './chunk-XBM7FHNK.js';
4
4
  import { __name } from './chunk-SHUYVCID.js';
5
5
  import { LogLevelLabel } from '@storm-software/config-tools/types';
6
6
  import { toArray } from '@stryke/convert/to-array';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkB3EE3VHZ_cjs = require('./chunk-B3EE3VHZ.cjs');
4
- var chunkLQEGZT5U_cjs = require('./chunk-LQEGZT5U.cjs');
4
+ var chunkQABAD5RE_cjs = require('./chunk-QABAD5RE.cjs');
5
5
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
6
6
  var resolve = require('@stryke/fs/resolve');
7
7
  var isFunction = require('@stryke/type-checks/is-function');
@@ -17,7 +17,7 @@ var PLUGIN_NON_HOOK_FIELDS = [
17
17
  ];
18
18
 
19
19
  // src/lib/contexts/environment-context.ts
20
- var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends chunkLQEGZT5U_cjs.PowerlinesContext {
20
+ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends chunkQABAD5RE_cjs.PowerlinesContext {
21
21
  static {
22
22
  chunkUSNT2KNT_cjs.__name(this, "PowerlinesEnvironmentContext");
23
23
  }
@@ -65,7 +65,7 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
65
65
  if (!result || isObject.isObject(result) && Object.keys(result).length === 0) {
66
66
  return;
67
67
  }
68
- resolvedPlugin = chunkLQEGZT5U_cjs.isPlugin(result) ? result : plugin;
68
+ resolvedPlugin = chunkQABAD5RE_cjs.isPlugin(result) ? result : plugin;
69
69
  }
70
70
  const context = chunkB3EE3VHZ_cjs.createPluginContext(resolvedPlugin, this);
71
71
  this.plugins.push({
@@ -75,28 +75,28 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
75
75
  this.#hooks = Object.keys(resolvedPlugin).filter((key) => !PLUGIN_NON_HOOK_FIELDS.includes(key)).reduce((ret, key) => {
76
76
  const hook = key;
77
77
  const pluginHook = resolvedPlugin[hook];
78
- if (!chunkLQEGZT5U_cjs.isPluginHook(pluginHook)) {
78
+ if (!chunkQABAD5RE_cjs.isPluginHook(pluginHook)) {
79
79
  return ret;
80
80
  }
81
- if (!chunkLQEGZT5U_cjs.isHookExternal(hook)) {
81
+ if (!chunkQABAD5RE_cjs.isHookExternal(hook)) {
82
82
  ret[hook] ??= {};
83
83
  if (resolvedPlugin.enforce) {
84
84
  ret[hook][`${resolvedPlugin.enforce}Enforced`] ??= [];
85
- chunkLQEGZT5U_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${resolvedPlugin.enforce}Enforced`]);
85
+ chunkQABAD5RE_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${resolvedPlugin.enforce}Enforced`]);
86
86
  return ret;
87
87
  }
88
88
  if (isFunction.isFunction(pluginHook) || !pluginHook.order) {
89
89
  ret[hook].normal ??= [];
90
- chunkLQEGZT5U_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook].normal);
90
+ chunkQABAD5RE_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook].normal);
91
91
  return ret;
92
92
  }
93
93
  ret[hook][`${pluginHook.order}Ordered`] ??= [];
94
- chunkLQEGZT5U_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${pluginHook.order}Ordered`]);
94
+ chunkQABAD5RE_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${pluginHook.order}Ordered`]);
95
95
  } else {
96
96
  ret[hook] ??= [];
97
97
  ret[hook].push({
98
98
  plugin: resolvedPlugin,
99
- hook: chunkLQEGZT5U_cjs.getHookHandler(pluginHook).bind(context)
99
+ hook: chunkQABAD5RE_cjs.getHookHandler(pluginHook).bind(context)
100
100
  });
101
101
  }
102
102
  return ret;
@@ -108,7 +108,7 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
108
108
  selectHooks(hook, options) {
109
109
  const handlers = [];
110
110
  if (this.hooks[hook]) {
111
- if (!chunkLQEGZT5U_cjs.isHookExternal(hook)) {
111
+ if (!chunkQABAD5RE_cjs.isHookExternal(hook)) {
112
112
  const hooks = this.hooks[hook];
113
113
  if (options?.order) {
114
114
  if (options?.order === "pre") {
@@ -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-63MH3ERQ.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 chunk7JAGT5GC_cjs = require('./chunk-7JAGT5GC.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');
@@ -71,6 +71,7 @@ var _fs__default = /*#__PURE__*/_interopDefault(_fs);
71
71
 
72
72
  function resolveOptions(options) {
73
73
  return defu2__default.default(options, {
74
+ debug: options.logLevel === "trace",
74
75
  interopDefault: true,
75
76
  fsCache: options.mode !== "development" ? joinPaths.joinPaths(options.cacheDir, "jiti") : false,
76
77
  moduleCache: options.mode !== "development"
@@ -2000,7 +2001,7 @@ var PowerlinesContext = class _PowerlinesContext {
2000
2001
  * @returns A promise that resolves to the new context.
2001
2002
  */
2002
2003
  static async from(workspaceRoot, config) {
2003
- const context = new _PowerlinesContext(await chunk7JAGT5GC_cjs.loadWorkspaceConfig(workspaceRoot, config.root));
2004
+ const context = new _PowerlinesContext(await chunkK3NBD5LL_cjs.loadWorkspaceConfig(workspaceRoot, config.root));
2004
2005
  await context.withUserConfig(config);
2005
2006
  context.powerlinesPath = await resolve.resolvePackage("powerlines");
2006
2007
  if (!context.powerlinesPath) {
@@ -2097,10 +2098,10 @@ var PowerlinesContext = class _PowerlinesContext {
2097
2098
  workspaceRoot: this.workspaceConfig?.workspaceRoot,
2098
2099
  projectRoot: this.config?.projectRoot
2099
2100
  }, {
2100
- maxLength: chunk7XHBIYIN_cjs.PROJECT_ROOT_HASH_LENGTH
2101
+ maxLength: chunk7VJ42H2I_cjs.PROJECT_ROOT_HASH_LENGTH
2101
2102
  }),
2102
2103
  configHash: murmurhash.murmurhash(this.config, {
2103
- maxLength: chunk7XHBIYIN_cjs.CACHE_HASH_LENGTH
2104
+ maxLength: chunk7VJ42H2I_cjs.CACHE_HASH_LENGTH
2104
2105
  })
2105
2106
  };
2106
2107
  }
@@ -2160,7 +2161,7 @@ var PowerlinesContext = class _PowerlinesContext {
2160
2161
  * Get the path to the data directory for the project
2161
2162
  */
2162
2163
  get dataPath() {
2163
- 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));
2164
2165
  }
2165
2166
  /**
2166
2167
  * Get the path to the cache directory for the project
@@ -2170,7 +2171,7 @@ var PowerlinesContext = class _PowerlinesContext {
2170
2171
  checksum: this.#checksum,
2171
2172
  config: this.meta.configHash
2172
2173
  }, {
2173
- maxLength: chunk7XHBIYIN_cjs.CACHE_HASH_LENGTH
2174
+ maxLength: chunk7VJ42H2I_cjs.CACHE_HASH_LENGTH
2174
2175
  }));
2175
2176
  }
2176
2177
  /**
@@ -2414,9 +2415,10 @@ var PowerlinesContext = class _PowerlinesContext {
2414
2415
  projectRoot: cacheKey.projectRoot,
2415
2416
  cacheDir: this.cachePath,
2416
2417
  mode: cacheKey.mode,
2418
+ logLevel: config.logLevel || this.config?.logLevel || this.workspaceConfig.logLevel || "info",
2417
2419
  skipCache: cacheKey.skipCache
2418
2420
  });
2419
- const userConfig = await chunk7JAGT5GC_cjs.loadUserConfigFile(cacheKey.projectRoot, this.workspaceConfig.workspaceRoot, 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);
2420
2422
  this.mergeUserConfig(userConfig.config);
2421
2423
  configCache.set(cacheKey, {
2422
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 chunkSMZ672RP_cjs = require('./chunk-SMZ672RP.cjs');
7
+ var chunkVLOUSKRX_cjs = require('./chunk-VLOUSKRX.cjs');
8
8
  var chunkB3EE3VHZ_cjs = require('./chunk-B3EE3VHZ.cjs');
9
- var chunkLQEGZT5U_cjs = require('./chunk-LQEGZT5U.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 chunkSMZ672RP_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[chunkLQEGZT5U_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[chunkLQEGZT5U_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[chunkLQEGZT5U_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 (!chunkLQEGZT5U_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 (chunkLQEGZT5U_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 (chunkLQEGZT5U_cjs.isPluginConfigTuple(awaited) || chunkLQEGZT5U_cjs.isPluginConfigObject(awaited)) {
1011
+ } else if (chunkQABAD5RE_cjs.isPluginConfigTuple(awaited) || chunkQABAD5RE_cjs.isPluginConfigObject(awaited)) {
1012
1012
  let pluginConfig;
1013
1013
  let pluginOptions;
1014
- if (chunkLQEGZT5U_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 (chunkLQEGZT5U_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 (!chunkLQEGZT5U_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 (chunkLQEGZT5U_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-OI7EHXNE.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-63MH3ERQ.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 chunkB3DJ4CXY_cjs = require('./chunk-B3DJ4CXY.cjs');
4
- var chunkLQEGZT5U_cjs = require('./chunk-LQEGZT5U.cjs');
5
- var chunk7JAGT5GC_cjs = require('./chunk-7JAGT5GC.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 chunkLQEGZT5U_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 chunkLQEGZT5U_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 chunk7JAGT5GC_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 chunkLQEGZT5U_cjs
127
127
  if (this.environments[environment.name]) {
128
128
  context = this.environments[environment.name];
129
129
  } else {
130
- context = await chunkB3DJ4CXY_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 } from './chunk-YH5GOJS3.js';
2
- import { loadWorkspaceConfig, loadUserConfigFile } from './chunk-PVCAB6BZ.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';
@@ -45,6 +45,7 @@ import { Union } from 'unionfs';
45
45
 
46
46
  function resolveOptions(options) {
47
47
  return defu2(options, {
48
+ debug: options.logLevel === "trace",
48
49
  interopDefault: true,
49
50
  fsCache: options.mode !== "development" ? joinPaths$1(options.cacheDir, "jiti") : false,
50
51
  moduleCache: options.mode !== "development"
@@ -2388,6 +2389,7 @@ var PowerlinesContext = class _PowerlinesContext {
2388
2389
  projectRoot: cacheKey.projectRoot,
2389
2390
  cacheDir: this.cachePath,
2390
2391
  mode: cacheKey.mode,
2392
+ logLevel: config.logLevel || this.config?.logLevel || this.workspaceConfig.logLevel || "info",
2391
2393
  skipCache: cacheKey.skipCache
2392
2394
  });
2393
2395
  const userConfig = await loadUserConfigFile(cacheKey.projectRoot, this.workspaceConfig.workspaceRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);