@storm-software/config-tools 1.119.0 → 1.130.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-4IYEDNYJ.mjs +426 -0
  3. package/dist/chunk-5P4S7DMV.js +51 -0
  4. package/dist/chunk-5QZ7AV2J.js +27 -0
  5. package/dist/chunk-6OYLNZFT.mjs +169 -0
  6. package/dist/chunk-6SJLAEJ3.js +70 -0
  7. package/dist/chunk-6WPG3DXV.js +32 -0
  8. package/dist/chunk-7XY63NME.js +44 -0
  9. package/dist/chunk-A7VLTBS6.mjs +271 -0
  10. package/dist/chunk-BNNLKDKI.mjs +102 -0
  11. package/dist/chunk-BO45V6E2.mjs +51 -0
  12. package/dist/chunk-BS5OC5E6.js +426 -0
  13. package/dist/chunk-E3IN3SQD.mjs +6 -0
  14. package/dist/chunk-FW22KPOW.mjs +27 -0
  15. package/dist/chunk-GIZ23UUE.js +189 -0
  16. package/dist/chunk-GOQAHXJF.mjs +28 -0
  17. package/dist/chunk-H6XXDZ7A.js +28 -0
  18. package/dist/chunk-K6TQN2LZ.js +6 -0
  19. package/dist/chunk-LCD7F65X.js +545 -0
  20. package/dist/chunk-LKZSRXS7.js +169 -0
  21. package/dist/chunk-MGI2M3SX.js +6 -0
  22. package/dist/chunk-N32EGEJB.js +90 -0
  23. package/dist/chunk-N4BRCEYB.js +27 -0
  24. package/dist/chunk-PEHVR33I.js +67 -0
  25. package/dist/chunk-PQNCKJAR.js +271 -0
  26. package/dist/chunk-PVPSTJNJ.mjs +90 -0
  27. package/dist/chunk-QHVHX67K.js +6 -0
  28. package/dist/chunk-QUVGIEZZ.mjs +6 -0
  29. package/dist/chunk-RAWSXKTG.mjs +189 -0
  30. package/dist/chunk-RHGJNRVE.mjs +125 -0
  31. package/dist/chunk-RYIDKM6L.mjs +545 -0
  32. package/dist/chunk-SJO5XZQA.js +6 -0
  33. package/dist/chunk-T2X5W62C.js +125 -0
  34. package/dist/chunk-TEKFJAJJ.mjs +70 -0
  35. package/dist/chunk-TTCXDK6S.mjs +27 -0
  36. package/dist/chunk-UCUOC6LA.mjs +70 -0
  37. package/dist/chunk-VFRDDJD4.js +102 -0
  38. package/dist/chunk-VQLOUFMG.mjs +32 -0
  39. package/dist/chunk-WRFJFYOU.mjs +51 -0
  40. package/dist/chunk-WXOSG64C.js +70 -0
  41. package/dist/chunk-WXYJGX4C.mjs +6 -0
  42. package/dist/chunk-X6VIYUJR.mjs +6 -0
  43. package/dist/chunk-XJEQHMOE.js +49 -0
  44. package/dist/chunk-XLMGW4ZW.mjs +67 -0
  45. package/dist/chunk-XXHENMLT.mjs +44 -0
  46. package/dist/config-file/get-config-file.d.mts +20 -0
  47. package/dist/config-file/get-config-file.d.ts +20 -0
  48. package/dist/config-file/get-config-file.js +23 -0
  49. package/dist/config-file/get-config-file.mjs +23 -0
  50. package/dist/config-file/index.d.mts +4 -0
  51. package/dist/config-file/index.d.ts +4 -0
  52. package/dist/config-file/index.js +24 -0
  53. package/dist/config-file/index.mjs +24 -0
  54. package/dist/create-storm-config.d.mts +29 -0
  55. package/dist/create-storm-config.d.ts +29 -0
  56. package/dist/create-storm-config.js +30 -0
  57. package/dist/create-storm-config.mjs +30 -0
  58. package/dist/env/get-env.d.mts +19 -0
  59. package/dist/env/get-env.d.ts +19 -0
  60. package/dist/env/get-env.js +13 -0
  61. package/dist/env/get-env.mjs +13 -0
  62. package/dist/env/index.d.mts +5 -0
  63. package/dist/env/index.d.ts +5 -0
  64. package/dist/env/index.js +20 -0
  65. package/dist/env/index.mjs +20 -0
  66. package/{src/env/get-env.d.ts → dist/env/set-env.d.mts} +7 -4
  67. package/{src → dist}/env/set-env.d.ts +7 -3
  68. package/dist/env/set-env.js +12 -0
  69. package/dist/env/set-env.mjs +12 -0
  70. package/dist/index.d.mts +19 -0
  71. package/dist/index.d.ts +19 -0
  72. package/dist/index.js +132 -0
  73. package/dist/index.mjs +132 -0
  74. package/dist/types-DGWqy1xb.d.mts +1395 -0
  75. package/dist/types-DGWqy1xb.d.ts +1395 -0
  76. package/dist/types.d.mts +40 -0
  77. package/{src → dist}/types.d.ts +14 -7
  78. package/dist/types.js +9 -0
  79. package/dist/types.mjs +9 -0
  80. package/dist/utilities/apply-workspace-tokens.d.mts +9 -0
  81. package/dist/utilities/apply-workspace-tokens.d.ts +9 -0
  82. package/dist/utilities/apply-workspace-tokens.js +14 -0
  83. package/dist/utilities/apply-workspace-tokens.mjs +14 -0
  84. package/dist/utilities/correct-paths.d.mts +19 -0
  85. package/dist/utilities/correct-paths.d.ts +19 -0
  86. package/dist/utilities/correct-paths.js +9 -0
  87. package/dist/utilities/correct-paths.mjs +9 -0
  88. package/dist/utilities/file-path-utils.d.mts +4 -0
  89. package/dist/utilities/file-path-utils.d.ts +4 -0
  90. package/dist/utilities/file-path-utils.js +9 -0
  91. package/dist/utilities/file-path-utils.mjs +9 -0
  92. package/dist/utilities/find-up.d.mts +6 -0
  93. package/dist/utilities/find-up.d.ts +6 -0
  94. package/dist/utilities/find-up.js +7 -0
  95. package/dist/utilities/find-up.mjs +7 -0
  96. package/dist/utilities/find-workspace-root.d.mts +16 -0
  97. package/{src → dist}/utilities/find-workspace-root.d.ts +4 -2
  98. package/dist/utilities/find-workspace-root.js +11 -0
  99. package/dist/utilities/find-workspace-root.mjs +11 -0
  100. package/dist/utilities/get-default-config.d.mts +15 -0
  101. package/dist/utilities/get-default-config.d.ts +15 -0
  102. package/dist/utilities/get-default-config.js +13 -0
  103. package/dist/utilities/get-default-config.mjs +13 -0
  104. package/dist/utilities/index.d.mts +11 -0
  105. package/dist/utilities/index.d.ts +11 -0
  106. package/dist/utilities/index.js +58 -0
  107. package/dist/utilities/index.mjs +58 -0
  108. package/dist/utilities/process-handler.d.mts +8 -0
  109. package/dist/utilities/process-handler.d.ts +8 -0
  110. package/dist/utilities/process-handler.js +20 -0
  111. package/dist/utilities/process-handler.mjs +20 -0
  112. package/dist/utilities/run.d.mts +36 -0
  113. package/dist/utilities/run.d.ts +36 -0
  114. package/dist/utilities/run.js +11 -0
  115. package/dist/utilities/run.mjs +11 -0
  116. package/package.json +1 -24
  117. package/CHANGELOG.md +0 -3122
  118. package/declarations.d.ts +0 -304
  119. package/index.cjs +0 -67508
  120. package/index.js +0 -67463
  121. package/meta.cjs.json +0 -5352
  122. package/meta.esm.json +0 -5413
  123. package/src/config-file/get-config-file.d.ts +0 -16
  124. package/src/config-file/index.d.ts +0 -1
  125. package/src/create-storm-config.d.ts +0 -26
  126. package/src/env/index.d.ts +0 -2
  127. package/src/index.d.ts +0 -13
  128. package/src/utilities/apply-workspace-tokens.d.ts +0 -4
  129. package/src/utilities/chalk.d.ts +0 -23
  130. package/src/utilities/correct-paths.d.ts +0 -1
  131. package/src/utilities/file-path-utils.d.ts +0 -2
  132. package/src/utilities/find-up.d.ts +0 -4
  133. package/src/utilities/get-default-config.d.ts +0 -15
  134. package/src/utilities/get-log-level.d.ts +0 -22
  135. package/src/utilities/index.d.ts +0 -10
  136. package/src/utilities/logger.d.ts +0 -78
  137. package/src/utilities/process-handler.d.ts +0 -4
  138. package/src/utilities/run.d.ts +0 -18
  139. package/utilities/chalk.cjs +0 -1610
  140. package/utilities/chalk.js +0 -1605
  141. package/utilities/find-workspace-root.cjs +0 -118
  142. package/utilities/find-workspace-root.js +0 -91
  143. package/utilities/logger.cjs +0 -5914
  144. package/utilities/logger.js +0 -5897
@@ -0,0 +1,70 @@
1
+ import {
2
+ findFolderUp
3
+ } from "./chunk-TTCXDK6S.mjs";
4
+ import {
5
+ correctPaths
6
+ } from "./chunk-GOQAHXJF.mjs";
7
+ import {
8
+ __name,
9
+ init_esm_shims
10
+ } from "./chunk-WRFJFYOU.mjs";
11
+
12
+ // src/utilities/find-workspace-root.ts
13
+ init_esm_shims();
14
+ var rootFiles = [
15
+ "storm.json",
16
+ "storm.json",
17
+ "storm.yaml",
18
+ "storm.yml",
19
+ "storm.js",
20
+ "storm.ts",
21
+ ".storm.json",
22
+ ".storm.yaml",
23
+ ".storm.yml",
24
+ ".storm.js",
25
+ ".storm.ts",
26
+ "lerna.json",
27
+ "nx.json",
28
+ "turbo.json",
29
+ "npm-workspace.json",
30
+ "yarn-workspace.json",
31
+ "pnpm-workspace.json",
32
+ "npm-workspace.yaml",
33
+ "yarn-workspace.yaml",
34
+ "pnpm-workspace.yaml",
35
+ "npm-workspace.yml",
36
+ "yarn-workspace.yml",
37
+ "pnpm-workspace.yml",
38
+ "npm-lock.json",
39
+ "yarn-lock.json",
40
+ "pnpm-lock.json",
41
+ "npm-lock.yaml",
42
+ "yarn-lock.yaml",
43
+ "pnpm-lock.yaml",
44
+ "npm-lock.yml",
45
+ "yarn-lock.yml",
46
+ "pnpm-lock.yml",
47
+ "bun.lockb"
48
+ ];
49
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
50
+ if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
51
+ return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
52
+ }
53
+ return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
54
+ }
55
+ __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
56
+ function findWorkspaceRoot(pathInsideMonorepo) {
57
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
58
+ if (!result) {
59
+ throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
60
+ ${rootFiles.join("\n")}
61
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
62
+ }
63
+ return result;
64
+ }
65
+ __name(findWorkspaceRoot, "findWorkspaceRoot");
66
+
67
+ export {
68
+ findWorkspaceRootSafe,
69
+ findWorkspaceRoot
70
+ };
@@ -0,0 +1,27 @@
1
+ import {
2
+ __name,
3
+ init_esm_shims
4
+ } from "./chunk-WRFJFYOU.mjs";
5
+
6
+ // src/utilities/find-up.ts
7
+ init_esm_shims();
8
+ import { existsSync } from "node:fs";
9
+ import { join } from "node:path";
10
+ var MAX_PATH_SEARCH_DEPTH = 30;
11
+ var depth = 0;
12
+ function findFolderUp(startPath, endFileNames) {
13
+ const _startPath = startPath ?? process.cwd();
14
+ if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
15
+ return _startPath;
16
+ }
17
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
18
+ const parent = join(_startPath, "..");
19
+ return findFolderUp(parent, endFileNames);
20
+ }
21
+ return void 0;
22
+ }
23
+ __name(findFolderUp, "findFolderUp");
24
+
25
+ export {
26
+ findFolderUp
27
+ };
@@ -0,0 +1,70 @@
1
+ import {
2
+ LogLevel,
3
+ LogLevelLabel
4
+ } from "./chunk-VQLOUFMG.mjs";
5
+ import {
6
+ __name,
7
+ init_esm_shims
8
+ } from "./chunk-WRFJFYOU.mjs";
9
+
10
+ // src/logger/get-log-level.ts
11
+ init_esm_shims();
12
+ var getLogLevel = /* @__PURE__ */ __name((label) => {
13
+ switch (label) {
14
+ case "all":
15
+ return LogLevel.ALL;
16
+ case "trace":
17
+ return LogLevel.TRACE;
18
+ case "debug":
19
+ return LogLevel.DEBUG;
20
+ case "info":
21
+ return LogLevel.INFO;
22
+ case "warn":
23
+ return LogLevel.WARN;
24
+ case "error":
25
+ return LogLevel.ERROR;
26
+ case "fatal":
27
+ return LogLevel.FATAL;
28
+ case "silent":
29
+ return LogLevel.SILENT;
30
+ default:
31
+ return LogLevel.INFO;
32
+ }
33
+ }, "getLogLevel");
34
+ var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
35
+ if (logLevel >= LogLevel.ALL) {
36
+ return LogLevelLabel.ALL;
37
+ }
38
+ if (logLevel >= LogLevel.TRACE) {
39
+ return LogLevelLabel.TRACE;
40
+ }
41
+ if (logLevel >= LogLevel.DEBUG) {
42
+ return LogLevelLabel.DEBUG;
43
+ }
44
+ if (logLevel >= LogLevel.INFO) {
45
+ return LogLevelLabel.INFO;
46
+ }
47
+ if (logLevel >= LogLevel.WARN) {
48
+ return LogLevelLabel.WARN;
49
+ }
50
+ if (logLevel >= LogLevel.ERROR) {
51
+ return LogLevelLabel.ERROR;
52
+ }
53
+ if (logLevel >= LogLevel.FATAL) {
54
+ return LogLevelLabel.FATAL;
55
+ }
56
+ if (logLevel <= LogLevel.SILENT) {
57
+ return LogLevelLabel.SILENT;
58
+ }
59
+ return LogLevelLabel.INFO;
60
+ }, "getLogLevelLabel");
61
+ var isVerbose = /* @__PURE__ */ __name((label = LogLevelLabel.SILENT) => {
62
+ const logLevel = typeof label === "string" ? getLogLevel(label) : label;
63
+ return logLevel <= LogLevel.DEBUG;
64
+ }, "isVerbose");
65
+
66
+ export {
67
+ getLogLevel,
68
+ getLogLevelLabel,
69
+ isVerbose
70
+ };
@@ -0,0 +1,102 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+ var _chunkLCD7F65Xjs = require('./chunk-LCD7F65X.js');
5
+
6
+
7
+
8
+
9
+ var _chunkT2X5W62Cjs = require('./chunk-T2X5W62C.js');
10
+
11
+
12
+ var _chunkN32EGEJBjs = require('./chunk-N32EGEJB.js');
13
+
14
+
15
+ var _chunk6SJLAEJ3js = require('./chunk-6SJLAEJ3.js');
16
+
17
+
18
+
19
+ var _chunkLKZSRXS7js = require('./chunk-LKZSRXS7.js');
20
+
21
+
22
+ var _chunkGIZ23UUEjs = require('./chunk-GIZ23UUE.js');
23
+
24
+
25
+ var _chunkPQNCKJARjs = require('./chunk-PQNCKJAR.js');
26
+
27
+
28
+
29
+ var _chunkXJEQHMOEjs = require('./chunk-XJEQHMOE.js');
30
+
31
+ // src/create-storm-config.ts
32
+ _chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
33
+ var _extension_cache = /* @__PURE__ */ new WeakMap();
34
+ var _static_cache = void 0;
35
+ var createConfig = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (workspaceRoot) => {
36
+ return createStormConfig(void 0, void 0, workspaceRoot);
37
+ }, "createConfig");
38
+ var createStormConfig = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (extensionName, schema, workspaceRoot) => {
39
+ let result;
40
+ if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 3e4) {
41
+ const config = _chunkLKZSRXS7js.getConfigEnv.call(void 0, );
42
+ const defaultConfig = _chunkN32EGEJBjs.getDefaultConfig.call(void 0, workspaceRoot);
43
+ result = _chunkGIZ23UUEjs.StormConfigSchema.parse(_chunkLCD7F65Xjs.defu.call(void 0, config, defaultConfig));
44
+ result.workspaceRoot ??= defaultConfig.workspaceRoot || _chunk6SJLAEJ3js.findWorkspaceRoot.call(void 0, workspaceRoot);
45
+ } else {
46
+ result = _static_cache.data;
47
+ }
48
+ if (schema && extensionName) {
49
+ result.extensions = {
50
+ ...result.extensions,
51
+ [extensionName]: createConfigExtension(extensionName, schema)
52
+ };
53
+ }
54
+ _static_cache = {
55
+ timestamp: Date.now(),
56
+ data: result
57
+ };
58
+ return result;
59
+ }, "createStormConfig");
60
+ var createConfigExtension = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (extensionName, schema) => {
61
+ const extension_cache_key = {
62
+ extensionName
63
+ };
64
+ if (_extension_cache.has(extension_cache_key)) {
65
+ return _extension_cache.get(extension_cache_key);
66
+ }
67
+ let extension = _chunkLKZSRXS7js.getExtensionEnv.call(void 0, extensionName);
68
+ if (schema) {
69
+ extension = schema.parse(extension);
70
+ }
71
+ _extension_cache.set(extension_cache_key, extension);
72
+ return extension;
73
+ }, "createConfigExtension");
74
+ var loadStormConfig = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, async (workspaceRoot) => {
75
+ let config = {};
76
+ if (_optionalChain([_static_cache, 'optionalAccess', _3 => _3.data]) && _optionalChain([_static_cache, 'optionalAccess', _4 => _4.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
77
+ _chunkT2X5W62Cjs.writeTrace.call(void 0, `Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
78
+ return _static_cache.data;
79
+ }
80
+ let _workspaceRoot = workspaceRoot;
81
+ if (!_workspaceRoot) {
82
+ _workspaceRoot = _chunk6SJLAEJ3js.findWorkspaceRoot.call(void 0, );
83
+ }
84
+ const configFile = await _chunkLCD7F65Xjs.getConfigFile.call(void 0, _workspaceRoot);
85
+ if (!configFile) {
86
+ _chunkT2X5W62Cjs.writeWarning.call(void 0, "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", {
87
+ logLevel: "all"
88
+ });
89
+ }
90
+ config = _chunkLCD7F65Xjs.defu.call(void 0, _chunkLKZSRXS7js.getConfigEnv.call(void 0, ), configFile, _chunkN32EGEJBjs.getDefaultConfig.call(void 0, _workspaceRoot));
91
+ _chunkPQNCKJARjs.setConfigEnv.call(void 0, config);
92
+ _chunkT2X5W62Cjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
93
+ ${_chunkT2X5W62Cjs.formatLogMessage.call(void 0, config)}`, config);
94
+ return config;
95
+ }, "loadStormConfig");
96
+
97
+
98
+
99
+
100
+
101
+
102
+ exports.createConfig = createConfig; exports.createStormConfig = createStormConfig; exports.createConfigExtension = createConfigExtension; exports.loadStormConfig = loadStormConfig;
@@ -0,0 +1,32 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-WRFJFYOU.mjs";
4
+
5
+ // src/types.ts
6
+ init_esm_shims();
7
+ var LogLevel = {
8
+ SILENT: 0,
9
+ FATAL: 10,
10
+ ERROR: 20,
11
+ WARN: 30,
12
+ SUCCESS: 35,
13
+ INFO: 40,
14
+ DEBUG: 60,
15
+ TRACE: 70,
16
+ ALL: 100
17
+ };
18
+ var LogLevelLabel = {
19
+ SILENT: "silent",
20
+ FATAL: "fatal",
21
+ ERROR: "error",
22
+ WARN: "warn",
23
+ INFO: "info",
24
+ DEBUG: "debug",
25
+ TRACE: "trace",
26
+ ALL: "all"
27
+ };
28
+
29
+ export {
30
+ LogLevel,
31
+ LogLevelLabel
32
+ };
@@ -0,0 +1,51 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __esm = (fn, res) => function __init() {
15
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
+ };
17
+ var __commonJS = (cb, mod) => function __require2() {
18
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+
37
+ // ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.5__@swc+core@1.7.26_@swc+helpers_c7mn2udg6r6tcyo4cnski6htca/node_modules/tsup/assets/esm_shims.js
38
+ import { fileURLToPath } from "url";
39
+ import path from "path";
40
+ var init_esm_shims = __esm({
41
+ "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.5__@swc+core@1.7.26_@swc+helpers_c7mn2udg6r6tcyo4cnski6htca/node_modules/tsup/assets/esm_shims.js"() {
42
+ }
43
+ });
44
+
45
+ export {
46
+ __name,
47
+ __require,
48
+ __commonJS,
49
+ __toESM,
50
+ init_esm_shims
51
+ };
@@ -0,0 +1,70 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk6WPG3DXVjs = require('./chunk-6WPG3DXV.js');
5
+
6
+
7
+
8
+ var _chunkXJEQHMOEjs = require('./chunk-XJEQHMOE.js');
9
+
10
+ // src/logger/get-log-level.ts
11
+ _chunkXJEQHMOEjs.init_cjs_shims.call(void 0, );
12
+ var getLogLevel = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (label) => {
13
+ switch (label) {
14
+ case "all":
15
+ return _chunk6WPG3DXVjs.LogLevel.ALL;
16
+ case "trace":
17
+ return _chunk6WPG3DXVjs.LogLevel.TRACE;
18
+ case "debug":
19
+ return _chunk6WPG3DXVjs.LogLevel.DEBUG;
20
+ case "info":
21
+ return _chunk6WPG3DXVjs.LogLevel.INFO;
22
+ case "warn":
23
+ return _chunk6WPG3DXVjs.LogLevel.WARN;
24
+ case "error":
25
+ return _chunk6WPG3DXVjs.LogLevel.ERROR;
26
+ case "fatal":
27
+ return _chunk6WPG3DXVjs.LogLevel.FATAL;
28
+ case "silent":
29
+ return _chunk6WPG3DXVjs.LogLevel.SILENT;
30
+ default:
31
+ return _chunk6WPG3DXVjs.LogLevel.INFO;
32
+ }
33
+ }, "getLogLevel");
34
+ var getLogLevelLabel = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (logLevel = _chunk6WPG3DXVjs.LogLevel.INFO) => {
35
+ if (logLevel >= _chunk6WPG3DXVjs.LogLevel.ALL) {
36
+ return _chunk6WPG3DXVjs.LogLevelLabel.ALL;
37
+ }
38
+ if (logLevel >= _chunk6WPG3DXVjs.LogLevel.TRACE) {
39
+ return _chunk6WPG3DXVjs.LogLevelLabel.TRACE;
40
+ }
41
+ if (logLevel >= _chunk6WPG3DXVjs.LogLevel.DEBUG) {
42
+ return _chunk6WPG3DXVjs.LogLevelLabel.DEBUG;
43
+ }
44
+ if (logLevel >= _chunk6WPG3DXVjs.LogLevel.INFO) {
45
+ return _chunk6WPG3DXVjs.LogLevelLabel.INFO;
46
+ }
47
+ if (logLevel >= _chunk6WPG3DXVjs.LogLevel.WARN) {
48
+ return _chunk6WPG3DXVjs.LogLevelLabel.WARN;
49
+ }
50
+ if (logLevel >= _chunk6WPG3DXVjs.LogLevel.ERROR) {
51
+ return _chunk6WPG3DXVjs.LogLevelLabel.ERROR;
52
+ }
53
+ if (logLevel >= _chunk6WPG3DXVjs.LogLevel.FATAL) {
54
+ return _chunk6WPG3DXVjs.LogLevelLabel.FATAL;
55
+ }
56
+ if (logLevel <= _chunk6WPG3DXVjs.LogLevel.SILENT) {
57
+ return _chunk6WPG3DXVjs.LogLevelLabel.SILENT;
58
+ }
59
+ return _chunk6WPG3DXVjs.LogLevelLabel.INFO;
60
+ }, "getLogLevelLabel");
61
+ var isVerbose = /* @__PURE__ */ _chunkXJEQHMOEjs.__name.call(void 0, (label = _chunk6WPG3DXVjs.LogLevelLabel.SILENT) => {
62
+ const logLevel = typeof label === "string" ? getLogLevel(label) : label;
63
+ return logLevel <= _chunk6WPG3DXVjs.LogLevel.DEBUG;
64
+ }, "isVerbose");
65
+
66
+
67
+
68
+
69
+
70
+ exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose;
@@ -0,0 +1,6 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-WRFJFYOU.mjs";
4
+
5
+ // src/config-file/index.ts
6
+ init_esm_shims();
@@ -0,0 +1,6 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-WRFJFYOU.mjs";
4
+
5
+ // src/logger/index.ts
6
+ init_esm_shims();
@@ -0,0 +1,49 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __esm = (fn, res) => function __init() {
15
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
+ };
17
+ var __commonJS = (cb, mod) => function __require2() {
18
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+
37
+ // ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.5__@swc+core@1.7.26_@swc+helpers_c7mn2udg6r6tcyo4cnski6htca/node_modules/tsup/assets/cjs_shims.js
38
+ var init_cjs_shims = __esm({
39
+ "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.5__@swc+core@1.7.26_@swc+helpers_c7mn2udg6r6tcyo4cnski6htca/node_modules/tsup/assets/cjs_shims.js"() {
40
+ }
41
+ });
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+ exports.__name = __name; exports.__require = __require; exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.init_cjs_shims = init_cjs_shims;
@@ -0,0 +1,67 @@
1
+ import {
2
+ findWorkspaceRoot
3
+ } from "./chunk-TEKFJAJJ.mjs";
4
+ import {
5
+ __name,
6
+ init_esm_shims
7
+ } from "./chunk-WRFJFYOU.mjs";
8
+
9
+ // src/utilities/apply-workspace-tokens.ts
10
+ init_esm_shims();
11
+ var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenizerOptions) => {
12
+ let result = option;
13
+ if (!result) {
14
+ return result;
15
+ }
16
+ if (tokenizerOptions) {
17
+ const optionKeys = Object.keys(tokenizerOptions);
18
+ if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
19
+ for (const optionKey of optionKeys) {
20
+ if (result.includes(`{${optionKey}}`)) {
21
+ result = result.replaceAll(`{${optionKey}}`, tokenizerOptions.config?.[optionKey] ?? "");
22
+ }
23
+ }
24
+ }
25
+ }
26
+ if (tokenizerOptions.config) {
27
+ const configKeys = Object.keys(tokenizerOptions.config);
28
+ if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
29
+ for (const configKey of configKeys) {
30
+ if (result.includes(`{${configKey}}`)) {
31
+ result = result.replaceAll(`{${configKey}}`, tokenizerOptions.config[configKey]);
32
+ }
33
+ }
34
+ }
35
+ }
36
+ if (result.includes("{workspaceRoot}")) {
37
+ result = result.replaceAll("{workspaceRoot}", tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot());
38
+ }
39
+ return result;
40
+ }, "applyWorkspaceBaseTokens");
41
+ var applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option, tokenizerOptions) => {
42
+ return applyWorkspaceBaseTokens(option, tokenizerOptions);
43
+ }, "applyWorkspaceProjectTokens");
44
+ var applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, config, tokenizerFn) => {
45
+ if (!options) {
46
+ return {};
47
+ }
48
+ const result = {};
49
+ for (const option of Object.keys(options)) {
50
+ if (typeof options[option] === "string") {
51
+ result[option] = await Promise.resolve(tokenizerFn(options[option], config));
52
+ } else if (Array.isArray(options[option])) {
53
+ result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item));
54
+ } else if (typeof options[option] === "object") {
55
+ result[option] = await applyWorkspaceTokens(options[option], config, tokenizerFn);
56
+ } else {
57
+ result[option] = options[option];
58
+ }
59
+ }
60
+ return result;
61
+ }, "applyWorkspaceTokens");
62
+
63
+ export {
64
+ applyWorkspaceBaseTokens,
65
+ applyWorkspaceProjectTokens,
66
+ applyWorkspaceTokens
67
+ };
@@ -0,0 +1,44 @@
1
+ import {
2
+ __name,
3
+ init_esm_shims
4
+ } from "./chunk-WRFJFYOU.mjs";
5
+
6
+ // src/utilities/run.ts
7
+ init_esm_shims();
8
+ import { exec, execSync } from "node:child_process";
9
+ var LARGE_BUFFER = 1024 * 1e6;
10
+ var run = /* @__PURE__ */ __name((config, command, cwd = config.workspaceRoot ?? process.cwd(), stdio = "inherit", env = process.env) => {
11
+ return execSync(command, {
12
+ cwd,
13
+ env: {
14
+ ...process.env,
15
+ ...env,
16
+ CLICOLOR: "true",
17
+ FORCE_COLOR: "true"
18
+ },
19
+ windowsHide: true,
20
+ stdio,
21
+ maxBuffer: LARGE_BUFFER,
22
+ killSignal: "SIGTERM"
23
+ });
24
+ }, "run");
25
+ var runAsync = /* @__PURE__ */ __name((config, command, cwd = config.workspaceRoot ?? process.cwd(), env = process.env) => {
26
+ return exec(command, {
27
+ cwd,
28
+ env: {
29
+ ...process.env,
30
+ ...env,
31
+ CLICOLOR: "true",
32
+ FORCE_COLOR: "true"
33
+ },
34
+ windowsHide: true,
35
+ maxBuffer: LARGE_BUFFER,
36
+ killSignal: "SIGTERM"
37
+ });
38
+ }, "runAsync");
39
+
40
+ export {
41
+ LARGE_BUFFER,
42
+ run,
43
+ runAsync
44
+ };
@@ -0,0 +1,20 @@
1
+ import { a as StormConfigInput } from '../types-DGWqy1xb.mjs';
2
+ import { LoadConfigOptions, ResolvedConfig } from 'c12';
3
+ import 'zod';
4
+
5
+ /**
6
+ * Get the config file for the current Storm workspace
7
+ *
8
+ * @param fileName - The name of the config file to search for
9
+ * @param filePath - The path to search for the config file in
10
+ * @returns The config file for the current Storm workspace
11
+ */
12
+ declare const getConfigFileByName: (fileName: string, filePath?: string, options?: LoadConfigOptions<Partial<StormConfigInput>>) => Promise<ResolvedConfig<Partial<StormConfigInput>>>;
13
+ /**
14
+ * Get the config file for the current Storm workspace
15
+ *
16
+ * @returns The config file for the current Storm workspace
17
+ */
18
+ declare const getConfigFile: (filePath?: string, additionalFileNames?: string[]) => Promise<Partial<StormConfigInput> | undefined>;
19
+
20
+ export { getConfigFile, getConfigFileByName };
@@ -0,0 +1,20 @@
1
+ import { a as StormConfigInput } from '../types-DGWqy1xb.js';
2
+ import { LoadConfigOptions, ResolvedConfig } from 'c12';
3
+ import 'zod';
4
+
5
+ /**
6
+ * Get the config file for the current Storm workspace
7
+ *
8
+ * @param fileName - The name of the config file to search for
9
+ * @param filePath - The path to search for the config file in
10
+ * @returns The config file for the current Storm workspace
11
+ */
12
+ declare const getConfigFileByName: (fileName: string, filePath?: string, options?: LoadConfigOptions<Partial<StormConfigInput>>) => Promise<ResolvedConfig<Partial<StormConfigInput>>>;
13
+ /**
14
+ * Get the config file for the current Storm workspace
15
+ *
16
+ * @returns The config file for the current Storm workspace
17
+ */
18
+ declare const getConfigFile: (filePath?: string, additionalFileNames?: string[]) => Promise<Partial<StormConfigInput> | undefined>;
19
+
20
+ export { getConfigFile, getConfigFileByName };
@@ -0,0 +1,23 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkLCD7F65Xjs = require('../chunk-LCD7F65X.js');
5
+ require('../chunk-K6TQN2LZ.js');
6
+ require('../chunk-5P4S7DMV.js');
7
+ require('../chunk-7XY63NME.js');
8
+ require('../chunk-T2X5W62C.js');
9
+ require('../chunk-N32EGEJB.js');
10
+ require('../chunk-BS5OC5E6.js');
11
+ require('../chunk-PEHVR33I.js');
12
+ require('../chunk-6SJLAEJ3.js');
13
+ require('../chunk-5QZ7AV2J.js');
14
+ require('../chunk-N4BRCEYB.js');
15
+ require('../chunk-GIZ23UUE.js');
16
+ require('../chunk-WXOSG64C.js');
17
+ require('../chunk-H6XXDZ7A.js');
18
+ require('../chunk-6WPG3DXV.js');
19
+ require('../chunk-XJEQHMOE.js');
20
+
21
+
22
+
23
+ exports.getConfigFile = _chunkLCD7F65Xjs.getConfigFile; exports.getConfigFileByName = _chunkLCD7F65Xjs.getConfigFileByName;