@storm-software/terraform-tools 0.54.69 → 0.54.71

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 CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  # Changelog for Storm Ops - Terraform Tools
4
4
 
5
+ ## [0.54.71](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.54.71) (2025-04-29)
6
+
7
+ ### Miscellaneous
8
+
9
+ - **monorepo:** Regenerate README markdown files
10
+ ([25750fcd9](https://github.com/storm-software/storm-ops/commit/25750fcd9))
11
+ - **monorepo:** Regenerate README markdown files
12
+ ([87d08a499](https://github.com/storm-software/storm-ops/commit/87d08a499))
13
+
14
+ ## [0.54.70](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.54.70) (2025-04-28)
15
+
16
+ ### Miscellaneous
17
+
18
+ - **eslint:** Disable markdown eslint rules by default
19
+ ([a84e36deb](https://github.com/storm-software/storm-ops/commit/a84e36deb))
20
+ - **monorepo:** Regenerate README markdown files
21
+ ([adffb8372](https://github.com/storm-software/storm-ops/commit/adffb8372))
22
+
5
23
  ## [0.54.69](https://github.com/storm-software/storm-ops/releases/tag/terraform-tools%400.54.69) (2025-04-28)
6
24
 
7
25
  ### 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.68-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.70-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,6 +1,6 @@
1
1
  import {
2
2
  __name
3
- } from "./chunk-N7GSKHH2.mjs";
3
+ } from "./chunk-NM2XRTN6.mjs";
4
4
 
5
5
  // ../config-tools/src/config-file/get-config-file.ts
6
6
  import { loadConfig } from "c12";
@@ -269,7 +269,6 @@ var DEFAULT_COMPILED_BANNER = `/*****************************************
269
269
  *****************************************/
270
270
  `;
271
271
  var DEFAULT_ENVIRONMENT = "production";
272
- var DEFAULT_TARGET = "esnext";
273
272
  var DEFAULT_ORGANIZATION = "storm-software";
274
273
 
275
274
  // ../build-tools/src/plugins/swc.ts
@@ -506,9 +505,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
506
505
  var DEFAULT_BUILD_OPTIONS = {
507
506
  assets: [],
508
507
  platform: "node",
509
- target: [
510
- "esnext"
511
- ],
508
+ target: "node22",
512
509
  format: "esm",
513
510
  tsconfig: "tsconfig.json",
514
511
  mode: "production",
@@ -520,6 +517,7 @@ var DEFAULT_BUILD_OPTIONS = {
520
517
  shims: false,
521
518
  watch: false,
522
519
  bundle: true,
520
+ distDir: "dist",
523
521
  loader: {
524
522
  ".aac": "file",
525
523
  ".css": "file",
@@ -664,22 +662,17 @@ async function resolveContext(userOptions) {
664
662
  throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
665
663
  }
666
664
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
667
- options.name ??= `${projectName}-${options.format}`;
668
- options.target ??= DEFAULT_TARGET;
669
665
  const packageJsonPath = _chunkFC5AL6FFjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
670
666
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
671
667
  throw new Error("Cannot find package.json configuration");
672
668
  }
673
669
  const env = getEnv("esbuild", options);
674
670
  const resolvedOptions = {
671
+ name: projectName,
675
672
  ...options,
676
673
  tsconfig: _chunkFC5AL6FFjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
677
- distDir: "dist",
678
- name: projectName,
679
674
  metafile: userOptions.mode === "development",
680
- ...userOptions,
681
675
  clean: false,
682
- target: userOptions.target || options.target,
683
676
  splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
684
677
  env,
685
678
  define: {
@@ -728,26 +721,79 @@ async function generatePackageJson(context) {
728
721
  if (context.options.entry) {
729
722
  packageJson.exports ??= {};
730
723
  packageJson.exports["./package.json"] ??= "./package.json";
731
- packageJson.exports["."] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js`;
732
724
  const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
733
- for (const entryPoint of entryPoints) {
734
- if (context.options.entry[entryPoint]) {
735
- const entry = context.options.entry[entryPoint].replaceAll("\\", "/").replaceAll(/^(\.\/)*/g, "").replace(/\.([cm])?[jt]s(x)?$/g, "");
736
- packageJson.exports[`./${entry}`] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entry}.js`;
725
+ if (entryPoints.length > 0) {
726
+ const defaultEntry = entryPoints.includes("index") ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entryPoints[0]}`;
727
+ const isEsm = Array.isArray(context.options.format) ? context.options.format.includes("esm") : context.options.format === "esm";
728
+ const isCjs = Array.isArray(context.options.format) ? context.options.format.includes("cjs") : context.options.format === "cjs";
729
+ const isDts = context.options.dts || context.options.experimentalDts;
730
+ packageJson.exports["."] ??= `${defaultEntry}.${isEsm ? "mjs" : isCjs ? "cjs" : "js"}`;
731
+ for (const entryPoint of entryPoints) {
732
+ packageJson.exports[`./${entryPoint}`] ??= {};
733
+ if (isEsm) {
734
+ if (isDts) {
735
+ packageJson.exports[`./${entryPoint}`].import = {
736
+ types: `./dist/${entryPoint}.d.mts`,
737
+ default: `./dist/${entryPoint}.mjs`
738
+ };
739
+ } else {
740
+ packageJson.exports[`./${entryPoint}`].import = `./dist/${entryPoint}.mjs`;
741
+ }
742
+ if (isDts) {
743
+ packageJson.exports[`./${entryPoint}`].default = {
744
+ types: `./dist/${entryPoint}.d.mts`,
745
+ default: `./dist/${entryPoint}.mjs`
746
+ };
747
+ } else {
748
+ packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.mjs`;
749
+ }
750
+ }
751
+ if (isCjs) {
752
+ if (isDts) {
753
+ packageJson.exports[`./${entryPoint}`].require = {
754
+ types: `./dist/${entryPoint}.d.cts`,
755
+ default: `./dist/${entryPoint}.cjs`
756
+ };
757
+ } else {
758
+ packageJson.exports[`./${entryPoint}`].require = `./dist/${entryPoint}.cjs`;
759
+ }
760
+ if (!isEsm) {
761
+ if (isDts) {
762
+ packageJson.exports[`./${entryPoint}`].default = {
763
+ types: `./dist/${entryPoint}.d.cts`,
764
+ default: `./dist/${entryPoint}.cjs`
765
+ };
766
+ } else {
767
+ packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.cjs`;
768
+ }
769
+ }
770
+ }
771
+ if (!isEsm && !isCjs) {
772
+ if (isDts) {
773
+ packageJson.exports[`./${entryPoint}`].default = {
774
+ types: `./dist/${entryPoint}.d.ts`,
775
+ default: `./dist/${entryPoint}.js`
776
+ };
777
+ } else {
778
+ packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.js`;
779
+ }
780
+ }
737
781
  }
738
- }
739
- if (context.options.format === "esm") {
740
- packageJson.module = packageJson.type === "module" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.mjs`;
741
- } else {
742
- packageJson.main = packageJson.type === "commonjs" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.cjs`;
743
- }
744
- packageJson.types = `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.d.ts`;
745
- packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
746
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
747
- ret[key.replace("/index", "")] = packageJson.exports[key];
782
+ if (isEsm) {
783
+ packageJson.module = `${defaultEntry}.mjs`;
784
+ } else {
785
+ packageJson.main = `${defaultEntry}.cjs`;
786
+ }
787
+ if (isDts) {
788
+ packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
748
789
  }
749
- return ret;
750
- }, packageJson.exports);
790
+ packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
791
+ if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
792
+ ret[key.replace("/index", "")] = packageJson.exports[key];
793
+ }
794
+ return ret;
795
+ }, packageJson.exports);
796
+ }
751
797
  }
752
798
  await _devkit.writeJsonFile.call(void 0, _chunkFC5AL6FFjs.joinPaths.call(void 0, context.outputPath, "package.json"), packageJson);
753
799
  stopwatch();
@@ -760,7 +806,7 @@ async function executeTsup(context) {
760
806
  const stopwatch = _chunkFC5AL6FFjs.getStopwatch.call(void 0, `${context.options.name} build`);
761
807
  await _tsup.build.call(void 0, {
762
808
  ...context.options,
763
- outDir: context.outputPath,
809
+ outDir: context.options.distDir ? _chunkFC5AL6FFjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
764
810
  workspaceConfig: context.workspaceConfig
765
811
  });
766
812
  stopwatch();
@@ -7,7 +7,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  throw Error('Dynamic require of "' + x + '" is not supported');
8
8
  });
9
9
 
10
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__aad0536395a8d4adbad069f47cf0551b/node_modules/tsup/assets/esm_shims.js
10
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/assets/esm_shims.js
11
11
  import { fileURLToPath } from "url";
12
12
  import path from "path";
13
13
  var getFilename = /* @__PURE__ */ __name(() => fileURLToPath(import.meta.url), "getFilename");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-GUH7JMSX.mjs";
3
+ } from "./chunk-UH5WSHEA.mjs";
4
4
 
5
5
  // src/executors/apply/executor.ts
6
6
  var executor_default = withTerraformExecutor("apply");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-GUH7JMSX.mjs";
3
+ } from "./chunk-UH5WSHEA.mjs";
4
4
 
5
5
  // src/executors/output/executor.ts
6
6
  var executor_default = withTerraformExecutor("output");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-GUH7JMSX.mjs";
3
+ } from "./chunk-UH5WSHEA.mjs";
4
4
 
5
5
  // src/executors/destroy/executor.ts
6
6
  var executor_default = withTerraformExecutor("destroy");
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "./chunk-RW373JXN.mjs";
3
+ } from "./chunk-ACQ7AUDY.mjs";
4
4
  import {
5
5
  __name
6
- } from "./chunk-N7GSKHH2.mjs";
6
+ } from "./chunk-NM2XRTN6.mjs";
7
7
 
8
8
  // ../config-tools/src/utilities/run.ts
9
9
  import { exec, execSync } from "node:child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-GUH7JMSX.mjs";
3
+ } from "./chunk-UH5WSHEA.mjs";
4
4
 
5
5
  // src/executors/plan/executor.ts
6
6
  var executor_default = withTerraformExecutor("plan");
@@ -15,12 +15,12 @@ import {
15
15
  writeSuccess,
16
16
  writeTrace,
17
17
  writeWarning
18
- } from "./chunk-RW373JXN.mjs";
18
+ } from "./chunk-ACQ7AUDY.mjs";
19
19
  import {
20
20
  __dirname,
21
21
  __name,
22
22
  __require
23
- } from "./chunk-N7GSKHH2.mjs";
23
+ } from "./chunk-NM2XRTN6.mjs";
24
24
 
25
25
  // src/generators/init/init.ts
26
26
  import { formatFiles as formatFiles9 } from "@nx/devkit";
@@ -270,7 +270,6 @@ var DEFAULT_COMPILED_BANNER = `/*****************************************
270
270
  *****************************************/
271
271
  `;
272
272
  var DEFAULT_ENVIRONMENT = "production";
273
- var DEFAULT_TARGET = "esnext";
274
273
  var DEFAULT_ORGANIZATION = "storm-software";
275
274
 
276
275
  // ../build-tools/src/plugins/swc.ts
@@ -507,9 +506,7 @@ __name(cleanDirectories, "cleanDirectories");
507
506
  var DEFAULT_BUILD_OPTIONS = {
508
507
  assets: [],
509
508
  platform: "node",
510
- target: [
511
- "esnext"
512
- ],
509
+ target: "node22",
513
510
  format: "esm",
514
511
  tsconfig: "tsconfig.json",
515
512
  mode: "production",
@@ -521,6 +518,7 @@ var DEFAULT_BUILD_OPTIONS = {
521
518
  shims: false,
522
519
  watch: false,
523
520
  bundle: true,
521
+ distDir: "dist",
524
522
  loader: {
525
523
  ".aac": "file",
526
524
  ".css": "file",
@@ -665,22 +663,17 @@ async function resolveContext(userOptions) {
665
663
  throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
666
664
  }
667
665
  const options = defu(userOptions, DEFAULT_BUILD_OPTIONS);
668
- options.name ??= `${projectName}-${options.format}`;
669
- options.target ??= DEFAULT_TARGET;
670
666
  const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
671
667
  if (!existsSync3(packageJsonPath)) {
672
668
  throw new Error("Cannot find package.json configuration");
673
669
  }
674
670
  const env = getEnv("esbuild", options);
675
671
  const resolvedOptions = {
672
+ name: projectName,
676
673
  ...options,
677
674
  tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
678
- distDir: "dist",
679
- name: projectName,
680
675
  metafile: userOptions.mode === "development",
681
- ...userOptions,
682
676
  clean: false,
683
- target: userOptions.target || options.target,
684
677
  splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
685
678
  env,
686
679
  define: {
@@ -729,26 +722,79 @@ async function generatePackageJson(context) {
729
722
  if (context.options.entry) {
730
723
  packageJson.exports ??= {};
731
724
  packageJson.exports["./package.json"] ??= "./package.json";
732
- packageJson.exports["."] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js`;
733
725
  const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
734
- for (const entryPoint of entryPoints) {
735
- if (context.options.entry[entryPoint]) {
736
- const entry = context.options.entry[entryPoint].replaceAll("\\", "/").replaceAll(/^(\.\/)*/g, "").replace(/\.([cm])?[jt]s(x)?$/g, "");
737
- packageJson.exports[`./${entry}`] ??= `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entry}.js`;
726
+ if (entryPoints.length > 0) {
727
+ const defaultEntry = entryPoints.includes("index") ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entryPoints[0]}`;
728
+ const isEsm = Array.isArray(context.options.format) ? context.options.format.includes("esm") : context.options.format === "esm";
729
+ const isCjs = Array.isArray(context.options.format) ? context.options.format.includes("cjs") : context.options.format === "cjs";
730
+ const isDts = context.options.dts || context.options.experimentalDts;
731
+ packageJson.exports["."] ??= `${defaultEntry}.${isEsm ? "mjs" : isCjs ? "cjs" : "js"}`;
732
+ for (const entryPoint of entryPoints) {
733
+ packageJson.exports[`./${entryPoint}`] ??= {};
734
+ if (isEsm) {
735
+ if (isDts) {
736
+ packageJson.exports[`./${entryPoint}`].import = {
737
+ types: `./dist/${entryPoint}.d.mts`,
738
+ default: `./dist/${entryPoint}.mjs`
739
+ };
740
+ } else {
741
+ packageJson.exports[`./${entryPoint}`].import = `./dist/${entryPoint}.mjs`;
742
+ }
743
+ if (isDts) {
744
+ packageJson.exports[`./${entryPoint}`].default = {
745
+ types: `./dist/${entryPoint}.d.mts`,
746
+ default: `./dist/${entryPoint}.mjs`
747
+ };
748
+ } else {
749
+ packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.mjs`;
750
+ }
751
+ }
752
+ if (isCjs) {
753
+ if (isDts) {
754
+ packageJson.exports[`./${entryPoint}`].require = {
755
+ types: `./dist/${entryPoint}.d.cts`,
756
+ default: `./dist/${entryPoint}.cjs`
757
+ };
758
+ } else {
759
+ packageJson.exports[`./${entryPoint}`].require = `./dist/${entryPoint}.cjs`;
760
+ }
761
+ if (!isEsm) {
762
+ if (isDts) {
763
+ packageJson.exports[`./${entryPoint}`].default = {
764
+ types: `./dist/${entryPoint}.d.cts`,
765
+ default: `./dist/${entryPoint}.cjs`
766
+ };
767
+ } else {
768
+ packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.cjs`;
769
+ }
770
+ }
771
+ }
772
+ if (!isEsm && !isCjs) {
773
+ if (isDts) {
774
+ packageJson.exports[`./${entryPoint}`].default = {
775
+ types: `./dist/${entryPoint}.d.ts`,
776
+ default: `./dist/${entryPoint}.js`
777
+ };
778
+ } else {
779
+ packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.js`;
780
+ }
781
+ }
738
782
  }
739
- }
740
- if (context.options.format === "esm") {
741
- packageJson.module = packageJson.type === "module" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.mjs`;
742
- } else {
743
- packageJson.main = packageJson.type === "commonjs" ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.js` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.cjs`;
744
- }
745
- packageJson.types = `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index.d.ts`;
746
- packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
747
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
748
- ret[key.replace("/index", "")] = packageJson.exports[key];
783
+ if (isEsm) {
784
+ packageJson.module = `${defaultEntry}.mjs`;
785
+ } else {
786
+ packageJson.main = `${defaultEntry}.cjs`;
787
+ }
788
+ if (isDts) {
789
+ packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
749
790
  }
750
- return ret;
751
- }, packageJson.exports);
791
+ packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
792
+ if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
793
+ ret[key.replace("/index", "")] = packageJson.exports[key];
794
+ }
795
+ return ret;
796
+ }, packageJson.exports);
797
+ }
752
798
  }
753
799
  await writeJsonFile(joinPaths(context.outputPath, "package.json"), packageJson);
754
800
  stopwatch();
@@ -761,7 +807,7 @@ async function executeTsup(context) {
761
807
  const stopwatch = getStopwatch(`${context.options.name} build`);
762
808
  await tsup({
763
809
  ...context.options,
764
- outDir: context.outputPath,
810
+ outDir: context.options.distDir ? joinPaths(context.outputPath, context.options.distDir) : context.outputPath,
765
811
  workspaceConfig: context.workspaceConfig
766
812
  });
767
813
  stopwatch();
@@ -1,8 +1,8 @@
1
1
  import "./chunk-HYHKZPRR.mjs";
2
- import "./chunk-HIHHRCT4.mjs";
3
- import "./chunk-DYXYEK43.mjs";
4
- import "./chunk-S53JCUPE.mjs";
5
- import "./chunk-4SYDCN3A.mjs";
6
- import "./chunk-GUH7JMSX.mjs";
7
- import "./chunk-RW373JXN.mjs";
8
- import "./chunk-N7GSKHH2.mjs";
2
+ import "./chunk-QBGJTJNT.mjs";
3
+ import "./chunk-O7OJZ72R.mjs";
4
+ import "./chunk-X7DJ4DVD.mjs";
5
+ import "./chunk-NXSCFV7N.mjs";
6
+ import "./chunk-UH5WSHEA.mjs";
7
+ import "./chunk-ACQ7AUDY.mjs";
8
+ import "./chunk-NM2XRTN6.mjs";
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-N2YKXZ5R.js');
2
2
 
3
3
 
4
- var _chunkIYHG32N4js = require('./chunk-IYHG32N4.js');
4
+ var _chunkIR3INUF5js = require('./chunk-IR3INUF5.js');
5
5
  require('./chunk-FC5AL6FF.js');
6
6
  require('./chunk-3GQAWCBQ.js');
7
7
 
8
8
 
9
- exports.initGenerator = _chunkIYHG32N4js.initGenerator;
9
+ exports.initGenerator = _chunkIR3INUF5js.initGenerator;
@@ -1,9 +1,9 @@
1
1
  import "./chunk-23KFTIT2.mjs";
2
2
  import {
3
3
  initGenerator
4
- } from "./chunk-UUJGGHQC.mjs";
5
- import "./chunk-RW373JXN.mjs";
6
- import "./chunk-N7GSKHH2.mjs";
4
+ } from "./chunk-XQSTQE3H.mjs";
5
+ import "./chunk-ACQ7AUDY.mjs";
6
+ import "./chunk-NM2XRTN6.mjs";
7
7
  export {
8
8
  initGenerator
9
9
  };
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ require('./chunk-ESAA5DIO.js');
5
5
  require('./chunk-N2YKXZ5R.js');
6
6
 
7
7
 
8
- var _chunkIYHG32N4js = require('./chunk-IYHG32N4.js');
8
+ var _chunkIR3INUF5js = require('./chunk-IR3INUF5.js');
9
9
  require('./chunk-GUQOEBFW.js');
10
10
 
11
11
 
@@ -20,4 +20,4 @@ require('./chunk-3GQAWCBQ.js');
20
20
 
21
21
 
22
22
 
23
- exports.baseTerraformExecutorSchema = _chunkILC773N2js.base_terraform_executor_untyped_default; exports.initGenerator = _chunkIYHG32N4js.initGenerator; exports.withTerraformExecutor = _chunkZAMME4JXjs.withTerraformExecutor;
23
+ exports.baseTerraformExecutorSchema = _chunkILC773N2js.base_terraform_executor_untyped_default; exports.initGenerator = _chunkIR3INUF5js.initGenerator; exports.withTerraformExecutor = _chunkZAMME4JXjs.withTerraformExecutor;
package/dist/index.mjs CHANGED
@@ -1,21 +1,21 @@
1
1
  import "./chunk-HYHKZPRR.mjs";
2
- import "./chunk-HIHHRCT4.mjs";
3
- import "./chunk-DYXYEK43.mjs";
4
- import "./chunk-S53JCUPE.mjs";
2
+ import "./chunk-QBGJTJNT.mjs";
3
+ import "./chunk-O7OJZ72R.mjs";
4
+ import "./chunk-X7DJ4DVD.mjs";
5
5
  import "./chunk-23KFTIT2.mjs";
6
6
  import {
7
7
  initGenerator
8
- } from "./chunk-UUJGGHQC.mjs";
8
+ } from "./chunk-XQSTQE3H.mjs";
9
9
  import "./chunk-CA7S5MOH.mjs";
10
10
  import {
11
11
  base_terraform_executor_untyped_default
12
12
  } from "./chunk-EL25IDXP.mjs";
13
- import "./chunk-4SYDCN3A.mjs";
13
+ import "./chunk-NXSCFV7N.mjs";
14
14
  import {
15
15
  withTerraformExecutor
16
- } from "./chunk-GUH7JMSX.mjs";
17
- import "./chunk-RW373JXN.mjs";
18
- import "./chunk-N7GSKHH2.mjs";
16
+ } from "./chunk-UH5WSHEA.mjs";
17
+ import "./chunk-ACQ7AUDY.mjs";
18
+ import "./chunk-NM2XRTN6.mjs";
19
19
  export {
20
20
  base_terraform_executor_untyped_default as baseTerraformExecutorSchema,
21
21
  initGenerator,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  base_terraform_executor_untyped_default
3
3
  } from "../../chunk-EL25IDXP.mjs";
4
- import "../../chunk-N7GSKHH2.mjs";
4
+ import "../../chunk-NM2XRTN6.mjs";
5
5
  export {
6
6
  base_terraform_executor_untyped_default as default
7
7
  };
@@ -4,9 +4,9 @@ import {
4
4
  } from "../../chunk-EL25IDXP.mjs";
5
5
  import {
6
6
  withTerraformExecutor
7
- } from "../../chunk-GUH7JMSX.mjs";
8
- import "../../chunk-RW373JXN.mjs";
9
- import "../../chunk-N7GSKHH2.mjs";
7
+ } from "../../chunk-UH5WSHEA.mjs";
8
+ import "../../chunk-ACQ7AUDY.mjs";
9
+ import "../../chunk-NM2XRTN6.mjs";
10
10
  export {
11
11
  base_terraform_executor_untyped_default as baseTerraformExecutorSchema,
12
12
  withTerraformExecutor
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "../../chunk-GUH7JMSX.mjs";
4
- import "../../chunk-RW373JXN.mjs";
5
- import "../../chunk-N7GSKHH2.mjs";
3
+ } from "../../chunk-UH5WSHEA.mjs";
4
+ import "../../chunk-ACQ7AUDY.mjs";
5
+ import "../../chunk-NM2XRTN6.mjs";
6
6
  export {
7
7
  withTerraformExecutor
8
8
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  executor_default
3
- } from "../../../chunk-4SYDCN3A.mjs";
4
- import "../../../chunk-GUH7JMSX.mjs";
5
- import "../../../chunk-RW373JXN.mjs";
6
- import "../../../chunk-N7GSKHH2.mjs";
3
+ } from "../../../chunk-NXSCFV7N.mjs";
4
+ import "../../../chunk-UH5WSHEA.mjs";
5
+ import "../../../chunk-ACQ7AUDY.mjs";
6
+ import "../../../chunk-NM2XRTN6.mjs";
7
7
  export {
8
8
  executor_default as default
9
9
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  executor_default
3
- } from "../../../chunk-HIHHRCT4.mjs";
4
- import "../../../chunk-GUH7JMSX.mjs";
5
- import "../../../chunk-RW373JXN.mjs";
6
- import "../../../chunk-N7GSKHH2.mjs";
3
+ } from "../../../chunk-QBGJTJNT.mjs";
4
+ import "../../../chunk-UH5WSHEA.mjs";
5
+ import "../../../chunk-ACQ7AUDY.mjs";
6
+ import "../../../chunk-NM2XRTN6.mjs";
7
7
  export {
8
8
  executor_default as default
9
9
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  executor_default
3
- } from "../../../chunk-DYXYEK43.mjs";
4
- import "../../../chunk-GUH7JMSX.mjs";
5
- import "../../../chunk-RW373JXN.mjs";
6
- import "../../../chunk-N7GSKHH2.mjs";
3
+ } from "../../../chunk-O7OJZ72R.mjs";
4
+ import "../../../chunk-UH5WSHEA.mjs";
5
+ import "../../../chunk-ACQ7AUDY.mjs";
6
+ import "../../../chunk-NM2XRTN6.mjs";
7
7
  export {
8
8
  executor_default as default
9
9
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  executor_default
3
- } from "../../../chunk-S53JCUPE.mjs";
4
- import "../../../chunk-GUH7JMSX.mjs";
5
- import "../../../chunk-RW373JXN.mjs";
6
- import "../../../chunk-N7GSKHH2.mjs";
3
+ } from "../../../chunk-X7DJ4DVD.mjs";
4
+ import "../../../chunk-UH5WSHEA.mjs";
5
+ import "../../../chunk-ACQ7AUDY.mjs";
6
+ import "../../../chunk-NM2XRTN6.mjs";
7
7
  export {
8
8
  executor_default as default
9
9
  };
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkIYHG32N4js = require('../../../chunk-IYHG32N4.js');
4
+ var _chunkIR3INUF5js = require('../../../chunk-IR3INUF5.js');
5
5
  require('../../../chunk-FC5AL6FF.js');
6
6
  require('../../../chunk-3GQAWCBQ.js');
7
7
 
8
8
 
9
9
 
10
- exports.default = _chunkIYHG32N4js.init_default; exports.initGenerator = _chunkIYHG32N4js.initGenerator;
10
+ exports.default = _chunkIR3INUF5js.init_default; exports.initGenerator = _chunkIR3INUF5js.initGenerator;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  initGenerator,
3
3
  init_default
4
- } from "../../../chunk-UUJGGHQC.mjs";
5
- import "../../../chunk-RW373JXN.mjs";
6
- import "../../../chunk-N7GSKHH2.mjs";
4
+ } from "../../../chunk-XQSTQE3H.mjs";
5
+ import "../../../chunk-ACQ7AUDY.mjs";
6
+ import "../../../chunk-NM2XRTN6.mjs";
7
7
  export {
8
8
  init_default as default,
9
9
  initGenerator
@@ -1,4 +1,4 @@
1
- import "./chunk-N7GSKHH2.mjs";
1
+ import "./chunk-NM2XRTN6.mjs";
2
2
 
3
3
  // tsup.config.ts
4
4
  import { defineConfig } from "tsup";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/terraform-tools",
3
- "version": "0.54.69",
3
+ "version": "0.54.71",
4
4
  "description": "Tools for managing Terraform infrastructure within a Nx workspace.",
5
5
  "repository": {
6
6
  "type": "github",