@storm-software/terraform-tools 0.47.1 → 0.49.0

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-NEISKBUA.mjs → chunk-3I64RHEK.mjs} +1 -1
  4. package/dist/{chunk-SIQ2JL7E.js → chunk-455PVGLF.js} +2 -2
  5. package/dist/{chunk-YLTIJRR5.js → chunk-665YWX4A.js} +279 -310
  6. package/dist/{chunk-SCRXKTPS.js → chunk-AMLRXVM3.js} +2 -2
  7. package/dist/{chunk-MW3JRZ4N.js → chunk-F7GLIHEV.js} +2 -2
  8. package/dist/{chunk-53WQJQ5K.js → chunk-FFFM47KZ.js} +2 -2
  9. package/dist/{chunk-AOTMRUKU.js → chunk-MOTE7YBG.js} +3 -3
  10. package/dist/{chunk-6GLEQENV.mjs → chunk-N4VDOPZF.mjs} +1 -1
  11. package/dist/{chunk-JNBNKAGF.js → chunk-NLQAVRJ6.js} +4 -4
  12. package/dist/{chunk-463AGI5I.mjs → chunk-OM64FIV6.mjs} +1 -1
  13. package/dist/{chunk-EAPOMBKY.mjs → chunk-QMDMW4SA.mjs} +1 -1
  14. package/dist/{chunk-WKVEHDC2.mjs → chunk-R4XW4ES7.mjs} +1 -1
  15. package/dist/{chunk-SH7NPG4K.mjs → chunk-UAZET5ED.mjs} +4 -4
  16. package/dist/{chunk-W4CCHPMY.mjs → chunk-Y52W5WN7.mjs} +106 -137
  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 +1 -1
@@ -18,7 +18,7 @@ import {
18
18
  writeSuccess,
19
19
  writeTrace,
20
20
  writeWarning
21
- } from "./chunk-SH7NPG4K.mjs";
21
+ } from "./chunk-UAZET5ED.mjs";
22
22
  import {
23
23
  __dirname,
24
24
  __name,
@@ -262,8 +262,8 @@ import { logger } from "@nx/devkit";
262
262
  var LARGE_BUFFER = 1024 * 1e6;
263
263
 
264
264
  // ../esbuild/src/build.ts
265
- import { hfs as hfs6 } from "@humanfs/node";
266
- import { createProjectGraphAsync as createProjectGraphAsync3, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph3, writeJsonFile } from "@nx/devkit";
265
+ import { hfs as hfs3 } from "@humanfs/node";
266
+ import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2, writeJsonFile } from "@nx/devkit";
267
267
 
268
268
  // ../build-tools/src/config.ts
269
269
  var DEFAULT_COMPILED_BANNER = `
@@ -290,13 +290,14 @@ import { stripIndents } from "@nx/devkit";
290
290
  import { relative as relative2 } from "path";
291
291
 
292
292
  // ../build-tools/src/utilities/copy-assets.ts
293
- import { hfs as hfs2 } from "@humanfs/node";
294
- import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
293
+ import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
295
294
  import { copyAssets as copyAssetsBase } from "@nx/js";
296
295
  import { glob } from "glob";
296
+ import { readFile as readFile2, writeFile } from "node:fs/promises";
297
297
 
298
298
  // ../build-tools/src/utilities/read-nx-config.ts
299
- import { hfs } from "@humanfs/node";
299
+ import { existsSync } from "node:fs";
300
+ import { readFile } from "node:fs/promises";
300
301
  var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot3) => {
301
302
  let rootDir = workspaceRoot3;
302
303
  if (!rootDir) {
@@ -304,10 +305,11 @@ var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot3) => {
304
305
  rootDir = config.workspaceRoot;
305
306
  }
306
307
  const nxJsonPath = joinPaths(rootDir, "nx.json");
307
- if (!await hfs.isFile(nxJsonPath)) {
308
+ if (!existsSync(nxJsonPath)) {
308
309
  throw new Error("Cannot find project.json configuration");
309
310
  }
310
- return hfs.json(nxJsonPath);
311
+ const configContent = await readFile(nxJsonPath, "utf8");
312
+ return JSON.parse(configContent);
311
313
  }, "readNxConfig");
312
314
 
313
315
  // ../build-tools/src/utilities/copy-assets.ts
@@ -342,14 +344,12 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
342
344
  });
343
345
  }
344
346
  const nxJson = readNxConfig(config.workspaceRoot);
345
- const projectGraph = await createProjectGraphAsync({
346
- exitOnError: true
347
- });
347
+ const projectGraph = readCachedProjectGraph();
348
348
  const projectsConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
349
349
  if (!projectsConfigurations?.projects?.[projectName]) {
350
350
  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.");
351
351
  }
352
- const buildTarget = projectsConfigurations.projects[projectName]?.targets?.build;
352
+ const buildTarget = projectsConfigurations.projects[projectName].targets?.build;
353
353
  if (!buildTarget) {
354
354
  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")}`);
355
355
  }
@@ -379,42 +379,30 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
379
379
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
380
380
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
381
381
  ]);
382
- await Promise.allSettled(files.map(async (file) => hfs2.write(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
382
+ await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
383
383
 
384
- ${await hfs2.text(file)}
384
+ ${await readFile2(file, "utf8")}
385
385
 
386
386
  ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
387
387
  }
388
388
  }, "copyAssets");
389
389
 
390
390
  // ../build-tools/src/utilities/generate-package-json.ts
391
- import { hfs as hfs3 } from "@humanfs/node";
392
391
  import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
393
392
  import { Glob } from "glob";
394
- import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2 } from "nx/src/project-graph/project-graph";
393
+ import { existsSync as existsSync2 } from "node:fs";
394
+ import { readFile as readFile3 } from "node:fs/promises";
395
+ import { readCachedProjectGraph as readCachedProjectGraph2 } from "nx/src/project-graph/project-graph";
395
396
  var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, projectRoot, projectName, packageJson) => {
396
- const projectGraph = await createProjectGraphAsync2({
397
- exitOnError: true
398
- });
399
- const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
400
- if (!projectConfigurations?.projects?.[projectName]) {
401
- 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.");
402
- }
403
- const projectJsonPath = joinPaths(workspaceRoot3, projectRoot, "project.json");
404
- if (!await hfs3.isFile(projectJsonPath)) {
405
- throw new Error("Cannot find project.json configuration");
406
- }
407
- if (!projectConfigurations?.projects?.[projectName]) {
408
- 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.");
409
- }
410
- const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
397
+ const projectDependencies = calculateProjectBuildableDependencies(void 0, readCachedProjectGraph2(), workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
411
398
  const localPackages = [];
412
399
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
413
400
  const projectNode = project.node;
414
401
  if (projectNode.data.root) {
415
402
  const projectPackageJsonPath = joinPaths(workspaceRoot3, projectNode.data.root, "package.json");
416
- if (await hfs3.isFile(projectPackageJsonPath)) {
417
- const projectPackageJson = await hfs3.json(projectPackageJsonPath);
403
+ if (existsSync2(projectPackageJsonPath)) {
404
+ const projectPackageJsonContent = await readFile3(projectPackageJsonPath, "utf8");
405
+ const projectPackageJson = JSON.parse(projectPackageJsonContent);
418
406
  if (projectPackageJson.private !== false) {
419
407
  localPackages.push(projectPackageJson);
420
408
  }
@@ -450,7 +438,8 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
450
438
  }, "addPackageDependencies");
451
439
  var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
452
440
  const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : findWorkspaceRoot();
453
- const workspacePackageJson = await hfs3.json(joinPaths(workspaceRoot3, "package.json"));
441
+ const workspacePackageJsonContent = await readFile3(joinPaths(workspaceRoot3, "package.json"), "utf8");
442
+ const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
454
443
  packageJson.type ??= "module";
455
444
  packageJson.sideEffects ??= false;
456
445
  if (includeSrc === true) {
@@ -771,11 +760,11 @@ var RendererEngine = class {
771
760
  };
772
761
 
773
762
  // ../esbuild/src/clean.ts
774
- import { hfs as hfs4 } from "@humanfs/node";
763
+ import { hfs } from "@humanfs/node";
775
764
  async function clean(name = "ESBuild", directory, config) {
776
765
  writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
777
766
  const stopwatch = getStopwatch(`${name} output clean`);
778
- await hfs4.deleteAll(directory);
767
+ await hfs.deleteAll(directory);
779
768
  stopwatch();
780
769
  }
781
770
  __name(clean, "clean");
@@ -950,7 +939,7 @@ var resolvePathsPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
950
939
  }), "resolvePathsPlugin");
951
940
 
952
941
  // ../esbuild/src/plugins/tsc.ts
953
- import { hfs as hfs5 } from "@humanfs/node";
942
+ import { hfs as hfs2 } from "@humanfs/node";
954
943
  import { Extractor, ExtractorConfig } from "@microsoft/api-extractor";
955
944
  function bundleTypeDefinitions(filename, outfile, externals, options) {
956
945
  const { dependencies, peerDependencies, devDependencies } = __require(joinPaths(options.projectRoot, "package.json"));
@@ -1024,18 +1013,18 @@ var tscPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => ({
1024
1013
  const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
1025
1014
  const bundlePath = joinPaths(resolvedOptions.outdir, entryPoint);
1026
1015
  let dtsPath;
1027
- if (await hfs5.isFile(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
1016
+ if (await hfs2.isFile(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
1028
1017
  dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
1029
- } else if (await hfs5.isFile(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
1018
+ } else if (await hfs2.isFile(joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
1030
1019
  dtsPath = joinPaths(resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
1031
1020
  }
1032
1021
  const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
1033
1022
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
1034
1023
  bundleTypeDefinitions(dtsPath, bundlePath, resolvedOptions.external ?? [], resolvedOptions);
1035
- const dtsContents = await hfs5.text(`${bundlePath}.d.ts`);
1036
- await hfs5.write(`${bundlePath}.${ext}`, dtsContents);
1024
+ const dtsContents = await hfs2.text(`${bundlePath}.d.ts`);
1025
+ await hfs2.write(`${bundlePath}.${ext}`, dtsContents);
1037
1026
  } else {
1038
- await hfs5.write(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
1027
+ await hfs2.write(`${bundlePath}.${ext}`, `export * from './${entryPoint}'`);
1039
1028
  }
1040
1029
  }
1041
1030
  });
@@ -1280,16 +1269,16 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1280
1269
  const config = await loadStormConfig(workspaceRoot3.dir);
1281
1270
  writeDebug(" \u2699\uFE0F Resolving build options", config);
1282
1271
  const stopwatch = getStopwatch("Build options resolution");
1283
- const projectGraph = await createProjectGraphAsync3({
1272
+ const projectGraph = await createProjectGraphAsync({
1284
1273
  exitOnError: true
1285
1274
  });
1286
1275
  const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
1287
- if (!await hfs6.isFile(projectJsonPath)) {
1276
+ if (!await hfs3.isFile(projectJsonPath)) {
1288
1277
  throw new Error("Cannot find project.json configuration");
1289
1278
  }
1290
- const projectJson = await hfs6.json(projectJsonPath);
1279
+ const projectJson = await hfs3.json(projectJsonPath);
1291
1280
  const projectName = projectJson.name;
1292
- const projectConfigurations = readProjectsConfigurationFromProjectGraph3(projectGraph);
1281
+ const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
1293
1282
  if (!projectConfigurations?.projects?.[projectName]) {
1294
1283
  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.");
1295
1284
  }
@@ -1297,10 +1286,10 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1297
1286
  options.name ??= `${projectName}-${options.format}`;
1298
1287
  options.target ??= DEFAULT_TARGET;
1299
1288
  const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
1300
- if (!await hfs6.isFile(packageJsonPath)) {
1289
+ if (!await hfs3.isFile(packageJsonPath)) {
1301
1290
  throw new Error("Cannot find package.json configuration");
1302
1291
  }
1303
- const packageJson = await hfs6.json(packageJsonPath);
1292
+ const packageJson = await hfs3.json(packageJsonPath);
1304
1293
  const outExtension = getOutputExtensionMap(options, packageJson.type);
1305
1294
  const env = getEnv("esbuild", options);
1306
1295
  const result = {
@@ -1379,14 +1368,14 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1379
1368
  return result;
1380
1369
  }, "resolveOptions");
1381
1370
  async function generatePackageJson(context2) {
1382
- if (context2.options.generatePackageJson !== false && await hfs6.isFile(joinPaths(context2.options.projectRoot, "package.json"))) {
1371
+ if (context2.options.generatePackageJson !== false && await hfs3.isFile(joinPaths(context2.options.projectRoot, "package.json"))) {
1383
1372
  writeDebug(" \u270D\uFE0F Writing package.json file", context2.options.config);
1384
1373
  const stopwatch = getStopwatch("Write package.json file");
1385
1374
  const packageJsonPath = joinPaths(context2.options.projectRoot, "project.json");
1386
- if (!await hfs6.isFile(packageJsonPath)) {
1375
+ if (!await hfs3.isFile(packageJsonPath)) {
1387
1376
  throw new Error("Cannot find package.json configuration");
1388
1377
  }
1389
- let packageJson = await hfs6.json(joinPaths(context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
1378
+ let packageJson = await hfs3.json(joinPaths(context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
1390
1379
  if (!packageJson) {
1391
1380
  throw new Error("Cannot find package.json configuration file");
1392
1381
  }
@@ -1459,7 +1448,7 @@ async function executeEsBuild(context2) {
1459
1448
  const result = await esbuild2.build(context2.options);
1460
1449
  if (result.metafile) {
1461
1450
  const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
1462
- await hfs6.write(metafilePath, JSON.stringify(result.metafile));
1451
+ await hfs3.write(metafilePath, JSON.stringify(result.metafile));
1463
1452
  }
1464
1453
  stopwatch();
1465
1454
  return context2;
@@ -1609,8 +1598,8 @@ import { execSync as execSync3 } from "node:child_process";
1609
1598
  import fs3 from "node:fs/promises";
1610
1599
 
1611
1600
  // ../workspace-tools/src/utils/pnpm-deps-update.ts
1612
- import { existsSync } from "node:fs";
1613
- import { readFile, writeFile } from "node:fs/promises";
1601
+ import { existsSync as existsSync3 } from "node:fs";
1602
+ import { readFile as readFile4, writeFile as writeFile2 } from "node:fs/promises";
1614
1603
  import readYamlFile from "read-yaml-file";
1615
1604
 
1616
1605
  // ../workspace-tools/src/executors/npm-publish/executor.ts
@@ -1651,18 +1640,18 @@ var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor",
1651
1640
  });
1652
1641
 
1653
1642
  // ../tsdown/src/build.ts
1654
- import { hfs as hfs8 } from "@humanfs/node";
1655
- import { createProjectGraphAsync as createProjectGraphAsync4, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph4, writeJsonFile as writeJsonFile2 } from "@nx/devkit";
1643
+ import { hfs as hfs5 } from "@humanfs/node";
1644
+ import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph3, writeJsonFile as writeJsonFile2 } from "@nx/devkit";
1656
1645
  import defu2 from "defu";
1657
1646
  import { findWorkspaceRoot as findWorkspaceRoot3 } from "nx/src/utils/find-workspace-root";
1658
1647
  import { build as tsdown } from "tsdown";
1659
1648
 
1660
1649
  // ../tsdown/src/clean.ts
1661
- import { hfs as hfs7 } from "@humanfs/node";
1650
+ import { hfs as hfs4 } from "@humanfs/node";
1662
1651
  async function clean2(name = "ESBuild", directory, config) {
1663
1652
  writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
1664
1653
  const stopwatch = getStopwatch(`${name} output clean`);
1665
- await hfs7.deleteAll(directory);
1654
+ await hfs4.deleteAll(directory);
1666
1655
  stopwatch();
1667
1656
  }
1668
1657
  __name(clean2, "clean");
@@ -1699,16 +1688,16 @@ var resolveOptions2 = /* @__PURE__ */ __name(async (userOptions) => {
1699
1688
  const config = await loadStormConfig(workspaceRoot3.dir);
1700
1689
  writeDebug(" \u2699\uFE0F Resolving build options", config);
1701
1690
  const stopwatch = getStopwatch("Build options resolution");
1702
- const projectGraph = await createProjectGraphAsync4({
1691
+ const projectGraph = await createProjectGraphAsync2({
1703
1692
  exitOnError: true
1704
1693
  });
1705
1694
  const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
1706
- if (!await hfs8.isFile(projectJsonPath)) {
1695
+ if (!await hfs5.isFile(projectJsonPath)) {
1707
1696
  throw new Error("Cannot find project.json configuration");
1708
1697
  }
1709
- const projectJson = await hfs8.json(projectJsonPath);
1698
+ const projectJson = await hfs5.json(projectJsonPath);
1710
1699
  const projectName = projectJson.name;
1711
- const projectConfigurations = readProjectsConfigurationFromProjectGraph4(projectGraph);
1700
+ const projectConfigurations = readProjectsConfigurationFromProjectGraph3(projectGraph);
1712
1701
  if (!projectConfigurations?.projects?.[projectName]) {
1713
1702
  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.");
1714
1703
  }
@@ -1716,7 +1705,7 @@ var resolveOptions2 = /* @__PURE__ */ __name(async (userOptions) => {
1716
1705
  options.name ??= `${projectName}-${options.format}`;
1717
1706
  options.target ??= DEFAULT_TARGET;
1718
1707
  const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
1719
- if (!await hfs8.isFile(packageJsonPath)) {
1708
+ if (!await hfs5.isFile(packageJsonPath)) {
1720
1709
  throw new Error("Cannot find package.json configuration");
1721
1710
  }
1722
1711
  const env = getEnv("tsdown", options);
@@ -1771,14 +1760,14 @@ var resolveOptions2 = /* @__PURE__ */ __name(async (userOptions) => {
1771
1760
  return result;
1772
1761
  }, "resolveOptions");
1773
1762
  async function generatePackageJson2(options) {
1774
- if (options.generatePackageJson !== false && await hfs8.isFile(joinPaths(options.projectRoot, "package.json"))) {
1763
+ if (options.generatePackageJson !== false && await hfs5.isFile(joinPaths(options.projectRoot, "package.json"))) {
1775
1764
  writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
1776
1765
  const stopwatch = getStopwatch("Write package.json file");
1777
1766
  const packageJsonPath = joinPaths(options.projectRoot, "project.json");
1778
- if (!await hfs8.isFile(packageJsonPath)) {
1767
+ if (!await hfs5.isFile(packageJsonPath)) {
1779
1768
  throw new Error("Cannot find package.json configuration");
1780
1769
  }
1781
- let packageJson = await hfs8.json(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"));
1770
+ let packageJson = await hfs5.json(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"));
1782
1771
  if (!packageJson) {
1783
1772
  throw new Error("Cannot find package.json configuration file");
1784
1773
  }
@@ -1956,21 +1945,25 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
1956
1945
  });
1957
1946
 
1958
1947
  // ../unbuild/src/build.ts
1959
- import { hfs as hfs10 } from "@humanfs/node";
1960
- import { createProjectGraphAsync as createProjectGraphAsync6, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph5, writeJsonFile as writeJsonFile3 } from "@nx/devkit";
1948
+ import { readCachedProjectGraph as readCachedProjectGraph4, writeJsonFile as writeJsonFile3 } from "@nx/devkit";
1961
1949
  import { getHelperDependency as getHelperDependency2, HelperDependency as HelperDependency2 } from "@nx/js";
1962
1950
  import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies3 } from "@nx/js/src/utils/buildable-libs-utils";
1963
1951
  import defu3 from "defu";
1952
+ import { existsSync as existsSync4 } from "node:fs";
1953
+ import { readFile as readFile5 } from "node:fs/promises";
1964
1954
  import { relative as relative4 } from "node:path";
1965
1955
  import { findWorkspaceRoot as findWorkspaceRoot4 } from "nx/src/utils/find-workspace-root";
1966
1956
  import { build as unbuild } from "unbuild";
1967
1957
 
1968
1958
  // ../unbuild/src/clean.ts
1969
- import { hfs as hfs9 } from "@humanfs/node";
1959
+ import { rm } from "node:fs/promises";
1970
1960
  async function clean3(name = "Unbuild", directory, config) {
1971
1961
  writeDebug(` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
1972
1962
  const stopwatch = getStopwatch(`${name} output clean`);
1973
- await hfs9.deleteAll(directory);
1963
+ await rm(directory, {
1964
+ recursive: true,
1965
+ force: true
1966
+ });
1974
1967
  stopwatch();
1975
1968
  }
1976
1969
  __name(clean3, "clean");
@@ -2021,28 +2014,8 @@ ${error ? error.message : "Unknown build error"}
2021
2014
  }
2022
2015
  }), "onErrorPlugin");
2023
2016
 
2024
- // ../unbuild/src/plugins/swc.ts
2025
- var swcPlugin = /* @__PURE__ */ __name((options, resolvedOptions) => {
2026
- const { transform: transform3 } = __require("@swc/core");
2027
- return {
2028
- name: "storm:swc",
2029
- transform(code, filename) {
2030
- return transform3(code, {
2031
- filename,
2032
- jsc: {
2033
- transform: {
2034
- react: {
2035
- runtime: "automatic"
2036
- }
2037
- }
2038
- }
2039
- });
2040
- }
2041
- };
2042
- }, "swcPlugin");
2043
-
2044
2017
  // ../unbuild/src/plugins/tsc.ts
2045
- import { createProjectGraphAsync as createProjectGraphAsync5 } from "@nx/devkit";
2018
+ import { readCachedProjectGraph as readCachedProjectGraph3 } from "@nx/devkit";
2046
2019
  import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies2 } from "@nx/js/src/utils/buildable-libs-utils";
2047
2020
  import { getHelperDependency, HelperDependency } from "@nx/js/src/utils/compiler-helper-dependency";
2048
2021
  import ts2Plugin from "rollup-plugin-typescript2";
@@ -2075,9 +2048,7 @@ __name(createTsCompilerOptions, "createTsCompilerOptions");
2075
2048
 
2076
2049
  // ../unbuild/src/plugins/tsc.ts
2077
2050
  var tscPlugin2 = /* @__PURE__ */ __name(async (options, resolvedOptions) => {
2078
- const projectGraph = await createProjectGraphAsync5({
2079
- exitOnError: true
2080
- });
2051
+ const projectGraph = readCachedProjectGraph3();
2081
2052
  const result = calculateProjectBuildableDependencies2(void 0, projectGraph, resolvedOptions.config.workspaceRoot, resolvedOptions.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
2082
2053
  let dependencies = result.dependencies;
2083
2054
  const tsLibDependency = getHelperDependency(HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
@@ -2096,37 +2067,39 @@ var tscPlugin2 = /* @__PURE__ */ __name(async (options, resolvedOptions) => {
2096
2067
 
2097
2068
  // ../unbuild/src/plugins/type-definitions.ts
2098
2069
  import { relative as relative3 } from "node:path";
2099
- var typeDefinitions = /* @__PURE__ */ __name((options, resolvedOptions) => ({
2100
- name: "storm:dts-bundle",
2101
- async generateBundle(_opts, bundle) {
2102
- for (const file of Object.values(bundle)) {
2103
- if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
2104
- continue;
2105
- }
2106
- const hasDefaultExport = file.exports.includes("default");
2107
- const entrySourceFileName = relative3(options.projectRoot, file.facadeModuleId);
2108
- const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
2109
- const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
2110
- const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
2111
- const dtsFileSource = hasDefaultExport ? `
2070
+ function typeDefinitions(projectRoot) {
2071
+ return {
2072
+ name: "storm:dts-bundle",
2073
+ async generateBundle(_opts, bundle) {
2074
+ for (const file of Object.values(bundle)) {
2075
+ if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
2076
+ continue;
2077
+ }
2078
+ const hasDefaultExport = file.exports.includes("default");
2079
+ const entrySourceFileName = relative3(projectRoot, file.facadeModuleId);
2080
+ const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
2081
+ const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
2082
+ const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
2083
+ const dtsFileSource = hasDefaultExport ? `
2112
2084
  export * from ${relativeSourceDtsName};
2113
2085
  export { default } from ${relativeSourceDtsName};
2114
2086
  ` : `export * from ${relativeSourceDtsName};
2115
2087
  `;
2116
- this.emitFile({
2117
- type: "asset",
2118
- fileName: dtsFileName,
2119
- source: dtsFileSource
2120
- });
2088
+ this.emitFile({
2089
+ type: "asset",
2090
+ fileName: dtsFileName,
2091
+ source: dtsFileSource
2092
+ });
2093
+ }
2121
2094
  }
2122
- }
2123
- }), "typeDefinitions");
2095
+ };
2096
+ }
2097
+ __name(typeDefinitions, "typeDefinitions");
2124
2098
 
2125
2099
  // ../unbuild/src/config.ts
2126
2100
  var getDefaultBuildPlugins2 = /* @__PURE__ */ __name(async (options, resolvedOptions) => Promise.all([
2127
2101
  analyzePlugin(options, resolvedOptions),
2128
- swcPlugin(options, resolvedOptions),
2129
- typeDefinitions(options, resolvedOptions),
2102
+ typeDefinitions(resolvedOptions.projectRoot),
2130
2103
  tscPlugin2(options, resolvedOptions),
2131
2104
  onErrorPlugin2(options, resolvedOptions)
2132
2105
  ].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
@@ -2151,38 +2124,34 @@ async function resolveOptions3(options) {
2151
2124
  options = defu3(options, configFile);
2152
2125
  }
2153
2126
  }
2154
- const projectGraph = await createProjectGraphAsync6({
2155
- exitOnError: true
2156
- });
2127
+ const projectGraph = readCachedProjectGraph4();
2157
2128
  const projectJsonPath = joinPaths(config.workspaceRoot, projectRoot, "project.json");
2158
- if (!await hfs10.isFile(projectJsonPath)) {
2129
+ if (!existsSync4(projectJsonPath)) {
2159
2130
  throw new Error("Cannot find project.json configuration");
2160
2131
  }
2161
- const projectJson = await hfs10.json(projectJsonPath);
2132
+ const projectJsonContent = await readFile5(projectJsonPath, "utf8");
2133
+ const projectJson = JSON.parse(projectJsonContent);
2162
2134
  const projectName = projectJson.name;
2163
2135
  const packageJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "package.json");
2164
- if (!await hfs10.isFile(packageJsonPath)) {
2136
+ if (!existsSync4(packageJsonPath)) {
2165
2137
  throw new Error("Cannot find package.json configuration");
2166
2138
  }
2167
- const packageJson = await hfs10.json(packageJsonPath);
2139
+ const packageJsonContent = await readFile5(packageJsonPath, "utf8");
2140
+ const packageJson = JSON.parse(packageJsonContent);
2168
2141
  let tsconfig = options.tsconfig;
2169
2142
  if (!tsconfig) {
2170
2143
  tsconfig = joinPaths(workspaceRoot3.dir, projectRoot, "tsconfig.json");
2171
2144
  }
2172
- if (!await hfs10.isFile(tsconfig)) {
2145
+ if (!existsSync4(tsconfig)) {
2173
2146
  throw new Error("Cannot find tsconfig.json configuration");
2174
2147
  }
2175
2148
  let sourceRoot = projectJson.sourceRoot;
2176
2149
  if (!sourceRoot) {
2177
2150
  sourceRoot = joinPaths(projectRoot, "src");
2178
2151
  }
2179
- if (!await hfs10.isDirectory(sourceRoot)) {
2152
+ if (!existsSync4(sourceRoot)) {
2180
2153
  throw new Error("Cannot find sourceRoot directory");
2181
2154
  }
2182
- const projectConfigurations = readProjectsConfigurationFromProjectGraph5(projectGraph);
2183
- if (!projectConfigurations?.projects?.[projectName]) {
2184
- 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.");
2185
- }
2186
2155
  const result = calculateProjectBuildableDependencies3(void 0, projectGraph, workspaceRoot3.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
2187
2156
  let dependencies = result.dependencies;
2188
2157
  const tsLibDependency = getHelperDependency2(HelperDependency2.tsc, tsconfig, dependencies, projectGraph, true);
@@ -2303,21 +2272,21 @@ async function resolveOptions3(options) {
2303
2272
  }
2304
2273
  __name(resolveOptions3, "resolveOptions");
2305
2274
  async function generatePackageJson3(options) {
2306
- if (options.generatePackageJson !== false && await hfs10.isFile(joinPaths(options.projectRoot, "package.json"))) {
2275
+ if (options.generatePackageJson !== false && existsSync4(joinPaths(options.projectRoot, "package.json"))) {
2307
2276
  writeDebug(" \u270D\uFE0F Writing package.json file", options.config);
2308
2277
  const stopwatch = getStopwatch("Write package.json file");
2309
2278
  const packageJsonPath = joinPaths(options.projectRoot, "project.json");
2310
- if (!await hfs10.isFile(packageJsonPath)) {
2279
+ if (!existsSync4(packageJsonPath)) {
2311
2280
  throw new Error("Cannot find package.json configuration");
2312
2281
  }
2313
- let packageJson = await hfs10.json(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"));
2314
- if (!packageJson) {
2282
+ let packageJsonContent = await readFile5(joinPaths(options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
2283
+ if (!packageJsonContent) {
2315
2284
  throw new Error("Cannot find package.json configuration file");
2316
2285
  }
2286
+ let packageJson = JSON.parse(packageJsonContent);
2317
2287
  packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
2318
2288
  packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
2319
- packageJson = await addPackageJsonExports(options.sourceRoot, packageJson);
2320
- await writeJsonFile3(joinPaths(options.outDir, "package.json"), packageJson);
2289
+ await writeJsonFile3(joinPaths(options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
2321
2290
  stopwatch();
2322
2291
  }
2323
2292
  return options;
@@ -3895,7 +3864,7 @@ import { names as names5 } from "@nx/devkit";
3895
3864
  import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/project-graph/utils/retrieve-workspace-files";
3896
3865
 
3897
3866
  // ../workspace-tools/src/utils/lock-file.ts
3898
- import { existsSync as existsSync2 } from "node:fs";
3867
+ import { existsSync as existsSync5 } from "node:fs";
3899
3868
  import { join as join2 } from "node:path";
3900
3869
  import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "nx/src/devkit-exports";
3901
3870
  import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
@@ -3910,7 +3879,7 @@ var PNPM_LOCK_PATH = join2(workspaceRoot2, PNPM_LOCK_FILE);
3910
3879
 
3911
3880
  // ../workspace-tools/src/utils/package-helpers.ts
3912
3881
  import { joinPathFragments as joinPathFragments10, readJsonFile as readJsonFile2 } from "@nx/devkit";
3913
- import { existsSync as existsSync3 } from "node:fs";
3882
+ import { existsSync as existsSync6 } from "node:fs";
3914
3883
 
3915
3884
  // ../workspace-tools/src/utils/typia-transform.ts
3916
3885
  import transform2 from "typia/lib/transform";
package/dist/executors.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";require('./chunk-E7SPQEPH.js');
2
- require('./chunk-53WQJQ5K.js');
3
- require('./chunk-MW3JRZ4N.js');
4
- require('./chunk-SIQ2JL7E.js');
5
- require('./chunk-SCRXKTPS.js');
6
- require('./chunk-AOTMRUKU.js');
7
- require('./chunk-JNBNKAGF.js');
2
+ require('./chunk-FFFM47KZ.js');
3
+ require('./chunk-F7GLIHEV.js');
4
+ require('./chunk-455PVGLF.js');
5
+ require('./chunk-AMLRXVM3.js');
6
+ require('./chunk-MOTE7YBG.js');
7
+ require('./chunk-NLQAVRJ6.js');
8
8
  require('./chunk-3GQAWCBQ.js');
@@ -1,8 +1,8 @@
1
1
  import "./chunk-HYHKZPRR.mjs";
2
- import "./chunk-6GLEQENV.mjs";
3
- import "./chunk-EAPOMBKY.mjs";
4
- import "./chunk-NEISKBUA.mjs";
5
- import "./chunk-463AGI5I.mjs";
6
- import "./chunk-WKVEHDC2.mjs";
7
- import "./chunk-SH7NPG4K.mjs";
2
+ import "./chunk-N4VDOPZF.mjs";
3
+ import "./chunk-QMDMW4SA.mjs";
4
+ import "./chunk-3I64RHEK.mjs";
5
+ import "./chunk-OM64FIV6.mjs";
6
+ import "./chunk-R4XW4ES7.mjs";
7
+ import "./chunk-UAZET5ED.mjs";
8
8
  import "./chunk-XUV4U54K.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 _chunkYLTIJRR5js = require('./chunk-YLTIJRR5.js');
5
- require('./chunk-JNBNKAGF.js');
4
+ var _chunk665YWX4Ajs = require('./chunk-665YWX4A.js');
5
+ require('./chunk-NLQAVRJ6.js');
6
6
  require('./chunk-3GQAWCBQ.js');
7
7
 
8
8
 
9
- exports.initGenerator = _chunkYLTIJRR5js.initGenerator;
9
+ exports.initGenerator = _chunk665YWX4Ajs.initGenerator;
@@ -1,8 +1,8 @@
1
1
  import "./chunk-23KFTIT2.mjs";
2
2
  import {
3
3
  initGenerator
4
- } from "./chunk-W4CCHPMY.mjs";
5
- import "./chunk-SH7NPG4K.mjs";
4
+ } from "./chunk-Y52W5WN7.mjs";
5
+ import "./chunk-UAZET5ED.mjs";
6
6
  import "./chunk-XUV4U54K.mjs";
7
7
  export {
8
8
  initGenerator
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-E7SPQEPH.js');
2
- require('./chunk-53WQJQ5K.js');
3
- require('./chunk-MW3JRZ4N.js');
4
- require('./chunk-SIQ2JL7E.js');
2
+ require('./chunk-FFFM47KZ.js');
3
+ require('./chunk-F7GLIHEV.js');
4
+ require('./chunk-455PVGLF.js');
5
5
  require('./chunk-N2YKXZ5R.js');
6
6
 
7
7
 
8
- var _chunkYLTIJRR5js = require('./chunk-YLTIJRR5.js');
8
+ var _chunk665YWX4Ajs = require('./chunk-665YWX4A.js');
9
9
  require('./chunk-GUQOEBFW.js');
10
10
 
11
11
 
12
12
  var _chunkILC773N2js = require('./chunk-ILC773N2.js');
13
- require('./chunk-SCRXKTPS.js');
13
+ require('./chunk-AMLRXVM3.js');
14
14
 
15
15
 
16
- var _chunkAOTMRUKUjs = require('./chunk-AOTMRUKU.js');
17
- require('./chunk-JNBNKAGF.js');
16
+ var _chunkMOTE7YBGjs = require('./chunk-MOTE7YBG.js');
17
+ require('./chunk-NLQAVRJ6.js');
18
18
  require('./chunk-3GQAWCBQ.js');
19
19
 
20
20
 
21
21
 
22
22
 
23
- exports.baseTerraformExecutorSchema = _chunkILC773N2js.base_terraform_executor_untyped_default; exports.initGenerator = _chunkYLTIJRR5js.initGenerator; exports.withTerraformExecutor = _chunkAOTMRUKUjs.withTerraformExecutor;
23
+ exports.baseTerraformExecutorSchema = _chunkILC773N2js.base_terraform_executor_untyped_default; exports.initGenerator = _chunk665YWX4Ajs.initGenerator; exports.withTerraformExecutor = _chunkMOTE7YBGjs.withTerraformExecutor;