@storm-software/cloudflare-tools 0.54.3 → 0.54.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.54.4 (2025-01-23)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **monorepo:** Resolve issue with internal package referencing ([cdc11477](https://github.com/storm-software/storm-ops/commit/cdc11477))
6
+
1
7
  ## 0.54.3 (2025-01-22)
2
8
 
3
9
  ### Miscellaneous
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.54.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.54.3-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 -->
@@ -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 _chunkNVFBJS7Cjs = require('./chunk-NVFBJS7C.js');
3
+ var _chunkPR2M4S7Fjs = require('./chunk-PR2M4S7F.js');
4
4
 
5
5
 
6
6
  var _chunkDFG3KJWSjs = require('./chunk-DFG3KJWS.js');
@@ -52,7 +52,7 @@ async function applicationGenerator(tree, schema) {
52
52
  ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`, config);
53
53
  const options = await normalizeOptions(tree, schema, config);
54
54
  const tasks = [];
55
- tasks.push(await _chunkNVFBJS7Cjs.generator_default.call(void 0, tree, {
55
+ tasks.push(await _chunkPR2M4S7Fjs.generator_default.call(void 0, tree, {
56
56
  ...options,
57
57
  skipFormat: true
58
58
  }));
@@ -8,7 +8,7 @@ var require_package = __commonJS({
8
8
  "package.json"(exports, module) {
9
9
  module.exports = {
10
10
  name: "@storm-software/cloudflare-tools",
11
- version: "0.54.3",
11
+ version: "0.54.4",
12
12
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
13
13
  repository: {
14
14
  type: "github",
@@ -8,7 +8,7 @@ var require_package = _chunkJ5SB6L2Ljs.__commonJS.call(void 0, {
8
8
  "package.json"(exports, module) {
9
9
  module.exports = {
10
10
  name: "@storm-software/cloudflare-tools",
11
- version: "0.54.3",
11
+ version: "0.54.4",
12
12
  description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
13
13
  repository: {
14
14
  type: "github",
@@ -449,38 +449,18 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
449
449
 
450
450
 
451
451
  // ../build-tools/src/utilities/copy-assets.ts
452
-
453
- var _js = require('@nx/js');
452
+ var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
454
453
  var _glob = require('glob');
455
454
  var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
456
-
457
- // ../build-tools/src/utilities/read-nx-config.ts
458
-
459
-
460
- var readNxConfig = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (workspaceRoot3) => {
461
- let rootDir = workspaceRoot3;
462
- if (!rootDir) {
463
- const config = await _chunkDFG3KJWSjs.getConfig.call(void 0, );
464
- rootDir = config.workspaceRoot;
465
- }
466
- const nxJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, rootDir, "nx.json");
467
- if (!_fs.existsSync.call(void 0, nxJsonPath)) {
468
- throw new Error("Cannot find project.json configuration");
469
- }
470
- const configContent = await _promises.readFile.call(void 0, nxJsonPath, "utf8");
471
- return JSON.parse(configContent);
472
- }, "readNxConfig");
473
-
474
- // ../build-tools/src/utilities/copy-assets.ts
475
- var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
455
+ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
476
456
  const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
477
457
  pendingAssets.push({
478
- input: _chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot),
458
+ input: projectRoot,
479
459
  glob: "*.md",
480
460
  output: "."
481
461
  });
482
462
  pendingAssets.push({
483
- input: config.workspaceRoot,
463
+ input: ".",
484
464
  glob: "LICENSE",
485
465
  output: "."
486
466
  });
@@ -498,36 +478,15 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
498
478
  output: "src/"
499
479
  });
500
480
  }
501
- const nxJson = readNxConfig(config.workspaceRoot);
502
- const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
503
- const projectsConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
504
- if (!_optionalChain([projectsConfigurations, 'optionalAccess', _29 => _29.projects, 'optionalAccess', _30 => _30[projectName]])) {
505
- 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.");
506
- }
507
- const buildTarget = _optionalChain([projectsConfigurations, 'access', _31 => _31.projects, 'access', _32 => _32[projectName], 'access', _33 => _33.targets, 'optionalAccess', _34 => _34.build]);
508
- if (!buildTarget) {
509
- 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 ${_chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
510
- }
511
481
  _chunkILLCSSWNjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
512
482
  ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkILLCSSWNjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
513
- const result = await _js.copyAssets.call(void 0, {
514
- assets: pendingAssets,
515
- watch: false,
516
- outputPath
517
- }, {
518
- root: config.workspaceRoot,
519
- targetName: "build",
520
- target: buildTarget,
521
- projectName,
522
- projectGraph,
523
- projectsConfigurations,
524
- nxJsonConfiguration: nxJson,
525
- cwd: config.workspaceRoot,
526
- isVerbose: _chunkILLCSSWNjs.isVerbose.call(void 0, config.logLevel)
483
+ const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
484
+ projectDir: projectRoot,
485
+ rootDir: config.workspaceRoot,
486
+ outputDir: outputPath,
487
+ assets: pendingAssets
527
488
  });
528
- if (!result.success) {
529
- throw new Error("The Build process failed trying to copy assets");
530
- }
489
+ await assetHandler.processAllAssetsOnce();
531
490
  if (includeSrc === true) {
532
491
  _chunkILLCSSWNjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkILLCSSWNjs.joinPaths.call(void 0, outputPath, "src")}`, config);
533
492
  const files = await _glob.glob.call(void 0, [
@@ -735,6 +694,10 @@ function getOutExtension(format2, pkgType) {
735
694
  }
736
695
  _chunkJ5SB6L2Ljs.__name.call(void 0, getOutExtension, "getOutExtension");
737
696
 
697
+ // ../build-tools/src/utilities/read-nx-config.ts
698
+
699
+
700
+
738
701
  // ../build-tools/src/utilities/task-graph.ts
739
702
  var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
740
703
 
@@ -813,15 +776,15 @@ var RendererEngine = class {
813
776
  if (!relativePath.startsWith("\\\\?\\")) {
814
777
  relativePath = relativePath.replace(/\\/g, "/");
815
778
  }
816
- const meta = _optionalChain([metafile, 'optionalAccess', _35 => _35.outputs, 'access', _36 => _36[relativePath]]);
779
+ const meta = _optionalChain([metafile, 'optionalAccess', _29 => _29.outputs, 'access', _30 => _30[relativePath]]);
817
780
  return {
818
781
  type: "chunk",
819
782
  path: file.path,
820
783
  code: file.text,
821
- map: _optionalChain([outputFiles, 'access', _37 => _37.find, 'call', _38 => _38((f) => f.path === `${file.path}.map`), 'optionalAccess', _39 => _39.text]),
822
- entryPoint: _optionalChain([meta, 'optionalAccess', _40 => _40.entryPoint]),
823
- exports: _optionalChain([meta, 'optionalAccess', _41 => _41.exports]),
824
- imports: _optionalChain([meta, 'optionalAccess', _42 => _42.imports])
784
+ map: _optionalChain([outputFiles, 'access', _31 => _31.find, 'call', _32 => _32((f) => f.path === `${file.path}.map`), 'optionalAccess', _33 => _33.text]),
785
+ entryPoint: _optionalChain([meta, 'optionalAccess', _34 => _34.entryPoint]),
786
+ exports: _optionalChain([meta, 'optionalAccess', _35 => _35.exports]),
787
+ imports: _optionalChain([meta, 'optionalAccess', _36 => _36.imports])
825
788
  };
826
789
  } else {
827
790
  return {
@@ -904,7 +867,7 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
904
867
  name: "storm:esm-split-code-to-cjs",
905
868
  setup(build5) {
906
869
  build5.onEnd(async (result) => {
907
- const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _43 => _43.metafile, 'optionalAccess', _44 => _44.outputs]), () => ( {})));
870
+ const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _37 => _37.metafile, 'optionalAccess', _38 => _38.outputs]), () => ( {})));
908
871
  const jsFiles = outFiles.filter((f) => f.endsWith("js"));
909
872
  await esbuild.build({
910
873
  outdir: resolvedOptions.outdir,
@@ -1026,7 +989,7 @@ ${result.errors.map((error) => error.text).join("\n")}
1026
989
  // ../esbuild/src/plugins/resolve-paths.ts
1027
990
 
1028
991
  function resolvePathsConfig(options, cwd) {
1029
- if (_optionalChain([options, 'optionalAccess', _45 => _45.compilerOptions, 'optionalAccess', _46 => _46.paths])) {
992
+ if (_optionalChain([options, 'optionalAccess', _39 => _39.compilerOptions, 'optionalAccess', _40 => _40.paths])) {
1030
993
  const paths = Object.entries(options.compilerOptions.paths);
1031
994
  const resolvedPaths = paths.map(([key, paths2]) => {
1032
995
  return [
@@ -1054,7 +1017,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (o
1054
1017
  build5.onResolve({
1055
1018
  filter: packagesRegex
1056
1019
  }, (args) => {
1057
- if (_optionalChain([build5, 'access', _47 => _47.initialOptions, 'access', _48 => _48.external, 'optionalAccess', _49 => _49.includes, 'call', _50 => _50(args.path)])) {
1020
+ if (_optionalChain([build5, 'access', _41 => _41.initialOptions, 'access', _42 => _42.external, 'optionalAccess', _43 => _43.includes, 'call', _44 => _44(args.path)])) {
1058
1021
  return {
1059
1022
  path: args.path,
1060
1023
  external: true
@@ -1162,7 +1125,7 @@ var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, r
1162
1125
  function getTypeDependencyPackageName(npmPackage) {
1163
1126
  if (npmPackage.startsWith("@")) {
1164
1127
  const [scope, name] = npmPackage.split("/");
1165
- return `@types/${_optionalChain([scope, 'optionalAccess', _51 => _51.slice, 'call', _52 => _52(1)])}__${name}`;
1128
+ return `@types/${_optionalChain([scope, 'optionalAccess', _45 => _45.slice, 'call', _46 => _46(1)])}__${name}`;
1166
1129
  }
1167
1130
  return `@types/${npmPackage}`;
1168
1131
  }
@@ -1369,7 +1332,7 @@ function pipeSync(fn, ...fns) {
1369
1332
  return (...args) => {
1370
1333
  let result = fn(...args);
1371
1334
  for (let i = 0; result !== skip && i < fns.length; ++i) {
1372
- result = _optionalChain([fns, 'access', _53 => _53[i], 'optionalCall', _54 => _54(result)]);
1335
+ result = _optionalChain([fns, 'access', _47 => _47[i], 'optionalCall', _48 => _48(result)]);
1373
1336
  }
1374
1337
  return result;
1375
1338
  };
@@ -1379,7 +1342,7 @@ function pipeAsync(fn, ...fns) {
1379
1342
  return async (...args) => {
1380
1343
  let result = await fn(...args);
1381
1344
  for (let i = 0; result !== skip && i < fns.length; ++i) {
1382
- result = await _optionalChain([fns, 'access', _55 => _55[i], 'optionalCall', _56 => _56(result)]);
1345
+ result = await _optionalChain([fns, 'access', _49 => _49[i], 'optionalCall', _50 => _50(result)]);
1383
1346
  }
1384
1347
  return result;
1385
1348
  };
@@ -1408,7 +1371,7 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1408
1371
  const projectJson = await _node.hfs.json(projectJsonPath);
1409
1372
  const projectName = projectJson.name;
1410
1373
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1411
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _57 => _57.projects, 'optionalAccess', _58 => _58[projectName]])) {
1374
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _51 => _51.projects, 'optionalAccess', _52 => _52[projectName]])) {
1412
1375
  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.");
1413
1376
  }
1414
1377
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
@@ -1584,17 +1547,17 @@ async function executeEsBuild(context2) {
1584
1547
  }
1585
1548
  _chunkJ5SB6L2Ljs.__name.call(void 0, executeEsBuild, "executeEsBuild");
1586
1549
  async function copyBuildAssets(context2) {
1587
- if (_optionalChain([context2, 'access', _59 => _59.result, 'optionalAccess', _60 => _60.errors, 'access', _61 => _61.length]) === 0) {
1550
+ if (_optionalChain([context2, 'access', _53 => _53.result, 'optionalAccess', _54 => _54.errors, 'access', _55 => _55.length]) === 0) {
1588
1551
  _chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
1589
1552
  const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
1590
- await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
1553
+ await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
1591
1554
  stopwatch();
1592
1555
  }
1593
1556
  return context2;
1594
1557
  }
1595
1558
  _chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
1596
1559
  async function reportResults(context2) {
1597
- if (_optionalChain([context2, 'access', _62 => _62.result, 'optionalAccess', _63 => _63.errors, 'access', _64 => _64.length]) === 0) {
1560
+ if (_optionalChain([context2, 'access', _56 => _56.result, 'optionalAccess', _57 => _57.errors, 'access', _58 => _58.length]) === 0) {
1598
1561
  if (context2.result.warnings.length > 0) {
1599
1562
  _chunkILLCSSWNjs.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);
1600
1563
  }
@@ -1692,14 +1655,14 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
1692
1655
  // ../workspace-tools/src/executors/esbuild/executor.ts
1693
1656
  async function esbuildExecutorFn(options, context2, config) {
1694
1657
  _chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
1695
- if (!_optionalChain([context2, 'access', _65 => _65.projectsConfigurations, 'optionalAccess', _66 => _66.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _67 => _67.projectsConfigurations, 'access', _68 => _68.projects, 'access', _69 => _69[context2.projectName], 'optionalAccess', _70 => _70.root])) {
1658
+ if (!_optionalChain([context2, 'access', _59 => _59.projectsConfigurations, 'optionalAccess', _60 => _60.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _61 => _61.projectsConfigurations, 'access', _62 => _62.projects, 'access', _63 => _63[context2.projectName], 'optionalAccess', _64 => _64.root])) {
1696
1659
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1697
1660
  }
1698
1661
  await build3({
1699
1662
  ...options,
1700
- projectRoot: _optionalChain([context2, 'access', _71 => _71.projectsConfigurations, 'access', _72 => _72.projects, 'optionalAccess', _73 => _73[context2.projectName], 'access', _74 => _74.root]),
1663
+ projectRoot: _optionalChain([context2, 'access', _65 => _65.projectsConfigurations, 'access', _66 => _66.projects, 'optionalAccess', _67 => _67[context2.projectName], 'access', _68 => _68.root]),
1701
1664
  projectName: context2.projectName,
1702
- sourceRoot: _optionalChain([context2, 'access', _75 => _75.projectsConfigurations, 'access', _76 => _76.projects, 'optionalAccess', _77 => _77[context2.projectName], 'optionalAccess', _78 => _78.sourceRoot]),
1665
+ sourceRoot: _optionalChain([context2, 'access', _69 => _69.projectsConfigurations, 'access', _70 => _70.projects, 'optionalAccess', _71 => _71[context2.projectName], 'optionalAccess', _72 => _72.sourceRoot]),
1703
1666
  format: options.format,
1704
1667
  platform: options.format
1705
1668
  });
@@ -1742,7 +1705,7 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
1742
1705
  var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
1743
1706
  var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
1744
1707
  async function sizeLimitExecutorFn(options, context2, config) {
1745
- if (!_optionalChain([context2, 'optionalAccess', _79 => _79.projectName]) || !_optionalChain([context2, 'access', _80 => _80.projectsConfigurations, 'optionalAccess', _81 => _81.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
1708
+ if (!_optionalChain([context2, 'optionalAccess', _73 => _73.projectName]) || !_optionalChain([context2, 'access', _74 => _74.projectsConfigurations, 'optionalAccess', _75 => _75.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
1746
1709
  throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
1747
1710
  }
1748
1711
  _chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
@@ -1751,7 +1714,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
1751
1714
  _esbuild3.default,
1752
1715
  _esbuildwhy2.default
1753
1716
  ], {
1754
- checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _82 => _82.projectsConfigurations, 'access', _83 => _83.projects, 'access', _84 => _84[context2.projectName], 'optionalAccess', _85 => _85.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _86 => _86.projectsConfigurations, 'access', _87 => _87.projects, 'access', _88 => _88[context2.projectName], 'optionalAccess', _89 => _89.root]), () => ( "./")), "src")))
1717
+ checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _76 => _76.projectsConfigurations, 'access', _77 => _77.projects, 'access', _78 => _78[context2.projectName], 'optionalAccess', _79 => _79.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _80 => _80.projectsConfigurations, 'access', _81 => _81.projects, 'access', _82 => _82[context2.projectName], 'optionalAccess', _83 => _83.root]), () => ( "./")), "src")))
1755
1718
  }).then((result) => {
1756
1719
  _chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
1757
1720
  });
@@ -1828,7 +1791,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
1828
1791
  const projectJson = await _node.hfs.json(projectJsonPath);
1829
1792
  const projectName = projectJson.name;
1830
1793
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1831
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _90 => _90.projects, 'optionalAccess', _91 => _91[projectName]])) {
1794
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _84 => _84.projects, 'optionalAccess', _85 => _85[projectName]])) {
1832
1795
  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.");
1833
1796
  }
1834
1797
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
@@ -1957,7 +1920,7 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, executeTSDown, "executeTSDown");
1957
1920
  async function copyBuildAssets2(options) {
1958
1921
  _chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
1959
1922
  const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${options.name} asset copy`);
1960
- await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
1923
+ await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
1961
1924
  stopwatch();
1962
1925
  return options;
1963
1926
  }
@@ -2008,14 +1971,14 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, build4, "build");
2008
1971
  // ../workspace-tools/src/executors/tsdown/executor.ts
2009
1972
  async function tsdownExecutorFn(options, context2, config) {
2010
1973
  _chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
2011
- if (!_optionalChain([context2, 'access', _92 => _92.projectsConfigurations, 'optionalAccess', _93 => _93.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _94 => _94.projectsConfigurations, 'access', _95 => _95.projects, 'access', _96 => _96[context2.projectName], 'optionalAccess', _97 => _97.root])) {
1974
+ if (!_optionalChain([context2, 'access', _86 => _86.projectsConfigurations, 'optionalAccess', _87 => _87.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _88 => _88.projectsConfigurations, 'access', _89 => _89.projects, 'access', _90 => _90[context2.projectName], 'optionalAccess', _91 => _91.root])) {
2012
1975
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
2013
1976
  }
2014
1977
  await build4({
2015
1978
  ...options,
2016
- projectRoot: _optionalChain([context2, 'access', _98 => _98.projectsConfigurations, 'access', _99 => _99.projects, 'optionalAccess', _100 => _100[context2.projectName], 'access', _101 => _101.root]),
1979
+ projectRoot: _optionalChain([context2, 'access', _92 => _92.projectsConfigurations, 'access', _93 => _93.projects, 'optionalAccess', _94 => _94[context2.projectName], 'access', _95 => _95.root]),
2017
1980
  projectName: context2.projectName,
2018
- sourceRoot: _optionalChain([context2, 'access', _102 => _102.projectsConfigurations, 'access', _103 => _103.projects, 'optionalAccess', _104 => _104[context2.projectName], 'optionalAccess', _105 => _105.sourceRoot]),
1981
+ sourceRoot: _optionalChain([context2, 'access', _96 => _96.projectsConfigurations, 'access', _97 => _97.projects, 'optionalAccess', _98 => _98[context2.projectName], 'optionalAccess', _99 => _99.sourceRoot]),
2019
1982
  format: options.format,
2020
1983
  platform: options.platform
2021
1984
  });
@@ -2079,7 +2042,7 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
2079
2042
  var _jiti = require('jiti');
2080
2043
  async function unbuildExecutorFn(options, context2, config) {
2081
2044
  _chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
2082
- if (!_optionalChain([context2, 'access', _106 => _106.projectsConfigurations, 'optionalAccess', _107 => _107.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
2045
+ if (!_optionalChain([context2, 'access', _100 => _100.projectsConfigurations, 'optionalAccess', _101 => _101.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
2083
2046
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
2084
2047
  }
2085
2048
  if (!context2.projectsConfigurations.projects[context2.projectName].root) {
@@ -2163,7 +2126,7 @@ var withRunGenerator = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (nam
2163
2126
  - workspaceRoot: ${workspaceRoot3}`, config);
2164
2127
  config = await _chunkDFG3KJWSjs.getConfig.call(void 0, workspaceRoot3);
2165
2128
  }
2166
- if (_optionalChain([generatorOptions, 'optionalAccess', _108 => _108.hooks, 'optionalAccess', _109 => _109.applyDefaultOptions])) {
2129
+ if (_optionalChain([generatorOptions, 'optionalAccess', _102 => _102.hooks, 'optionalAccess', _103 => _103.applyDefaultOptions])) {
2167
2130
  _chunkILLCSSWNjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
2168
2131
  options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
2169
2132
  _chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
@@ -2174,22 +2137,22 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
2174
2137
  workspaceRoot: tree.root,
2175
2138
  config
2176
2139
  }, applyWorkspaceBaseTokens);
2177
- if (_optionalChain([generatorOptions, 'optionalAccess', _110 => _110.hooks, 'optionalAccess', _111 => _111.preProcess])) {
2140
+ if (_optionalChain([generatorOptions, 'optionalAccess', _104 => _104.hooks, 'optionalAccess', _105 => _105.preProcess])) {
2178
2141
  _chunkILLCSSWNjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
2179
2142
  await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
2180
2143
  _chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
2181
2144
  }
2182
2145
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
2183
2146
  if (result) {
2184
- if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _112 => _112.error, 'optionalAccess', _113 => _113.message]) && typeof _optionalChain([result, 'optionalAccess', _114 => _114.error, 'optionalAccess', _115 => _115.message]) === "string" && _optionalChain([result, 'optionalAccess', _116 => _116.error, 'optionalAccess', _117 => _117.name]) && typeof _optionalChain([result, 'optionalAccess', _118 => _118.error, 'optionalAccess', _119 => _119.name]) === "string") {
2147
+ if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _106 => _106.error, 'optionalAccess', _107 => _107.message]) && typeof _optionalChain([result, 'optionalAccess', _108 => _108.error, 'optionalAccess', _109 => _109.message]) === "string" && _optionalChain([result, 'optionalAccess', _110 => _110.error, 'optionalAccess', _111 => _111.name]) && typeof _optionalChain([result, 'optionalAccess', _112 => _112.error, 'optionalAccess', _113 => _113.name]) === "string") {
2185
2148
  throw new Error(`The ${name} generator failed to run`, {
2186
- cause: _optionalChain([result, 'optionalAccess', _120 => _120.error])
2149
+ cause: _optionalChain([result, 'optionalAccess', _114 => _114.error])
2187
2150
  });
2188
2151
  } else if (result.success && result.data) {
2189
2152
  return result;
2190
2153
  }
2191
2154
  }
2192
- if (_optionalChain([generatorOptions, 'optionalAccess', _121 => _121.hooks, 'optionalAccess', _122 => _122.postProcess])) {
2155
+ if (_optionalChain([generatorOptions, 'optionalAccess', _115 => _115.hooks, 'optionalAccess', _116 => _116.postProcess])) {
2193
2156
  _chunkILLCSSWNjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
2194
2157
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
2195
2158
  _chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
@@ -2213,7 +2176,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
2213
2176
  // ../workspace-tools/src/base/typescript-library-generator.ts
2214
2177
 
2215
2178
  var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
2216
-
2179
+ var _js = require('@nx/js');
2217
2180
  var _init = require('@nx/js/src/generators/init/init'); var _init2 = _interopRequireDefault(_init);
2218
2181
  var _generator = require('@nx/js/src/generators/setup-verdaccio/generator'); var _generator2 = _interopRequireDefault(_generator);
2219
2182
 
@@ -2299,15 +2262,15 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2299
2262
  _devkit.addProjectConfiguration.call(void 0, tree, options.name, projectConfig);
2300
2263
  let repository = {
2301
2264
  type: "github",
2302
- url: _optionalChain([config, 'optionalAccess', _123 => _123.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _124 => _124.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _125 => _125.namespace]) || _optionalChain([config, 'optionalAccess', _126 => _126.name]) || "repository"}.git`
2265
+ url: _optionalChain([config, 'optionalAccess', _117 => _117.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _118 => _118.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _119 => _119.namespace]) || _optionalChain([config, 'optionalAccess', _120 => _120.name]) || "repository"}.git`
2303
2266
  };
2304
2267
  let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
2305
2268
  if (tree.exists("package.json")) {
2306
2269
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
2307
- if (_optionalChain([packageJson, 'optionalAccess', _127 => _127.repository])) {
2270
+ if (_optionalChain([packageJson, 'optionalAccess', _121 => _121.repository])) {
2308
2271
  repository = packageJson.repository;
2309
2272
  }
2310
- if (_optionalChain([packageJson, 'optionalAccess', _128 => _128.description])) {
2273
+ if (_optionalChain([packageJson, 'optionalAccess', _122 => _122.description])) {
2311
2274
  description = packageJson.description;
2312
2275
  }
2313
2276
  }
@@ -2362,9 +2325,9 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2362
2325
  _devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
2363
2326
  ...json,
2364
2327
  pnpm: {
2365
- ..._optionalChain([json, 'optionalAccess', _129 => _129.pnpm]),
2328
+ ..._optionalChain([json, 'optionalAccess', _123 => _123.pnpm]),
2366
2329
  overrides: {
2367
- ..._optionalChain([json, 'optionalAccess', _130 => _130.pnpm, 'optionalAccess', _131 => _131.overrides]),
2330
+ ..._optionalChain([json, 'optionalAccess', _124 => _124.pnpm, 'optionalAccess', _125 => _125.overrides]),
2368
2331
  [_nullishCoalesce(options.importPath, () => ( ""))]: "workspace:*"
2369
2332
  }
2370
2333
  }
@@ -2378,10 +2341,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2378
2341
  ]);
2379
2342
  if (tree.exists("package.json")) {
2380
2343
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
2381
- if (_optionalChain([packageJson, 'optionalAccess', _132 => _132.repository])) {
2344
+ if (_optionalChain([packageJson, 'optionalAccess', _126 => _126.repository])) {
2382
2345
  repository = packageJson.repository;
2383
2346
  }
2384
- if (_optionalChain([packageJson, 'optionalAccess', _133 => _133.description])) {
2347
+ if (_optionalChain([packageJson, 'optionalAccess', _127 => _127.description])) {
2385
2348
  description = packageJson.description;
2386
2349
  }
2387
2350
  }
@@ -2429,24 +2392,24 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, getOutputPath, "getOutputPath");
2429
2392
  function createProjectTsConfigJson(tree, options) {
2430
2393
  const tsconfig = {
2431
2394
  extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
2432
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _134 => _134.tsconfigOptions]), () => ( {})),
2395
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _128 => _128.tsconfigOptions]), () => ( {})),
2433
2396
  compilerOptions: {
2434
2397
  ...options.rootProject ? _js.tsConfigBaseOptions : {},
2435
2398
  outDir: _chunkILLCSSWNjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
2436
2399
  noEmit: true,
2437
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.tsconfigOptions, 'optionalAccess', _136 => _136.compilerOptions]), () => ( {}))
2400
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.tsconfigOptions, 'optionalAccess', _130 => _130.compilerOptions]), () => ( {}))
2438
2401
  },
2439
2402
  files: [
2440
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _137 => _137.tsconfigOptions, 'optionalAccess', _138 => _138.files]), () => ( []))
2403
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _131 => _131.tsconfigOptions, 'optionalAccess', _132 => _132.files]), () => ( []))
2441
2404
  ],
2442
2405
  include: [
2443
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _139 => _139.tsconfigOptions, 'optionalAccess', _140 => _140.include]), () => ( [])),
2406
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _133 => _133.tsconfigOptions, 'optionalAccess', _134 => _134.include]), () => ( [])),
2444
2407
  "src/**/*.ts",
2445
2408
  "src/**/*.js",
2446
2409
  "bin/**/*"
2447
2410
  ],
2448
2411
  exclude: [
2449
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _141 => _141.tsconfigOptions, 'optionalAccess', _142 => _142.exclude]), () => ( [])),
2412
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.tsconfigOptions, 'optionalAccess', _136 => _136.exclude]), () => ( [])),
2450
2413
  "jest.config.ts",
2451
2414
  "src/**/*.spec.ts",
2452
2415
  "src/**/*.test.ts"
@@ -2584,7 +2547,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
2584
2547
  name: "StormWorkspaceConfiguration"
2585
2548
  });
2586
2549
  _chunkILLCSSWNjs.writeTrace.call(void 0, jsonSchema, config);
2587
- const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _143 => _143.workspaceRoot]), () => ( _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _144 => _144.outputFile, 'optionalAccess', _145 => _145.startsWith, 'call', _146 => _146("./")]) ? "" : "./");
2550
+ const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _137 => _137.workspaceRoot]), () => ( _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _138 => _138.outputFile, 'optionalAccess', _139 => _139.startsWith, 'call', _140 => _140("./")]) ? "" : "./");
2588
2551
  _chunkILLCSSWNjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
2589
2552
  _devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
2590
2553
  spaces: 2
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generator_default
3
- } from "./chunk-EZCE5VIE.mjs";
3
+ } from "./chunk-CYTUL65E.mjs";
4
4
  import {
5
5
  getConfig
6
6
  } from "./chunk-DQHMNZ47.mjs";
@@ -423,7 +423,7 @@ var LARGE_BUFFER2 = 1024 * 1e6;
423
423
 
424
424
  // ../esbuild/src/build.ts
425
425
  import { hfs as hfs3 } from "@humanfs/node";
426
- import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2, writeJsonFile } from "@nx/devkit";
426
+ import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph, writeJsonFile } from "@nx/devkit";
427
427
 
428
428
  // ../build-tools/src/config.ts
429
429
  var DEFAULT_COMPILED_BANNER = `
@@ -450,38 +450,18 @@ import { stripIndents } from "@nx/devkit";
450
450
  import { relative as relative2 } from "path";
451
451
 
452
452
  // ../build-tools/src/utilities/copy-assets.ts
453
- import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
454
- import { copyAssets as copyAssetsBase } from "@nx/js";
453
+ import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
455
454
  import { glob } from "glob";
456
- import { readFile as readFile2, writeFile } from "node:fs/promises";
457
-
458
- // ../build-tools/src/utilities/read-nx-config.ts
459
- import { existsSync } from "node:fs";
460
- import { readFile } from "node:fs/promises";
461
- var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot3) => {
462
- let rootDir = workspaceRoot3;
463
- if (!rootDir) {
464
- const config = await getConfig();
465
- rootDir = config.workspaceRoot;
466
- }
467
- const nxJsonPath = joinPaths(rootDir, "nx.json");
468
- if (!existsSync(nxJsonPath)) {
469
- throw new Error("Cannot find project.json configuration");
470
- }
471
- const configContent = await readFile(nxJsonPath, "utf8");
472
- return JSON.parse(configContent);
473
- }, "readNxConfig");
474
-
475
- // ../build-tools/src/utilities/copy-assets.ts
476
- var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
455
+ import { readFile, writeFile } from "node:fs/promises";
456
+ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
477
457
  const pendingAssets = Array.from(assets ?? []);
478
458
  pendingAssets.push({
479
- input: joinPaths(config.workspaceRoot, projectRoot),
459
+ input: projectRoot,
480
460
  glob: "*.md",
481
461
  output: "."
482
462
  });
483
463
  pendingAssets.push({
484
- input: config.workspaceRoot,
464
+ input: ".",
485
465
  glob: "LICENSE",
486
466
  output: "."
487
467
  });
@@ -499,36 +479,15 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
499
479
  output: "src/"
500
480
  });
501
481
  }
502
- const nxJson = readNxConfig(config.workspaceRoot);
503
- const projectGraph = readCachedProjectGraph();
504
- const projectsConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
505
- if (!projectsConfigurations?.projects?.[projectName]) {
506
- 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.");
507
- }
508
- const buildTarget = projectsConfigurations.projects[projectName].targets?.build;
509
- if (!buildTarget) {
510
- 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")}`);
511
- }
512
482
  writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
513
483
  ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`, config);
514
- const result = await copyAssetsBase({
515
- assets: pendingAssets,
516
- watch: false,
517
- outputPath
518
- }, {
519
- root: config.workspaceRoot,
520
- targetName: "build",
521
- target: buildTarget,
522
- projectName,
523
- projectGraph,
524
- projectsConfigurations,
525
- nxJsonConfiguration: nxJson,
526
- cwd: config.workspaceRoot,
527
- isVerbose: isVerbose(config.logLevel)
484
+ const assetHandler = new CopyAssetsHandler({
485
+ projectDir: projectRoot,
486
+ rootDir: config.workspaceRoot,
487
+ outputDir: outputPath,
488
+ assets: pendingAssets
528
489
  });
529
- if (!result.success) {
530
- throw new Error("The Build process failed trying to copy assets");
531
- }
490
+ await assetHandler.processAllAssetsOnce();
532
491
  if (includeSrc === true) {
533
492
  writeDebug(`\u{1F4DD} Adding banner and writing source files: ${joinPaths(outputPath, "src")}`, config);
534
493
  const files = await glob([
@@ -539,7 +498,7 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
539
498
  ]);
540
499
  await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
541
500
 
542
- ${await readFile2(file, "utf8")}
501
+ ${await readFile(file, "utf8")}
543
502
 
544
503
  ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
545
504
  }
@@ -548,18 +507,18 @@ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `//
548
507
  // ../build-tools/src/utilities/generate-package-json.ts
549
508
  import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
550
509
  import { Glob } from "glob";
551
- import { existsSync as existsSync2 } from "node:fs";
552
- import { readFile as readFile3 } from "node:fs/promises";
553
- import { readCachedProjectGraph as readCachedProjectGraph2 } from "nx/src/project-graph/project-graph";
510
+ import { existsSync } from "node:fs";
511
+ import { readFile as readFile2 } from "node:fs/promises";
512
+ import { readCachedProjectGraph } from "nx/src/project-graph/project-graph";
554
513
  var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, projectRoot, projectName, packageJson) => {
555
- const projectDependencies = calculateProjectBuildableDependencies(void 0, readCachedProjectGraph2(), workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
514
+ const projectDependencies = calculateProjectBuildableDependencies(void 0, readCachedProjectGraph(), workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
556
515
  const localPackages = [];
557
516
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
558
517
  const projectNode = project.node;
559
518
  if (projectNode.data.root) {
560
519
  const projectPackageJsonPath = joinPaths(workspaceRoot3, projectNode.data.root, "package.json");
561
- if (existsSync2(projectPackageJsonPath)) {
562
- const projectPackageJsonContent = await readFile3(projectPackageJsonPath, "utf8");
520
+ if (existsSync(projectPackageJsonPath)) {
521
+ const projectPackageJsonContent = await readFile2(projectPackageJsonPath, "utf8");
563
522
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
564
523
  if (projectPackageJson.private !== false) {
565
524
  localPackages.push(projectPackageJson);
@@ -596,7 +555,7 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
596
555
  }, "addPackageDependencies");
597
556
  var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
598
557
  const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : findWorkspaceRoot();
599
- const workspacePackageJsonContent = await readFile3(joinPaths(workspaceRoot3, "package.json"), "utf8");
558
+ const workspacePackageJsonContent = await readFile2(joinPaths(workspaceRoot3, "package.json"), "utf8");
600
559
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
601
560
  packageJson.type ??= "module";
602
561
  packageJson.sideEffects ??= false;
@@ -736,6 +695,10 @@ function getOutExtension(format2, pkgType) {
736
695
  }
737
696
  __name(getOutExtension, "getOutExtension");
738
697
 
698
+ // ../build-tools/src/utilities/read-nx-config.ts
699
+ import { existsSync as existsSync2 } from "node:fs";
700
+ import { readFile as readFile3 } from "node:fs/promises";
701
+
739
702
  // ../build-tools/src/utilities/task-graph.ts
740
703
  import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-runner/create-task-graph";
741
704
 
@@ -1408,7 +1371,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
1408
1371
  }
1409
1372
  const projectJson = await hfs3.json(projectJsonPath);
1410
1373
  const projectName = projectJson.name;
1411
- const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
1374
+ const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
1412
1375
  if (!projectConfigurations?.projects?.[projectName]) {
1413
1376
  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.");
1414
1377
  }
@@ -1588,7 +1551,7 @@ async function copyBuildAssets(context2) {
1588
1551
  if (context2.result?.errors.length === 0) {
1589
1552
  writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
1590
1553
  const stopwatch = getStopwatch(`${context2.options.name} asset copy`);
1591
- await copyAssets(context2.options.config, context2.options.assets ?? [], context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
1554
+ await copyAssets(context2.options.config, context2.options.assets ?? [], context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
1592
1555
  stopwatch();
1593
1556
  }
1594
1557
  return context2;
@@ -1772,7 +1735,7 @@ var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor",
1772
1735
 
1773
1736
  // ../tsdown/src/build.ts
1774
1737
  import { hfs as hfs5 } from "@humanfs/node";
1775
- import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph3, writeJsonFile as writeJsonFile2 } from "@nx/devkit";
1738
+ import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2, writeJsonFile as writeJsonFile2 } from "@nx/devkit";
1776
1739
  import defu3 from "defu";
1777
1740
  import { findWorkspaceRoot as findWorkspaceRoot3 } from "nx/src/utils/find-workspace-root";
1778
1741
  import { build as tsdown } from "tsdown";
@@ -1828,7 +1791,7 @@ var resolveOptions2 = /* @__PURE__ */ __name(async (userOptions) => {
1828
1791
  }
1829
1792
  const projectJson = await hfs5.json(projectJsonPath);
1830
1793
  const projectName = projectJson.name;
1831
- const projectConfigurations = readProjectsConfigurationFromProjectGraph3(projectGraph);
1794
+ const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
1832
1795
  if (!projectConfigurations?.projects?.[projectName]) {
1833
1796
  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.");
1834
1797
  }
@@ -1958,7 +1921,7 @@ __name(executeTSDown, "executeTSDown");
1958
1921
  async function copyBuildAssets2(options) {
1959
1922
  writeDebug(` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
1960
1923
  const stopwatch = getStopwatch(`${options.name} asset copy`);
1961
- await copyAssets(options.config, options.assets ?? [], options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
1924
+ await copyAssets(options.config, options.assets ?? [], options.outdir, options.projectRoot, options.sourceRoot, true, false);
1962
1925
  stopwatch();
1963
1926
  return options;
1964
1927
  }
package/dist/executors.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";require('./chunk-XO66D74Z.js');
2
2
  require('./chunk-R7AIVBS7.js');
3
- require('./chunk-LW7DSVEL.js');
3
+ require('./chunk-TDFLX6AI.js');
4
4
  require('./chunk-LXXVBXFM.js');
5
5
  require('./chunk-BM5BCBD5.js');
6
6
  require('./chunk-VTHBMY4B.js');
@@ -1,6 +1,6 @@
1
1
  import "./chunk-YSCEY447.mjs";
2
2
  import "./chunk-QEWY5YJA.mjs";
3
- import "./chunk-CXOUHOZ7.mjs";
3
+ import "./chunk-YBA7ROY5.mjs";
4
4
  import "./chunk-XIDK2YZE.mjs";
5
5
  import "./chunk-23YXGFBU.mjs";
6
6
  import "./chunk-XU6MTFCV.mjs";
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkLOFONHDQjs = require('./chunk-LOFONHDQ.js');
5
+ var _chunk4FP3SZAKjs = require('./chunk-4FP3SZAK.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkNVFBJS7Cjs = require('./chunk-NVFBJS7C.js');
9
+ var _chunkPR2M4S7Fjs = require('./chunk-PR2M4S7F.js');
10
10
  require('./chunk-DFG3KJWS.js');
11
11
  require('./chunk-ILLCSSWN.js');
12
12
  require('./chunk-J5SB6L2L.js');
@@ -15,4 +15,4 @@ require('./chunk-J5SB6L2L.js');
15
15
 
16
16
 
17
17
 
18
- exports.applicationGenerator = _chunkLOFONHDQjs.applicationGenerator; exports.applicationSchematic = _chunkLOFONHDQjs.applicationSchematic; exports.initGenerator = _chunkNVFBJS7Cjs.initGenerator; exports.initSchematic = _chunkNVFBJS7Cjs.initSchematic;
18
+ exports.applicationGenerator = _chunk4FP3SZAKjs.applicationGenerator; exports.applicationSchematic = _chunk4FP3SZAKjs.applicationSchematic; exports.initGenerator = _chunkPR2M4S7Fjs.initGenerator; exports.initSchematic = _chunkPR2M4S7Fjs.initSchematic;
@@ -2,11 +2,11 @@ import "./chunk-3J7KBHMJ.mjs";
2
2
  import {
3
3
  applicationGenerator,
4
4
  applicationSchematic
5
- } from "./chunk-2XNO3U7C.mjs";
5
+ } from "./chunk-WG5F7OJK.mjs";
6
6
  import {
7
7
  initGenerator,
8
8
  initSchematic
9
- } from "./chunk-EZCE5VIE.mjs";
9
+ } from "./chunk-CYTUL65E.mjs";
10
10
  import "./chunk-DQHMNZ47.mjs";
11
11
  import "./chunk-IXEWBCGZ.mjs";
12
12
  import "./chunk-A7FFSBE6.mjs";
package/dist/index.js CHANGED
@@ -3,14 +3,14 @@ require('./chunk-DHBG5ASJ.js');
3
3
 
4
4
 
5
5
 
6
- var _chunkLOFONHDQjs = require('./chunk-LOFONHDQ.js');
6
+ var _chunk4FP3SZAKjs = require('./chunk-4FP3SZAK.js');
7
7
 
8
8
 
9
9
 
10
- var _chunkNVFBJS7Cjs = require('./chunk-NVFBJS7C.js');
10
+ var _chunkPR2M4S7Fjs = require('./chunk-PR2M4S7F.js');
11
11
  require('./chunk-CVGPWUNP.js');
12
12
  require('./chunk-R7AIVBS7.js');
13
- require('./chunk-LW7DSVEL.js');
13
+ require('./chunk-TDFLX6AI.js');
14
14
  require('./chunk-LXXVBXFM.js');
15
15
 
16
16
 
@@ -148,4 +148,4 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, createPackageJson, "createPackageJson");
148
148
 
149
149
 
150
150
 
151
- exports.applicationGenerator = _chunkLOFONHDQjs.applicationGenerator; exports.applicationSchematic = _chunkLOFONHDQjs.applicationSchematic; exports.createNodes = createNodes; exports.getInternalDependencies = _chunkBM5BCBD5js.getInternalDependencies; exports.initGenerator = _chunkNVFBJS7Cjs.initGenerator; exports.initSchematic = _chunkNVFBJS7Cjs.initSchematic; exports.name = name; exports.r2UploadFile = _chunkBM5BCBD5js.r2UploadFile;
151
+ exports.applicationGenerator = _chunk4FP3SZAKjs.applicationGenerator; exports.applicationSchematic = _chunk4FP3SZAKjs.applicationSchematic; exports.createNodes = createNodes; exports.getInternalDependencies = _chunkBM5BCBD5js.getInternalDependencies; exports.initGenerator = _chunkPR2M4S7Fjs.initGenerator; exports.initSchematic = _chunkPR2M4S7Fjs.initSchematic; exports.name = name; exports.r2UploadFile = _chunkBM5BCBD5js.r2UploadFile;
package/dist/index.mjs CHANGED
@@ -3,14 +3,14 @@ import "./chunk-3J7KBHMJ.mjs";
3
3
  import {
4
4
  applicationGenerator,
5
5
  applicationSchematic
6
- } from "./chunk-2XNO3U7C.mjs";
6
+ } from "./chunk-WG5F7OJK.mjs";
7
7
  import {
8
8
  initGenerator,
9
9
  initSchematic
10
- } from "./chunk-EZCE5VIE.mjs";
10
+ } from "./chunk-CYTUL65E.mjs";
11
11
  import "./chunk-7Z5PILRU.mjs";
12
12
  import "./chunk-QEWY5YJA.mjs";
13
- import "./chunk-CXOUHOZ7.mjs";
13
+ import "./chunk-YBA7ROY5.mjs";
14
14
  import "./chunk-XIDK2YZE.mjs";
15
15
  import {
16
16
  getInternalDependencies,
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
  var _chunkR7AIVBS7js = require('../../../chunk-R7AIVBS7.js');
4
- require('../../../chunk-LW7DSVEL.js');
4
+ require('../../../chunk-TDFLX6AI.js');
5
5
  require('../../../chunk-VTHBMY4B.js');
6
6
  require('../../../chunk-DFG3KJWS.js');
7
7
  require('../../../chunk-ILLCSSWN.js');
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  runExecutor
3
3
  } from "../../../chunk-QEWY5YJA.mjs";
4
- import "../../../chunk-CXOUHOZ7.mjs";
4
+ import "../../../chunk-YBA7ROY5.mjs";
5
5
  import "../../../chunk-XU6MTFCV.mjs";
6
6
  import "../../../chunk-DQHMNZ47.mjs";
7
7
  import "../../../chunk-IXEWBCGZ.mjs";
@@ -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 _chunkLW7DSVELjs = require('../../../chunk-LW7DSVEL.js');
3
+ var _chunkTDFLX6AIjs = require('../../../chunk-TDFLX6AI.js');
4
4
 
5
5
 
6
6
  var _chunkVTHBMY4Bjs = require('../../../chunk-VTHBMY4B.js');
@@ -60,7 +60,7 @@ async function* serveExecutor(options, context, config) {
60
60
  };
61
61
  }
62
62
  _chunkJ5SB6L2Ljs.__name.call(void 0, serveExecutor, "serveExecutor");
63
- var executor_default = _chunkLW7DSVELjs.withRunExecutor.call(void 0, "Cloudflare Serve executor", serveExecutor, {
63
+ var executor_default = _chunkTDFLX6AIjs.withRunExecutor.call(void 0, "Cloudflare Serve executor", serveExecutor, {
64
64
  skipReadingConfig: false,
65
65
  hooks: {
66
66
  applyDefaultOptions: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "../../../chunk-CXOUHOZ7.mjs";
3
+ } from "../../../chunk-YBA7ROY5.mjs";
4
4
  import {
5
5
  createCliOptions
6
6
  } from "../../../chunk-XU6MTFCV.mjs";
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkNVFBJS7Cjs = require('../../../chunk-NVFBJS7C.js');
5
+ var _chunkPR2M4S7Fjs = require('../../../chunk-PR2M4S7F.js');
6
6
  require('../../../chunk-J5SB6L2L.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.default = _chunkNVFBJS7Cjs.generator_default; exports.initGenerator = _chunkNVFBJS7Cjs.initGenerator; exports.initSchematic = _chunkNVFBJS7Cjs.initSchematic;
11
+ exports.default = _chunkPR2M4S7Fjs.generator_default; exports.initGenerator = _chunkPR2M4S7Fjs.initGenerator; exports.initSchematic = _chunkPR2M4S7Fjs.initSchematic;
@@ -2,7 +2,7 @@ import {
2
2
  generator_default,
3
3
  initGenerator,
4
4
  initSchematic
5
- } from "../../../chunk-EZCE5VIE.mjs";
5
+ } from "../../../chunk-CYTUL65E.mjs";
6
6
  import "../../../chunk-A7FFSBE6.mjs";
7
7
  export {
8
8
  generator_default as default,
@@ -2,8 +2,8 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkLOFONHDQjs = require('../../../chunk-LOFONHDQ.js');
6
- require('../../../chunk-NVFBJS7C.js');
5
+ var _chunk4FP3SZAKjs = require('../../../chunk-4FP3SZAK.js');
6
+ require('../../../chunk-PR2M4S7F.js');
7
7
  require('../../../chunk-DFG3KJWS.js');
8
8
  require('../../../chunk-ILLCSSWN.js');
9
9
  require('../../../chunk-J5SB6L2L.js');
@@ -11,4 +11,4 @@ require('../../../chunk-J5SB6L2L.js');
11
11
 
12
12
 
13
13
 
14
- exports.applicationGenerator = _chunkLOFONHDQjs.applicationGenerator; exports.applicationSchematic = _chunkLOFONHDQjs.applicationSchematic; exports.default = _chunkLOFONHDQjs.generator_default;
14
+ exports.applicationGenerator = _chunk4FP3SZAKjs.applicationGenerator; exports.applicationSchematic = _chunk4FP3SZAKjs.applicationSchematic; exports.default = _chunk4FP3SZAKjs.generator_default;
@@ -2,8 +2,8 @@ import {
2
2
  applicationGenerator,
3
3
  applicationSchematic,
4
4
  generator_default
5
- } from "../../../chunk-2XNO3U7C.mjs";
6
- import "../../../chunk-EZCE5VIE.mjs";
5
+ } from "../../../chunk-WG5F7OJK.mjs";
6
+ import "../../../chunk-CYTUL65E.mjs";
7
7
  import "../../../chunk-DQHMNZ47.mjs";
8
8
  import "../../../chunk-IXEWBCGZ.mjs";
9
9
  import "../../../chunk-A7FFSBE6.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/cloudflare-tools",
3
- "version": "0.54.3",
3
+ "version": "0.54.4",
4
4
  "description": "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
5
5
  "repository": {
6
6
  "type": "github",