@storm-software/terraform-tools 0.53.0 → 0.53.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-NMB6NAZ4.mjs → chunk-42WVFPO6.mjs} +17 -17
  4. package/dist/{chunk-CJ2BQVRU.js → chunk-6D4LV6X2.js} +3 -3
  5. package/dist/{chunk-XEE74WQC.mjs → chunk-D6CRGFE3.mjs} +1 -1
  6. package/dist/{chunk-G32UYXGQ.mjs → chunk-EMIZUK4F.mjs} +1 -1
  7. package/dist/{chunk-FULLEJHI.js → chunk-FLEOXRFA.js} +2 -2
  8. package/dist/{chunk-B6ANLUY3.js → chunk-GEMICIUF.js} +2 -2
  9. package/dist/{chunk-D2YGB72L.mjs → chunk-IMGISWCA.mjs} +1 -1
  10. package/dist/{chunk-EFLSH2FU.js → chunk-JEBWKJI3.js} +2 -2
  11. package/dist/{chunk-3O6YOFSC.mjs → chunk-KBT4UFBN.mjs} +1 -1
  12. package/dist/{chunk-YT7RFZEY.js → chunk-MJMNVCOX.js} +2 -2
  13. package/dist/{chunk-BW5TMV3C.js → chunk-TQAFH5OJ.js} +33 -33
  14. package/dist/{chunk-QTJWW3IT.mjs → chunk-TX2U6RJQ.mjs} +17 -15
  15. package/dist/{chunk-3HOUHXFA.js → chunk-ZBKQBMHX.js} +180 -178
  16. package/dist/{chunk-E6E5A5MU.mjs → chunk-ZTLSR2U3.mjs} +1 -1
  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 +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## 0.53.2 (2025-01-22)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **build-tools:** Resolved issue with copying asset files into output directory ([1b314e8e](https://github.com/storm-software/storm-ops/commit/1b314e8e))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated workspace-tools to 1.239.4
10
+ - Updated workspace-tools to 1.239.4
11
+
12
+ ## 0.53.1 (2025-01-22)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **config-tools:** Resolved issue applying entire token parameters object ([5ccf3881](https://github.com/storm-software/storm-ops/commit/5ccf3881))
17
+
18
+ ### 🧱 Updated Dependencies
19
+
20
+ - Updated workspace-tools to 1.239.2
21
+ - Updated workspace-tools to 1.239.2
22
+
1
23
  ## 0.53.0 (2025-01-22)
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.52.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)
24
+ [![Version](https://img.shields.io/badge/version-0.53.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 -->
@@ -607,51 +607,51 @@ var _isFunction = /* @__PURE__ */ __name((value) => {
607
607
  }, "_isFunction");
608
608
 
609
609
  // ../config-tools/src/utilities/apply-workspace-tokens.ts
610
- var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenizerOptions) => {
610
+ var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams) => {
611
611
  let result = option;
612
612
  if (!result) {
613
613
  return result;
614
614
  }
615
- if (tokenizerOptions) {
616
- const optionKeys = Object.keys(tokenizerOptions);
615
+ if (tokenParams) {
616
+ const optionKeys = Object.keys(tokenParams);
617
617
  if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
618
618
  for (const optionKey of optionKeys) {
619
619
  if (result.includes(`{${optionKey}}`)) {
620
- result = result.replaceAll(`{${optionKey}}`, tokenizerOptions.config?.[optionKey] ?? "");
620
+ result = result.replaceAll(`{${optionKey}}`, tokenParams?.[optionKey] || "");
621
621
  }
622
622
  }
623
623
  }
624
624
  }
625
- if (tokenizerOptions.config) {
626
- const configKeys = Object.keys(tokenizerOptions.config);
625
+ if (tokenParams.config) {
626
+ const configKeys = Object.keys(tokenParams.config);
627
627
  if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
628
628
  for (const configKey of configKeys) {
629
629
  if (result.includes(`{${configKey}}`)) {
630
- result = result.replaceAll(`{${configKey}}`, tokenizerOptions.config[configKey]);
630
+ result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
631
631
  }
632
632
  }
633
633
  }
634
634
  }
635
635
  if (result.includes("{workspaceRoot}")) {
636
- result = result.replaceAll("{workspaceRoot}", tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot());
636
+ result = result.replaceAll("{workspaceRoot}", tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot());
637
637
  }
638
638
  return result;
639
639
  }, "applyWorkspaceBaseTokens");
640
- var applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option, tokenizerOptions) => {
641
- return applyWorkspaceBaseTokens(option, tokenizerOptions);
640
+ var applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option, tokenParams) => {
641
+ return applyWorkspaceBaseTokens(option, tokenParams);
642
642
  }, "applyWorkspaceProjectTokens");
643
- var applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, config, tokenizerFn) => {
643
+ var applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, tokenParams, tokenizerFn) => {
644
644
  if (!options) {
645
645
  return {};
646
646
  }
647
647
  const result = {};
648
648
  for (const option of Object.keys(options)) {
649
649
  if (typeof options[option] === "string") {
650
- result[option] = await Promise.resolve(tokenizerFn(options[option], config));
650
+ result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
651
651
  } else if (Array.isArray(options[option])) {
652
- result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item));
652
+ result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
653
653
  } else if (typeof options[option] === "object") {
654
- result[option] = await applyWorkspaceTokens(options[option], config, tokenizerFn);
654
+ result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
655
655
  } else {
656
656
  result[option] = options[option];
657
657
  }
@@ -1146,8 +1146,8 @@ var withRunExecutor = /* @__PURE__ */ __name((name, executorFn, executorOptions
1146
1146
  }
1147
1147
  const workspaceRoot = findWorkspaceRoot();
1148
1148
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot;
1149
- const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || workspaceRoot;
1150
- const projectName = context.projectsConfigurations.projects[context.projectName].name || context.projectName;
1149
+ const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot;
1150
+ const projectName = context.projectName;
1151
1151
  config.workspaceRoot = workspaceRoot;
1152
1152
  writeInfo(`
1153
1153
  \u26A1 Running the ${name} executor for ${projectName}
@@ -1175,7 +1175,7 @@ ${formatLogMessage(options)}
1175
1175
  sourceRoot,
1176
1176
  projectName,
1177
1177
  config
1178
- }, executorOptions, context.projectsConfigurations.projects[context.projectName], config), applyWorkspaceProjectTokens);
1178
+ }, config, context.projectsConfigurations.projects[context.projectName]), applyWorkspaceProjectTokens);
1179
1179
  writeTrace(`Executor schema tokenized options \u2699\uFE0F
1180
1180
  ${formatLogMessage(tokenized)}
1181
1181
  `, config);
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkBW5TMV3Cjs = require('./chunk-BW5TMV3C.js');
4
+ var _chunkTQAFH5OJjs = require('./chunk-TQAFH5OJ.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 _chunkBW5TMV3Cjs.withRunExecutor.call(void 0, `Terraform \`${command}\` Command Executor`, async (options, context2, config) => {
12
+ return _chunkTQAFH5OJjs.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
- _chunkBW5TMV3Cjs.run.call(void 0, config, [
24
+ _chunkTQAFH5OJjs.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-G32UYXGQ.mjs";
3
+ } from "./chunk-EMIZUK4F.mjs";
4
4
 
5
5
  // src/executors/output/executor.ts
6
6
  var executor_default = withTerraformExecutor("output");
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  run,
3
3
  withRunExecutor
4
- } from "./chunk-NMB6NAZ4.mjs";
4
+ } from "./chunk-42WVFPO6.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 _chunkCJ2BQVRUjs = require('./chunk-CJ2BQVRU.js');
3
+ var _chunk6D4LV6X2js = require('./chunk-6D4LV6X2.js');
4
4
 
5
5
  // src/executors/apply/executor.ts
6
- var executor_default = _chunkCJ2BQVRUjs.withTerraformExecutor.call(void 0, "apply");
6
+ var executor_default = _chunk6D4LV6X2js.withTerraformExecutor.call(void 0, "apply");
7
7
 
8
8
 
9
9
 
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkCJ2BQVRUjs = require('./chunk-CJ2BQVRU.js');
3
+ var _chunk6D4LV6X2js = require('./chunk-6D4LV6X2.js');
4
4
 
5
5
  // src/executors/destroy/executor.ts
6
- var executor_default = _chunkCJ2BQVRUjs.withTerraformExecutor.call(void 0, "destroy");
6
+ var executor_default = _chunk6D4LV6X2js.withTerraformExecutor.call(void 0, "destroy");
7
7
 
8
8
 
9
9
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-G32UYXGQ.mjs";
3
+ } from "./chunk-EMIZUK4F.mjs";
4
4
 
5
5
  // src/executors/apply/executor.ts
6
6
  var executor_default = withTerraformExecutor("apply");
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkCJ2BQVRUjs = require('./chunk-CJ2BQVRU.js');
3
+ var _chunk6D4LV6X2js = require('./chunk-6D4LV6X2.js');
4
4
 
5
5
  // src/executors/output/executor.ts
6
- var executor_default = _chunkCJ2BQVRUjs.withTerraformExecutor.call(void 0, "output");
6
+ var executor_default = _chunk6D4LV6X2js.withTerraformExecutor.call(void 0, "output");
7
7
 
8
8
 
9
9
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTerraformExecutor
3
- } from "./chunk-G32UYXGQ.mjs";
3
+ } from "./chunk-EMIZUK4F.mjs";
4
4
 
5
5
  // src/executors/destroy/executor.ts
6
6
  var executor_default = withTerraformExecutor("destroy");
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkCJ2BQVRUjs = require('./chunk-CJ2BQVRU.js');
3
+ var _chunk6D4LV6X2js = require('./chunk-6D4LV6X2.js');
4
4
 
5
5
  // src/executors/plan/executor.ts
6
- var executor_default = _chunkCJ2BQVRUjs.withTerraformExecutor.call(void 0, "plan");
6
+ var executor_default = _chunk6D4LV6X2js.withTerraformExecutor.call(void 0, "plan");
7
7
 
8
8
 
9
9
 
@@ -607,51 +607,51 @@ var _isFunction = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (value) =
607
607
  }, "_isFunction");
608
608
 
609
609
  // ../config-tools/src/utilities/apply-workspace-tokens.ts
610
- var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (option, tokenizerOptions) => {
610
+ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (option, tokenParams) => {
611
611
  let result = option;
612
612
  if (!result) {
613
613
  return result;
614
614
  }
615
- if (tokenizerOptions) {
616
- const optionKeys = Object.keys(tokenizerOptions);
615
+ if (tokenParams) {
616
+ const optionKeys = Object.keys(tokenParams);
617
617
  if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
618
618
  for (const optionKey of optionKeys) {
619
619
  if (result.includes(`{${optionKey}}`)) {
620
- result = result.replaceAll(`{${optionKey}}`, _nullishCoalesce(_optionalChain([tokenizerOptions, 'access', _30 => _30.config, 'optionalAccess', _31 => _31[optionKey]]), () => ( "")));
620
+ result = result.replaceAll(`{${optionKey}}`, _optionalChain([tokenParams, 'optionalAccess', _30 => _30[optionKey]]) || "");
621
621
  }
622
622
  }
623
623
  }
624
624
  }
625
- if (tokenizerOptions.config) {
626
- const configKeys = Object.keys(tokenizerOptions.config);
625
+ if (tokenParams.config) {
626
+ const configKeys = Object.keys(tokenParams.config);
627
627
  if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
628
628
  for (const configKey of configKeys) {
629
629
  if (result.includes(`{${configKey}}`)) {
630
- result = result.replaceAll(`{${configKey}}`, tokenizerOptions.config[configKey]);
630
+ result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
631
631
  }
632
632
  }
633
633
  }
634
634
  }
635
635
  if (result.includes("{workspaceRoot}")) {
636
- result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenizerOptions.workspaceRoot, () => ( _optionalChain([tokenizerOptions, 'access', _32 => _32.config, 'optionalAccess', _33 => _33.workspaceRoot]))), () => ( findWorkspaceRoot())));
636
+ result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _31 => _31.config, 'optionalAccess', _32 => _32.workspaceRoot]))), () => ( findWorkspaceRoot())));
637
637
  }
638
638
  return result;
639
639
  }, "applyWorkspaceBaseTokens");
640
- var applyWorkspaceProjectTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option, tokenizerOptions) => {
641
- return applyWorkspaceBaseTokens(option, tokenizerOptions);
640
+ var applyWorkspaceProjectTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option, tokenParams) => {
641
+ return applyWorkspaceBaseTokens(option, tokenParams);
642
642
  }, "applyWorkspaceProjectTokens");
643
- var applyWorkspaceTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config, tokenizerFn) => {
643
+ var applyWorkspaceTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, tokenParams, tokenizerFn) => {
644
644
  if (!options) {
645
645
  return {};
646
646
  }
647
647
  const result = {};
648
648
  for (const option of Object.keys(options)) {
649
649
  if (typeof options[option] === "string") {
650
- result[option] = await Promise.resolve(tokenizerFn(options[option], config));
650
+ result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
651
651
  } else if (Array.isArray(options[option])) {
652
- result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item));
652
+ result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
653
653
  } else if (typeof options[option] === "object") {
654
- result[option] = await applyWorkspaceTokens(options[option], config, tokenizerFn);
654
+ result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
655
655
  } else {
656
656
  result[option] = options[option];
657
657
  }
@@ -666,7 +666,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, a
666
666
  cwd: workspacePath,
667
667
  packageJson: true,
668
668
  name: fileName,
669
- envName: _optionalChain([fileName, 'optionalAccess', _34 => _34.toUpperCase, 'call', _35 => _35()]),
669
+ envName: _optionalChain([fileName, 'optionalAccess', _33 => _33.toUpperCase, 'call', _34 => _34()]),
670
670
  jitiOptions: {
671
671
  debug: false,
672
672
  fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
@@ -678,7 +678,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, a
678
678
  cwd: workspacePath,
679
679
  packageJson: true,
680
680
  name: fileName,
681
- envName: _optionalChain([fileName, 'optionalAccess', _36 => _36.toUpperCase, 'call', _37 => _37()]),
681
+ envName: _optionalChain([fileName, 'optionalAccess', _35 => _35.toUpperCase, 'call', _36 => _36()]),
682
682
  jitiOptions: {
683
683
  debug: false,
684
684
  fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
@@ -702,7 +702,7 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
702
702
  if (additionalFileNames && additionalFileNames.length > 0) {
703
703
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
704
704
  for (const result2 of results) {
705
- if (_optionalChain([result2, 'optionalAccess', _38 => _38.config]) && _optionalChain([result2, 'optionalAccess', _39 => _39.configFile]) && Object.keys(result2.config).length > 0) {
705
+ if (_optionalChain([result2, 'optionalAccess', _37 => _37.config]) && _optionalChain([result2, 'optionalAccess', _38 => _38.configFile]) && Object.keys(result2.config).length > 0) {
706
706
  writeSystem(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
707
707
  logLevel: "all"
708
708
  });
@@ -861,13 +861,13 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
861
861
  var setExtensionEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (extensionName, extension) => {
862
862
  for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
863
863
  if (extension[key]) {
864
- const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _40 => _40.replace, 'call', _41 => _41(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _42 => _42[0], 'optionalAccess', _43 => _43.toUpperCase, 'call', _44 => _44()]) + input.slice(1) : ""), 'access', _45 => _45.split, 'call', _46 => _46(/(?=[A-Z])|[.\-\s_]/), 'access', _47 => _47.map, 'call', _48 => _48((x) => x.toLowerCase())]), () => ( []));
864
+ const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _39 => _39.replace, 'call', _40 => _40(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _41 => _41[0], 'optionalAccess', _42 => _42.toUpperCase, 'call', _43 => _43()]) + input.slice(1) : ""), 'access', _44 => _44.split, 'call', _45 => _45(/(?=[A-Z])|[.\-\s_]/), 'access', _46 => _46.map, 'call', _47 => _47((x) => x.toLowerCase())]), () => ( []));
865
865
  let extensionKey;
866
866
  if (result.length === 0) {
867
867
  return;
868
868
  }
869
869
  if (result.length === 1) {
870
- extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _49 => _49[0], 'optionalAccess', _50 => _50.toUpperCase, 'call', _51 => _51()]), () => ( ""));
870
+ extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _48 => _48[0], 'optionalAccess', _49 => _49.toUpperCase, 'call', _50 => _50()]), () => ( ""));
871
871
  } else {
872
872
  extensionKey = result.reduce((ret, part) => {
873
873
  return `${ret}_${part.toLowerCase()}`;
@@ -964,7 +964,7 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
964
964
  process.env.NODE_ENV = config.env;
965
965
  process.env.ENVIRONMENT = config.env;
966
966
  }
967
- if (_optionalChain([config, 'access', _52 => _52.colors, 'optionalAccess', _53 => _53.base, 'optionalAccess', _54 => _54.light]) || _optionalChain([config, 'access', _55 => _55.colors, 'optionalAccess', _56 => _56.base, 'optionalAccess', _57 => _57.dark])) {
967
+ if (_optionalChain([config, 'access', _51 => _51.colors, 'optionalAccess', _52 => _52.base, 'optionalAccess', _53 => _53.light]) || _optionalChain([config, 'access', _54 => _54.colors, 'optionalAccess', _55 => _55.base, 'optionalAccess', _56 => _56.dark])) {
968
968
  for (const key of Object.keys(config.colors)) {
969
969
  setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
970
970
  }
@@ -1012,7 +1012,7 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
1012
1012
  }
1013
1013
  }, "setConfigEnv");
1014
1014
  var setThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (prefix, config) => {
1015
- return _optionalChain([config, 'optionalAccess', _58 => _58.light, 'optionalAccess', _59 => _59.brand]) || _optionalChain([config, 'optionalAccess', _60 => _60.dark, 'optionalAccess', _61 => _61.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
1015
+ return _optionalChain([config, 'optionalAccess', _57 => _57.light, 'optionalAccess', _58 => _58.brand]) || _optionalChain([config, 'optionalAccess', _59 => _59.dark, 'optionalAccess', _60 => _60.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
1016
1016
  }, "setThemeColorConfigEnv");
1017
1017
  var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (prefix, config) => {
1018
1018
  if (config.dark) {
@@ -1113,7 +1113,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
1113
1113
  var _static_cache = void 0;
1114
1114
  var loadStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot) => {
1115
1115
  let config = {};
1116
- if (_optionalChain([_static_cache, 'optionalAccess', _62 => _62.data]) && _optionalChain([_static_cache, 'optionalAccess', _63 => _63.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
1116
+ if (_optionalChain([_static_cache, 'optionalAccess', _61 => _61.data]) && _optionalChain([_static_cache, 'optionalAccess', _62 => _62.timestamp]) && _static_cache.timestamp >= Date.now() + 3e4) {
1117
1117
  writeTrace(`Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
1118
1118
  return _static_cache.data;
1119
1119
  }
@@ -1141,13 +1141,13 @@ var withRunExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name
1141
1141
  let options = _options;
1142
1142
  let config = {};
1143
1143
  try {
1144
- if (!_optionalChain([context, 'access', _64 => _64.projectsConfigurations, 'optionalAccess', _65 => _65.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
1144
+ if (!_optionalChain([context, 'access', _63 => _63.projectsConfigurations, 'optionalAccess', _64 => _64.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
1145
1145
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1146
1146
  }
1147
1147
  const workspaceRoot = findWorkspaceRoot();
1148
1148
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot;
1149
- const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || workspaceRoot;
1150
- const projectName = context.projectsConfigurations.projects[context.projectName].name || context.projectName;
1149
+ const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot;
1150
+ const projectName = context.projectName;
1151
1151
  config.workspaceRoot = workspaceRoot;
1152
1152
  writeInfo(`
1153
1153
  \u26A1 Running the ${name} executor for ${projectName}
@@ -1161,7 +1161,7 @@ var withRunExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name
1161
1161
  `, config);
1162
1162
  config = await loadStormConfig(workspaceRoot);
1163
1163
  }
1164
- if (_optionalChain([executorOptions, 'optionalAccess', _66 => _66.hooks, 'optionalAccess', _67 => _67.applyDefaultOptions])) {
1164
+ if (_optionalChain([executorOptions, 'optionalAccess', _65 => _65.hooks, 'optionalAccess', _66 => _66.applyDefaultOptions])) {
1165
1165
  writeDebug("Running the applyDefaultOptions hook...", config);
1166
1166
  options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
1167
1167
  writeDebug("Completed the applyDefaultOptions hook", config);
@@ -1175,31 +1175,31 @@ ${formatLogMessage(options)}
1175
1175
  sourceRoot,
1176
1176
  projectName,
1177
1177
  config
1178
- }, executorOptions, context.projectsConfigurations.projects[context.projectName], config), applyWorkspaceProjectTokens);
1178
+ }, config, context.projectsConfigurations.projects[context.projectName]), applyWorkspaceProjectTokens);
1179
1179
  writeTrace(`Executor schema tokenized options \u2699\uFE0F
1180
1180
  ${formatLogMessage(tokenized)}
1181
1181
  `, config);
1182
- if (_optionalChain([executorOptions, 'optionalAccess', _68 => _68.hooks, 'optionalAccess', _69 => _69.preProcess])) {
1182
+ if (_optionalChain([executorOptions, 'optionalAccess', _67 => _67.hooks, 'optionalAccess', _68 => _68.preProcess])) {
1183
1183
  writeDebug("Running the preProcess hook...", config);
1184
1184
  await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
1185
1185
  writeDebug("Completed the preProcess hook", config);
1186
1186
  }
1187
1187
  const ret = executorFn(tokenized, context, config);
1188
- if (_isFunction2(_optionalChain([ret, 'optionalAccess', _70 => _70.next]))) {
1188
+ if (_isFunction2(_optionalChain([ret, 'optionalAccess', _69 => _69.next]))) {
1189
1189
  const asyncGen = ret;
1190
1190
  for await (const iter of asyncGen) {
1191
1191
  }
1192
1192
  }
1193
1193
  const result = await Promise.resolve(ret);
1194
- if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _71 => _71.error, 'optionalAccess', _72 => _72.message]) && typeof _optionalChain([result, 'optionalAccess', _73 => _73.error, 'optionalAccess', _74 => _74.message]) === "string" && _optionalChain([result, 'optionalAccess', _75 => _75.error, 'optionalAccess', _76 => _76.name]) && typeof _optionalChain([result, 'optionalAccess', _77 => _77.error, 'optionalAccess', _78 => _78.name]) === "string")) {
1194
+ if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _70 => _70.error, 'optionalAccess', _71 => _71.message]) && typeof _optionalChain([result, 'optionalAccess', _72 => _72.error, 'optionalAccess', _73 => _73.message]) === "string" && _optionalChain([result, 'optionalAccess', _74 => _74.error, 'optionalAccess', _75 => _75.name]) && typeof _optionalChain([result, 'optionalAccess', _76 => _76.error, 'optionalAccess', _77 => _77.name]) === "string")) {
1195
1195
  writeTrace(`Failure determined by the ${name} executor
1196
1196
  ${formatLogMessage(result)}`, config);
1197
1197
  console.error(result);
1198
1198
  throw new Error(`The ${name} executor failed to run`, {
1199
- cause: _optionalChain([result, 'optionalAccess', _79 => _79.error])
1199
+ cause: _optionalChain([result, 'optionalAccess', _78 => _78.error])
1200
1200
  });
1201
1201
  }
1202
- if (_optionalChain([executorOptions, 'optionalAccess', _80 => _80.hooks, 'optionalAccess', _81 => _81.postProcess])) {
1202
+ if (_optionalChain([executorOptions, 'optionalAccess', _79 => _79.hooks, 'optionalAccess', _80 => _80.postProcess])) {
1203
1203
  writeDebug("Running the postProcess hook...", config);
1204
1204
  await Promise.resolve(executorOptions.hooks.postProcess(config));
1205
1205
  writeDebug("Completed the postProcess hook", config);
@@ -1223,7 +1223,7 @@ ${formatLogMessage(result)}`, config);
1223
1223
  }, "withRunExecutor");
1224
1224
  var _isFunction2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (value) => {
1225
1225
  try {
1226
- return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _82 => _82.constructor]) && _optionalChain([value, 'optionalAccess', _83 => _83.call]) && _optionalChain([value, 'optionalAccess', _84 => _84.apply]));
1226
+ return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _81 => _81.constructor]) && _optionalChain([value, 'optionalAccess', _82 => _82.call]) && _optionalChain([value, 'optionalAccess', _83 => _83.apply]));
1227
1227
  } catch (e) {
1228
1228
  return false;
1229
1229
  }
@@ -17,7 +17,7 @@ import {
17
17
  writeSuccess,
18
18
  writeTrace,
19
19
  writeWarning
20
- } from "./chunk-NMB6NAZ4.mjs";
20
+ } from "./chunk-42WVFPO6.mjs";
21
21
  import {
22
22
  __dirname,
23
23
  __name,
@@ -348,8 +348,10 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
348
348
  if (!buildTarget) {
349
349
  throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${joinPaths(projectRoot, "project.json")}`);
350
350
  }
351
+ writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
352
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`, config);
351
353
  const result = await copyAssetsBase({
352
- assets,
354
+ assets: pendingAssets,
353
355
  watch: false,
354
356
  outputPath
355
357
  }, {
@@ -1917,8 +1919,14 @@ import { defu as defu3 } from "defu";
1917
1919
  import { createJiti } from "jiti";
1918
1920
  async function unbuildExecutorFn(options, context2, config) {
1919
1921
  writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
1920
- if (!context2.projectsConfigurations?.projects || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !context2.projectsConfigurations.projects[context2.projectName]?.root) {
1921
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1922
+ if (!context2.projectsConfigurations?.projects || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
1923
+ throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
1924
+ }
1925
+ if (!context2.projectsConfigurations.projects[context2.projectName].root) {
1926
+ throw new Error("The Build process failed because the project root is not valid. Please run this command from a workspace root directory.");
1927
+ }
1928
+ if (!context2.projectsConfigurations.projects[context2.projectName].sourceRoot) {
1929
+ throw new Error("The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory.");
1922
1930
  }
1923
1931
  const jiti = createJiti(config.workspaceRoot, {
1924
1932
  fsCache: config.skipCache ? false : joinPaths(config.directories.cache || "node_modules/.cache/storm", "jiti"),
@@ -1927,11 +1935,10 @@ async function unbuildExecutorFn(options, context2, config) {
1927
1935
  const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
1928
1936
  await stormUnbuild.build(defu3({
1929
1937
  ...options,
1930
- projectRoot: context2.projectsConfigurations.projects?.[context2.projectName].root,
1938
+ projectRoot: context2.projectsConfigurations.projects[context2.projectName].root,
1931
1939
  projectName: context2.projectName,
1932
- sourceRoot: context2.projectsConfigurations.projects?.[context2.projectName]?.sourceRoot,
1933
- platform: options.platform,
1934
- name: context2.projectName
1940
+ sourceRoot: context2.projectsConfigurations.projects[context2.projectName].sourceRoot,
1941
+ platform: options.platform
1935
1942
  }, {
1936
1943
  stubOptions: {
1937
1944
  jiti: {
@@ -1941,20 +1948,15 @@ async function unbuildExecutorFn(options, context2, config) {
1941
1948
  rollup: {
1942
1949
  emitCJS: true,
1943
1950
  watch: false,
1944
- cjsBridge: false,
1945
1951
  dts: {
1946
1952
  respectExternal: true
1947
1953
  },
1948
- replace: {},
1949
- alias: {},
1950
- resolve: {},
1951
- json: {},
1952
- commonjs: {},
1953
1954
  esbuild: {
1954
1955
  target: options.target,
1955
1956
  format: "esm",
1956
1957
  platform: options.platform,
1957
- minify: options.minify,
1958
+ minify: options.minify ?? !options.debug,
1959
+ sourcemap: options.sourcemap ?? options.debug,
1958
1960
  treeShaking: options.treeShaking
1959
1961
  }
1960
1962
  }