@storm-software/terraform-tools 0.66.81 → 0.66.83

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 (36) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{chunk-BYMZHOCC.js → chunk-7XVRK5WD.js} +164 -160
  3. package/dist/{chunk-DQLLLQ3W.js → chunk-CAIQR7GN.js} +63 -29
  4. package/dist/{chunk-TBA2JJ4J.mjs → chunk-CCVXBG6L.mjs} +11 -7
  5. package/dist/{chunk-3FDOVLTY.js → chunk-CSYTB2N7.js} +2 -2
  6. package/dist/{chunk-6FYSEZWH.mjs → chunk-D4U46GWE.mjs} +1 -1
  7. package/dist/{chunk-J57WHN7L.mjs → chunk-EOOFQKYU.mjs} +1 -1
  8. package/dist/{chunk-E4ESQN5K.js → chunk-JS3EKPPV.js} +2 -2
  9. package/dist/{chunk-JFUM7ZZB.mjs → chunk-N2PWQQSE.mjs} +1 -1
  10. package/dist/{chunk-SAKJKPCQ.js → chunk-OHTE4UWL.js} +2 -2
  11. package/dist/{chunk-3IRIVVDV.mjs → chunk-PH7BX4DL.mjs} +36 -2
  12. package/dist/{chunk-DZ42ZKYZ.mjs → chunk-TZ3XK5DI.mjs} +1 -1
  13. package/dist/{chunk-6ETHBIXV.js → chunk-UIV26GY2.js} +2 -2
  14. package/dist/{chunk-523C2S52.mjs → chunk-XGSETPII.mjs} +1 -1
  15. package/dist/{chunk-YYE5IN55.js → chunk-YLEMDXGU.js} +2 -2
  16. package/dist/executors.js +6 -6
  17. package/dist/executors.mjs +6 -6
  18. package/dist/generators.js +3 -3
  19. package/dist/generators.mjs +2 -2
  20. package/dist/index.js +8 -8
  21. package/dist/index.mjs +7 -7
  22. package/dist/src/base/index.js +3 -3
  23. package/dist/src/base/index.mjs +2 -2
  24. package/dist/src/base/terraform-executor.js +3 -3
  25. package/dist/src/base/terraform-executor.mjs +2 -2
  26. package/dist/src/executors/apply/executor.js +4 -4
  27. package/dist/src/executors/apply/executor.mjs +3 -3
  28. package/dist/src/executors/destroy/executor.js +4 -4
  29. package/dist/src/executors/destroy/executor.mjs +3 -3
  30. package/dist/src/executors/output/executor.js +4 -4
  31. package/dist/src/executors/output/executor.mjs +3 -3
  32. package/dist/src/executors/plan/executor.js +4 -4
  33. package/dist/src/executors/plan/executor.mjs +3 -3
  34. package/dist/src/generators/init/init.js +3 -3
  35. package/dist/src/generators/init/init.mjs +2 -2
  36. package/package.json +4 -4
@@ -66,6 +66,35 @@ var DEFAULT_COLOR_CONFIG = {
66
66
  gradient: ["#1fb2a6", "#db2777", "#818cf8"]
67
67
  }
68
68
  };
69
+ function getColors(config) {
70
+ if (!_optionalChain([config, 'optionalAccess', _2 => _2.colors]) || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !_optionalChain([config, 'access', _3 => _3.colors, 'access', _4 => _4["base"], 'optionalAccess', _5 => _5["dark"]]))) {
71
+ return DEFAULT_COLOR_CONFIG;
72
+ }
73
+ if (config.colors["base"]) {
74
+ if (typeof config.colors["base"]["dark"] === "object") {
75
+ return config.colors["base"]["dark"];
76
+ } else if (config.colors["base"]["dark"] === "string") {
77
+ return config.colors["base"];
78
+ }
79
+ }
80
+ if (typeof config.colors["dark"] === "object") {
81
+ return config.colors["dark"];
82
+ }
83
+ return _nullishCoalesce(config.colors, () => ( DEFAULT_COLOR_CONFIG));
84
+ }
85
+ function getColor(key, config) {
86
+ const colors = getColors(config);
87
+ const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
88
+ if (result) {
89
+ return result;
90
+ }
91
+ if (key === "link" || key === "debug") {
92
+ return getColor("info", config);
93
+ } else if (key === "fatal") {
94
+ return getColor("danger", config);
95
+ }
96
+ return getColor("brand", config);
97
+ }
69
98
 
70
99
  // ../config-tools/src/logger/chalk.ts
71
100
  var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
@@ -94,7 +123,7 @@ var chalkDefault = {
94
123
  };
95
124
  var getChalk = () => {
96
125
  let _chalk = _chalk3.default;
97
- if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.white])) {
126
+ if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright]) || !_optionalChain([_chalk, 'optionalAccess', _11 => _11.white])) {
98
127
  _chalk = chalkDefault;
99
128
  }
100
129
  return _chalk;
@@ -115,7 +144,7 @@ function isUnicodeSupported() {
115
144
  var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
116
145
  var CONSOLE_ICONS = {
117
146
  [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
118
- [LogLevelLabel.FATAL]: useIcon("\u2622", "\xD7"),
147
+ [LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
119
148
  [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
120
149
  [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
121
150
  [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
@@ -182,7 +211,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
182
211
 
183
212
  // ../config-tools/src/logger/console.ts
184
213
  var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
185
- const colors = !_optionalChain([config, 'access', _8 => _8.colors, 'optionalAccess', _9 => _9.dark]) && !_optionalChain([config, 'access', _10 => _10.colors, 'optionalAccess', _11 => _11["base"]]) && !_optionalChain([config, 'access', _12 => _12.colors, 'optionalAccess', _13 => _13["base"], 'optionalAccess', _14 => _14.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _17 => _17.colors, 'optionalAccess', _18 => _18["base"], 'optionalAccess', _19 => _19.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"]]) ? _optionalChain([config, 'access', _22 => _22.colors, 'optionalAccess', _23 => _23["base"]]) : DEFAULT_COLOR_CONFIG;
214
+ const colors = !_optionalChain([config, 'access', _12 => _12.colors, 'optionalAccess', _13 => _13.dark]) && !_optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15["base"]]) && !_optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"], 'optionalAccess', _23 => _23.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _24 => _24.colors, 'optionalAccess', _25 => _25["base"]]) ? _optionalChain([config, 'access', _26 => _26.colors, 'optionalAccess', _27 => _27["base"]]) : DEFAULT_COLOR_CONFIG;
186
215
  const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
187
216
  if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
188
217
  return (_) => {
@@ -327,11 +356,12 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
327
356
  };
328
357
  var _isFunction = (value) => {
329
358
  try {
330
- return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _24 => _24.constructor]) && _optionalChain([value, 'optionalAccess', _25 => _25.call]) && _optionalChain([value, 'optionalAccess', _26 => _26.apply]));
359
+ return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _28 => _28.constructor]) && _optionalChain([value, 'optionalAccess', _29 => _29.call]) && _optionalChain([value, 'optionalAccess', _30 => _30.apply]));
331
360
  } catch (e2) {
332
361
  return false;
333
362
  }
334
363
  };
364
+ var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
335
365
 
336
366
  // ../config-tools/src/utilities/correct-paths.ts
337
367
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
@@ -350,7 +380,7 @@ var correctPaths = function(path) {
350
380
  return ".";
351
381
  }
352
382
  path = normalizeWindowsPath(path);
353
- const isUNCPath = _optionalChain([path, 'optionalAccess', _27 => _27.match, 'call', _28 => _28(_UNC_REGEX)]);
383
+ const isUNCPath = _optionalChain([path, 'optionalAccess', _31 => _31.match, 'call', _32 => _32(_UNC_REGEX)]);
354
384
  const isPathAbsolute = isAbsolute(path);
355
385
  const trailingSeparator = path[path.length - 1] === "/";
356
386
  path = normalizeString(path, !isPathAbsolute);
@@ -605,7 +635,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
605
635
  if (result.includes(`{${optionKey}}`)) {
606
636
  result = result.replaceAll(
607
637
  `{${optionKey}}`,
608
- _optionalChain([tokenParams, 'optionalAccess', _29 => _29[optionKey]]) || ""
638
+ _optionalChain([tokenParams, 'optionalAccess', _33 => _33[optionKey]]) || ""
609
639
  );
610
640
  }
611
641
  }
@@ -627,7 +657,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
627
657
  if (result.includes("{workspaceRoot}")) {
628
658
  result = result.replaceAll(
629
659
  "{workspaceRoot}",
630
- _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _30 => _30.config, 'optionalAccess', _31 => _31.workspaceRoot]))), () => ( findWorkspaceRoot()))
660
+ _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _34 => _34.config, 'optionalAccess', _35 => _35.workspaceRoot]))), () => ( findWorkspaceRoot()))
631
661
  );
632
662
  }
633
663
  return result;
@@ -1339,7 +1369,7 @@ function applyDefaultConfig(config) {
1339
1369
  if (!config.contact) {
1340
1370
  config.contact = `${config.homepage}/contact`;
1341
1371
  }
1342
- if (!_optionalChain([config, 'access', _32 => _32.error, 'optionalAccess', _33 => _33.codesFile]) || !_optionalChain([config, 'optionalAccess', _34 => _34.error, 'optionalAccess', _35 => _35.url])) {
1372
+ if (!_optionalChain([config, 'access', _36 => _36.error, 'optionalAccess', _37 => _37.codesFile]) || !_optionalChain([config, 'optionalAccess', _38 => _38.error, 'optionalAccess', _39 => _39.url])) {
1343
1373
  config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
1344
1374
  if (config.homepage) {
1345
1375
  config.error.url ??= `${config.homepage}/errors`;
@@ -1357,7 +1387,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
1357
1387
  cwd: workspacePath,
1358
1388
  packageJson: true,
1359
1389
  name: fileName,
1360
- envName: _optionalChain([fileName, 'optionalAccess', _36 => _36.toUpperCase, 'call', _37 => _37()]),
1390
+ envName: _optionalChain([fileName, 'optionalAccess', _40 => _40.toUpperCase, 'call', _41 => _41()]),
1361
1391
  jitiOptions: {
1362
1392
  debug: false,
1363
1393
  fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
@@ -1371,7 +1401,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
1371
1401
  cwd: workspacePath,
1372
1402
  packageJson: true,
1373
1403
  name: fileName,
1374
- envName: _optionalChain([fileName, 'optionalAccess', _38 => _38.toUpperCase, 'call', _39 => _39()]),
1404
+ envName: _optionalChain([fileName, 'optionalAccess', _42 => _42.toUpperCase, 'call', _43 => _43()]),
1375
1405
  jitiOptions: {
1376
1406
  debug: false,
1377
1407
  fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
@@ -1405,7 +1435,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
1405
1435
  )
1406
1436
  );
1407
1437
  for (const result2 of results) {
1408
- if (_optionalChain([result2, 'optionalAccess', _40 => _40.config]) && _optionalChain([result2, 'optionalAccess', _41 => _41.configFile]) && Object.keys(result2.config).length > 0) {
1438
+ if (_optionalChain([result2, 'optionalAccess', _44 => _44.config]) && _optionalChain([result2, 'optionalAccess', _45 => _45.configFile]) && Object.keys(result2.config).length > 0) {
1409
1439
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
1410
1440
  writeTrace(
1411
1441
  `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
@@ -1647,16 +1677,16 @@ var getBaseThemeColorsEnv = (prefix) => {
1647
1677
  var setExtensionEnv = (extensionName, extension) => {
1648
1678
  for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
1649
1679
  if (extension[key]) {
1650
- const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _42 => _42.replace, 'call', _43 => _43(
1680
+ const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _46 => _46.replace, 'call', _47 => _47(
1651
1681
  /([A-Z])+/g,
1652
- (input) => input ? _optionalChain([input, 'access', _44 => _44[0], 'optionalAccess', _45 => _45.toUpperCase, 'call', _46 => _46()]) + input.slice(1) : ""
1653
- ), 'access', _47 => _47.split, 'call', _48 => _48(/(?=[A-Z])|[.\-\s_]/), 'access', _49 => _49.map, 'call', _50 => _50((x) => x.toLowerCase())]), () => ( []));
1682
+ (input) => input ? _optionalChain([input, 'access', _48 => _48[0], 'optionalAccess', _49 => _49.toUpperCase, 'call', _50 => _50()]) + input.slice(1) : ""
1683
+ ), 'access', _51 => _51.split, 'call', _52 => _52(/(?=[A-Z])|[.\-\s_]/), 'access', _53 => _53.map, 'call', _54 => _54((x) => x.toLowerCase())]), () => ( []));
1654
1684
  let extensionKey;
1655
1685
  if (result.length === 0) {
1656
1686
  return;
1657
1687
  }
1658
1688
  if (result.length === 1) {
1659
- extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _51 => _51[0], 'optionalAccess', _52 => _52.toUpperCase, 'call', _53 => _53()]), () => ( ""));
1689
+ extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _55 => _55[0], 'optionalAccess', _56 => _56.toUpperCase, 'call', _57 => _57()]), () => ( ""));
1660
1690
  } else {
1661
1691
  extensionKey = result.reduce((ret, part) => {
1662
1692
  return `${ret}_${part.toLowerCase()}`;
@@ -1844,7 +1874,7 @@ var setConfigEnv = (config) => {
1844
1874
  process.env.NODE_ENV = config.mode;
1845
1875
  process.env.ENVIRONMENT = config.mode;
1846
1876
  }
1847
- if (_optionalChain([config, 'access', _54 => _54.colors, 'optionalAccess', _55 => _55.base, 'optionalAccess', _56 => _56.light]) || _optionalChain([config, 'access', _57 => _57.colors, 'optionalAccess', _58 => _58.base, 'optionalAccess', _59 => _59.dark])) {
1877
+ if (_optionalChain([config, 'access', _58 => _58.colors, 'optionalAccess', _59 => _59.base, 'optionalAccess', _60 => _60.light]) || _optionalChain([config, 'access', _61 => _61.colors, 'optionalAccess', _62 => _62.base, 'optionalAccess', _63 => _63.dark])) {
1848
1878
  for (const key of Object.keys(config.colors)) {
1849
1879
  setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1850
1880
  }
@@ -1905,7 +1935,7 @@ var setConfigEnv = (config) => {
1905
1935
  }
1906
1936
  };
1907
1937
  var setThemeColorsEnv = (prefix, config) => {
1908
- return _optionalChain([config, 'optionalAccess', _60 => _60.light, 'optionalAccess', _61 => _61.brand]) || _optionalChain([config, 'optionalAccess', _62 => _62.dark, 'optionalAccess', _63 => _63.brand]) ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
1938
+ return _optionalChain([config, 'optionalAccess', _64 => _64.light, 'optionalAccess', _65 => _65.brand]) || _optionalChain([config, 'optionalAccess', _66 => _66.dark, 'optionalAccess', _67 => _67.brand]) ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
1909
1939
  };
1910
1940
  var setSingleThemeColorsEnv = (prefix, config) => {
1911
1941
  if (config.dark) {
@@ -2023,7 +2053,7 @@ var _extension_cache = /* @__PURE__ */ new WeakMap();
2023
2053
  var _static_cache = void 0;
2024
2054
  var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
2025
2055
  let result;
2026
- if (!_optionalChain([_static_cache, 'optionalAccess', _64 => _64.data]) || !_optionalChain([_static_cache, 'optionalAccess', _65 => _65.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
2056
+ if (!_optionalChain([_static_cache, 'optionalAccess', _68 => _68.data]) || !_optionalChain([_static_cache, 'optionalAccess', _69 => _69.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
2027
2057
  let _workspaceRoot = workspaceRoot;
2028
2058
  if (!_workspaceRoot) {
2029
2059
  _workspaceRoot = findWorkspaceRoot();
@@ -2057,7 +2087,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
2057
2087
  result.workspaceRoot ??= _workspaceRoot;
2058
2088
  } catch (error) {
2059
2089
  throw new Error(
2060
- `Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _66 => _66.message]) ? `: ${error.message}` : ""}
2090
+ `Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _70 => _70.message]) ? `: ${error.message}` : ""}
2061
2091
 
2062
2092
  Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage(
2063
2093
  configInput
@@ -2132,7 +2162,7 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
2132
2162
  let options = _options;
2133
2163
  let config = {};
2134
2164
  try {
2135
- if (!_optionalChain([context, 'access', _67 => _67.projectsConfigurations, 'optionalAccess', _68 => _68.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
2165
+ if (!_optionalChain([context, 'access', _71 => _71.projectsConfigurations, 'optionalAccess', _72 => _72.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
2136
2166
  throw new Error(
2137
2167
  "The Build process failed because the context is not valid. Please run this command from a workspace."
2138
2168
  );
@@ -2142,7 +2172,10 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
2142
2172
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot;
2143
2173
  const projectName = context.projectName;
2144
2174
  config.workspaceRoot = workspaceRoot;
2145
- writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
2175
+ writeInfo(
2176
+ `${brandIcon(config)} Running the ${name} executor for ${projectName} `,
2177
+ config
2178
+ );
2146
2179
  if (!executorOptions.skipReadingConfig) {
2147
2180
  writeTrace(
2148
2181
  `Loading the Storm Config from environment variables and storm.config.js file...
@@ -2155,7 +2188,7 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
2155
2188
  );
2156
2189
  config = await getConfig(workspaceRoot);
2157
2190
  }
2158
- if (_optionalChain([executorOptions, 'optionalAccess', _69 => _69.hooks, 'optionalAccess', _70 => _70.applyDefaultOptions])) {
2191
+ if (_optionalChain([executorOptions, 'optionalAccess', _73 => _73.hooks, 'optionalAccess', _74 => _74.applyDefaultOptions])) {
2159
2192
  writeDebug("Running the applyDefaultOptions hook...", config);
2160
2193
  options = await Promise.resolve(
2161
2194
  executorOptions.hooks.applyDefaultOptions(options, config)
@@ -2183,7 +2216,7 @@ ${formatLogMessage(tokenized)}
2183
2216
  `,
2184
2217
  config
2185
2218
  );
2186
- if (_optionalChain([executorOptions, 'optionalAccess', _71 => _71.hooks, 'optionalAccess', _72 => _72.preProcess])) {
2219
+ if (_optionalChain([executorOptions, 'optionalAccess', _75 => _75.hooks, 'optionalAccess', _76 => _76.preProcess])) {
2187
2220
  writeDebug("Running the preProcess hook...", config);
2188
2221
  await Promise.resolve(
2189
2222
  executorOptions.hooks.preProcess(tokenized, config)
@@ -2191,7 +2224,7 @@ ${formatLogMessage(tokenized)}
2191
2224
  writeDebug("Completed the preProcess hook", config);
2192
2225
  }
2193
2226
  const ret = executorFn(tokenized, context, config);
2194
- if (_isFunction2(_optionalChain([ret, 'optionalAccess', _73 => _73.next]))) {
2227
+ if (_isFunction2(_optionalChain([ret, 'optionalAccess', _77 => _77.next]))) {
2195
2228
  const asyncGen = ret;
2196
2229
  for await (const iter of asyncGen) {
2197
2230
  void iter;
@@ -2200,18 +2233,18 @@ ${formatLogMessage(tokenized)}
2200
2233
  const result = await Promise.resolve(
2201
2234
  ret
2202
2235
  );
2203
- if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _74 => _74.error, 'optionalAccess', _75 => _75.message]) && typeof _optionalChain([result, 'optionalAccess', _76 => _76.error, 'optionalAccess', _77 => _77.message]) === "string" && _optionalChain([result, 'optionalAccess', _78 => _78.error, 'optionalAccess', _79 => _79.name]) && typeof _optionalChain([result, 'optionalAccess', _80 => _80.error, 'optionalAccess', _81 => _81.name]) === "string")) {
2236
+ if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _78 => _78.error, 'optionalAccess', _79 => _79.message]) && typeof _optionalChain([result, 'optionalAccess', _80 => _80.error, 'optionalAccess', _81 => _81.message]) === "string" && _optionalChain([result, 'optionalAccess', _82 => _82.error, 'optionalAccess', _83 => _83.name]) && typeof _optionalChain([result, 'optionalAccess', _84 => _84.error, 'optionalAccess', _85 => _85.name]) === "string")) {
2204
2237
  throw new Error(
2205
2238
  `Failure determined while running the ${name} executor
2206
2239
  ${formatLogMessage(
2207
2240
  result
2208
2241
  )}`,
2209
2242
  {
2210
- cause: _optionalChain([result, 'optionalAccess', _82 => _82.error])
2243
+ cause: _optionalChain([result, 'optionalAccess', _86 => _86.error])
2211
2244
  }
2212
2245
  );
2213
2246
  }
2214
- if (_optionalChain([executorOptions, 'optionalAccess', _83 => _83.hooks, 'optionalAccess', _84 => _84.postProcess])) {
2247
+ if (_optionalChain([executorOptions, 'optionalAccess', _87 => _87.hooks, 'optionalAccess', _88 => _88.postProcess])) {
2215
2248
  writeDebug("Running the postProcess hook...", config);
2216
2249
  await Promise.resolve(executorOptions.hooks.postProcess(config));
2217
2250
  writeDebug("Completed the postProcess hook", config);
@@ -2241,7 +2274,7 @@ ${formatLogMessage(
2241
2274
  };
2242
2275
  var _isFunction2 = (value) => {
2243
2276
  try {
2244
- return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _85 => _85.constructor]) && _optionalChain([value, 'optionalAccess', _86 => _86.call]) && _optionalChain([value, 'optionalAccess', _87 => _87.apply]));
2277
+ return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _89 => _89.constructor]) && _optionalChain([value, 'optionalAccess', _90 => _90.call]) && _optionalChain([value, 'optionalAccess', _91 => _91.apply]));
2245
2278
  } catch (e) {
2246
2279
  return false;
2247
2280
  }
@@ -2269,4 +2302,5 @@ var _isFunction2 = (value) => {
2269
2302
 
2270
2303
 
2271
2304
 
2272
- exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.isAbsolute = isAbsolute; exports.relative = relative; exports.findWorkspaceRoot = findWorkspaceRoot; exports.applyWorkspaceBaseTokens = applyWorkspaceBaseTokens; exports.applyWorkspaceTokens = applyWorkspaceTokens; exports.schemaRegistry = schemaRegistry; exports.workspaceConfigSchema = workspaceConfigSchema; exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig; exports.withRunExecutor = withRunExecutor;
2305
+
2306
+ exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.brandIcon = brandIcon; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.isAbsolute = isAbsolute; exports.relative = relative; exports.findWorkspaceRoot = findWorkspaceRoot; exports.applyWorkspaceBaseTokens = applyWorkspaceBaseTokens; exports.applyWorkspaceTokens = applyWorkspaceTokens; exports.schemaRegistry = schemaRegistry; exports.workspaceConfigSchema = workspaceConfigSchema; exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig; exports.withRunExecutor = withRunExecutor;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  applyWorkspaceBaseTokens,
3
3
  applyWorkspaceTokens,
4
+ brandIcon,
4
5
  correctPaths,
5
6
  findWorkspaceRoot,
6
7
  formatLogMessage,
@@ -20,7 +21,7 @@ import {
20
21
  writeSuccess,
21
22
  writeTrace,
22
23
  writeWarning
23
- } from "./chunk-3IRIVVDV.mjs";
24
+ } from "./chunk-PH7BX4DL.mjs";
24
25
  import {
25
26
  __dirname
26
27
  } from "./chunk-3SMBRI6D.mjs";
@@ -263,12 +264,12 @@ var LARGE_BUFFER = 1024 * 1e6;
263
264
  // ../build-tools/src/config.ts
264
265
  var DEFAULT_JS_BANNER = `
265
266
  // ---------------------------------------
266
- // \u26A1 Built by Storm Software
267
+ // \u{1F5F2} Built by Storm Software
267
268
  // ---------------------------------------
268
269
  `;
269
270
  var DEFAULT_CSS_BANNER = `
270
271
  /* ---------------------------------------
271
- \u26A1 Built by Storm Software
272
+ \u{1F5F2} Built by Storm Software
272
273
  --------------------------------------- */
273
274
  `;
274
275
  var DEFAULT_ENVIRONMENT = "production";
@@ -928,7 +929,7 @@ async function cleanOutputPath(context) {
928
929
  return context;
929
930
  }
930
931
  async function build2(options) {
931
- writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
932
+ writeDebug(` ${brandIcon()} Executing Storm ESBuild pipeline`);
932
933
  const stopwatch = getStopwatch("ESBuild pipeline");
933
934
  try {
934
935
  const opts = Array.isArray(options) ? options : [options];
@@ -1504,7 +1505,7 @@ async function cleanOutputPath2(options) {
1504
1505
  return options;
1505
1506
  }
1506
1507
  async function build3(options) {
1507
- writeDebug(` \u26A1 Executing Storm TSDown pipeline`);
1508
+ writeDebug(` ${brandIcon()} Executing Storm TSDown pipeline`);
1508
1509
  const stopwatch = getStopwatch("TSDown pipeline");
1509
1510
  try {
1510
1511
  const opts = Array.isArray(options) ? options : [options];
@@ -1725,9 +1726,12 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
1725
1726
  let options = _options;
1726
1727
  let config;
1727
1728
  try {
1728
- writeInfo(`\u26A1 Running the ${name} generator...
1729
+ writeInfo(
1730
+ `${brandIcon(config)} Running the ${name} generator...
1729
1731
 
1730
- `, config);
1732
+ `,
1733
+ config
1734
+ );
1731
1735
  const workspaceRoot2 = findWorkspaceRoot();
1732
1736
  if (!generatorOptions.skipReadingConfig) {
1733
1737
  writeDebug(
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkSAKJKPCQjs = require('./chunk-SAKJKPCQ.js');
3
+ var _chunkOHTE4UWLjs = require('./chunk-OHTE4UWL.js');
4
4
 
5
5
  // src/executors/destroy/executor.ts
6
- var executor_default = _chunkSAKJKPCQjs.withTerraformExecutor.call(void 0, "destroy");
6
+ var executor_default = _chunkOHTE4UWLjs.withTerraformExecutor.call(void 0, "destroy");
7
7
 
8
8
 
9
9
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-JFUM7ZZB.mjs";
3
+ } from "./chunk-N2PWQQSE.mjs";
4
4
 
5
5
  // src/executors/output/executor.ts
6
6
  var executor_default = withTerraformExecutor("output");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-JFUM7ZZB.mjs";
3
+ } from "./chunk-N2PWQQSE.mjs";
4
4
 
5
5
  // src/executors/destroy/executor.ts
6
6
  var executor_default = withTerraformExecutor("destroy");
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkSAKJKPCQjs = require('./chunk-SAKJKPCQ.js');
3
+ var _chunkOHTE4UWLjs = require('./chunk-OHTE4UWL.js');
4
4
 
5
5
  // src/executors/apply/executor.ts
6
- var executor_default = _chunkSAKJKPCQjs.withTerraformExecutor.call(void 0, "apply");
6
+ var executor_default = _chunkOHTE4UWLjs.withTerraformExecutor.call(void 0, "apply");
7
7
 
8
8
 
9
9
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "./chunk-3IRIVVDV.mjs";
3
+ } from "./chunk-PH7BX4DL.mjs";
4
4
 
5
5
  // ../config-tools/src/utilities/run.ts
6
6
  import { exec, execSync } from "node:child_process";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkDQLLLQ3Wjs = require('./chunk-DQLLLQ3W.js');
3
+ var _chunkCAIQR7GNjs = require('./chunk-CAIQR7GN.js');
4
4
 
5
5
  // ../config-tools/src/utilities/run.ts
6
6
  var _child_process = require('child_process');
@@ -25,7 +25,7 @@ var run = (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => (
25
25
  // src/base/terraform-executor.ts
26
26
  var _shelljs = require('shelljs');
27
27
  var withTerraformExecutor = (command, executorOptions = {}) => async (_options, context) => {
28
- return _chunkDQLLLQ3Wjs.withRunExecutor.call(void 0,
28
+ return _chunkCAIQR7GNjs.withRunExecutor.call(void 0,
29
29
  `Terraform \`${command}\` Command Executor`,
30
30
  async (options, context2, config) => {
31
31
  if (!_shelljs.which.call(void 0, "tofu") || !_shelljs.which.call(void 0, "terraform")) {
@@ -66,6 +66,35 @@ var DEFAULT_COLOR_CONFIG = {
66
66
  gradient: ["#1fb2a6", "#db2777", "#818cf8"]
67
67
  }
68
68
  };
69
+ function getColors(config) {
70
+ if (!config?.colors || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !config.colors["base"]?.["dark"])) {
71
+ return DEFAULT_COLOR_CONFIG;
72
+ }
73
+ if (config.colors["base"]) {
74
+ if (typeof config.colors["base"]["dark"] === "object") {
75
+ return config.colors["base"]["dark"];
76
+ } else if (config.colors["base"]["dark"] === "string") {
77
+ return config.colors["base"];
78
+ }
79
+ }
80
+ if (typeof config.colors["dark"] === "object") {
81
+ return config.colors["dark"];
82
+ }
83
+ return config.colors ?? DEFAULT_COLOR_CONFIG;
84
+ }
85
+ function getColor(key, config) {
86
+ const colors = getColors(config);
87
+ const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
88
+ if (result) {
89
+ return result;
90
+ }
91
+ if (key === "link" || key === "debug") {
92
+ return getColor("info", config);
93
+ } else if (key === "fatal") {
94
+ return getColor("danger", config);
95
+ }
96
+ return getColor("brand", config);
97
+ }
69
98
 
70
99
  // ../config-tools/src/logger/chalk.ts
71
100
  import chalk from "chalk";
@@ -115,7 +144,7 @@ function isUnicodeSupported() {
115
144
  var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
116
145
  var CONSOLE_ICONS = {
117
146
  [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
118
- [LogLevelLabel.FATAL]: useIcon("\u2622", "\xD7"),
147
+ [LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
119
148
  [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
120
149
  [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
121
150
  [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
@@ -332,6 +361,7 @@ var _isFunction = (value) => {
332
361
  return false;
333
362
  }
334
363
  };
364
+ var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
335
365
 
336
366
  // ../config-tools/src/utilities/correct-paths.ts
337
367
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
@@ -2142,7 +2172,10 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
2142
2172
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot;
2143
2173
  const projectName = context.projectName;
2144
2174
  config.workspaceRoot = workspaceRoot;
2145
- writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
2175
+ writeInfo(
2176
+ `${brandIcon(config)} Running the ${name} executor for ${projectName} `,
2177
+ config
2178
+ );
2146
2179
  if (!executorOptions.skipReadingConfig) {
2147
2180
  writeTrace(
2148
2181
  `Loading the Storm Config from environment variables and storm.config.js file...
@@ -2257,6 +2290,7 @@ export {
2257
2290
  writeTrace,
2258
2291
  getStopwatch,
2259
2292
  formatLogMessage,
2293
+ brandIcon,
2260
2294
  correctPaths,
2261
2295
  joinPaths,
2262
2296
  isAbsolute,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-JFUM7ZZB.mjs";
3
+ } from "./chunk-N2PWQQSE.mjs";
4
4
 
5
5
  // src/executors/apply/executor.ts
6
6
  var executor_default = withTerraformExecutor("apply");
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkSAKJKPCQjs = require('./chunk-SAKJKPCQ.js');
3
+ var _chunkOHTE4UWLjs = require('./chunk-OHTE4UWL.js');
4
4
 
5
5
  // src/executors/output/executor.ts
6
- var executor_default = _chunkSAKJKPCQjs.withTerraformExecutor.call(void 0, "output");
6
+ var executor_default = _chunkOHTE4UWLjs.withTerraformExecutor.call(void 0, "output");
7
7
 
8
8
 
9
9
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-JFUM7ZZB.mjs";
3
+ } from "./chunk-N2PWQQSE.mjs";
4
4
 
5
5
  // src/executors/plan/executor.ts
6
6
  var executor_default = withTerraformExecutor("plan");
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkSAKJKPCQjs = require('./chunk-SAKJKPCQ.js');
3
+ var _chunkOHTE4UWLjs = require('./chunk-OHTE4UWL.js');
4
4
 
5
5
  // src/executors/plan/executor.ts
6
- var executor_default = _chunkSAKJKPCQjs.withTerraformExecutor.call(void 0, "plan");
6
+ var executor_default = _chunkOHTE4UWLjs.withTerraformExecutor.call(void 0, "plan");
7
7
 
8
8
 
9
9
 
package/dist/executors.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";require('./chunk-E7SPQEPH.js');
2
- require('./chunk-3FDOVLTY.js');
3
- require('./chunk-6ETHBIXV.js');
4
- require('./chunk-YYE5IN55.js');
5
- require('./chunk-E4ESQN5K.js');
6
- require('./chunk-SAKJKPCQ.js');
7
- require('./chunk-DQLLLQ3W.js');
2
+ require('./chunk-CSYTB2N7.js');
3
+ require('./chunk-UIV26GY2.js');
4
+ require('./chunk-YLEMDXGU.js');
5
+ require('./chunk-JS3EKPPV.js');
6
+ require('./chunk-OHTE4UWL.js');
7
+ require('./chunk-CAIQR7GN.js');
@@ -1,8 +1,8 @@
1
1
  import "./chunk-HYHKZPRR.mjs";
2
- import "./chunk-J57WHN7L.mjs";
3
- import "./chunk-6FYSEZWH.mjs";
4
- import "./chunk-523C2S52.mjs";
5
- import "./chunk-DZ42ZKYZ.mjs";
6
- import "./chunk-JFUM7ZZB.mjs";
7
- import "./chunk-3IRIVVDV.mjs";
2
+ import "./chunk-EOOFQKYU.mjs";
3
+ import "./chunk-D4U46GWE.mjs";
4
+ import "./chunk-XGSETPII.mjs";
5
+ import "./chunk-TZ3XK5DI.mjs";
6
+ import "./chunk-N2PWQQSE.mjs";
7
+ import "./chunk-PH7BX4DL.mjs";
8
8
  import "./chunk-3SMBRI6D.mjs";
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-N2YKXZ5R.js');
2
2
 
3
3
 
4
- var _chunkBYMZHOCCjs = require('./chunk-BYMZHOCC.js');
5
- require('./chunk-DQLLLQ3W.js');
4
+ var _chunk7XVRK5WDjs = require('./chunk-7XVRK5WD.js');
5
+ require('./chunk-CAIQR7GN.js');
6
6
 
7
7
 
8
- exports.initGenerator = _chunkBYMZHOCCjs.initGenerator;
8
+ exports.initGenerator = _chunk7XVRK5WDjs.initGenerator;
@@ -1,8 +1,8 @@
1
1
  import "./chunk-23KFTIT2.mjs";
2
2
  import {
3
3
  initGenerator
4
- } from "./chunk-TBA2JJ4J.mjs";
5
- import "./chunk-3IRIVVDV.mjs";
4
+ } from "./chunk-CCVXBG6L.mjs";
5
+ import "./chunk-PH7BX4DL.mjs";
6
6
  import "./chunk-3SMBRI6D.mjs";
7
7
  export {
8
8
  initGenerator
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-E7SPQEPH.js');
2
- require('./chunk-3FDOVLTY.js');
3
- require('./chunk-6ETHBIXV.js');
4
- require('./chunk-YYE5IN55.js');
2
+ require('./chunk-CSYTB2N7.js');
3
+ require('./chunk-UIV26GY2.js');
4
+ require('./chunk-YLEMDXGU.js');
5
5
  require('./chunk-N2YKXZ5R.js');
6
6
 
7
7
 
8
- var _chunkBYMZHOCCjs = require('./chunk-BYMZHOCC.js');
8
+ var _chunk7XVRK5WDjs = require('./chunk-7XVRK5WD.js');
9
9
  require('./chunk-GUQOEBFW.js');
10
10
 
11
11
 
12
12
  var _chunkILC773N2js = require('./chunk-ILC773N2.js');
13
- require('./chunk-E4ESQN5K.js');
13
+ require('./chunk-JS3EKPPV.js');
14
14
 
15
15
 
16
- var _chunkSAKJKPCQjs = require('./chunk-SAKJKPCQ.js');
17
- require('./chunk-DQLLLQ3W.js');
16
+ var _chunkOHTE4UWLjs = require('./chunk-OHTE4UWL.js');
17
+ require('./chunk-CAIQR7GN.js');
18
18
 
19
19
 
20
20
 
21
21
 
22
- exports.baseTerraformExecutorSchema = _chunkILC773N2js.base_terraform_executor_untyped_default; exports.initGenerator = _chunkBYMZHOCCjs.initGenerator; exports.withTerraformExecutor = _chunkSAKJKPCQjs.withTerraformExecutor;
22
+ exports.baseTerraformExecutorSchema = _chunkILC773N2js.base_terraform_executor_untyped_default; exports.initGenerator = _chunk7XVRK5WDjs.initGenerator; exports.withTerraformExecutor = _chunkOHTE4UWLjs.withTerraformExecutor;