@storm-software/terraform-tools 0.54.84 → 0.54.85

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 +12 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-LXKO7ZLH.js → chunk-2WTDMDFS.js} +2 -2
  4. package/dist/chunk-3RG5ZIWI.js +10 -0
  5. package/dist/{chunk-EMBHVVES.mjs → chunk-3VZ6A6RG.mjs} +770 -529
  6. package/dist/{chunk-JQCUCWAF.mjs → chunk-5TXZ2IQ6.mjs} +1 -1
  7. package/dist/chunk-7GH4VDRM.mjs +95 -0
  8. package/dist/{chunk-FC5AL6FF.js → chunk-A4RDGLKC.js} +420 -248
  9. package/dist/{chunk-YBMM6DDX.js → chunk-AJVSFBNT.js} +2 -2
  10. package/dist/{chunk-YA4E2N42.mjs → chunk-DIXFQWYR.mjs} +419 -247
  11. package/dist/{chunk-WPRKDCZP.mjs → chunk-IEZKYJSF.mjs} +3 -6
  12. package/dist/{chunk-DXM2JXJD.mjs → chunk-LHAZ3WPQ.mjs} +1 -1
  13. package/dist/{chunk-WWAFUN4V.mjs → chunk-ONGG25RY.mjs} +1 -1
  14. package/dist/{chunk-JPGERIM3.js → chunk-OV7TVEAC.js} +2 -2
  15. package/dist/{chunk-SR7JIQJV.js → chunk-S6UZXYLH.js} +804 -563
  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
@@ -1,71 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
-
3
- var _chunkFC5AL6FFjs = require('./chunk-FC5AL6FF.js');
4
-
5
-
6
- var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
7
-
8
- // ../config-tools/src/utilities/run.ts
9
- var _child_process = require('child_process');
10
- var LARGE_BUFFER = 1024 * 1e6;
11
- var run = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), stdio = "inherit", env = process.env) => {
12
- return _child_process.execSync.call(void 0, command, {
13
- cwd,
14
- env: {
15
- ...process.env,
16
- ...env,
17
- CLICOLOR: "true",
18
- FORCE_COLOR: "true"
19
- },
20
- windowsHide: true,
21
- stdio,
22
- maxBuffer: LARGE_BUFFER,
23
- killSignal: "SIGTERM"
24
- });
25
- }, "run");
26
-
27
- // src/base/terraform-executor.ts
28
- var _shelljs = require('shelljs');
29
- var withTerraformExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (command, executorOptions = {}) => async (_options, context) => {
30
- return _chunkFC5AL6FFjs.withRunExecutor.call(void 0, `Terraform \`${command}\` Command Executor`, async (options, context2, config) => {
31
- if (!_shelljs.which.call(void 0, "tofu") || !_shelljs.which.call(void 0, "terraform")) {
32
- throw new Error("Both OpenTofu and Terraform are not installed. Please install one of the two before running this executor.");
33
- }
34
- if (!_shelljs.which.call(void 0, "terragrunt")) {
35
- throw new Error("Terragrunt is not installed. Please install them before running this executor.");
36
- }
37
- const { backendConfig = [], planFile, autoApproval, formatWrite, upgrade, migrateState, lock, varFile, varString, reconfigure } = options;
38
- let jsonBackendConfig = backendConfig;
39
- if (typeof jsonBackendConfig === "string") {
40
- jsonBackendConfig = JSON.parse(jsonBackendConfig);
41
- }
42
- run(config, [
43
- "terragrunt",
44
- command,
45
- ...jsonBackendConfig.map((config2) => `-backend-config="${config2.key}=${config2.name}"`),
46
- command === "plan" && planFile && `-out ${planFile}`,
47
- command === "plan" && varFile && `--var-file ${varFile}`,
48
- command === "plan" && varString && `--var ${varString}`,
49
- command === "destroy" && autoApproval && "-auto-approve",
50
- command === "apply" && autoApproval && "-auto-approve",
51
- command === "apply" && planFile,
52
- command === "apply" && varString && `--var ${varString}`,
53
- command === "fmt" && "--recursive",
54
- command === "fmt" && !formatWrite && "--check --list",
55
- command === "init" && upgrade && "-upgrade",
56
- command === "init" && migrateState && "-migrate-state",
57
- command === "init" && reconfigure && "-reconfigure",
58
- command === "providers" && lock && "lock",
59
- command === "test" && varFile && `--var-file ${varFile}`,
60
- command === "test" && varString && `--var ${varString}`
61
- ].filter(Boolean).join(" "), options.sourceRoot, "inherit", process.env.CI ? {
62
- TF_IN_AUTOMATION: "true",
63
- TF_INPUT: "0"
64
- } : {});
65
- return null;
66
- }, executorOptions)(_options, context);
67
- }, "withTerraformExecutor");
68
-
69
-
70
-
71
- exports.withTerraformExecutor = withTerraformExecutor;