@storm-software/esbuild 0.23.13 → 0.23.15

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.23.12-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.23.14-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,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkZMQZFCEUcjs = require('./chunk-ZMQZFCEU.cjs');
5
- require('./chunk-7B5IS3JU.cjs');
6
- require('./chunk-EKAZKXNP.cjs');
4
+ var _chunkHWY22RLNcjs = require('./chunk-HWY22RLN.cjs');
5
+ require('./chunk-7GH6IQLM.cjs');
6
+ require('./chunk-IVFUCCVG.cjs');
7
7
  require('./chunk-S6M44SSZ.cjs');
8
8
  require('./chunk-WRBUO7H6.cjs');
9
- require('./chunk-TVEZYOW4.cjs');
9
+ require('./chunk-EZPAK54E.cjs');
10
10
  require('./chunk-SSEYS7LI.cjs');
11
- require('./chunk-W7IOYOPN.cjs');
12
- require('./chunk-URNZZJ4H.cjs');
13
- require('./chunk-YMPJ3GHZ.cjs');
11
+ require('./chunk-WLOCBN4Z.cjs');
12
+ require('./chunk-U5LZSTP3.cjs');
13
+ require('./chunk-SUAWGD24.cjs');
14
14
  require('./chunk-XITTOHOG.cjs');
15
15
  require('./chunk-CGFDQ5AJ.cjs');
16
16
  require('./chunk-EZGTDCYM.cjs');
@@ -18,4 +18,4 @@ require('./chunk-BGYQAVKQ.cjs');
18
18
 
19
19
 
20
20
 
21
- exports.build = _chunkZMQZFCEUcjs.build; exports.cleanOutputPath = _chunkZMQZFCEUcjs.cleanOutputPath;
21
+ exports.build = _chunkHWY22RLNcjs.build; exports.cleanOutputPath = _chunkHWY22RLNcjs.cleanOutputPath;
package/dist/build.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  build,
3
3
  cleanOutputPath
4
- } from "./chunk-WRQFX4AD.js";
5
- import "./chunk-RAOTNBZB.js";
6
- import "./chunk-NZA22OTO.js";
4
+ } from "./chunk-4GNYHB56.js";
5
+ import "./chunk-DSL7ZVCY.js";
6
+ import "./chunk-AXDSSXRQ.js";
7
7
  import "./chunk-T5272PC2.js";
8
8
  import "./chunk-LYDEMC26.js";
9
- import "./chunk-HETBF2XF.js";
9
+ import "./chunk-TR3LJQBE.js";
10
10
  import "./chunk-Q3LOGZKI.js";
11
- import "./chunk-2TSSKHLN.js";
12
- import "./chunk-7BNTMCVO.js";
13
- import "./chunk-GUU57L7S.js";
11
+ import "./chunk-RZ4ZXSK6.js";
12
+ import "./chunk-A3GRRLNW.js";
13
+ import "./chunk-O7T743WQ.js";
14
14
  import "./chunk-YMTDVMD6.js";
15
15
  import "./chunk-YNQ45EAM.js";
16
16
  import "./chunk-GWG4HOQ6.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cleanDirectories
3
- } from "./chunk-RAOTNBZB.js";
3
+ } from "./chunk-DSL7ZVCY.js";
4
4
  import {
5
5
  DEFAULT_BUILD_OPTIONS,
6
6
  DEFAULT_COMPILED_BANNER,
@@ -14,10 +14,10 @@ import {
14
14
  getEntryPoints,
15
15
  getEnv,
16
16
  getOutputExtensionMap
17
- } from "./chunk-NZA22OTO.js";
17
+ } from "./chunk-AXDSSXRQ.js";
18
18
  import {
19
19
  depsCheckPlugin
20
- } from "./chunk-7BNTMCVO.js";
20
+ } from "./chunk-A3GRRLNW.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-GUU57L7S.js";
30
+ } from "./chunk-O7T743WQ.js";
31
31
  import {
32
32
  joinPaths
33
33
  } from "./chunk-YMTDVMD6.js";
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkYMPJ3GHZcjs = require('./chunk-YMPJ3GHZ.cjs');
4
+ var _chunkSUAWGD24cjs = require('./chunk-SUAWGD24.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 _promises = require('fs/promises');
11
11
  async function clean(name = "ESBuild", directory, config) {
12
- _chunkYMPJ3GHZcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
- const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, `${name} output clean`);
12
+ _chunkSUAWGD24cjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
+ const stopwatch = _chunkSUAWGD24cjs.getStopwatch.call(void 0, `${name} output clean`);
14
14
  await cleanDirectories(name, directory, config);
15
15
  stopwatch();
16
16
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  writeError,
3
3
  writeWarning
4
- } from "./chunk-GUU57L7S.js";
4
+ } from "./chunk-O7T743WQ.js";
5
5
  import {
6
6
  __name,
7
7
  __require
@@ -6,13 +6,13 @@ import {
6
6
  } from "./chunk-LYDEMC26.js";
7
7
  import {
8
8
  onErrorPlugin
9
- } from "./chunk-HETBF2XF.js";
9
+ } from "./chunk-TR3LJQBE.js";
10
10
  import {
11
11
  resolvePathsPlugin
12
12
  } from "./chunk-Q3LOGZKI.js";
13
13
  import {
14
14
  tscPlugin
15
- } from "./chunk-2TSSKHLN.js";
15
+ } from "./chunk-RZ4ZXSK6.js";
16
16
  import {
17
17
  COLOR_KEYS,
18
18
  LogLevel,
@@ -28,7 +28,7 @@ import {
28
28
  writeDebug,
29
29
  writeTrace,
30
30
  writeWarning
31
- } from "./chunk-GUU57L7S.js";
31
+ } from "./chunk-O7T743WQ.js";
32
32
  import {
33
33
  correctPaths,
34
34
  joinPaths
@@ -125,11 +125,12 @@ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `//
125
125
  // ../build-tools/src/utilities/generate-package-json.ts
126
126
  import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
127
127
  import { Glob } from "glob";
128
- import { existsSync } from "node:fs";
128
+ import { existsSync, readFileSync } from "node:fs";
129
129
  import { readFile as readFile2 } from "node:fs/promises";
130
- import { readCachedProjectGraph } from "nx/src/project-graph/project-graph";
130
+ import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "nx/src/project-graph/project-graph";
131
131
  var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
132
- const projectDependencies = calculateProjectBuildableDependencies(void 0, readCachedProjectGraph(), workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
132
+ const projectGraph = readCachedProjectGraph();
133
+ const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
133
134
  const localPackages = [];
134
135
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
135
136
  const projectNode = project.node;
@@ -146,26 +147,38 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
146
147
  }
147
148
  if (localPackages.length > 0) {
148
149
  writeTrace(`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
149
- packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
150
- if (!ret[localPackage.name]) {
151
- ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
150
+ const projectJsonFile = await readFile2(joinPaths(projectRoot, "project.json"), "utf8");
151
+ const projectJson = JSON.parse(projectJsonFile);
152
+ const projectName2 = projectJson.name;
153
+ const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
154
+ if (!projectConfigurations?.projects?.[projectName2]) {
155
+ 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.");
156
+ }
157
+ const implicitDependencies = projectConfigurations.projects?.[projectName2].implicitDependencies?.reduce((ret, dep) => {
158
+ if (projectConfigurations.projects?.[dep]) {
159
+ const depPackageJsonPath = joinPaths(workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
160
+ if (existsSync(depPackageJsonPath)) {
161
+ const depPackageJsonContent = readFileSync(depPackageJsonPath, "utf8");
162
+ const depPackageJson = JSON.parse(depPackageJsonContent);
163
+ if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
164
+ ret.push(depPackageJson.name);
165
+ }
166
+ }
152
167
  }
153
168
  return ret;
154
- }, packageJson.peerDependencies ?? {});
155
- packageJson.peerDependenciesMeta = localPackages.reduce((ret, localPackage) => {
156
- if (!ret[localPackage.name]) {
157
- ret[localPackage.name] = {
158
- optional: false
159
- };
169
+ }, []);
170
+ packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
171
+ if (!ret[localPackage.name] && !implicitDependencies?.includes(localPackage.name)) {
172
+ ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
160
173
  }
161
174
  return ret;
162
- }, packageJson.peerDependenciesMeta ?? {});
175
+ }, packageJson.dependencies ?? {});
163
176
  packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
164
- if (!ret[localPackage.name]) {
177
+ if (!ret[localPackage.name] && implicitDependencies?.includes(localPackage.name)) {
165
178
  ret[localPackage.name] = localPackage.version || "0.0.1";
166
179
  }
167
180
  return ret;
168
- }, packageJson.peerDependencies ?? {});
181
+ }, packageJson.devDependencies ?? {});
169
182
  } else {
170
183
  writeTrace("\u{1F4E6} No local packages dependencies to add to package.json");
171
184
  }
@@ -271,10 +284,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
271
284
  }, "getConfigFileByName");
272
285
  var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
273
286
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
274
- const result = await getConfigFileByName("storm", workspacePath);
287
+ const result = await getConfigFileByName("storm-workspace", workspacePath);
275
288
  let config = result.config;
276
289
  const configFile = result.configFile;
277
- if (config && configFile && Object.keys(config).length > 0) {
290
+ if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
278
291
  writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
279
292
  logLevel: "all"
280
293
  });
@@ -283,9 +296,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
283
296
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
284
297
  for (const result2 of results) {
285
298
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
286
- writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
287
- logLevel: "all"
288
- });
299
+ if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
300
+ writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
301
+ logLevel: "all"
302
+ });
303
+ }
289
304
  config = defu(result2.config ?? {}, config ?? {});
290
305
  }
291
306
  }
@@ -361,7 +376,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
361
376
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
362
377
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
363
378
  },
364
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
379
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
380
+ skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
365
381
  };
366
382
  const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
367
383
  config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
@@ -596,6 +612,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
596
612
  process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
597
613
  process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
598
614
  }
615
+ if (config.skipConfigLogging !== void 0) {
616
+ process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
617
+ }
599
618
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
600
619
  for (const key of Object.keys(config.extensions ?? {})) {
601
620
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
@@ -713,7 +732,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
713
732
  const defaultConfig = await getDefaultConfig(_workspaceRoot);
714
733
  const configFile = await getConfigFile(_workspaceRoot);
715
734
  if (!configFile && !skipLogs) {
716
- writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
735
+ writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
717
736
  logLevel: "all"
718
737
  });
719
738
  }
@@ -751,8 +770,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
751
770
  var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
752
771
  const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
753
772
  setConfigEnv(config);
754
- if (!skipLogs) {
755
- writeTrace(`\u2699\uFE0F Using Storm configuration:
773
+ if (!skipLogs && !config.skipConfigLogging) {
774
+ writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
756
775
  ${formatLogMessage(config)}`, config);
757
776
  }
758
777
  return config;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getStopwatch,
3
3
  writeDebug
4
- } from "./chunk-GUU57L7S.js";
4
+ } from "./chunk-O7T743WQ.js";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-3GQAWCBQ.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkYMPJ3GHZcjs = require('./chunk-YMPJ3GHZ.cjs');
3
+ var _chunkSUAWGD24cjs = require('./chunk-SUAWGD24.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
- _chunkYMPJ3GHZcjs.writeError.call(void 0, `The following errors occurred during the build:
14
+ _chunkSUAWGD24cjs.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);
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunk7B5IS3JUcjs = require('./chunk-7B5IS3JU.cjs');
3
+ var _chunk7GH6IQLMcjs = require('./chunk-7GH6IQLM.cjs');
4
4
 
5
5
 
6
6
 
@@ -14,10 +14,10 @@ var _chunk7B5IS3JUcjs = require('./chunk-7B5IS3JU.cjs');
14
14
 
15
15
 
16
16
 
17
- var _chunkEKAZKXNPcjs = require('./chunk-EKAZKXNP.cjs');
17
+ var _chunkIVFUCCVGcjs = require('./chunk-IVFUCCVG.cjs');
18
18
 
19
19
 
20
- var _chunkURNZZJ4Hcjs = require('./chunk-URNZZJ4H.cjs');
20
+ var _chunkU5LZSTP3cjs = require('./chunk-U5LZSTP3.cjs');
21
21
 
22
22
 
23
23
 
@@ -27,7 +27,7 @@ var _chunkURNZZJ4Hcjs = require('./chunk-URNZZJ4H.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunkYMPJ3GHZcjs = require('./chunk-YMPJ3GHZ.cjs');
30
+ var _chunkSUAWGD24cjs = require('./chunk-SUAWGD24.cjs');
31
31
 
32
32
 
33
33
  var _chunkXITTOHOGcjs = require('./chunk-XITTOHOG.cjs');
@@ -278,9 +278,9 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
278
278
  if (!workspaceRoot) {
279
279
  throw new Error("Cannot find Nx workspace root");
280
280
  }
281
- const config = await _chunkEKAZKXNPcjs.getConfig.call(void 0, workspaceRoot.dir);
282
- _chunkYMPJ3GHZcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
283
- const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, "Build options resolution");
281
+ const config = await _chunkIVFUCCVGcjs.getConfig.call(void 0, workspaceRoot.dir);
282
+ _chunkSUAWGD24cjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
283
+ const stopwatch = _chunkSUAWGD24cjs.getStopwatch.call(void 0, "Build options resolution");
284
284
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
285
285
  exitOnError: true
286
286
  });
@@ -295,17 +295,17 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
295
295
  if (!_optionalChain([projectConfigurations, 'optionalAccess', _14 => _14.projects, 'optionalAccess', _15 => _15[projectName]])) {
296
296
  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.");
297
297
  }
298
- const options = _defu2.default.call(void 0, userOptions, _chunkEKAZKXNPcjs.DEFAULT_BUILD_OPTIONS);
298
+ const options = _defu2.default.call(void 0, userOptions, _chunkIVFUCCVGcjs.DEFAULT_BUILD_OPTIONS);
299
299
  options.name ??= `${projectName}-${options.format}`;
300
- options.target ??= _chunkEKAZKXNPcjs.DEFAULT_TARGET;
300
+ options.target ??= _chunkIVFUCCVGcjs.DEFAULT_TARGET;
301
301
  const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
302
302
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
303
303
  throw new Error("Cannot find package.json configuration");
304
304
  }
305
305
  const packageJsonFile = await _promises2.default.readFile(packageJsonPath, "utf8");
306
306
  const packageJson = JSON.parse(packageJsonFile);
307
- const outExtension = _chunkEKAZKXNPcjs.getOutputExtensionMap.call(void 0, options, packageJson.type);
308
- const env = _chunkEKAZKXNPcjs.getEnv.call(void 0, "esbuild", options);
307
+ const outExtension = _chunkIVFUCCVGcjs.getOutputExtensionMap.call(void 0, options, packageJson.type);
308
+ const env = _chunkIVFUCCVGcjs.getEnv.call(void 0, "esbuild", options);
309
309
  const result = {
310
310
  ...options,
311
311
  config,
@@ -325,7 +325,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
325
325
  ...userOptions,
326
326
  tsconfig: _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
327
327
  format: options.format || "cjs",
328
- entryPoints: await _chunkEKAZKXNPcjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
328
+ entryPoints: await _chunkIVFUCCVGcjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
329
329
  "./src/index.ts"
330
330
  ], userOptions.emitOnAll),
331
331
  outdir: userOptions.outputPath || _chunkXITTOHOGcjs.joinPaths.call(void 0, "dist", projectRoot),
@@ -336,7 +336,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
336
336
  projectGraph,
337
337
  sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, "src"),
338
338
  minify: userOptions.minify || !userOptions.debug,
339
- verbose: userOptions.verbose || _chunkYMPJ3GHZcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
339
+ verbose: userOptions.verbose || _chunkSUAWGD24cjs.isVerbose.call(void 0, ) || userOptions.debug === true,
340
340
  includeSrc: userOptions.includeSrc === true,
341
341
  metafile: userOptions.metafile !== false,
342
342
  generatePackageJson: userOptions.generatePackageJson !== false,
@@ -350,8 +350,8 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
350
350
  outExtension,
351
351
  footer: userOptions.footer,
352
352
  banner: {
353
- js: options.banner || _chunkEKAZKXNPcjs.DEFAULT_COMPILED_BANNER,
354
- css: options.banner || _chunkEKAZKXNPcjs.DEFAULT_COMPILED_BANNER
353
+ js: options.banner || _chunkIVFUCCVGcjs.DEFAULT_COMPILED_BANNER,
354
+ css: options.banner || _chunkIVFUCCVGcjs.DEFAULT_COMPILED_BANNER
355
355
  },
356
356
  splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
357
357
  treeShaking: options.format === "esm",
@@ -377,14 +377,14 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
377
377
  ..._nullishCoalesce(options.inject, () => ( []))
378
378
  ].filter(Boolean)
379
379
  };
380
- result.plugins = _nullishCoalesce(userOptions.plugins, () => ( _chunkEKAZKXNPcjs.getDefaultBuildPlugins.call(void 0, userOptions, result)));
380
+ result.plugins = _nullishCoalesce(userOptions.plugins, () => ( _chunkIVFUCCVGcjs.getDefaultBuildPlugins.call(void 0, userOptions, result)));
381
381
  stopwatch();
382
382
  return result;
383
383
  }, "resolveOptions");
384
384
  async function generatePackageJson(context2) {
385
385
  if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
386
- _chunkYMPJ3GHZcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
387
- const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, "Write package.json file");
386
+ _chunkSUAWGD24cjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
387
+ const stopwatch = _chunkSUAWGD24cjs.getStopwatch.call(void 0, "Write package.json file");
388
388
  const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
389
389
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
390
390
  throw new Error("Cannot find package.json configuration");
@@ -394,11 +394,11 @@ async function generatePackageJson(context2) {
394
394
  if (!packageJson) {
395
395
  throw new Error("Cannot find package.json configuration file");
396
396
  }
397
- packageJson = await _chunkEKAZKXNPcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
398
- packageJson = await _chunkEKAZKXNPcjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
397
+ packageJson = await _chunkIVFUCCVGcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
398
+ packageJson = await _chunkIVFUCCVGcjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
399
399
  packageJson.exports ??= {};
400
400
  packageJson.exports["./package.json"] ??= "./package.json";
401
- packageJson.exports["."] ??= _chunkEKAZKXNPcjs.addPackageJsonExport.call(void 0, "index", packageJson.type, context2.options.sourceRoot);
401
+ packageJson.exports["."] ??= _chunkIVFUCCVGcjs.addPackageJsonExport.call(void 0, "index", packageJson.type, context2.options.sourceRoot);
402
402
  let entryPoints = [
403
403
  {
404
404
  in: "./src/index.ts",
@@ -416,7 +416,7 @@ async function generatePackageJson(context2) {
416
416
  const split = entryPoint.out.split(".");
417
417
  split.pop();
418
418
  const entry = split.join(".").replaceAll("\\", "/");
419
- packageJson.exports[`./${entry}`] ??= _chunkEKAZKXNPcjs.addPackageJsonExport.call(void 0, entry, packageJson.type, context2.options.sourceRoot);
419
+ packageJson.exports[`./${entry}`] ??= _chunkIVFUCCVGcjs.addPackageJsonExport.call(void 0, entry, packageJson.type, context2.options.sourceRoot);
420
420
  }
421
421
  }
422
422
  packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
@@ -454,8 +454,8 @@ async function generateContext(getOptions) {
454
454
  }
455
455
  _chunkBGYQAVKQcjs.__name.call(void 0, generateContext, "generateContext");
456
456
  async function executeEsBuild(context2) {
457
- _chunkYMPJ3GHZcjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
458
- const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, `${context2.options.name} build`);
457
+ _chunkSUAWGD24cjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
458
+ const stopwatch = _chunkSUAWGD24cjs.getStopwatch.call(void 0, `${context2.options.name} build`);
459
459
  if (process.env.WATCH === "true") {
460
460
  const ctx = await esbuild.context(context2.options);
461
461
  watch(ctx, context2.options);
@@ -471,9 +471,9 @@ async function executeEsBuild(context2) {
471
471
  _chunkBGYQAVKQcjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
472
472
  async function copyBuildAssets(context2) {
473
473
  if (_optionalChain([context2, 'access', _16 => _16.result, 'optionalAccess', _17 => _17.errors, 'access', _18 => _18.length]) === 0) {
474
- _chunkYMPJ3GHZcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
475
- const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
476
- await _chunkEKAZKXNPcjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
474
+ _chunkSUAWGD24cjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
475
+ const stopwatch = _chunkSUAWGD24cjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
476
+ await _chunkIVFUCCVGcjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
477
477
  stopwatch();
478
478
  }
479
479
  return context2;
@@ -482,9 +482,9 @@ _chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
482
482
  async function reportResults(context2) {
483
483
  if (_optionalChain([context2, 'access', _19 => _19.result, 'optionalAccess', _20 => _20.errors, 'access', _21 => _21.length]) === 0) {
484
484
  if (context2.result.warnings.length > 0) {
485
- _chunkYMPJ3GHZcjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
485
+ _chunkSUAWGD24cjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
486
486
  }
487
- _chunkYMPJ3GHZcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
487
+ _chunkSUAWGD24cjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
488
488
  }
489
489
  }
490
490
  _chunkBGYQAVKQcjs.__name.call(void 0, reportResults, "reportResults");
@@ -510,7 +510,7 @@ async function dependencyCheck(options) {
510
510
  write: false,
511
511
  outdir: "out",
512
512
  plugins: [
513
- _chunkURNZZJ4Hcjs.depsCheckPlugin.call(void 0, options.bundle)
513
+ _chunkU5LZSTP3cjs.depsCheckPlugin.call(void 0, options.bundle)
514
514
  ]
515
515
  });
516
516
  await buildPromise.catch(() => {
@@ -520,17 +520,17 @@ async function dependencyCheck(options) {
520
520
  _chunkBGYQAVKQcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
521
521
  async function cleanOutputPath(context2) {
522
522
  if (context2.options.clean !== false && context2.options.outdir) {
523
- _chunkYMPJ3GHZcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
524
- const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
525
- await _chunk7B5IS3JUcjs.cleanDirectories.call(void 0, context2.options.name, context2.options.outdir, context2.options.config);
523
+ _chunkSUAWGD24cjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
524
+ const stopwatch = _chunkSUAWGD24cjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
525
+ await _chunk7GH6IQLMcjs.cleanDirectories.call(void 0, context2.options.name, context2.options.outdir, context2.options.config);
526
526
  stopwatch();
527
527
  }
528
528
  return context2;
529
529
  }
530
530
  _chunkBGYQAVKQcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
531
531
  async function build2(options) {
532
- _chunkYMPJ3GHZcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
533
- const stopwatch = _chunkYMPJ3GHZcjs.getStopwatch.call(void 0, "ESBuild pipeline");
532
+ _chunkSUAWGD24cjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
533
+ const stopwatch = _chunkSUAWGD24cjs.getStopwatch.call(void 0, "ESBuild pipeline");
534
534
  try {
535
535
  const opts = Array.isArray(options) ? options : [
536
536
  options
@@ -540,9 +540,9 @@ async function build2(options) {
540
540
  }
541
541
  void transduce.async(opts, dependencyCheck);
542
542
  await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
543
- _chunkYMPJ3GHZcjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
543
+ _chunkSUAWGD24cjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
544
544
  } catch (error) {
545
- _chunkYMPJ3GHZcjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
545
+ _chunkSUAWGD24cjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
546
546
  throw error;
547
547
  } finally {
548
548
  stopwatch();
@@ -570,9 +570,9 @@ var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, opt
570
570
  return context2.rebuild();
571
571
  });
572
572
  if (rebuildResult instanceof Error) {
573
- _chunkYMPJ3GHZcjs.writeError.call(void 0, rebuildResult.message);
573
+ _chunkSUAWGD24cjs.writeError.call(void 0, rebuildResult.message);
574
574
  }
575
- _chunkYMPJ3GHZcjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
575
+ _chunkSUAWGD24cjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
576
576
  }, 10);
577
577
  changeWatcher.on("change", fastRebuild);
578
578
  return void 0;