@storm-software/terraform-tools 0.60.7 → 0.60.9
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 +12 -0
- package/README.md +1 -1
- package/dist/{chunk-ONGG25RY.mjs → chunk-27LFUIUZ.mjs} +1 -1
- package/dist/{chunk-A4RDGLKC.js → chunk-27OX2IVB.js} +84 -41
- package/dist/{chunk-2WTDMDFS.js → chunk-4B5XOSWD.js} +2 -2
- package/dist/{chunk-AJVSFBNT.js → chunk-AS2B5GS7.js} +2 -2
- package/dist/{chunk-75RE5W2I.mjs → chunk-AYJTBMXU.mjs} +1 -1
- package/dist/{chunk-DIXFQWYR.mjs → chunk-CTX4RJC2.mjs} +60 -17
- package/dist/{chunk-LHAZ3WPQ.mjs → chunk-DFS4RHJB.mjs} +1 -1
- package/dist/{chunk-OV7TVEAC.js → chunk-EE3AHVP3.js} +2 -2
- package/dist/{chunk-W6SJQG4N.js → chunk-EXBK3TQE.js} +114 -105
- package/dist/{chunk-ZLPOE4VZ.js → chunk-K5VRWNMP.js} +2 -2
- package/dist/{chunk-WJV4GOSN.js → chunk-LT5Z4JUG.js} +2 -2
- package/dist/{chunk-Q7Q5E5A6.mjs → chunk-MGXXRII3.mjs} +12 -3
- package/dist/{chunk-VNME2RIT.mjs → chunk-NSR5VU3N.mjs} +1 -1
- package/dist/{chunk-5TXZ2IQ6.mjs → chunk-PXFXKNOL.mjs} +1 -1
- package/dist/{chunk-7GH4VDRM.mjs → chunk-QNJTHB5H.mjs} +1 -1
- package/dist/executors.js +6 -6
- package/dist/executors.mjs +7 -7
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +3 -3
- package/dist/index.js +8 -8
- package/dist/index.mjs +8 -8
- package/dist/src/base/base-terraform-executor.untyped.mjs +1 -1
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +3 -3
- package/dist/src/base/terraform-executor.js +3 -3
- package/dist/src/base/terraform-executor.mjs +3 -3
- package/dist/src/executors/apply/executor.js +4 -4
- package/dist/src/executors/apply/executor.mjs +4 -4
- package/dist/src/executors/destroy/executor.js +4 -4
- package/dist/src/executors/destroy/executor.mjs +4 -4
- package/dist/src/executors/output/executor.js +4 -4
- package/dist/src/executors/output/executor.mjs +4 -4
- package/dist/src/executors/plan/executor.js +4 -4
- package/dist/src/executors/plan/executor.mjs +4 -4
- package/dist/src/generators/init/init.js +3 -3
- package/dist/src/generators/init/init.mjs +3 -3
- package/dist/tsup.config.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Terraform Tools
|
|
4
4
|
|
|
5
|
+
## [0.60.8](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.60.8) (2025-05-18)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Regenerate README markdown files
|
|
10
|
+
|
|
11
|
+
## [0.60.7](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.60.7) (2025-05-13)
|
|
12
|
+
|
|
13
|
+
### Miscellaneous
|
|
14
|
+
|
|
15
|
+
- **monorepo:** Regenerate README markdown files
|
|
16
|
+
|
|
5
17
|
## [0.60.6](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.60.6) (2025-05-09)
|
|
6
18
|
|
|
7
19
|
### Miscellaneous
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -27,10 +27,10 @@ var LogLevelLabel = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// ../config/src/constants.ts
|
|
30
|
-
var STORM_DEFAULT_DOCS = "https://
|
|
30
|
+
var STORM_DEFAULT_DOCS = "https://stormsoftware.com/docs";
|
|
31
31
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
32
32
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
33
|
-
var STORM_DEFAULT_LICENSING = "https://
|
|
33
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
34
34
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
35
35
|
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
36
36
|
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
@@ -204,10 +204,13 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
204
204
|
organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
205
205
|
repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
206
206
|
license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
207
|
-
homepage: _zod2.default.string().trim().url().
|
|
208
|
-
docs: _zod2.default.string().trim().url().
|
|
209
|
-
licensing: _zod2.default.string().trim().url().
|
|
210
|
-
contact: _zod2.default.string().trim().url().
|
|
207
|
+
homepage: _zod2.default.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
208
|
+
docs: _zod2.default.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
209
|
+
licensing: _zod2.default.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
210
|
+
contact: _zod2.default.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
211
|
+
support: _zod2.default.string().trim().url().optional().describe(
|
|
212
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
213
|
+
),
|
|
211
214
|
branch: _zod2.default.string().trim().default("main").describe("The branch of the workspace"),
|
|
212
215
|
preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
213
216
|
owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
@@ -528,9 +531,10 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
528
531
|
negative: "#dc2626"
|
|
529
532
|
}
|
|
530
533
|
};
|
|
531
|
-
|
|
534
|
+
async function getPackageJsonConfig(root) {
|
|
532
535
|
let license = STORM_DEFAULT_LICENSE;
|
|
533
|
-
let homepage =
|
|
536
|
+
let homepage = void 0;
|
|
537
|
+
let support = void 0;
|
|
534
538
|
let name = void 0;
|
|
535
539
|
let namespace = void 0;
|
|
536
540
|
let repository = void 0;
|
|
@@ -561,6 +565,13 @@ var getDefaultConfig = async (root) => {
|
|
|
561
565
|
if (packageJson.homepage) {
|
|
562
566
|
homepage = packageJson.homepage;
|
|
563
567
|
}
|
|
568
|
+
if (packageJson.bugs) {
|
|
569
|
+
if (typeof packageJson.bugs === "string") {
|
|
570
|
+
support = packageJson.bugs;
|
|
571
|
+
} else if (packageJson.bugs.url) {
|
|
572
|
+
support = packageJson.bugs.url;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
564
575
|
}
|
|
565
576
|
}
|
|
566
577
|
return {
|
|
@@ -570,13 +581,38 @@ var getDefaultConfig = async (root) => {
|
|
|
570
581
|
repository,
|
|
571
582
|
license,
|
|
572
583
|
homepage,
|
|
573
|
-
|
|
574
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
575
|
-
error: {
|
|
576
|
-
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
577
|
-
}
|
|
584
|
+
support
|
|
578
585
|
};
|
|
579
|
-
}
|
|
586
|
+
}
|
|
587
|
+
function applyDefaultConfig(config) {
|
|
588
|
+
if (!config.support && config.contact) {
|
|
589
|
+
config.support = config.contact;
|
|
590
|
+
}
|
|
591
|
+
if (!config.contact && config.support) {
|
|
592
|
+
config.contact = config.support;
|
|
593
|
+
}
|
|
594
|
+
if (config.homepage) {
|
|
595
|
+
if (!config.docs) {
|
|
596
|
+
config.docs = `${config.homepage}/docs`;
|
|
597
|
+
}
|
|
598
|
+
if (!config.license) {
|
|
599
|
+
config.license = `${config.homepage}/license`;
|
|
600
|
+
}
|
|
601
|
+
if (!config.support) {
|
|
602
|
+
config.support = `${config.homepage}/support`;
|
|
603
|
+
}
|
|
604
|
+
if (!config.contact) {
|
|
605
|
+
config.contact = `${config.homepage}/contact`;
|
|
606
|
+
}
|
|
607
|
+
if (!_optionalChain([config, 'access', _2 => _2.error, 'optionalAccess', _3 => _3.codesFile]) || !_optionalChain([config, 'optionalAccess', _4 => _4.error, 'optionalAccess', _5 => _5.url])) {
|
|
608
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
609
|
+
if (config.homepage) {
|
|
610
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
return config;
|
|
615
|
+
}
|
|
580
616
|
|
|
581
617
|
// ../config-tools/src/logger/chalk.ts
|
|
582
618
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
@@ -601,7 +637,7 @@ var chalkDefault = {
|
|
|
601
637
|
};
|
|
602
638
|
var getChalk = () => {
|
|
603
639
|
let _chalk = _chalk3.default;
|
|
604
|
-
if (!_optionalChain([_chalk, 'optionalAccess',
|
|
640
|
+
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])) {
|
|
605
641
|
_chalk = chalkDefault;
|
|
606
642
|
}
|
|
607
643
|
return _chalk;
|
|
@@ -689,7 +725,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
689
725
|
|
|
690
726
|
// ../config-tools/src/logger/console.ts
|
|
691
727
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
692
|
-
const colors = !_optionalChain([config, 'access',
|
|
728
|
+
const colors = !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12.dark]) && !_optionalChain([config, 'access', _13 => _13.colors, 'optionalAccess', _14 => _14["base"]]) && !_optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16["base"], 'optionalAccess', _17 => _17.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _18 => _18.colors, 'optionalAccess', _19 => _19.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"], 'optionalAccess', _22 => _22.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24["base"]]) ? _optionalChain([config, 'access', _25 => _25.colors, 'optionalAccess', _26 => _26["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
693
729
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
694
730
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
695
731
|
return (_) => {
|
|
@@ -805,7 +841,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
|
805
841
|
};
|
|
806
842
|
var _isFunction = (value) => {
|
|
807
843
|
try {
|
|
808
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
844
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _27 => _27.constructor]) && _optionalChain([value, 'optionalAccess', _28 => _28.call]) && _optionalChain([value, 'optionalAccess', _29 => _29.apply]));
|
|
809
845
|
} catch (e) {
|
|
810
846
|
return false;
|
|
811
847
|
}
|
|
@@ -824,7 +860,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
824
860
|
if (result.includes(`{${optionKey}}`)) {
|
|
825
861
|
result = result.replaceAll(
|
|
826
862
|
`{${optionKey}}`,
|
|
827
|
-
_optionalChain([tokenParams, 'optionalAccess',
|
|
863
|
+
_optionalChain([tokenParams, 'optionalAccess', _30 => _30[optionKey]]) || ""
|
|
828
864
|
);
|
|
829
865
|
}
|
|
830
866
|
}
|
|
@@ -846,7 +882,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
846
882
|
if (result.includes("{workspaceRoot}")) {
|
|
847
883
|
result = result.replaceAll(
|
|
848
884
|
"{workspaceRoot}",
|
|
849
|
-
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access',
|
|
885
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _31 => _31.config, 'optionalAccess', _32 => _32.workspaceRoot]))), () => ( findWorkspaceRoot()))
|
|
850
886
|
);
|
|
851
887
|
}
|
|
852
888
|
return result;
|
|
@@ -891,7 +927,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
891
927
|
cwd: workspacePath,
|
|
892
928
|
packageJson: true,
|
|
893
929
|
name: fileName,
|
|
894
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
930
|
+
envName: _optionalChain([fileName, 'optionalAccess', _33 => _33.toUpperCase, 'call', _34 => _34()]),
|
|
895
931
|
jitiOptions: {
|
|
896
932
|
debug: false,
|
|
897
933
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
@@ -905,7 +941,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
905
941
|
cwd: workspacePath,
|
|
906
942
|
packageJson: true,
|
|
907
943
|
name: fileName,
|
|
908
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
944
|
+
envName: _optionalChain([fileName, 'optionalAccess', _35 => _35.toUpperCase, 'call', _36 => _36()]),
|
|
909
945
|
jitiOptions: {
|
|
910
946
|
debug: false,
|
|
911
947
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
@@ -939,7 +975,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
939
975
|
)
|
|
940
976
|
);
|
|
941
977
|
for (const result2 of results) {
|
|
942
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
978
|
+
if (_optionalChain([result2, 'optionalAccess', _37 => _37.config]) && _optionalChain([result2, 'optionalAccess', _38 => _38.configFile]) && Object.keys(result2.config).length > 0) {
|
|
943
979
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
944
980
|
writeTrace(
|
|
945
981
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
@@ -1010,6 +1046,7 @@ var getConfigEnv = () => {
|
|
|
1010
1046
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
1011
1047
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
1012
1048
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
1049
|
+
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
1013
1050
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
1014
1051
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
1015
1052
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
@@ -1141,16 +1178,16 @@ var getBaseThemeColorConfigEnv = (prefix) => {
|
|
|
1141
1178
|
var setExtensionEnv = (extensionName, extension) => {
|
|
1142
1179
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
1143
1180
|
if (extension[key]) {
|
|
1144
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
1181
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _39 => _39.replace, 'call', _40 => _40(
|
|
1145
1182
|
/([A-Z])+/g,
|
|
1146
|
-
(input) => input ? _optionalChain([input, 'access',
|
|
1147
|
-
), 'access',
|
|
1183
|
+
(input) => input ? _optionalChain([input, 'access', _41 => _41[0], 'optionalAccess', _42 => _42.toUpperCase, 'call', _43 => _43()]) + input.slice(1) : ""
|
|
1184
|
+
), 'access', _44 => _44.split, 'call', _45 => _45(/(?=[A-Z])|[.\-\s_]/), 'access', _46 => _46.map, 'call', _47 => _47((x) => x.toLowerCase())]), () => ( []));
|
|
1148
1185
|
let extensionKey;
|
|
1149
1186
|
if (result.length === 0) {
|
|
1150
1187
|
return;
|
|
1151
1188
|
}
|
|
1152
1189
|
if (result.length === 1) {
|
|
1153
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
1190
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _48 => _48[0], 'optionalAccess', _49 => _49.toUpperCase, 'call', _50 => _50()]), () => ( ""));
|
|
1154
1191
|
} else {
|
|
1155
1192
|
extensionKey = result.reduce((ret, part) => {
|
|
1156
1193
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -1228,6 +1265,9 @@ var setConfigEnv = (config) => {
|
|
|
1228
1265
|
if (config.contact) {
|
|
1229
1266
|
process.env[`${prefix}CONTACT`] = config.contact;
|
|
1230
1267
|
}
|
|
1268
|
+
if (config.support) {
|
|
1269
|
+
process.env[`${prefix}SUPPORT`] = config.support;
|
|
1270
|
+
}
|
|
1231
1271
|
if (config.timezone) {
|
|
1232
1272
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
1233
1273
|
process.env.TZ = config.timezone;
|
|
@@ -1291,7 +1331,7 @@ var setConfigEnv = (config) => {
|
|
|
1291
1331
|
process.env.NODE_ENV = config.mode;
|
|
1292
1332
|
process.env.ENVIRONMENT = config.mode;
|
|
1293
1333
|
}
|
|
1294
|
-
if (_optionalChain([config, 'access',
|
|
1334
|
+
if (_optionalChain([config, 'access', _51 => _51.colors, 'optionalAccess', _52 => _52.base, 'optionalAccess', _53 => _53.light]) || _optionalChain([config, 'access', _54 => _54.colors, 'optionalAccess', _55 => _55.base, 'optionalAccess', _56 => _56.dark])) {
|
|
1295
1335
|
for (const key of Object.keys(config.colors)) {
|
|
1296
1336
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1297
1337
|
}
|
|
@@ -1357,7 +1397,7 @@ var setConfigEnv = (config) => {
|
|
|
1357
1397
|
}
|
|
1358
1398
|
};
|
|
1359
1399
|
var setThemeColorConfigEnv = (prefix, config) => {
|
|
1360
|
-
return _optionalChain([config, 'optionalAccess',
|
|
1400
|
+
return _optionalChain([config, 'optionalAccess', _57 => _57.light, 'optionalAccess', _58 => _58.brand]) || _optionalChain([config, 'optionalAccess', _59 => _59.dark, 'optionalAccess', _60 => _60.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
1361
1401
|
};
|
|
1362
1402
|
var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
1363
1403
|
if (config.dark) {
|
|
@@ -1459,7 +1499,7 @@ var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
|
1459
1499
|
var _static_cache = void 0;
|
|
1460
1500
|
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
1461
1501
|
let result;
|
|
1462
|
-
if (!_optionalChain([_static_cache, 'optionalAccess',
|
|
1502
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _61 => _61.data]) || !_optionalChain([_static_cache, 'optionalAccess', _62 => _62.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1463
1503
|
let _workspaceRoot = workspaceRoot;
|
|
1464
1504
|
if (!_workspaceRoot) {
|
|
1465
1505
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -1477,9 +1517,11 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1477
1517
|
return void 0;
|
|
1478
1518
|
}
|
|
1479
1519
|
}
|
|
1480
|
-
const defaultConfig = await
|
|
1481
|
-
result =
|
|
1482
|
-
|
|
1520
|
+
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
1521
|
+
result = applyDefaultConfig(
|
|
1522
|
+
await stormWorkspaceConfigSchema.parseAsync(
|
|
1523
|
+
_defu2.default.call(void 0, configEnv, configFile, defaultConfig)
|
|
1524
|
+
)
|
|
1483
1525
|
);
|
|
1484
1526
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1485
1527
|
} else {
|
|
@@ -1547,7 +1589,7 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
1547
1589
|
let options = _options;
|
|
1548
1590
|
let config = {};
|
|
1549
1591
|
try {
|
|
1550
|
-
if (!_optionalChain([context, 'access',
|
|
1592
|
+
if (!_optionalChain([context, 'access', _63 => _63.projectsConfigurations, 'optionalAccess', _64 => _64.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1551
1593
|
throw new Error(
|
|
1552
1594
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
1553
1595
|
);
|
|
@@ -1570,7 +1612,7 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
1570
1612
|
);
|
|
1571
1613
|
config = await getConfig(workspaceRoot);
|
|
1572
1614
|
}
|
|
1573
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
1615
|
+
if (_optionalChain([executorOptions, 'optionalAccess', _65 => _65.hooks, 'optionalAccess', _66 => _66.applyDefaultOptions])) {
|
|
1574
1616
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
1575
1617
|
options = await Promise.resolve(
|
|
1576
1618
|
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
@@ -1598,7 +1640,7 @@ ${formatLogMessage(tokenized)}
|
|
|
1598
1640
|
`,
|
|
1599
1641
|
config
|
|
1600
1642
|
);
|
|
1601
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
1643
|
+
if (_optionalChain([executorOptions, 'optionalAccess', _67 => _67.hooks, 'optionalAccess', _68 => _68.preProcess])) {
|
|
1602
1644
|
writeDebug("Running the preProcess hook...", config);
|
|
1603
1645
|
await Promise.resolve(
|
|
1604
1646
|
executorOptions.hooks.preProcess(tokenized, config)
|
|
@@ -1606,7 +1648,7 @@ ${formatLogMessage(tokenized)}
|
|
|
1606
1648
|
writeDebug("Completed the preProcess hook", config);
|
|
1607
1649
|
}
|
|
1608
1650
|
const ret = executorFn(tokenized, context, config);
|
|
1609
|
-
if (_isFunction2(_optionalChain([ret, 'optionalAccess',
|
|
1651
|
+
if (_isFunction2(_optionalChain([ret, 'optionalAccess', _69 => _69.next]))) {
|
|
1610
1652
|
const asyncGen = ret;
|
|
1611
1653
|
for await (const iter of asyncGen) {
|
|
1612
1654
|
void iter;
|
|
@@ -1615,7 +1657,7 @@ ${formatLogMessage(tokenized)}
|
|
|
1615
1657
|
const result = await Promise.resolve(
|
|
1616
1658
|
ret
|
|
1617
1659
|
);
|
|
1618
|
-
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess',
|
|
1660
|
+
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _70 => _70.error, 'optionalAccess', _71 => _71.message]) && typeof _optionalChain([result, 'optionalAccess', _72 => _72.error, 'optionalAccess', _73 => _73.message]) === "string" && _optionalChain([result, 'optionalAccess', _74 => _74.error, 'optionalAccess', _75 => _75.name]) && typeof _optionalChain([result, 'optionalAccess', _76 => _76.error, 'optionalAccess', _77 => _77.name]) === "string")) {
|
|
1619
1661
|
writeTrace(
|
|
1620
1662
|
`Failure determined by the ${name} executor
|
|
1621
1663
|
${formatLogMessage(result)}`,
|
|
@@ -1623,10 +1665,10 @@ ${formatLogMessage(result)}`,
|
|
|
1623
1665
|
);
|
|
1624
1666
|
console.error(result);
|
|
1625
1667
|
throw new Error(`The ${name} executor failed to run`, {
|
|
1626
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
1668
|
+
cause: _optionalChain([result, 'optionalAccess', _78 => _78.error])
|
|
1627
1669
|
});
|
|
1628
1670
|
}
|
|
1629
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
1671
|
+
if (_optionalChain([executorOptions, 'optionalAccess', _79 => _79.hooks, 'optionalAccess', _80 => _80.postProcess])) {
|
|
1630
1672
|
writeDebug("Running the postProcess hook...", config);
|
|
1631
1673
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
1632
1674
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -1656,7 +1698,7 @@ ${formatLogMessage(result)}`,
|
|
|
1656
1698
|
};
|
|
1657
1699
|
var _isFunction2 = (value) => {
|
|
1658
1700
|
try {
|
|
1659
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
1701
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _81 => _81.constructor]) && _optionalChain([value, 'optionalAccess', _82 => _82.call]) && _optionalChain([value, 'optionalAccess', _83 => _83.apply]));
|
|
1660
1702
|
} catch (e) {
|
|
1661
1703
|
return false;
|
|
1662
1704
|
}
|
|
@@ -1679,4 +1721,5 @@ var _isFunction2 = (value) => {
|
|
|
1679
1721
|
|
|
1680
1722
|
|
|
1681
1723
|
|
|
1682
|
-
|
|
1724
|
+
|
|
1725
|
+
exports.stormWorkspaceConfigSchema = stormWorkspaceConfigSchema; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; 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.applyWorkspaceBaseTokens = applyWorkspaceBaseTokens; exports.applyWorkspaceTokens = applyWorkspaceTokens; exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig; exports.withRunExecutor = withRunExecutor;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkK5VRWNMPjs = require('./chunk-K5VRWNMP.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/destroy/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunkK5VRWNMPjs.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 _chunkK5VRWNMPjs = require('./chunk-K5VRWNMP.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/apply/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunkK5VRWNMPjs.withTerraformExecutor.call(void 0, "apply");
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -5,7 +5,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
5
5
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
6
|
});
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
8
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__23d29aaa007764500c48e48a9770b339/node_modules/tsup/assets/esm_shims.js
|
|
9
9
|
import { fileURLToPath } from "url";
|
|
10
10
|
import path from "path";
|
|
11
11
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -27,10 +27,10 @@ var LogLevelLabel = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// ../config/src/constants.ts
|
|
30
|
-
var STORM_DEFAULT_DOCS = "https://
|
|
30
|
+
var STORM_DEFAULT_DOCS = "https://stormsoftware.com/docs";
|
|
31
31
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
32
32
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
33
|
-
var STORM_DEFAULT_LICENSING = "https://
|
|
33
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
34
34
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
35
35
|
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
36
36
|
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
@@ -204,10 +204,13 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
204
204
|
organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
205
205
|
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
206
206
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
207
|
-
homepage: z.string().trim().url().
|
|
208
|
-
docs: z.string().trim().url().
|
|
209
|
-
licensing: z.string().trim().url().
|
|
210
|
-
contact: z.string().trim().url().
|
|
207
|
+
homepage: z.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
208
|
+
docs: z.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
209
|
+
licensing: z.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
210
|
+
contact: z.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
211
|
+
support: z.string().trim().url().optional().describe(
|
|
212
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
213
|
+
),
|
|
211
214
|
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
212
215
|
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
213
216
|
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
@@ -528,9 +531,10 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
528
531
|
negative: "#dc2626"
|
|
529
532
|
}
|
|
530
533
|
};
|
|
531
|
-
|
|
534
|
+
async function getPackageJsonConfig(root) {
|
|
532
535
|
let license = STORM_DEFAULT_LICENSE;
|
|
533
|
-
let homepage =
|
|
536
|
+
let homepage = void 0;
|
|
537
|
+
let support = void 0;
|
|
534
538
|
let name = void 0;
|
|
535
539
|
let namespace = void 0;
|
|
536
540
|
let repository = void 0;
|
|
@@ -561,6 +565,13 @@ var getDefaultConfig = async (root) => {
|
|
|
561
565
|
if (packageJson.homepage) {
|
|
562
566
|
homepage = packageJson.homepage;
|
|
563
567
|
}
|
|
568
|
+
if (packageJson.bugs) {
|
|
569
|
+
if (typeof packageJson.bugs === "string") {
|
|
570
|
+
support = packageJson.bugs;
|
|
571
|
+
} else if (packageJson.bugs.url) {
|
|
572
|
+
support = packageJson.bugs.url;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
564
575
|
}
|
|
565
576
|
}
|
|
566
577
|
return {
|
|
@@ -570,13 +581,38 @@ var getDefaultConfig = async (root) => {
|
|
|
570
581
|
repository,
|
|
571
582
|
license,
|
|
572
583
|
homepage,
|
|
573
|
-
|
|
574
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
575
|
-
error: {
|
|
576
|
-
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
577
|
-
}
|
|
584
|
+
support
|
|
578
585
|
};
|
|
579
|
-
}
|
|
586
|
+
}
|
|
587
|
+
function applyDefaultConfig(config) {
|
|
588
|
+
if (!config.support && config.contact) {
|
|
589
|
+
config.support = config.contact;
|
|
590
|
+
}
|
|
591
|
+
if (!config.contact && config.support) {
|
|
592
|
+
config.contact = config.support;
|
|
593
|
+
}
|
|
594
|
+
if (config.homepage) {
|
|
595
|
+
if (!config.docs) {
|
|
596
|
+
config.docs = `${config.homepage}/docs`;
|
|
597
|
+
}
|
|
598
|
+
if (!config.license) {
|
|
599
|
+
config.license = `${config.homepage}/license`;
|
|
600
|
+
}
|
|
601
|
+
if (!config.support) {
|
|
602
|
+
config.support = `${config.homepage}/support`;
|
|
603
|
+
}
|
|
604
|
+
if (!config.contact) {
|
|
605
|
+
config.contact = `${config.homepage}/contact`;
|
|
606
|
+
}
|
|
607
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
608
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
609
|
+
if (config.homepage) {
|
|
610
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
return config;
|
|
615
|
+
}
|
|
580
616
|
|
|
581
617
|
// ../config-tools/src/logger/chalk.ts
|
|
582
618
|
import chalk from "chalk";
|
|
@@ -1010,6 +1046,7 @@ var getConfigEnv = () => {
|
|
|
1010
1046
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
1011
1047
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
1012
1048
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
1049
|
+
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
1013
1050
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
1014
1051
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
1015
1052
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
@@ -1228,6 +1265,9 @@ var setConfigEnv = (config) => {
|
|
|
1228
1265
|
if (config.contact) {
|
|
1229
1266
|
process.env[`${prefix}CONTACT`] = config.contact;
|
|
1230
1267
|
}
|
|
1268
|
+
if (config.support) {
|
|
1269
|
+
process.env[`${prefix}SUPPORT`] = config.support;
|
|
1270
|
+
}
|
|
1231
1271
|
if (config.timezone) {
|
|
1232
1272
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
1233
1273
|
process.env.TZ = config.timezone;
|
|
@@ -1477,9 +1517,11 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1477
1517
|
return void 0;
|
|
1478
1518
|
}
|
|
1479
1519
|
}
|
|
1480
|
-
const defaultConfig = await
|
|
1481
|
-
result =
|
|
1482
|
-
|
|
1520
|
+
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
1521
|
+
result = applyDefaultConfig(
|
|
1522
|
+
await stormWorkspaceConfigSchema.parseAsync(
|
|
1523
|
+
defu2(configEnv, configFile, defaultConfig)
|
|
1524
|
+
)
|
|
1483
1525
|
);
|
|
1484
1526
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1485
1527
|
} else {
|
|
@@ -1674,6 +1716,7 @@ export {
|
|
|
1674
1716
|
writeDebug,
|
|
1675
1717
|
writeTrace,
|
|
1676
1718
|
getStopwatch,
|
|
1719
|
+
formatLogMessage,
|
|
1677
1720
|
applyWorkspaceBaseTokens,
|
|
1678
1721
|
applyWorkspaceTokens,
|
|
1679
1722
|
getConfig,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkK5VRWNMPjs = require('./chunk-K5VRWNMP.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/output/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunkK5VRWNMPjs.withTerraformExecutor.call(void 0, "output");
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|