@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.
- package/CHANGELOG.md +14 -0
- package/dist/{chunk-BYMZHOCC.js → chunk-7XVRK5WD.js} +164 -160
- package/dist/{chunk-DQLLLQ3W.js → chunk-CAIQR7GN.js} +63 -29
- package/dist/{chunk-TBA2JJ4J.mjs → chunk-CCVXBG6L.mjs} +11 -7
- package/dist/{chunk-3FDOVLTY.js → chunk-CSYTB2N7.js} +2 -2
- package/dist/{chunk-6FYSEZWH.mjs → chunk-D4U46GWE.mjs} +1 -1
- package/dist/{chunk-J57WHN7L.mjs → chunk-EOOFQKYU.mjs} +1 -1
- package/dist/{chunk-E4ESQN5K.js → chunk-JS3EKPPV.js} +2 -2
- package/dist/{chunk-JFUM7ZZB.mjs → chunk-N2PWQQSE.mjs} +1 -1
- package/dist/{chunk-SAKJKPCQ.js → chunk-OHTE4UWL.js} +2 -2
- package/dist/{chunk-3IRIVVDV.mjs → chunk-PH7BX4DL.mjs} +36 -2
- package/dist/{chunk-DZ42ZKYZ.mjs → chunk-TZ3XK5DI.mjs} +1 -1
- package/dist/{chunk-6ETHBIXV.js → chunk-UIV26GY2.js} +2 -2
- package/dist/{chunk-523C2S52.mjs → chunk-XGSETPII.mjs} +1 -1
- package/dist/{chunk-YYE5IN55.js → chunk-YLEMDXGU.js} +2 -2
- package/dist/executors.js +6 -6
- package/dist/executors.mjs +6 -6
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +2 -2
- package/dist/src/base/terraform-executor.js +3 -3
- package/dist/src/base/terraform-executor.mjs +2 -2
- package/dist/src/executors/apply/executor.js +4 -4
- package/dist/src/executors/apply/executor.mjs +3 -3
- package/dist/src/executors/destroy/executor.js +4 -4
- package/dist/src/executors/destroy/executor.mjs +3 -3
- package/dist/src/executors/output/executor.js +4 -4
- package/dist/src/executors/output/executor.mjs +3 -3
- package/dist/src/executors/plan/executor.js +4 -4
- package/dist/src/executors/plan/executor.mjs +3 -3
- package/dist/src/generators/init/init.js +3 -3
- package/dist/src/generators/init/init.mjs +2 -2
- 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',
|
|
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("\
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
1680
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _46 => _46.replace, 'call', _47 => _47(
|
|
1651
1681
|
/([A-Z])+/g,
|
|
1652
|
-
(input) => input ? _optionalChain([input, 'access',
|
|
1653
|
-
), 'access',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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(
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
2243
|
+
cause: _optionalChain([result, 'optionalAccess', _86 => _86.error])
|
|
2211
2244
|
}
|
|
2212
2245
|
);
|
|
2213
2246
|
}
|
|
2214
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
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',
|
|
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
|
-
|
|
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-
|
|
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
|
-
// \
|
|
267
|
+
// \u{1F5F2} Built by Storm Software
|
|
267
268
|
// ---------------------------------------
|
|
268
269
|
`;
|
|
269
270
|
var DEFAULT_CSS_BANNER = `
|
|
270
271
|
/* ---------------------------------------
|
|
271
|
-
\
|
|
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(`
|
|
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(`
|
|
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(
|
|
1729
|
+
writeInfo(
|
|
1730
|
+
`${brandIcon(config)} Running the ${name} generator...
|
|
1729
1731
|
|
|
1730
|
-
`,
|
|
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
|
|
3
|
+
var _chunkOHTE4UWLjs = require('./chunk-OHTE4UWL.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/destroy/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunkOHTE4UWLjs.withTerraformExecutor.call(void 0, "destroy");
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOHTE4UWLjs = require('./chunk-OHTE4UWL.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/apply/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunkOHTE4UWLjs.withTerraformExecutor.call(void 0, "apply");
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -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
|
|
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
|
|
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("\
|
|
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(
|
|
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,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOHTE4UWLjs = require('./chunk-OHTE4UWL.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/output/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunkOHTE4UWLjs.withTerraformExecutor.call(void 0, "output");
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOHTE4UWLjs = require('./chunk-OHTE4UWL.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/plan/executor.ts
|
|
6
|
-
var executor_default =
|
|
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-
|
|
3
|
-
require('./chunk-
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
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');
|
package/dist/executors.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./chunk-HYHKZPRR.mjs";
|
|
2
|
-
import "./chunk-
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
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";
|
package/dist/generators.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-N2YKXZ5R.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunk7XVRK5WDjs = require('./chunk-7XVRK5WD.js');
|
|
5
|
+
require('./chunk-CAIQR7GN.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.initGenerator =
|
|
8
|
+
exports.initGenerator = _chunk7XVRK5WDjs.initGenerator;
|
package/dist/generators.mjs
CHANGED
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-
|
|
3
|
-
require('./chunk-
|
|
4
|
-
require('./chunk-
|
|
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
|
|
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-
|
|
13
|
+
require('./chunk-JS3EKPPV.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
17
|
-
require('./chunk-
|
|
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 =
|
|
22
|
+
exports.baseTerraformExecutorSchema = _chunkILC773N2js.base_terraform_executor_untyped_default; exports.initGenerator = _chunk7XVRK5WDjs.initGenerator; exports.withTerraformExecutor = _chunkOHTE4UWLjs.withTerraformExecutor;
|