@storm-software/workspace-tools 1.46.1 → 1.48.0

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [1.47.0](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.46.1...workspace-tools-v1.47.0) (2024-01-19)
2
+
3
+
4
+ ### Features
5
+
6
+ * **config-tools:** Added the `getConfigFileByName` function export ([9f56a9c](https://github.com/storm-software/storm-ops/commit/9f56a9ca2c1df0bccbf533cc63f15602e8de0dff))
7
+
8
+ ## [1.46.1](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.46.0...workspace-tools-v1.46.1) (2024-01-19)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **config-tools:** Added the `defineConfig` function to type-check config options ([0676271](https://github.com/storm-software/storm-ops/commit/0676271161ec4a04715fb495f55042328a9f116f))
14
+
1
15
  # [1.46.0](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.45.3...workspace-tools-v1.46.0) (2024-01-19)
2
16
 
3
17
 
package/index.js CHANGED
@@ -45557,9 +45557,9 @@ var require_brace_expansion2 = __commonJS({
45557
45557
  }
45558
45558
  });
45559
45559
 
45560
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-EPAEWGCP.js
45560
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-EPAEWGCP.js
45561
45561
  var require_chunk_EPAEWGCP = __commonJS({
45562
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
45562
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
45563
45563
  "use strict";
45564
45564
  Object.defineProperty(exports, "__esModule", { value: true });
45565
45565
  var version = "8.0.0";
@@ -47206,9 +47206,9 @@ var require_resolve_from2 = __commonJS({
47206
47206
  }
47207
47207
  });
47208
47208
 
47209
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-GQ77QZBO.js
47209
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-GQ77QZBO.js
47210
47210
  var require_chunk_GQ77QZBO = __commonJS({
47211
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
47211
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
47212
47212
  "use strict";
47213
47213
  Object.defineProperty(exports, "__esModule", { value: true });
47214
47214
  function _interopRequireDefault(obj) {
@@ -47486,9 +47486,9 @@ var require_chunk_GQ77QZBO = __commonJS({
47486
47486
  }
47487
47487
  });
47488
47488
 
47489
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-UIX4URMV.js
47489
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-UIX4URMV.js
47490
47490
  var require_chunk_UIX4URMV = __commonJS({
47491
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
47491
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
47492
47492
  "use strict";
47493
47493
  Object.defineProperty(exports, "__esModule", { value: true });
47494
47494
  function _interopRequireWildcard(obj) {
@@ -48422,9 +48422,9 @@ var require_dist3 = __commonJS({
48422
48422
  }
48423
48423
  });
48424
48424
 
48425
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-7G76EW2R.js
48425
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-7G76EW2R.js
48426
48426
  var require_chunk_7G76EW2R = __commonJS({
48427
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
48427
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
48428
48428
  "use strict";
48429
48429
  Object.defineProperty(exports, "__esModule", { value: true });
48430
48430
  function _interopRequireDefault(obj) {
@@ -101624,9 +101624,9 @@ var require_chokidar = __commonJS({
101624
101624
  }
101625
101625
  });
101626
101626
 
101627
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/index.js
101627
+ // node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/index.js
101628
101628
  var require_dist6 = __commonJS({
101629
- "node_modules/.pnpm/tsup@8.0.0_patch_hash=lurtiqcq5kq3yakooovipkye6e_@microsoft+api-extractor@7.38.3_@swc+core@1._3b4jumqayj5mkfp6uvbuagbdei/node_modules/tsup/dist/index.js"(exports) {
101629
+ "node_modules/.pnpm/tsup@8.0.0_patch_hash=vonq2ypzonrhdbbnbw7rufdaga_@microsoft+api-extractor@7.38.3_@swc+core@1._oxrz763w3giqwq7zitausocayi/node_modules/tsup/dist/index.js"(exports) {
101630
101630
  "use strict";
101631
101631
  Object.defineProperty(exports, "__esModule", { value: true });
101632
101632
  function _interopRequireDefault(obj) {
@@ -103340,7 +103340,6 @@ var require_dist6 = __commonJS({
103340
103340
  tsconfigResolvePaths: options.tsconfigResolvePaths
103341
103341
  }),
103342
103342
  options.tsconfigDecoratorMetadata && swcPlugin({ logger: logger3 }),
103343
- nativeNodeModulesPlugin(),
103344
103343
  postcssPlugin({
103345
103344
  css,
103346
103345
  inject: options.injectStyle,
@@ -103349,6 +103348,9 @@ var require_dist6 = __commonJS({
103349
103348
  sveltePlugin({ css }),
103350
103349
  ...options.esbuildPlugins || []
103351
103350
  ];
103351
+ if (options.skipNativeModulesPlugin !== true) {
103352
+ esbuildPlugins.push(nativeNodeModulesPlugin());
103353
+ }
103352
103354
  const banner = typeof options.banner === "function" ? options.banner({ format: format2 }) : options.banner;
103353
103355
  const footer = typeof options.footer === "function" ? options.footer({ format: format2 }) : options.footer;
103354
103356
  try {
@@ -127045,216 +127047,23 @@ module.exports = __toCommonJS(workspace_tools_exports);
127045
127047
 
127046
127048
  // packages/config-tools/src/config-file/get-config-file.ts
127047
127049
  var import_cosmiconfig = __toESM(require_dist(), 1);
127048
-
127049
- // packages/config-tools/src/utilities/logger.ts
127050
- var chalk = __toESM(require_source(), 1);
127051
-
127052
- // packages/config-tools/src/types.ts
127053
- var LogLevel = {
127054
- SILENT: 0,
127055
- FATAL: 10,
127056
- ERROR: 20,
127057
- WARN: 30,
127058
- INFO: 40,
127059
- SUCCESS: 45,
127060
- DEBUG: 60,
127061
- TRACE: 70,
127062
- ALL: 100
127063
- };
127064
- var LogLevelLabel = {
127065
- SILENT: "silent",
127066
- FATAL: "fatal",
127067
- ERROR: "error",
127068
- WARN: "warn",
127069
- INFO: "info",
127070
- DEBUG: "debug",
127071
- TRACE: "trace",
127072
- ALL: "all"
127073
- };
127074
-
127075
- // packages/config-tools/src/utilities/get-log-level.ts
127076
- var getLogLevel = (label) => {
127077
- switch (label) {
127078
- case "all":
127079
- return LogLevel.ALL;
127080
- case "trace":
127081
- return LogLevel.TRACE;
127082
- case "debug":
127083
- return LogLevel.DEBUG;
127084
- case "info":
127085
- return LogLevel.INFO;
127086
- case "warn":
127087
- return LogLevel.WARN;
127088
- case "error":
127089
- return LogLevel.ERROR;
127090
- case "fatal":
127091
- return LogLevel.FATAL;
127092
- case "silent":
127093
- return LogLevel.SILENT;
127094
- default:
127095
- return LogLevel.INFO;
127096
- }
127097
- };
127098
- var getLogLevelLabel = (logLevel) => {
127099
- if (logLevel >= LogLevel.ALL) {
127100
- return LogLevelLabel.ALL;
127101
- }
127102
- if (logLevel >= LogLevel.TRACE) {
127103
- return LogLevelLabel.TRACE;
127104
- }
127105
- if (logLevel >= LogLevel.DEBUG) {
127106
- return LogLevelLabel.DEBUG;
127107
- }
127108
- if (logLevel >= LogLevel.INFO) {
127109
- return LogLevelLabel.INFO;
127110
- }
127111
- if (logLevel >= LogLevel.WARN) {
127112
- return LogLevelLabel.WARN;
127113
- }
127114
- if (logLevel >= LogLevel.ERROR) {
127115
- return LogLevelLabel.ERROR;
127116
- }
127117
- if (logLevel >= LogLevel.FATAL) {
127118
- return LogLevelLabel.FATAL;
127119
- }
127120
- if (logLevel <= LogLevel.SILENT) {
127121
- return LogLevelLabel.SILENT;
127122
- }
127123
- return LogLevelLabel.INFO;
127124
- };
127125
-
127126
- // packages/config-tools/src/utilities/logger.ts
127127
- var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
127128
- if (typeof logLevel === "number" && (logLevel >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL)) {
127129
- return (_) => {
127130
- };
127131
- }
127132
- if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
127133
- return (message) => {
127134
- console.error(
127135
- `
127136
- ${chalk.bold.hex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").white(" \u{1F480} Fatal ")} ${chalk.hex(
127137
- config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
127138
- )(message)}
127139
-
127140
- `
127141
- );
127142
- };
127143
- }
127144
- if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
127145
- return (message) => {
127146
- console.error(
127147
- `
127148
- ${chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")} ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").white(" \u2718 Error ")} ${chalk.hex(
127149
- config?.colors?.error ? config.colors.error : "#7d1a1a"
127150
- )(message)}
127151
- `
127152
- );
127153
- };
127154
- }
127155
- if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
127156
- return (message) => {
127157
- console.warn(
127158
- `
127159
- ${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(">")} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" ! Warn ")} ${chalk.hex(
127160
- config?.colors?.warning ? config.colors.warning : "#fcc419"
127161
- )(message)}
127162
- `
127163
- );
127164
- };
127165
- }
127166
- if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
127167
- return (message) => {
127168
- console.info(
127169
- `
127170
- ${chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").white(" \u2139 Info ")} ${chalk.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(
127171
- message
127172
- )}
127173
- `
127174
- );
127175
- };
127176
- }
127177
- if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
127178
- return (message) => {
127179
- console.info(
127180
- `
127181
- ${chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(">")} ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").white(" \u221A Success ")} ${chalk.hex(
127182
- config?.colors?.success ? config.colors.success : "#087f5b"
127183
- )(message)}
127184
- `
127185
- );
127186
- };
127187
- }
127188
- if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
127189
- return (message) => {
127190
- console.debug(
127191
- `
127192
- ${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F9EA} Debug ")} ${chalk.hex(
127193
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
127194
- )(message)}
127195
- `
127196
- );
127197
- };
127198
- }
127199
- return (message) => {
127200
- console.log(
127201
- `
127202
- ${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F4E2} System ")} ${chalk.hex(
127203
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
127204
- )(message)}
127205
- `
127206
- );
127207
- };
127208
- };
127209
- var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
127210
- var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
127211
- var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
127212
- var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
127213
- var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
127214
- var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
127215
- var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
127216
- var getStopwatch = (name) => {
127217
- const start = process.hrtime();
127218
- return () => {
127219
- const end = process.hrtime(start);
127220
- console.info(
127221
- chalk.dim(
127222
- `\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
127223
- end[0] * 1e3 + end[1] / 1e6
127224
- )}ms to complete`
127225
- )
127226
- );
127227
- };
127228
- };
127229
-
127230
- // packages/config-tools/src/config-file/get-config-file.ts
127231
127050
  var _static_cache = void 0;
127232
- var getConfigFileName = async (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
127051
+ var getConfigFileByName = async (fileName, filePath) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath);
127233
127052
  var getConfigFile = async (filePath) => {
127234
127053
  if (_static_cache) {
127235
127054
  return _static_cache;
127236
127055
  }
127237
- let cosmiconfigResult = await getConfigFileName("storm", filePath);
127056
+ let cosmiconfigResult = await getConfigFileByName("storm", filePath);
127238
127057
  if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
127239
- cosmiconfigResult = await getConfigFileName("storm-software", filePath);
127058
+ cosmiconfigResult = await getConfigFileByName("storm-software", filePath);
127240
127059
  if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
127241
- cosmiconfigResult = await getConfigFileName("storm-stack", filePath);
127060
+ cosmiconfigResult = await getConfigFileByName("storm-stack", filePath);
127242
127061
  if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
127243
- cosmiconfigResult = await getConfigFileName("storm-cloud", filePath);
127244
- if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
127245
- cosmiconfigResult = await getConfigFileName("acidic", filePath);
127246
- if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
127247
- cosmiconfigResult = await getConfigFileName("acid", filePath);
127248
- }
127249
- }
127062
+ cosmiconfigResult = await getConfigFileByName("storm-cloud", filePath);
127250
127063
  }
127251
127064
  }
127252
127065
  }
127253
127066
  if (!cosmiconfigResult || Object.keys(cosmiconfigResult).length === 0 || cosmiconfigResult.isEmpty || !cosmiconfigResult.filepath) {
127254
- writeWarning(
127255
- { logLevel: "all" },
127256
- "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not.\n"
127257
- );
127258
127067
  return void 0;
127259
127068
  }
127260
127069
  const config = cosmiconfigResult.config ?? {};
@@ -131045,6 +130854,185 @@ var getDefaultConfig = (config = {}, root) => {
131045
130854
  });
131046
130855
  };
131047
130856
 
130857
+ // packages/config-tools/src/types.ts
130858
+ var LogLevel = {
130859
+ SILENT: 0,
130860
+ FATAL: 10,
130861
+ ERROR: 20,
130862
+ WARN: 30,
130863
+ INFO: 40,
130864
+ SUCCESS: 45,
130865
+ DEBUG: 60,
130866
+ TRACE: 70,
130867
+ ALL: 100
130868
+ };
130869
+ var LogLevelLabel = {
130870
+ SILENT: "silent",
130871
+ FATAL: "fatal",
130872
+ ERROR: "error",
130873
+ WARN: "warn",
130874
+ INFO: "info",
130875
+ DEBUG: "debug",
130876
+ TRACE: "trace",
130877
+ ALL: "all"
130878
+ };
130879
+
130880
+ // packages/config-tools/src/utilities/get-log-level.ts
130881
+ var getLogLevel = (label) => {
130882
+ switch (label) {
130883
+ case "all":
130884
+ return LogLevel.ALL;
130885
+ case "trace":
130886
+ return LogLevel.TRACE;
130887
+ case "debug":
130888
+ return LogLevel.DEBUG;
130889
+ case "info":
130890
+ return LogLevel.INFO;
130891
+ case "warn":
130892
+ return LogLevel.WARN;
130893
+ case "error":
130894
+ return LogLevel.ERROR;
130895
+ case "fatal":
130896
+ return LogLevel.FATAL;
130897
+ case "silent":
130898
+ return LogLevel.SILENT;
130899
+ default:
130900
+ return LogLevel.INFO;
130901
+ }
130902
+ };
130903
+ var getLogLevelLabel = (logLevel) => {
130904
+ if (logLevel >= LogLevel.ALL) {
130905
+ return LogLevelLabel.ALL;
130906
+ }
130907
+ if (logLevel >= LogLevel.TRACE) {
130908
+ return LogLevelLabel.TRACE;
130909
+ }
130910
+ if (logLevel >= LogLevel.DEBUG) {
130911
+ return LogLevelLabel.DEBUG;
130912
+ }
130913
+ if (logLevel >= LogLevel.INFO) {
130914
+ return LogLevelLabel.INFO;
130915
+ }
130916
+ if (logLevel >= LogLevel.WARN) {
130917
+ return LogLevelLabel.WARN;
130918
+ }
130919
+ if (logLevel >= LogLevel.ERROR) {
130920
+ return LogLevelLabel.ERROR;
130921
+ }
130922
+ if (logLevel >= LogLevel.FATAL) {
130923
+ return LogLevelLabel.FATAL;
130924
+ }
130925
+ if (logLevel <= LogLevel.SILENT) {
130926
+ return LogLevelLabel.SILENT;
130927
+ }
130928
+ return LogLevelLabel.INFO;
130929
+ };
130930
+
130931
+ // packages/config-tools/src/utilities/logger.ts
130932
+ var chalk = __toESM(require_source(), 1);
130933
+ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130934
+ if (typeof logLevel === "number" && (logLevel >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL)) {
130935
+ return (_) => {
130936
+ };
130937
+ }
130938
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
130939
+ return (message) => {
130940
+ console.error(
130941
+ `
130942
+ ${chalk.bold.hex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").white(" \u{1F480} Fatal ")} ${chalk.hex(
130943
+ config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
130944
+ )(message)}
130945
+
130946
+ `
130947
+ );
130948
+ };
130949
+ }
130950
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
130951
+ return (message) => {
130952
+ console.error(
130953
+ `
130954
+ ${chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")} ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").white(" \u2718 Error ")} ${chalk.hex(
130955
+ config?.colors?.error ? config.colors.error : "#7d1a1a"
130956
+ )(message)}
130957
+ `
130958
+ );
130959
+ };
130960
+ }
130961
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
130962
+ return (message) => {
130963
+ console.warn(
130964
+ `
130965
+ ${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(">")} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" \u26A0 Warn ")} ${chalk.hex(
130966
+ config?.colors?.warning ? config.colors.warning : "#fcc419"
130967
+ )(message)}
130968
+ `
130969
+ );
130970
+ };
130971
+ }
130972
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
130973
+ return (message) => {
130974
+ console.info(
130975
+ `
130976
+ ${chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").white(" \u2139 Info ")} ${chalk.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(
130977
+ message
130978
+ )}
130979
+ `
130980
+ );
130981
+ };
130982
+ }
130983
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
130984
+ return (message) => {
130985
+ console.info(
130986
+ `
130987
+ ${chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(">")} ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").white(" \u221A Success ")} ${chalk.hex(
130988
+ config?.colors?.success ? config.colors.success : "#087f5b"
130989
+ )(message)}
130990
+ `
130991
+ );
130992
+ };
130993
+ }
130994
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
130995
+ return (message) => {
130996
+ console.debug(
130997
+ `
130998
+ ${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" ! Debug ")} ${chalk.hex(
130999
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
131000
+ )(message)}
131001
+ `
131002
+ );
131003
+ };
131004
+ }
131005
+ return (message) => {
131006
+ console.log(
131007
+ `
131008
+ ${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" ! System ")} ${chalk.hex(
131009
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
131010
+ )(message)}
131011
+ `
131012
+ );
131013
+ };
131014
+ };
131015
+ var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
131016
+ var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
131017
+ var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
131018
+ var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
131019
+ var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
131020
+ var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
131021
+ var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
131022
+ var getStopwatch = (name) => {
131023
+ const start = process.hrtime();
131024
+ return () => {
131025
+ const end = process.hrtime(start);
131026
+ console.info(
131027
+ chalk.dim(
131028
+ `\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
131029
+ end[0] * 1e3 + end[1] / 1e6
131030
+ )}ms to complete`
131031
+ )
131032
+ );
131033
+ };
131034
+ };
131035
+
131048
131036
  // node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
131049
131037
  var import_node_buffer2 = require("node:buffer");
131050
131038
  var import_node_path4 = __toESM(require("node:path"), 1);
@@ -132813,10 +132801,17 @@ var loadStormConfig = async (workspaceRoot) => {
132813
132801
  if (!_workspaceRoot) {
132814
132802
  _workspaceRoot = findWorkspaceRoot();
132815
132803
  }
132804
+ const configFile = await getConfigFile(_workspaceRoot);
132805
+ if (!configFile) {
132806
+ writeWarning(
132807
+ { logLevel: "all" },
132808
+ "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not.\n"
132809
+ );
132810
+ }
132816
132811
  config = StormConfigSchema.parse(
132817
132812
  await getDefaultConfig(
132818
132813
  {
132819
- ...await getConfigFile(_workspaceRoot),
132814
+ ...configFile,
132820
132815
  ...getConfigEnv()
132821
132816
  },
132822
132817
  _workspaceRoot
@@ -133123,7 +133118,8 @@ function defaultConfig({
133123
133118
  apiReport = true,
133124
133119
  docModel = true,
133125
133120
  tsdocMetadata = true,
133126
- metafile = false,
133121
+ metafile = true,
133122
+ skipNativeModulesPlugin = false,
133127
133123
  define: define2,
133128
133124
  env: env2,
133129
133125
  plugins,
@@ -133171,6 +133167,7 @@ function defaultConfig({
133171
133167
  tsdocMetadata,
133172
133168
  sourcemap: debug,
133173
133169
  clean: false,
133170
+ skipNativeModulesPlugin,
133174
133171
  tsconfigDecoratorMetadata: true,
133175
133172
  plugins,
133176
133173
  getTransform,
@@ -140364,7 +140361,8 @@ var applyDefaultOptions = (options) => {
140364
140361
  options.docModel ??= true;
140365
140362
  options.tsdocMetadata ??= true;
140366
140363
  options.emitOnAll ??= false;
140367
- options.metafile ??= false;
140364
+ options.metafile ??= true;
140365
+ options.skipNativeModulesPlugin ??= false;
140368
140366
  options.define ??= {};
140369
140367
  options.env ??= {};
140370
140368
  options.getConfig ??= { dist: defaultConfig };
@@ -140407,7 +140405,8 @@ var neutralConfig = ({
140407
140405
  banner = {},
140408
140406
  platform = "neutral",
140409
140407
  verbose = false,
140410
- metafile = false,
140408
+ metafile = true,
140409
+ skipNativeModulesPlugin = false,
140411
140410
  define: define2,
140412
140411
  env: env2,
140413
140412
  apiReport = true,
@@ -140459,6 +140458,7 @@ var neutralConfig = ({
140459
140458
  tsdocMetadata,
140460
140459
  sourcemap: debug,
140461
140460
  clean: false,
140461
+ skipNativeModulesPlugin,
140462
140462
  tsconfigDecoratorMetadata: true,
140463
140463
  plugins,
140464
140464
  outExtension,
@@ -140538,7 +140538,8 @@ function nodeConfig({
140538
140538
  apiReport = true,
140539
140539
  docModel = true,
140540
140540
  tsdocMetadata = true,
140541
- metafile = false,
140541
+ metafile = true,
140542
+ skipNativeModulesPlugin = false,
140542
140543
  define: define2,
140543
140544
  env: env2,
140544
140545
  plugins,
@@ -140586,6 +140587,7 @@ function nodeConfig({
140586
140587
  tsdocMetadata,
140587
140588
  sourcemap: debug,
140588
140589
  clean: false,
140590
+ skipNativeModulesPlugin,
140589
140591
  tsconfigDecoratorMetadata: true,
140590
140592
  plugins,
140591
140593
  outExtension,
@@ -140659,7 +140661,8 @@ var modernBrowserConfig = ({
140659
140661
  banner = {},
140660
140662
  platform = "browser",
140661
140663
  verbose = false,
140662
- metafile = false,
140664
+ metafile = true,
140665
+ skipNativeModulesPlugin = false,
140663
140666
  define: define2,
140664
140667
  env: env2,
140665
140668
  plugins,
@@ -140708,6 +140711,7 @@ var modernBrowserConfig = ({
140708
140711
  tsdocMetadata: false,
140709
140712
  sourcemap: debug,
140710
140713
  clean: false,
140714
+ skipNativeModulesPlugin,
140711
140715
  tsconfigDecoratorMetadata: true,
140712
140716
  plugins,
140713
140717
  outExtension,
@@ -140741,7 +140745,8 @@ var legacyBrowserConfig = ({
140741
140745
  apiReport = true,
140742
140746
  docModel = true,
140743
140747
  tsdocMetadata = true,
140744
- metafile = false,
140748
+ metafile = true,
140749
+ skipNativeModulesPlugin = false,
140745
140750
  define: define2,
140746
140751
  env: env2,
140747
140752
  plugins,
@@ -140790,6 +140795,7 @@ var legacyBrowserConfig = ({
140790
140795
  tsdocMetadata,
140791
140796
  sourcemap: debug,
140792
140797
  clean: false,
140798
+ skipNativeModulesPlugin,
140793
140799
  tsconfigDecoratorMetadata: true,
140794
140800
  plugins,
140795
140801
  outExtension,