@storm-software/terraform-tools 0.54.61 → 0.54.63
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 +7 -0
- package/README.md +1 -1
- package/dist/{chunk-REF2V3LE.mjs → chunk-3OHP5XR7.mjs} +1 -1
- package/dist/{chunk-WFKMYI7B.mjs → chunk-5L6S5MSQ.mjs} +16 -10
- package/dist/{chunk-K6XGAEWU.mjs → chunk-6DHDE4R5.mjs} +2 -2
- package/dist/{chunk-4TXU7I2F.mjs → chunk-AMI6SOPS.mjs} +2 -2
- package/dist/{chunk-J5GWHRAQ.mjs → chunk-ASFTANKT.mjs} +1 -1
- package/dist/{chunk-5BLPZKPP.js → chunk-DHBOQ6QN.js} +2 -2
- package/dist/{chunk-JBYCJPBO.js → chunk-DLJYMU67.js} +15 -9
- package/dist/{chunk-TVXPZKCZ.js → chunk-EVACDYVV.js} +2 -2
- package/dist/{chunk-H5DDA2HN.mjs → chunk-IQBE77EA.mjs} +1 -1
- package/dist/{chunk-TVXMNWA2.js → chunk-JJLWDVUK.js} +2 -2
- package/dist/{chunk-MWN6FEKO.js → chunk-JYWO443U.js} +3 -3
- package/dist/{chunk-7HBKLSTX.mjs → chunk-MVJYL7QB.mjs} +1 -1
- package/dist/{chunk-YTM42MRU.js → chunk-OYRE6CEZ.js} +131 -131
- package/dist/{chunk-Y4D6KHJP.mjs → chunk-VGSUCQ2S.mjs} +1 -1
- package/dist/{chunk-TGCSS72O.js → chunk-YRJ6SG2R.js} +2 -2
- 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 +32 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Terraform Tools
|
|
4
4
|
|
|
5
|
+
## [0.54.63](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.54.63) (2025-04-25)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Regenerate README markdown files
|
|
10
|
+
([9ab7e03d9](https://github.com/storm-software/storm-ops/commit/9ab7e03d9))
|
|
11
|
+
|
|
5
12
|
## [0.54.61](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.54.61) (2025-04-16)
|
|
6
13
|
|
|
7
14
|
### 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 -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__name
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VGSUCQ2S.mjs";
|
|
4
4
|
|
|
5
5
|
// ../config-tools/src/utilities/run.ts
|
|
6
6
|
import { exec, execSync } from "node:child_process";
|
|
@@ -209,7 +209,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
209
209
|
"staging",
|
|
210
210
|
"production"
|
|
211
211
|
]).default("production").describe("The current runtime environment mode for the package"),
|
|
212
|
-
workspaceRoot: z.string().trim().
|
|
212
|
+
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
213
213
|
externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
214
214
|
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
215
215
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -872,7 +872,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
if (!config) {
|
|
875
|
+
if (!config || Object.keys(config).length === 0) {
|
|
876
876
|
return void 0;
|
|
877
877
|
}
|
|
878
878
|
config.configFile = configFile;
|
|
@@ -1346,7 +1346,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
1346
1346
|
// ../config-tools/src/create-storm-config.ts
|
|
1347
1347
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1348
1348
|
var _static_cache = void 0;
|
|
1349
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1349
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
1350
1350
|
let result;
|
|
1351
1351
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1352
1352
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -1354,13 +1354,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
|
|
|
1354
1354
|
_workspaceRoot = findWorkspaceRoot();
|
|
1355
1355
|
}
|
|
1356
1356
|
const configEnv = getConfigEnv();
|
|
1357
|
-
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1358
1357
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1359
|
-
if (!configFile
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1358
|
+
if (!configFile) {
|
|
1359
|
+
if (!skipLogs) {
|
|
1360
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
1361
|
+
logLevel: "all"
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
if (useDefault === false) {
|
|
1365
|
+
return void 0;
|
|
1366
|
+
}
|
|
1363
1367
|
}
|
|
1368
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1364
1369
|
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
1365
1370
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1366
1371
|
} else {
|
|
@@ -1393,7 +1398,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1393
1398
|
return extension;
|
|
1394
1399
|
}, "createConfigExtension");
|
|
1395
1400
|
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1396
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1401
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
1397
1402
|
setConfigEnv(config);
|
|
1398
1403
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1399
1404
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
@@ -1459,6 +1464,7 @@ ${formatLogMessage(tokenized)}
|
|
|
1459
1464
|
if (_isFunction2(ret?.next)) {
|
|
1460
1465
|
const asyncGen = ret;
|
|
1461
1466
|
for await (const iter of asyncGen) {
|
|
1467
|
+
void iter;
|
|
1462
1468
|
}
|
|
1463
1469
|
}
|
|
1464
1470
|
const result = await Promise.resolve(ret);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
run,
|
|
3
3
|
withRunExecutor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5L6S5MSQ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__name
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VGSUCQ2S.mjs";
|
|
8
8
|
|
|
9
9
|
// src/base/terraform-executor.ts
|
|
10
10
|
import { which } from "shelljs";
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
writeSuccess,
|
|
19
19
|
writeTrace,
|
|
20
20
|
writeWarning
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5L6S5MSQ.mjs";
|
|
22
22
|
import {
|
|
23
23
|
__dirname,
|
|
24
24
|
__name,
|
|
25
25
|
__require
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VGSUCQ2S.mjs";
|
|
27
27
|
|
|
28
28
|
// src/generators/init/init.ts
|
|
29
29
|
import { formatFiles as formatFiles9 } from "@nx/devkit";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJYWO443Ujs = require('./chunk-JYWO443U.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/apply/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunkJYWO443Ujs.withTerraformExecutor.call(void 0, "apply");
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -209,7 +209,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
209
209
|
"staging",
|
|
210
210
|
"production"
|
|
211
211
|
]).default("production").describe("The current runtime environment mode for the package"),
|
|
212
|
-
workspaceRoot: _zod2.default.string().trim().
|
|
212
|
+
workspaceRoot: _zod2.default.string().trim().describe("The root directory of the workspace"),
|
|
213
213
|
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
214
214
|
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
215
215
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -872,7 +872,7 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
|
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
if (!config) {
|
|
875
|
+
if (!config || Object.keys(config).length === 0) {
|
|
876
876
|
return void 0;
|
|
877
877
|
}
|
|
878
878
|
config.configFile = configFile;
|
|
@@ -1346,7 +1346,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1346
1346
|
// ../config-tools/src/create-storm-config.ts
|
|
1347
1347
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1348
1348
|
var _static_cache = void 0;
|
|
1349
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1349
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
1350
1350
|
let result;
|
|
1351
1351
|
if (!_optionalChain([_static_cache, 'optionalAccess', _57 => _57.data]) || !_optionalChain([_static_cache, 'optionalAccess', _58 => _58.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1352
1352
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -1354,13 +1354,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1354
1354
|
_workspaceRoot = findWorkspaceRoot();
|
|
1355
1355
|
}
|
|
1356
1356
|
const configEnv = getConfigEnv();
|
|
1357
|
-
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1358
1357
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1359
|
-
if (!configFile
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1358
|
+
if (!configFile) {
|
|
1359
|
+
if (!skipLogs) {
|
|
1360
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
1361
|
+
logLevel: "all"
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
if (useDefault === false) {
|
|
1365
|
+
return void 0;
|
|
1366
|
+
}
|
|
1363
1367
|
}
|
|
1368
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1364
1369
|
result = await stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
1365
1370
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1366
1371
|
} else {
|
|
@@ -1393,7 +1398,7 @@ var createConfigExtension = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
1393
1398
|
return extension;
|
|
1394
1399
|
}, "createConfigExtension");
|
|
1395
1400
|
var loadStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
1396
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1401
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
1397
1402
|
setConfigEnv(config);
|
|
1398
1403
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1399
1404
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
@@ -1459,6 +1464,7 @@ ${formatLogMessage(tokenized)}
|
|
|
1459
1464
|
if (_isFunction2(_optionalChain([ret, 'optionalAccess', _65 => _65.next]))) {
|
|
1460
1465
|
const asyncGen = ret;
|
|
1461
1466
|
for await (const iter of asyncGen) {
|
|
1467
|
+
void iter;
|
|
1462
1468
|
}
|
|
1463
1469
|
}
|
|
1464
1470
|
const result = await Promise.resolve(ret);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJYWO443Ujs = require('./chunk-JYWO443U.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/plan/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunkJYWO443Ujs.withTerraformExecutor.call(void 0, "plan");
|
|
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 _chunkJYWO443Ujs = require('./chunk-JYWO443U.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/destroy/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunkJYWO443Ujs.withTerraformExecutor.call(void 0, "destroy");
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDLJYMU67js = require('./chunk-DLJYMU67.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -9,7 +9,7 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
9
9
|
// src/base/terraform-executor.ts
|
|
10
10
|
var _shelljs = require('shelljs');
|
|
11
11
|
var withTerraformExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (command, executorOptions = {}) => async (_options, context) => {
|
|
12
|
-
return
|
|
12
|
+
return _chunkDLJYMU67js.withRunExecutor.call(void 0, `Terraform \`${command}\` Command Executor`, async (options, context2, config) => {
|
|
13
13
|
if (!_shelljs.which.call(void 0, "tofu") || !_shelljs.which.call(void 0, "terraform")) {
|
|
14
14
|
throw new Error("Both OpenTofu and Terraform are not installed. Please install one of the two before running this executor.");
|
|
15
15
|
}
|
|
@@ -21,7 +21,7 @@ var withTerraformExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
21
21
|
if (typeof jsonBackendConfig === "string") {
|
|
22
22
|
jsonBackendConfig = JSON.parse(jsonBackendConfig);
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
_chunkDLJYMU67js.run.call(void 0, config, [
|
|
25
25
|
"terragrunt",
|
|
26
26
|
command,
|
|
27
27
|
...jsonBackendConfig.map((config2) => `-backend-config="${config2.key}=${config2.name}"`),
|