@storm-software/terraform-tools 0.54.84 → 0.54.86

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 (46) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +1 -2
  3. package/dist/{chunk-LXKO7ZLH.js → chunk-2WTDMDFS.js} +2 -2
  4. package/dist/chunk-3RG5ZIWI.js +10 -0
  5. package/dist/{chunk-JQCUCWAF.mjs → chunk-5TXZ2IQ6.mjs} +1 -1
  6. package/dist/chunk-7GH4VDRM.mjs +95 -0
  7. package/dist/{chunk-FC5AL6FF.js → chunk-A4RDGLKC.js} +420 -248
  8. package/dist/{chunk-YBMM6DDX.js → chunk-AJVSFBNT.js} +2 -2
  9. package/dist/{chunk-YA4E2N42.mjs → chunk-DIXFQWYR.mjs} +419 -247
  10. package/dist/{chunk-WPRKDCZP.mjs → chunk-IEZKYJSF.mjs} +3 -6
  11. package/dist/{chunk-EMBHVVES.mjs → chunk-L3RPHNAE.mjs} +751 -560
  12. package/dist/{chunk-DXM2JXJD.mjs → chunk-LHAZ3WPQ.mjs} +1 -1
  13. package/dist/{chunk-SR7JIQJV.js → chunk-N5AGYIJO.js} +810 -619
  14. package/dist/{chunk-WWAFUN4V.mjs → chunk-ONGG25RY.mjs} +1 -1
  15. package/dist/{chunk-JPGERIM3.js → chunk-OV7TVEAC.js} +2 -2
  16. package/dist/{chunk-YMKC4F5V.mjs → chunk-VNME2RIT.mjs} +1 -1
  17. package/dist/{chunk-ESAA5DIO.js → chunk-WJV4GOSN.js} +2 -2
  18. package/dist/chunk-ZLPOE4VZ.js +95 -0
  19. package/dist/executors.js +7 -7
  20. package/dist/executors.mjs +7 -7
  21. package/dist/generators.js +4 -4
  22. package/dist/generators.mjs +3 -3
  23. package/dist/index.js +9 -9
  24. package/dist/index.mjs +8 -8
  25. package/dist/src/base/base-terraform-executor.untyped.js +1 -1
  26. package/dist/src/base/base-terraform-executor.untyped.mjs +1 -1
  27. package/dist/src/base/index.js +4 -4
  28. package/dist/src/base/index.mjs +3 -3
  29. package/dist/src/base/terraform-executor.js +4 -4
  30. package/dist/src/base/terraform-executor.mjs +3 -3
  31. package/dist/src/executors/apply/executor.js +5 -5
  32. package/dist/src/executors/apply/executor.mjs +4 -4
  33. package/dist/src/executors/destroy/executor.js +5 -5
  34. package/dist/src/executors/destroy/executor.mjs +4 -4
  35. package/dist/src/executors/output/executor.js +5 -5
  36. package/dist/src/executors/output/executor.mjs +4 -4
  37. package/dist/src/executors/plan/executor.js +5 -5
  38. package/dist/src/executors/plan/executor.mjs +4 -4
  39. package/dist/src/generators/init/init.js +4 -4
  40. package/dist/src/generators/init/init.mjs +3 -3
  41. package/dist/tsup.config.js +3 -8
  42. package/dist/tsup.config.mjs +3 -8
  43. package/package.json +1 -1
  44. package/dist/chunk-3GQAWCBQ.js +0 -13
  45. package/dist/chunk-Q6WCEL5B.mjs +0 -71
  46. package/dist/chunk-ZAMME4JX.js +0 -71
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  # Changelog for Storm Ops - Terraform Tools
4
4
 
5
+ ## [0.54.86](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.54.86) (2025-04-30)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **esbuild:** Remove swc plugin for ESBuild
10
+ ([ad298c288](https://github.com/storm-software/storm-ops/commit/ad298c288))
11
+ - **monorepo:** Regenerate README markdown files
12
+ ([933d45f0b](https://github.com/storm-software/storm-ops/commit/933d45f0b))
13
+
14
+ ## [0.54.85](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.54.85) (2025-04-30)
15
+
16
+ ### Bug Fixes
17
+
18
+ - **esbuild:** Update script to use .cjs file extension
19
+ ([95c4e5abd](https://github.com/storm-software/storm-ops/commit/95c4e5abd))
20
+
21
+ ### Miscellaneous
22
+
23
+ - **monorepo:** Regenerate README markdown files
24
+ ([17b6c5930](https://github.com/storm-software/storm-ops/commit/17b6c5930))
25
+
5
26
  ## [0.54.84](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.54.84) (2025-04-30)
6
27
 
7
28
  ### Bug Fixes
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
- [![Version](https://img.shields.io/badge/version-0.54.83-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.54.85-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -40,7 +40,6 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
40
40
 
41
41
  <!-- START doctoc -->
42
42
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
43
-
44
43
  ## Table of Contents
45
44
 
46
45
  - [Storm Terraform Tools](#storm-terraform-tools)
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZAMME4JXjs = require('./chunk-ZAMME4JX.js');
3
+ var _chunkZLPOE4VZjs = require('./chunk-ZLPOE4VZ.js');
4
4
 
5
5
  // src/executors/destroy/executor.ts
6
- var executor_default = _chunkZAMME4JXjs.withTerraformExecutor.call(void 0, "destroy");
6
+ var executor_default = _chunkZLPOE4VZjs.withTerraformExecutor.call(void 0, "destroy");
7
7
 
8
8
 
9
9
 
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+
9
+
10
+ exports.__require = __require;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-Q6WCEL5B.mjs";
3
+ } from "./chunk-7GH4VDRM.mjs";
4
4
 
5
5
  // src/executors/output/executor.ts
6
6
  var executor_default = withTerraformExecutor("output");
@@ -0,0 +1,95 @@
1
+ import {
2
+ withRunExecutor
3
+ } from "./chunk-DIXFQWYR.mjs";
4
+
5
+ // ../config-tools/src/utilities/run.ts
6
+ import { exec, execSync } from "node:child_process";
7
+ var LARGE_BUFFER = 1024 * 1e6;
8
+ var run = (config, command, cwd = config.workspaceRoot ?? process.cwd(), stdio = "inherit", env = process.env) => {
9
+ return execSync(command, {
10
+ cwd,
11
+ env: {
12
+ ...process.env,
13
+ ...env,
14
+ CLICOLOR: "true",
15
+ FORCE_COLOR: "true"
16
+ },
17
+ windowsHide: true,
18
+ stdio,
19
+ maxBuffer: LARGE_BUFFER,
20
+ killSignal: "SIGTERM"
21
+ });
22
+ };
23
+
24
+ // src/base/terraform-executor.ts
25
+ import { which } from "shelljs";
26
+ var withTerraformExecutor = (command, executorOptions = {}) => async (_options, context) => {
27
+ return withRunExecutor(
28
+ `Terraform \`${command}\` Command Executor`,
29
+ async (options, context2, config) => {
30
+ if (!which("tofu") || !which("terraform")) {
31
+ throw new Error(
32
+ "Both OpenTofu and Terraform are not installed. Please install one of the two before running this executor."
33
+ );
34
+ }
35
+ if (!which("terragrunt")) {
36
+ throw new Error(
37
+ "Terragrunt is not installed. Please install them before running this executor."
38
+ );
39
+ }
40
+ const {
41
+ backendConfig = [],
42
+ planFile,
43
+ autoApproval,
44
+ formatWrite,
45
+ upgrade,
46
+ migrateState,
47
+ lock,
48
+ varFile,
49
+ varString,
50
+ reconfigure
51
+ } = options;
52
+ let jsonBackendConfig = backendConfig;
53
+ if (typeof jsonBackendConfig === "string") {
54
+ jsonBackendConfig = JSON.parse(jsonBackendConfig);
55
+ }
56
+ run(
57
+ config,
58
+ [
59
+ "terragrunt",
60
+ command,
61
+ ...jsonBackendConfig.map(
62
+ (config2) => `-backend-config="${config2.key}=${config2.name}"`
63
+ ),
64
+ command === "plan" && planFile && `-out ${planFile}`,
65
+ command === "plan" && varFile && `--var-file ${varFile}`,
66
+ command === "plan" && varString && `--var ${varString}`,
67
+ command === "destroy" && autoApproval && "-auto-approve",
68
+ command === "apply" && autoApproval && "-auto-approve",
69
+ command === "apply" && planFile,
70
+ command === "apply" && varString && `--var ${varString}`,
71
+ command === "fmt" && "--recursive",
72
+ command === "fmt" && !formatWrite && "--check --list",
73
+ command === "init" && upgrade && "-upgrade",
74
+ command === "init" && migrateState && "-migrate-state",
75
+ command === "init" && reconfigure && "-reconfigure",
76
+ command === "providers" && lock && "lock",
77
+ command === "test" && varFile && `--var-file ${varFile}`,
78
+ command === "test" && varString && `--var ${varString}`
79
+ ].filter(Boolean).join(" "),
80
+ options.sourceRoot,
81
+ "inherit",
82
+ process.env.CI ? {
83
+ TF_IN_AUTOMATION: "true",
84
+ TF_INPUT: "0"
85
+ } : {}
86
+ );
87
+ return null;
88
+ },
89
+ executorOptions
90
+ )(_options, context);
91
+ };
92
+
93
+ export {
94
+ withTerraformExecutor
95
+ };