@storm-software/esbuild 0.17.4 → 0.19.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.
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.17.4-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.18.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/dist/build.cjs CHANGED
@@ -1,19 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkO5KQUB74cjs = require('./chunk-O5KQUB74.cjs');
4
- require('./chunk-UJM4BCSP.cjs');
5
- require('./chunk-2C3TGE3A.cjs');
3
+ var _chunkRPF2EQ6Bcjs = require('./chunk-RPF2EQ6B.cjs');
4
+ require('./chunk-B3ZJI3HY.cjs');
5
+ require('./chunk-XI4WLOK5.cjs');
6
6
  require('./chunk-S6M44SSZ.cjs');
7
7
  require('./chunk-WRBUO7H6.cjs');
8
- require('./chunk-MQBIMPCE.cjs');
8
+ require('./chunk-L5BDTYEA.cjs');
9
9
  require('./chunk-RMB62XEL.cjs');
10
- require('./chunk-2GDH4JSN.cjs');
11
- require('./chunk-QJCTL2UQ.cjs');
12
- require('./chunk-ZKJVN5D7.cjs');
10
+ require('./chunk-2COJNALQ.cjs');
11
+ require('./chunk-BM5D6M6U.cjs');
12
+ require('./chunk-RRTBX24M.cjs');
13
13
  require('./chunk-LVWQSCJM.cjs');
14
14
  require('./chunk-CGFDQ5AJ.cjs');
15
15
  require('./chunk-EZGTDCYM.cjs');
16
16
  require('./chunk-BGYQAVKQ.cjs');
17
17
 
18
18
 
19
- exports.build = _chunkO5KQUB74cjs.build;
19
+ exports.build = _chunkRPF2EQ6Bcjs.build;
package/dist/build.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  build
3
- } from "./chunk-6B4WCVK3.js";
4
- import "./chunk-JETLWBVI.js";
5
- import "./chunk-C7RQ2QZM.js";
3
+ } from "./chunk-E4AODPGJ.js";
4
+ import "./chunk-WBJTD7ZO.js";
5
+ import "./chunk-EKJD2HV5.js";
6
6
  import "./chunk-T5272PC2.js";
7
7
  import "./chunk-LYDEMC26.js";
8
- import "./chunk-Y67WRXQG.js";
8
+ import "./chunk-I457R337.js";
9
9
  import "./chunk-DAGDNKO5.js";
10
- import "./chunk-UY5T74KN.js";
11
- import "./chunk-B6XATEM4.js";
12
- import "./chunk-IMZK22U3.js";
10
+ import "./chunk-4U2FYKOQ.js";
11
+ import "./chunk-5SXB2YMC.js";
12
+ import "./chunk-CHCOA7BI.js";
13
13
  import "./chunk-7MDMXJ5V.js";
14
14
  import "./chunk-YNQ45EAM.js";
15
15
  import "./chunk-GWG4HOQ6.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkZKJVN5D7cjs = require('./chunk-ZKJVN5D7.cjs');
3
+ var _chunkRRTBX24Mcjs = require('./chunk-RRTBX24M.cjs');
4
4
 
5
5
 
6
6
  var _chunkLVWQSCJMcjs = require('./chunk-LVWQSCJM.cjs');
@@ -84,7 +84,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
84
84
  localBuild: true
85
85
  });
86
86
  if (extractorResult.succeeded === false) {
87
- _chunkZKJVN5D7cjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
87
+ _chunkRRTBX24Mcjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
88
88
  throw new Error("API Extractor completed with errors");
89
89
  }
90
90
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeError
3
- } from "./chunk-IMZK22U3.js";
3
+ } from "./chunk-CHCOA7BI.js";
4
4
  import {
5
5
  joinPaths
6
6
  } from "./chunk-7MDMXJ5V.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  writeError,
3
3
  writeWarning
4
- } from "./chunk-IMZK22U3.js";
4
+ } from "./chunk-CHCOA7BI.js";
5
5
  import {
6
6
  __name,
7
7
  __require
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkZKJVN5D7cjs = require('./chunk-ZKJVN5D7.cjs');
4
+ var _chunkRRTBX24Mcjs = require('./chunk-RRTBX24M.cjs');
5
5
 
6
6
 
7
7
  var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
@@ -9,8 +9,8 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
9
9
  // src/clean.ts
10
10
  var _node = require('@humanfs/node');
11
11
  async function clean(name = "ESBuild", directory, config) {
12
- _chunkZKJVN5D7cjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
- const stopwatch = _chunkZKJVN5D7cjs.getStopwatch.call(void 0, `${name} output clean`);
12
+ _chunkRRTBX24Mcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
+ const stopwatch = _chunkRRTBX24Mcjs.getStopwatch.call(void 0, `${name} output clean`);
14
14
  await _node.hfs.deleteAll(directory);
15
15
  stopwatch();
16
16
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkZKJVN5D7cjs = require('./chunk-ZKJVN5D7.cjs');
4
+ var _chunkRRTBX24Mcjs = require('./chunk-RRTBX24M.cjs');
5
5
 
6
6
 
7
7
 
@@ -86,8 +86,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (bun
86
86
  const filteredMissingDeps = missingDependencies.filter((dep) => {
87
87
  return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
88
88
  });
89
- _chunkZKJVN5D7cjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
90
- _chunkZKJVN5D7cjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
89
+ _chunkRRTBX24Mcjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
90
+ _chunkRRTBX24Mcjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
91
91
  if (filteredMissingDeps.length > 0) {
92
92
  throw new Error(`Missing dependencies detected - please install them:
93
93
  ${JSON.stringify(filteredMissingDeps)}
@@ -453,7 +453,8 @@ var CONSOLE_ICONS = {
453
453
  [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
454
454
  [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
455
455
  [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
456
- [LogLevelLabel.TRACE]: useIcon("\u2709", "\u2192")
456
+ [LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
457
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
457
458
  };
458
459
 
459
460
  // ../config-tools/src/logger/format-timestamp.ts
@@ -473,48 +474,48 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) =>
473
474
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
474
475
  return (message) => {
475
476
  console.error(`
476
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
477
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
477
478
  `);
478
479
  };
479
480
  }
480
481
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
481
482
  return (message) => {
482
483
  console.error(`
483
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
484
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
484
485
  `);
485
486
  };
486
487
  }
487
488
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
488
489
  return (message) => {
489
490
  console.warn(`
490
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
491
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
491
492
  `);
492
493
  };
493
494
  }
494
495
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
495
496
  return (message) => {
496
497
  console.info(`
497
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
498
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
498
499
  `);
499
500
  };
500
501
  }
501
502
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
502
503
  return (message) => {
503
504
  console.info(`
504
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
505
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
505
506
  `);
506
507
  };
507
508
  }
508
509
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
509
510
  return (message) => {
510
511
  console.debug(`
511
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Debug]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
512
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
512
513
  `);
513
514
  };
514
515
  }
515
516
  return (message) => {
516
517
  console.log(`
517
- ${_chalk.gray(formatTimestamp())} ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
518
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
518
519
  `);
519
520
  };
520
521
  }, "getLogFn");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clean
3
- } from "./chunk-JETLWBVI.js";
3
+ } from "./chunk-WBJTD7ZO.js";
4
4
  import {
5
5
  DEFAULT_BUILD_OPTIONS,
6
6
  DEFAULT_COMPILED_BANNER,
@@ -14,10 +14,10 @@ import {
14
14
  getEnv,
15
15
  getOutputExtensionMap,
16
16
  loadStormConfig
17
- } from "./chunk-C7RQ2QZM.js";
17
+ } from "./chunk-EKJD2HV5.js";
18
18
  import {
19
19
  depsCheckPlugin
20
- } from "./chunk-B6XATEM4.js";
20
+ } from "./chunk-5SXB2YMC.js";
21
21
  import {
22
22
  getStopwatch,
23
23
  isVerbose,
@@ -27,7 +27,7 @@ import {
27
27
  writeSuccess,
28
28
  writeTrace,
29
29
  writeWarning
30
- } from "./chunk-IMZK22U3.js";
30
+ } from "./chunk-CHCOA7BI.js";
31
31
  import {
32
32
  joinPaths
33
33
  } from "./chunk-7MDMXJ5V.js";
@@ -6,13 +6,13 @@ import {
6
6
  } from "./chunk-LYDEMC26.js";
7
7
  import {
8
8
  onErrorPlugin
9
- } from "./chunk-Y67WRXQG.js";
9
+ } from "./chunk-I457R337.js";
10
10
  import {
11
11
  resolvePathsPlugin
12
12
  } from "./chunk-DAGDNKO5.js";
13
13
  import {
14
14
  tscPlugin
15
- } from "./chunk-UY5T74KN.js";
15
+ } from "./chunk-4U2FYKOQ.js";
16
16
  import {
17
17
  COLOR_KEYS,
18
18
  LogLevel,
@@ -29,7 +29,7 @@ import {
29
29
  writeSystem,
30
30
  writeTrace,
31
31
  writeWarning
32
- } from "./chunk-IMZK22U3.js";
32
+ } from "./chunk-CHCOA7BI.js";
33
33
  import {
34
34
  correctPaths,
35
35
  joinPaths
@@ -69,39 +69,36 @@ import { stripIndents } from "@nx/devkit";
69
69
  import { relative } from "path";
70
70
 
71
71
  // ../build-tools/src/utilities/copy-assets.ts
72
- import { hfs as hfs2 } from "@humanfs/node";
73
- import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
72
+ import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
74
73
  import { copyAssets as copyAssetsBase } from "@nx/js";
75
74
  import { glob } from "glob";
76
-
77
- // ../build-tools/src/utilities/read-nx-config.ts
78
- import { hfs } from "@humanfs/node";
75
+ import { readFile as readFile2, writeFile } from "node:fs/promises";
79
76
 
80
77
  // ../config-tools/src/config-file/get-config-file.ts
81
78
  import { loadConfig } from "c12";
82
79
  import defu from "defu";
83
80
  var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
84
81
  const workspacePath = filePath || findWorkspaceRoot(filePath);
85
- let config = loadConfig({
82
+ let config = await loadConfig({
86
83
  cwd: workspacePath,
87
84
  packageJson: true,
88
85
  name: fileName,
89
86
  envName: fileName?.toUpperCase(),
90
87
  jitiOptions: {
91
88
  debug: false,
92
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
89
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
93
90
  },
94
91
  ...options
95
92
  });
96
93
  if (!config || Object.keys(config).length === 0) {
97
- config = loadConfig({
94
+ config = await loadConfig({
98
95
  cwd: workspacePath,
99
96
  packageJson: true,
100
97
  name: fileName,
101
98
  envName: fileName?.toUpperCase(),
102
99
  jitiOptions: {
103
100
  debug: false,
104
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
101
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
105
102
  },
106
103
  configFile: fileName,
107
104
  ...options
@@ -555,6 +552,8 @@ ${formatLogMessage(config)}`, config);
555
552
  }, "loadStormConfig");
556
553
 
557
554
  // ../build-tools/src/utilities/read-nx-config.ts
555
+ import { existsSync } from "node:fs";
556
+ import { readFile } from "node:fs/promises";
558
557
  var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
559
558
  let rootDir = workspaceRoot;
560
559
  if (!rootDir) {
@@ -562,10 +561,11 @@ var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
562
561
  rootDir = config.workspaceRoot;
563
562
  }
564
563
  const nxJsonPath = joinPaths(rootDir, "nx.json");
565
- if (!await hfs.isFile(nxJsonPath)) {
564
+ if (!existsSync(nxJsonPath)) {
566
565
  throw new Error("Cannot find project.json configuration");
567
566
  }
568
- return hfs.json(nxJsonPath);
567
+ const configContent = await readFile(nxJsonPath, "utf8");
568
+ return JSON.parse(configContent);
569
569
  }, "readNxConfig");
570
570
 
571
571
  // ../build-tools/src/utilities/copy-assets.ts
@@ -600,14 +600,12 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
600
600
  });
601
601
  }
602
602
  const nxJson = readNxConfig(config.workspaceRoot);
603
- const projectGraph = await createProjectGraphAsync({
604
- exitOnError: true
605
- });
603
+ const projectGraph = readCachedProjectGraph();
606
604
  const projectsConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
607
605
  if (!projectsConfigurations?.projects?.[projectName]) {
608
606
  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.");
609
607
  }
610
- const buildTarget = projectsConfigurations.projects[projectName]?.targets?.build;
608
+ const buildTarget = projectsConfigurations.projects[projectName].targets?.build;
611
609
  if (!buildTarget) {
612
610
  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")}`);
613
611
  }
@@ -637,42 +635,30 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
637
635
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
638
636
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
639
637
  ]);
640
- await Promise.allSettled(files.map(async (file) => hfs2.write(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
638
+ await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
641
639
 
642
- ${await hfs2.text(file)}
640
+ ${await readFile2(file, "utf8")}
643
641
 
644
642
  ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
645
643
  }
646
644
  }, "copyAssets");
647
645
 
648
646
  // ../build-tools/src/utilities/generate-package-json.ts
649
- import { hfs as hfs3 } from "@humanfs/node";
650
647
  import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
651
648
  import { Glob } from "glob";
652
- import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2 } from "nx/src/project-graph/project-graph";
649
+ import { existsSync as existsSync2 } from "node:fs";
650
+ import { readFile as readFile3 } from "node:fs/promises";
651
+ import { readCachedProjectGraph as readCachedProjectGraph2 } from "nx/src/project-graph/project-graph";
653
652
  var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
654
- const projectGraph = await createProjectGraphAsync2({
655
- exitOnError: true
656
- });
657
- const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
658
- if (!projectConfigurations?.projects?.[projectName]) {
659
- 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.");
660
- }
661
- const projectJsonPath = joinPaths(workspaceRoot, projectRoot, "project.json");
662
- if (!await hfs3.isFile(projectJsonPath)) {
663
- throw new Error("Cannot find project.json configuration");
664
- }
665
- if (!projectConfigurations?.projects?.[projectName]) {
666
- 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.");
667
- }
668
- const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
653
+ const projectDependencies = calculateProjectBuildableDependencies(void 0, readCachedProjectGraph2(), workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
669
654
  const localPackages = [];
670
655
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
671
656
  const projectNode = project.node;
672
657
  if (projectNode.data.root) {
673
658
  const projectPackageJsonPath = joinPaths(workspaceRoot, projectNode.data.root, "package.json");
674
- if (await hfs3.isFile(projectPackageJsonPath)) {
675
- const projectPackageJson = await hfs3.json(projectPackageJsonPath);
659
+ if (existsSync2(projectPackageJsonPath)) {
660
+ const projectPackageJsonContent = await readFile3(projectPackageJsonPath, "utf8");
661
+ const projectPackageJson = JSON.parse(projectPackageJsonContent);
676
662
  if (projectPackageJson.private !== false) {
677
663
  localPackages.push(projectPackageJson);
678
664
  }
@@ -708,7 +694,8 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
708
694
  }, "addPackageDependencies");
709
695
  var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
710
696
  const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : findWorkspaceRoot();
711
- const workspacePackageJson = await hfs3.json(joinPaths(workspaceRoot, "package.json"));
697
+ const workspacePackageJsonContent = await readFile3(joinPaths(workspaceRoot, "package.json"), "utf8");
698
+ const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
712
699
  packageJson.type ??= "module";
713
700
  packageJson.sideEffects ??= false;
714
701
  if (includeSrc === true) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeError
3
- } from "./chunk-IMZK22U3.js";
3
+ } from "./chunk-CHCOA7BI.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-3GQAWCBQ.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZKJVN5D7cjs = require('./chunk-ZKJVN5D7.cjs');
3
+ var _chunkRRTBX24Mcjs = require('./chunk-RRTBX24M.cjs');
4
4
 
5
5
 
6
6
  var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
@@ -11,7 +11,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
11
11
  setup(build) {
12
12
  build.onEnd((result) => {
13
13
  if (result.errors.length > 0 && process.env.WATCH !== "true") {
14
- _chunkZKJVN5D7cjs.writeError.call(void 0, `The following errors occurred during the build:
14
+ _chunkRRTBX24Mcjs.writeError.call(void 0, `The following errors occurred during the build:
15
15
  ${result.errors.map((error) => error.text).join("\n")}
16
16
 
17
17
  `, resolvedOptions.config);