@storm-software/unbuild 0.35.2 → 0.36.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/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.35.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.35.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/bin/unbuild.cjs CHANGED
@@ -129,7 +129,7 @@ var WorkspaceDirectoryConfigSchema = import_zod.default.object({
129
129
  build: import_zod.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
130
130
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
131
131
  var StormConfigSchema = import_zod.default.object({
132
- $schema: import_zod.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
132
+ $schema: import_zod.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
133
133
  extends: ExtendsSchema.optional(),
134
134
  name: import_zod.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
135
135
  namespace: import_zod.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
@@ -171,6 +171,7 @@ var StormConfigSchema = import_zod.default.object({
171
171
  "trace",
172
172
  "all"
173
173
  ]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
174
+ skipConfigLogging: import_zod.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
174
175
  registry: RegistryConfigSchema,
175
176
  configFile: import_zod.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
176
177
  colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
@@ -364,14 +365,17 @@ var import_node_fs = require("fs");
364
365
  var import_node_path = require("path");
365
366
  var MAX_PATH_SEARCH_DEPTH = 30;
366
367
  var depth = 0;
367
- function findFolderUp(startPath, endFileNames) {
368
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
368
369
  const _startPath = startPath ?? process.cwd();
370
+ if (endDirectoryNames.some((endDirName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
371
+ return _startPath;
372
+ }
369
373
  if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
370
374
  return _startPath;
371
375
  }
372
376
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
373
377
  const parent = (0, import_node_path.join)(_startPath, "..");
374
- return findFolderUp(parent, endFileNames);
378
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
375
379
  }
376
380
  return void 0;
377
381
  }
@@ -379,17 +383,17 @@ __name(findFolderUp, "findFolderUp");
379
383
 
380
384
  // ../config-tools/src/utilities/find-workspace-root.ts
381
385
  var rootFiles = [
382
- "storm.json",
383
- "storm.json",
384
- "storm.yaml",
385
- "storm.yml",
386
- "storm.js",
387
- "storm.ts",
388
- ".storm.json",
389
- ".storm.yaml",
390
- ".storm.yml",
391
- ".storm.js",
392
- ".storm.ts",
386
+ "storm-workspace.json",
387
+ "storm-workspace.json",
388
+ "storm-workspace.yaml",
389
+ "storm-workspace.yml",
390
+ "storm-workspace.js",
391
+ "storm-workspace.ts",
392
+ ".storm-workspace.json",
393
+ ".storm-workspace.yaml",
394
+ ".storm-workspace.yml",
395
+ ".storm-workspace.js",
396
+ ".storm-workspace.ts",
393
397
  "lerna.json",
394
398
  "nx.json",
395
399
  "turbo.json",
@@ -413,11 +417,18 @@ var rootFiles = [
413
417
  "pnpm-lock.yml",
414
418
  "bun.lockb"
415
419
  ];
420
+ var rootDirectories = [
421
+ ".storm-workspace",
422
+ ".nx",
423
+ ".github",
424
+ ".vscode",
425
+ ".verdaccio"
426
+ ];
416
427
  function findWorkspaceRootSafe(pathInsideMonorepo) {
417
428
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
418
429
  return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
419
430
  }
420
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
431
+ return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
421
432
  }
422
433
  __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
423
434
  function findWorkspaceRoot(pathInsideMonorepo) {
@@ -792,10 +803,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
792
803
  }, "getConfigFileByName");
793
804
  var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
794
805
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
795
- const result = await getConfigFileByName("storm", workspacePath);
806
+ const result = await getConfigFileByName("storm-workspace", workspacePath);
796
807
  let config = result.config;
797
808
  const configFile = result.configFile;
798
- if (config && configFile && Object.keys(config).length > 0) {
809
+ if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
799
810
  writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
800
811
  logLevel: "all"
801
812
  });
@@ -804,9 +815,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
804
815
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
805
816
  for (const result2 of results) {
806
817
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
807
- writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
808
- logLevel: "all"
809
- });
818
+ if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
819
+ writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
820
+ logLevel: "all"
821
+ });
822
+ }
810
823
  config = (0, import_defu.default)(result2.config ?? {}, config ?? {});
811
824
  }
812
825
  }
@@ -879,7 +892,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
879
892
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
880
893
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
881
894
  },
882
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
895
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
896
+ skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
883
897
  };
884
898
  const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
885
899
  config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
@@ -1114,6 +1128,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1114
1128
  process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
1115
1129
  process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
1116
1130
  }
1131
+ if (config.skipConfigLogging !== void 0) {
1132
+ process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
1133
+ }
1117
1134
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
1118
1135
  for (const key of Object.keys(config.extensions ?? {})) {
1119
1136
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
@@ -1231,7 +1248,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
1231
1248
  const defaultConfig = await getDefaultConfig(_workspaceRoot);
1232
1249
  const configFile = await getConfigFile(_workspaceRoot);
1233
1250
  if (!configFile && !skipLogs) {
1234
- writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
1251
+ writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
1235
1252
  logLevel: "all"
1236
1253
  });
1237
1254
  }
@@ -1269,8 +1286,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1269
1286
  var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
1270
1287
  const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
1271
1288
  setConfigEnv(config);
1272
- if (!skipLogs) {
1273
- writeTrace(`\u2699\uFE0F Using Storm configuration:
1289
+ if (!skipLogs && !config.skipConfigLogging) {
1290
+ writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
1274
1291
  ${formatLogMessage(config)}`, config);
1275
1292
  }
1276
1293
  return config;
package/bin/unbuild.js CHANGED
@@ -108,7 +108,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
108
108
  build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
109
109
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
110
110
  var StormConfigSchema = z.object({
111
- $schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
111
+ $schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
112
112
  extends: ExtendsSchema.optional(),
113
113
  name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
114
114
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
@@ -150,6 +150,7 @@ var StormConfigSchema = z.object({
150
150
  "trace",
151
151
  "all"
152
152
  ]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
153
+ skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
153
154
  registry: RegistryConfigSchema,
154
155
  configFile: z.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
155
156
  colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
@@ -343,14 +344,17 @@ import { existsSync } from "node:fs";
343
344
  import { join } from "node:path";
344
345
  var MAX_PATH_SEARCH_DEPTH = 30;
345
346
  var depth = 0;
346
- function findFolderUp(startPath, endFileNames) {
347
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
347
348
  const _startPath = startPath ?? process.cwd();
349
+ if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
350
+ return _startPath;
351
+ }
348
352
  if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
349
353
  return _startPath;
350
354
  }
351
355
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
352
356
  const parent = join(_startPath, "..");
353
- return findFolderUp(parent, endFileNames);
357
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
354
358
  }
355
359
  return void 0;
356
360
  }
@@ -358,17 +362,17 @@ __name(findFolderUp, "findFolderUp");
358
362
 
359
363
  // ../config-tools/src/utilities/find-workspace-root.ts
360
364
  var rootFiles = [
361
- "storm.json",
362
- "storm.json",
363
- "storm.yaml",
364
- "storm.yml",
365
- "storm.js",
366
- "storm.ts",
367
- ".storm.json",
368
- ".storm.yaml",
369
- ".storm.yml",
370
- ".storm.js",
371
- ".storm.ts",
365
+ "storm-workspace.json",
366
+ "storm-workspace.json",
367
+ "storm-workspace.yaml",
368
+ "storm-workspace.yml",
369
+ "storm-workspace.js",
370
+ "storm-workspace.ts",
371
+ ".storm-workspace.json",
372
+ ".storm-workspace.yaml",
373
+ ".storm-workspace.yml",
374
+ ".storm-workspace.js",
375
+ ".storm-workspace.ts",
372
376
  "lerna.json",
373
377
  "nx.json",
374
378
  "turbo.json",
@@ -392,11 +396,18 @@ var rootFiles = [
392
396
  "pnpm-lock.yml",
393
397
  "bun.lockb"
394
398
  ];
399
+ var rootDirectories = [
400
+ ".storm-workspace",
401
+ ".nx",
402
+ ".github",
403
+ ".vscode",
404
+ ".verdaccio"
405
+ ];
395
406
  function findWorkspaceRootSafe(pathInsideMonorepo) {
396
407
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
397
408
  return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
398
409
  }
399
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
410
+ return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
400
411
  }
401
412
  __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
402
413
  function findWorkspaceRoot(pathInsideMonorepo) {
@@ -771,10 +782,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
771
782
  }, "getConfigFileByName");
772
783
  var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
773
784
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
774
- const result = await getConfigFileByName("storm", workspacePath);
785
+ const result = await getConfigFileByName("storm-workspace", workspacePath);
775
786
  let config = result.config;
776
787
  const configFile = result.configFile;
777
- if (config && configFile && Object.keys(config).length > 0) {
788
+ if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
778
789
  writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
779
790
  logLevel: "all"
780
791
  });
@@ -783,9 +794,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
783
794
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
784
795
  for (const result2 of results) {
785
796
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
786
- writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
787
- logLevel: "all"
788
- });
797
+ if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
798
+ writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
799
+ logLevel: "all"
800
+ });
801
+ }
789
802
  config = defu(result2.config ?? {}, config ?? {});
790
803
  }
791
804
  }
@@ -858,7 +871,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
858
871
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
859
872
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
860
873
  },
861
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
874
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
875
+ skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
862
876
  };
863
877
  const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
864
878
  config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
@@ -1093,6 +1107,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1093
1107
  process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
1094
1108
  process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
1095
1109
  }
1110
+ if (config.skipConfigLogging !== void 0) {
1111
+ process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
1112
+ }
1096
1113
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
1097
1114
  for (const key of Object.keys(config.extensions ?? {})) {
1098
1115
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
@@ -1210,7 +1227,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
1210
1227
  const defaultConfig = await getDefaultConfig(_workspaceRoot);
1211
1228
  const configFile = await getConfigFile(_workspaceRoot);
1212
1229
  if (!configFile && !skipLogs) {
1213
- writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
1230
+ writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
1214
1231
  logLevel: "all"
1215
1232
  });
1216
1233
  }
@@ -1248,8 +1265,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1248
1265
  var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
1249
1266
  const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
1250
1267
  setConfigEnv(config);
1251
- if (!skipLogs) {
1252
- writeTrace(`\u2699\uFE0F Using Storm configuration:
1268
+ if (!skipLogs && !config.skipConfigLogging) {
1269
+ writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
1253
1270
  ${formatLogMessage(config)}`, config);
1254
1271
  }
1255
1272
  return config;
package/dist/build.cjs CHANGED
@@ -5,13 +5,13 @@
5
5
 
6
6
 
7
7
 
8
- var _chunk44QVHNBQcjs = require('./chunk-44QVHNBQ.cjs');
8
+ var _chunkPX6F2F5Pcjs = require('./chunk-PX6F2F5P.cjs');
9
9
  require('./chunk-OD3ULBE3.cjs');
10
- require('./chunk-3HGUCQU6.cjs');
11
- require('./chunk-N5KR37LU.cjs');
12
- require('./chunk-Y7PS2HJA.cjs');
13
- require('./chunk-ZPWH22ZM.cjs');
14
- require('./chunk-5FQVMM7I.cjs');
10
+ require('./chunk-5XTLMOFH.cjs');
11
+ require('./chunk-MXG2QBLK.cjs');
12
+ require('./chunk-AI7YECRT.cjs');
13
+ require('./chunk-BZELKGMN.cjs');
14
+ require('./chunk-A45F3XCO.cjs');
15
15
  require('./chunk-BGYQAVKQ.cjs');
16
16
 
17
17
 
@@ -20,4 +20,4 @@ require('./chunk-BGYQAVKQ.cjs');
20
20
 
21
21
 
22
22
 
23
- exports.build = _chunk44QVHNBQcjs.build; exports.cleanOutputPath = _chunk44QVHNBQcjs.cleanOutputPath; exports.copyBuildAssets = _chunk44QVHNBQcjs.copyBuildAssets; exports.executeUnbuild = _chunk44QVHNBQcjs.executeUnbuild; exports.generatePackageJson = _chunk44QVHNBQcjs.generatePackageJson; exports.resolveOptions = _chunk44QVHNBQcjs.resolveOptions;
23
+ exports.build = _chunkPX6F2F5Pcjs.build; exports.cleanOutputPath = _chunkPX6F2F5Pcjs.cleanOutputPath; exports.copyBuildAssets = _chunkPX6F2F5Pcjs.copyBuildAssets; exports.executeUnbuild = _chunkPX6F2F5Pcjs.executeUnbuild; exports.generatePackageJson = _chunkPX6F2F5Pcjs.generatePackageJson; exports.resolveOptions = _chunkPX6F2F5Pcjs.resolveOptions;
package/dist/build.js CHANGED
@@ -5,13 +5,13 @@ import {
5
5
  executeUnbuild,
6
6
  generatePackageJson,
7
7
  resolveOptions
8
- } from "./chunk-KXDOKQLW.js";
8
+ } from "./chunk-JONED24L.js";
9
9
  import "./chunk-RBYYB7X2.js";
10
- import "./chunk-2E6P5U5P.js";
11
- import "./chunk-L3WYWYD4.js";
12
- import "./chunk-RFEZKCMQ.js";
13
- import "./chunk-3M7GEZDL.js";
14
- import "./chunk-PLJQK2VX.js";
10
+ import "./chunk-FLMNRVR2.js";
11
+ import "./chunk-XRMMVXZP.js";
12
+ import "./chunk-R6HJQ5XB.js";
13
+ import "./chunk-FRURXT64.js";
14
+ import "./chunk-A7ULBMR4.js";
15
15
  import "./chunk-3GQAWCBQ.js";
16
16
  export {
17
17
  build,
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk5FQVMM7Icjs = require('./chunk-5FQVMM7I.cjs');
4
+ var _chunkA45F3XCOcjs = require('./chunk-A45F3XCO.cjs');
5
5
 
6
6
 
7
7
  var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
@@ -9,8 +9,8 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
9
9
  // src/clean.ts
10
10
  var _promises = require('fs/promises');
11
11
  async function clean(name = "Unbuild", directory, config) {
12
- _chunk5FQVMM7Icjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
- const stopwatch = _chunk5FQVMM7Icjs.getStopwatch.call(void 0, `${name} output clean`);
12
+ _chunkA45F3XCOcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
+ const stopwatch = _chunkA45F3XCOcjs.getStopwatch.call(void 0, `${name} output clean`);
14
14
  await cleanDirectories(name, directory, config);
15
15
  stopwatch();
16
16
  }
@@ -312,7 +312,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
312
312
  build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
313
313
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
314
314
  var StormConfigSchema = _zod2.default.object({
315
- $schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
315
+ $schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
316
316
  extends: ExtendsSchema.optional(),
317
317
  name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
318
318
  namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
@@ -354,6 +354,7 @@ var StormConfigSchema = _zod2.default.object({
354
354
  "trace",
355
355
  "all"
356
356
  ]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
357
+ skipConfigLogging: _zod2.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
357
358
  registry: RegistryConfigSchema,
358
359
  configFile: _zod2.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
359
360
  colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
@@ -389,14 +390,17 @@ var _path = require('path');
389
390
 
390
391
  var MAX_PATH_SEARCH_DEPTH = 30;
391
392
  var depth = 0;
392
- function findFolderUp(startPath, endFileNames) {
393
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
393
394
  const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
395
+ if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
396
+ return _startPath;
397
+ }
394
398
  if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
395
399
  return _startPath;
396
400
  }
397
401
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
398
402
  const parent = _path.join.call(void 0, _startPath, "..");
399
- return findFolderUp(parent, endFileNames);
403
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
400
404
  }
401
405
  return void 0;
402
406
  }
@@ -404,17 +408,17 @@ _chunkBGYQAVKQcjs.__name.call(void 0, findFolderUp, "findFolderUp");
404
408
 
405
409
  // ../config-tools/src/utilities/find-workspace-root.ts
406
410
  var rootFiles = [
407
- "storm.json",
408
- "storm.json",
409
- "storm.yaml",
410
- "storm.yml",
411
- "storm.js",
412
- "storm.ts",
413
- ".storm.json",
414
- ".storm.yaml",
415
- ".storm.yml",
416
- ".storm.js",
417
- ".storm.ts",
411
+ "storm-workspace.json",
412
+ "storm-workspace.json",
413
+ "storm-workspace.yaml",
414
+ "storm-workspace.yml",
415
+ "storm-workspace.js",
416
+ "storm-workspace.ts",
417
+ ".storm-workspace.json",
418
+ ".storm-workspace.yaml",
419
+ ".storm-workspace.yml",
420
+ ".storm-workspace.js",
421
+ ".storm-workspace.ts",
418
422
  "lerna.json",
419
423
  "nx.json",
420
424
  "turbo.json",
@@ -438,11 +442,18 @@ var rootFiles = [
438
442
  "pnpm-lock.yml",
439
443
  "bun.lockb"
440
444
  ];
445
+ var rootDirectories = [
446
+ ".storm-workspace",
447
+ ".nx",
448
+ ".github",
449
+ ".vscode",
450
+ ".verdaccio"
451
+ ];
441
452
  function findWorkspaceRootSafe(pathInsideMonorepo) {
442
453
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
443
454
  return correctPaths(_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
444
455
  }
445
- return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
456
+ return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
446
457
  }
447
458
  _chunkBGYQAVKQcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
448
459
  function findWorkspaceRoot(pathInsideMonorepo) {
@@ -312,7 +312,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
312
312
  build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
313
313
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
314
314
  var StormConfigSchema = z.object({
315
- $schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
315
+ $schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
316
316
  extends: ExtendsSchema.optional(),
317
317
  name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
318
318
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
@@ -354,6 +354,7 @@ var StormConfigSchema = z.object({
354
354
  "trace",
355
355
  "all"
356
356
  ]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
357
+ skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
357
358
  registry: RegistryConfigSchema,
358
359
  configFile: z.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
359
360
  colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
@@ -389,14 +390,17 @@ import { existsSync } from "node:fs";
389
390
  import { join } from "node:path";
390
391
  var MAX_PATH_SEARCH_DEPTH = 30;
391
392
  var depth = 0;
392
- function findFolderUp(startPath, endFileNames) {
393
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
393
394
  const _startPath = startPath ?? process.cwd();
395
+ if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
396
+ return _startPath;
397
+ }
394
398
  if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
395
399
  return _startPath;
396
400
  }
397
401
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
398
402
  const parent = join(_startPath, "..");
399
- return findFolderUp(parent, endFileNames);
403
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
400
404
  }
401
405
  return void 0;
402
406
  }
@@ -404,17 +408,17 @@ __name(findFolderUp, "findFolderUp");
404
408
 
405
409
  // ../config-tools/src/utilities/find-workspace-root.ts
406
410
  var rootFiles = [
407
- "storm.json",
408
- "storm.json",
409
- "storm.yaml",
410
- "storm.yml",
411
- "storm.js",
412
- "storm.ts",
413
- ".storm.json",
414
- ".storm.yaml",
415
- ".storm.yml",
416
- ".storm.js",
417
- ".storm.ts",
411
+ "storm-workspace.json",
412
+ "storm-workspace.json",
413
+ "storm-workspace.yaml",
414
+ "storm-workspace.yml",
415
+ "storm-workspace.js",
416
+ "storm-workspace.ts",
417
+ ".storm-workspace.json",
418
+ ".storm-workspace.yaml",
419
+ ".storm-workspace.yml",
420
+ ".storm-workspace.js",
421
+ ".storm-workspace.ts",
418
422
  "lerna.json",
419
423
  "nx.json",
420
424
  "turbo.json",
@@ -438,11 +442,18 @@ var rootFiles = [
438
442
  "pnpm-lock.yml",
439
443
  "bun.lockb"
440
444
  ];
445
+ var rootDirectories = [
446
+ ".storm-workspace",
447
+ ".nx",
448
+ ".github",
449
+ ".vscode",
450
+ ".verdaccio"
451
+ ];
441
452
  function findWorkspaceRootSafe(pathInsideMonorepo) {
442
453
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
443
454
  return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
444
455
  }
445
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
456
+ return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
446
457
  }
447
458
  __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
448
459
  function findWorkspaceRoot(pathInsideMonorepo) {
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk5FQVMM7Icjs = require('./chunk-5FQVMM7I.cjs');
3
+ var _chunkA45F3XCOcjs = require('./chunk-A45F3XCO.cjs');
4
4
 
5
5
 
6
6
  var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
@@ -10,7 +10,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
10
10
  name: "storm:on-error",
11
11
  buildEnd(error) {
12
12
  if (error) {
13
- _chunk5FQVMM7Icjs.writeError.call(void 0, `The following errors occurred during the build:
13
+ _chunkA45F3XCOcjs.writeError.call(void 0, `The following errors occurred during the build:
14
14
  ${error ? error.message : "Unknown build error"}
15
15
 
16
16
  `, options.config);
@@ -18,7 +18,7 @@ ${error ? error.message : "Unknown build error"}
18
18
  }
19
19
  },
20
20
  renderError(error) {
21
- _chunk5FQVMM7Icjs.writeError.call(void 0, `The following errors occurred during the build:
21
+ _chunkA45F3XCOcjs.writeError.call(void 0, `The following errors occurred during the build:
22
22
  ${error ? error.message : "Unknown build error"}
23
23
 
24
24
  `, options.config);
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunk5FQVMM7Icjs = require('./chunk-5FQVMM7I.cjs');
3
+ var _chunkA45F3XCOcjs = require('./chunk-A45F3XCO.cjs');
4
4
 
5
5
 
6
6
  var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
@@ -32,7 +32,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
32
32
  declaration: true,
33
33
  paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
34
34
  };
35
- _chunk5FQVMM7Icjs.writeTrace.call(void 0, compilerOptions, config);
35
+ _chunkA45F3XCOcjs.writeTrace.call(void 0, compilerOptions, config);
36
36
  return compilerOptions;
37
37
  }
38
38
  _chunkBGYQAVKQcjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getStopwatch,
3
3
  writeDebug
4
- } from "./chunk-PLJQK2VX.js";
4
+ } from "./chunk-A7ULBMR4.js";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-3GQAWCBQ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeTrace
3
- } from "./chunk-PLJQK2VX.js";
3
+ } from "./chunk-A7ULBMR4.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-3GQAWCBQ.js";