@storm-software/terraform-tools 0.49.0 → 0.49.2

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 (37) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-R4XW4ES7.mjs → chunk-2G5G6H2X.mjs} +1 -1
  4. package/dist/{chunk-455PVGLF.js → chunk-3QQYGWLX.js} +2 -2
  5. package/dist/{chunk-UAZET5ED.mjs → chunk-4FQ7OTSE.mjs} +2 -2
  6. package/dist/{chunk-QMDMW4SA.mjs → chunk-4UCIB5EX.mjs} +1 -1
  7. package/dist/{chunk-F7GLIHEV.js → chunk-55SRZ3NV.js} +2 -2
  8. package/dist/{chunk-Y52W5WN7.mjs → chunk-DNTE5MBP.mjs} +28 -8
  9. package/dist/{chunk-AMLRXVM3.js → chunk-DTYPMVS2.js} +2 -2
  10. package/dist/{chunk-3I64RHEK.mjs → chunk-M4Q23Z5H.mjs} +1 -1
  11. package/dist/{chunk-N4VDOPZF.mjs → chunk-MUBINZ32.mjs} +1 -1
  12. package/dist/{chunk-MOTE7YBG.js → chunk-PCZI22PL.js} +3 -3
  13. package/dist/{chunk-OM64FIV6.mjs → chunk-QUA3WPTX.mjs} +1 -1
  14. package/dist/{chunk-665YWX4A.js → chunk-VORJFDGV.js} +204 -184
  15. package/dist/{chunk-FFFM47KZ.js → chunk-WUQW2NTB.js} +2 -2
  16. package/dist/{chunk-NLQAVRJ6.js → chunk-ZW3ZP7CV.js} +2 -2
  17. package/dist/executors.js +6 -6
  18. package/dist/executors.mjs +6 -6
  19. package/dist/generators.js +3 -3
  20. package/dist/generators.mjs +2 -2
  21. package/dist/index.js +8 -8
  22. package/dist/index.mjs +7 -7
  23. package/dist/src/base/index.js +3 -3
  24. package/dist/src/base/index.mjs +2 -2
  25. package/dist/src/base/terraform-executor.js +3 -3
  26. package/dist/src/base/terraform-executor.mjs +2 -2
  27. package/dist/src/executors/apply/executor.js +4 -4
  28. package/dist/src/executors/apply/executor.mjs +3 -3
  29. package/dist/src/executors/destroy/executor.js +4 -4
  30. package/dist/src/executors/destroy/executor.mjs +3 -3
  31. package/dist/src/executors/output/executor.js +4 -4
  32. package/dist/src/executors/output/executor.mjs +3 -3
  33. package/dist/src/executors/plan/executor.js +4 -4
  34. package/dist/src/executors/plan/executor.mjs +3 -3
  35. package/dist/src/generators/init/init.js +3 -3
  36. package/dist/src/generators/init/init.mjs +2 -2
  37. package/package.json +140 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## 0.49.2 (2025-01-20)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **untyped:** Resovle bundling issue with externals ([ff044ddf](https://github.com/storm-software/storm-ops/commit/ff044ddf))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated workspace-tools to 1.233.0
10
+ - Updated workspace-tools to 1.233.0
11
+
12
+ ## 0.49.1 (2025-01-20)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **unbuild:** Update package to bundle the `unbuild` package for distribution ([d304c28d](https://github.com/storm-software/storm-ops/commit/d304c28d))
17
+
18
+ ### 🧱 Updated Dependencies
19
+
20
+ - Updated workspace-tools to 1.232.1
21
+ - Updated workspace-tools to 1.232.1
22
+
1
23
  ## 0.49.0 (2025-01-20)
2
24
 
3
25
  ### Features
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.48.0-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.49.1-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 -->
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  run,
3
3
  withRunExecutor
4
- } from "./chunk-UAZET5ED.mjs";
4
+ } from "./chunk-4FQ7OTSE.mjs";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-XUV4U54K.mjs";
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkMOTE7YBGjs = require('./chunk-MOTE7YBG.js');
3
+ var _chunkPCZI22PLjs = require('./chunk-PCZI22PL.js');
4
4
 
5
5
  // src/executors/plan/executor.ts
6
- var executor_default = _chunkMOTE7YBGjs.withTerraformExecutor.call(void 0, "plan");
6
+ var executor_default = _chunkPCZI22PLjs.withTerraformExecutor.call(void 0, "plan");
7
7
 
8
8
 
9
9
 
@@ -660,7 +660,7 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
660
660
  envName: fileName?.toUpperCase(),
661
661
  jitiOptions: {
662
662
  debug: false,
663
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
663
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
664
664
  },
665
665
  ...options
666
666
  });
@@ -672,7 +672,7 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
672
672
  envName: fileName?.toUpperCase(),
673
673
  jitiOptions: {
674
674
  debug: false,
675
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
675
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
676
676
  },
677
677
  configFile: fileName,
678
678
  ...options
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-R4XW4ES7.mjs";
3
+ } from "./chunk-2G5G6H2X.mjs";
4
4
 
5
5
  // src/executors/output/executor.ts
6
6
  var executor_default = withTerraformExecutor("output");
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkMOTE7YBGjs = require('./chunk-MOTE7YBG.js');
3
+ var _chunkPCZI22PLjs = require('./chunk-PCZI22PL.js');
4
4
 
5
5
  // src/executors/output/executor.ts
6
- var executor_default = _chunkMOTE7YBGjs.withTerraformExecutor.call(void 0, "output");
6
+ var executor_default = _chunkPCZI22PLjs.withTerraformExecutor.call(void 0, "output");
7
7
 
8
8
 
9
9
 
@@ -18,7 +18,7 @@ import {
18
18
  writeSuccess,
19
19
  writeTrace,
20
20
  writeWarning
21
- } from "./chunk-UAZET5ED.mjs";
21
+ } from "./chunk-4FQ7OTSE.mjs";
22
22
  import {
23
23
  __dirname,
24
24
  __name,
@@ -585,18 +585,18 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
585
585
  }, "getEnv");
586
586
 
587
587
  // ../build-tools/src/utilities/get-out-extension.ts
588
- function getOutExtension(format, pkgType) {
588
+ function getOutExtension(format2, pkgType) {
589
589
  let jsExtension = ".js";
590
590
  let dtsExtension = ".d.ts";
591
- if (pkgType === "module" && format === "cjs") {
591
+ if (pkgType === "module" && format2 === "cjs") {
592
592
  jsExtension = ".cjs";
593
593
  dtsExtension = ".d.cts";
594
594
  }
595
- if (pkgType !== "module" && format === "esm") {
595
+ if (pkgType !== "module" && format2 === "esm") {
596
596
  jsExtension = ".mjs";
597
597
  dtsExtension = ".d.mts";
598
598
  }
599
- if (format === "iife") {
599
+ if (format2 === "iife") {
600
600
  jsExtension = ".global.js";
601
601
  }
602
602
  return {
@@ -1600,6 +1600,7 @@ import fs3 from "node:fs/promises";
1600
1600
  // ../workspace-tools/src/utils/pnpm-deps-update.ts
1601
1601
  import { existsSync as existsSync3 } from "node:fs";
1602
1602
  import { readFile as readFile4, writeFile as writeFile2 } from "node:fs/promises";
1603
+ import { format } from "prettier";
1603
1604
  import readYamlFile from "read-yaml-file";
1604
1605
 
1605
1606
  // ../workspace-tools/src/executors/npm-publish/executor.ts
@@ -1949,11 +1950,11 @@ import { readCachedProjectGraph as readCachedProjectGraph4, writeJsonFile as wri
1949
1950
  import { getHelperDependency as getHelperDependency2, HelperDependency as HelperDependency2 } from "@nx/js";
1950
1951
  import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies3 } from "@nx/js/src/utils/buildable-libs-utils";
1951
1952
  import defu3 from "defu";
1953
+ import { createJiti } from "jiti";
1952
1954
  import { existsSync as existsSync4 } from "node:fs";
1953
1955
  import { readFile as readFile5 } from "node:fs/promises";
1954
1956
  import { relative as relative4 } from "node:path";
1955
1957
  import { findWorkspaceRoot as findWorkspaceRoot4 } from "nx/src/utils/find-workspace-root";
1956
- import { build as unbuild } from "unbuild";
1957
1958
 
1958
1959
  // ../unbuild/src/clean.ts
1959
1960
  import { rm } from "node:fs/promises";
@@ -2159,6 +2160,11 @@ async function resolveOptions3(options) {
2159
2160
  dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
2160
2161
  dependencies.push(tsLibDependency);
2161
2162
  }
2163
+ const jiti = createJiti(config.workspaceRoot, {
2164
+ cache: true,
2165
+ fsCache: config.skipCache ? false : joinPaths(config.directories.cache || "node_modules/.cache/storm", "jiti"),
2166
+ interopDefault: true
2167
+ });
2162
2168
  const resolvedOptions = {
2163
2169
  name: projectName,
2164
2170
  config,
@@ -2166,6 +2172,7 @@ async function resolveOptions3(options) {
2166
2172
  sourceRoot,
2167
2173
  projectName,
2168
2174
  tsconfig,
2175
+ jiti,
2169
2176
  clean: false,
2170
2177
  entries: [
2171
2178
  {
@@ -2232,7 +2239,7 @@ async function resolveOptions3(options) {
2232
2239
  ]
2233
2240
  },
2234
2241
  esbuild: {
2235
- minify: !!options.minify,
2242
+ minify: options.minify !== false,
2236
2243
  splitting: options.splitting !== false,
2237
2244
  treeShaking: options.treeShaking !== false,
2238
2245
  color: true,
@@ -2292,11 +2299,24 @@ async function generatePackageJson3(options) {
2292
2299
  return options;
2293
2300
  }
2294
2301
  __name(generatePackageJson3, "generatePackageJson");
2302
+ async function resolveUnbuild(options) {
2303
+ writeTrace(`Resolving Unbuild package with Jiti`, options.config);
2304
+ try {
2305
+ return options.jiti.import("unbuild");
2306
+ } catch (error) {
2307
+ writeError(" \u274C An error occurred while resolving the Unbuild package", options.config);
2308
+ throw new Error("An error occurred while resolving the Unbuild package", {
2309
+ cause: error
2310
+ });
2311
+ }
2312
+ }
2313
+ __name(resolveUnbuild, "resolveUnbuild");
2295
2314
  async function executeUnbuild(options) {
2296
2315
  writeDebug(` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
2297
2316
  const stopwatch = getStopwatch(`${options.name} (${options.projectRoot}) build`);
2298
2317
  try {
2299
- await unbuild(options.projectRoot, false, {
2318
+ const unbuild = await resolveUnbuild(options);
2319
+ await unbuild.build(options.projectRoot, false, {
2300
2320
  ...options,
2301
2321
  rootDir: options.projectRoot
2302
2322
  });
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkMOTE7YBGjs = require('./chunk-MOTE7YBG.js');
3
+ var _chunkPCZI22PLjs = require('./chunk-PCZI22PL.js');
4
4
 
5
5
  // src/executors/apply/executor.ts
6
- var executor_default = _chunkMOTE7YBGjs.withTerraformExecutor.call(void 0, "apply");
6
+ var executor_default = _chunkPCZI22PLjs.withTerraformExecutor.call(void 0, "apply");
7
7
 
8
8
 
9
9
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-R4XW4ES7.mjs";
3
+ } from "./chunk-2G5G6H2X.mjs";
4
4
 
5
5
  // src/executors/plan/executor.ts
6
6
  var executor_default = withTerraformExecutor("plan");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-R4XW4ES7.mjs";
3
+ } from "./chunk-2G5G6H2X.mjs";
4
4
 
5
5
  // src/executors/destroy/executor.ts
6
6
  var executor_default = withTerraformExecutor("destroy");
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkNLQAVRJ6js = require('./chunk-NLQAVRJ6.js');
4
+ var _chunkZW3ZP7CVjs = require('./chunk-ZW3ZP7CV.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 _chunkNLQAVRJ6js.withRunExecutor.call(void 0, `Terraform \`${command}\` Command Executor`, async (options, context2, config) => {
12
+ return _chunkZW3ZP7CVjs.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
- _chunkNLQAVRJ6js.run.call(void 0, config, [
24
+ _chunkZW3ZP7CVjs.run.call(void 0, config, [
25
25
  "terragrunt",
26
26
  command,
27
27
  ...jsonBackendConfig.map((config2) => `-backend-config="${config2.key}=${config2.name}"`),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-R4XW4ES7.mjs";
3
+ } from "./chunk-2G5G6H2X.mjs";
4
4
 
5
5
  // src/executors/apply/executor.ts
6
6
  var executor_default = withTerraformExecutor("apply");