@storm-software/terraform-tools 0.48.0 → 0.49.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-WKVEHDC2.mjs → chunk-2G5G6H2X.mjs} +1 -1
  4. package/dist/{chunk-SIQ2JL7E.js → chunk-3QQYGWLX.js} +2 -2
  5. package/dist/{chunk-SH7NPG4K.mjs → chunk-4FQ7OTSE.mjs} +4 -4
  6. package/dist/{chunk-EAPOMBKY.mjs → chunk-4UCIB5EX.mjs} +1 -1
  7. package/dist/{chunk-MW3JRZ4N.js → chunk-55SRZ3NV.js} +2 -2
  8. package/dist/{chunk-LKPBZPSA.mjs → chunk-DNTE5MBP.mjs} +124 -142
  9. package/dist/{chunk-SCRXKTPS.js → chunk-DTYPMVS2.js} +2 -2
  10. package/dist/{chunk-NEISKBUA.mjs → chunk-M4Q23Z5H.mjs} +1 -1
  11. package/dist/{chunk-6GLEQENV.mjs → chunk-MUBINZ32.mjs} +1 -1
  12. package/dist/{chunk-AOTMRUKU.js → chunk-PCZI22PL.js} +3 -3
  13. package/dist/{chunk-463AGI5I.mjs → chunk-QUA3WPTX.mjs} +1 -1
  14. package/dist/{chunk-72FEODKN.js → chunk-VORJFDGV.js} +290 -308
  15. package/dist/{chunk-53WQJQ5K.js → chunk-WUQW2NTB.js} +2 -2
  16. package/dist/{chunk-JNBNKAGF.js → chunk-ZW3ZP7CV.js} +4 -4
  17. package/dist/executors.js +6 -6
  18. package/dist/executors.mjs +6 -6
  19. package/dist/generators.js +3 -3
  20. package/dist/generators.mjs +2 -2
  21. package/dist/index.js +8 -8
  22. package/dist/index.mjs +7 -7
  23. package/dist/src/base/index.js +3 -3
  24. package/dist/src/base/index.mjs +2 -2
  25. package/dist/src/base/terraform-executor.js +3 -3
  26. package/dist/src/base/terraform-executor.mjs +2 -2
  27. package/dist/src/executors/apply/executor.js +4 -4
  28. package/dist/src/executors/apply/executor.mjs +3 -3
  29. package/dist/src/executors/destroy/executor.js +4 -4
  30. package/dist/src/executors/destroy/executor.mjs +3 -3
  31. package/dist/src/executors/output/executor.js +4 -4
  32. package/dist/src/executors/output/executor.mjs +3 -3
  33. package/dist/src/executors/plan/executor.js +4 -4
  34. package/dist/src/executors/plan/executor.mjs +3 -3
  35. package/dist/src/generators/init/init.js +3 -3
  36. package/dist/src/generators/init/init.mjs +2 -2
  37. package/package.json +140 -1
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- var _chunkJNBNKAGFjs = require('./chunk-JNBNKAGF.js');
21
+ var _chunkZW3ZP7CVjs = require('./chunk-ZW3ZP7CV.js');
22
22
 
23
23
 
24
24
 
@@ -159,7 +159,7 @@ async function cargoBuildExecutor(options, context2) {
159
159
  return await cargoCommand(...command);
160
160
  }
161
161
  _chunk3GQAWCBQjs.__name.call(void 0, cargoBuildExecutor, "cargoBuildExecutor");
162
- var executor_default = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Cargo Build", cargoBuildExecutor, {
162
+ var executor_default = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Cargo Build", cargoBuildExecutor, {
163
163
  skipReadingConfig: false,
164
164
  hooks: {
165
165
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
@@ -176,7 +176,7 @@ async function cargoCheckExecutor(options, context2) {
176
176
  return await cargoCommand(...command);
177
177
  }
178
178
  _chunk3GQAWCBQjs.__name.call(void 0, cargoCheckExecutor, "cargoCheckExecutor");
179
- var executor_default2 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Cargo Check", cargoCheckExecutor, {
179
+ var executor_default2 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Cargo Check", cargoCheckExecutor, {
180
180
  skipReadingConfig: false,
181
181
  hooks: {
182
182
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
@@ -192,7 +192,7 @@ async function cargoClippyExecutor(options, context2) {
192
192
  return await cargoCommand(...command);
193
193
  }
194
194
  _chunk3GQAWCBQjs.__name.call(void 0, cargoClippyExecutor, "cargoClippyExecutor");
195
- var executor_default3 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
195
+ var executor_default3 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
196
196
  skipReadingConfig: false,
197
197
  hooks: {
198
198
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
@@ -213,7 +213,7 @@ async function cargoDocExecutor(options, context2) {
213
213
  return await cargoCommand(...command);
214
214
  }
215
215
  _chunk3GQAWCBQjs.__name.call(void 0, cargoDocExecutor, "cargoDocExecutor");
216
- var executor_default4 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Cargo Doc", cargoDocExecutor, {
216
+ var executor_default4 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Cargo Doc", cargoDocExecutor, {
217
217
  skipReadingConfig: false,
218
218
  hooks: {
219
219
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
@@ -236,7 +236,7 @@ async function cargoFormatExecutor(options, context2) {
236
236
  return await cargoCommand(...command);
237
237
  }
238
238
  _chunk3GQAWCBQjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
239
- var executor_default5 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
239
+ var executor_default5 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
240
240
  skipReadingConfig: false,
241
241
  hooks: {
242
242
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
@@ -290,23 +290,25 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
290
290
 
291
291
  // ../build-tools/src/utilities/copy-assets.ts
292
292
 
293
-
294
293
  var _js = require('@nx/js');
295
294
  var _glob = require('glob');
295
+ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
296
296
 
297
297
  // ../build-tools/src/utilities/read-nx-config.ts
298
298
 
299
+
299
300
  var readNxConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot3) => {
300
301
  let rootDir = workspaceRoot3;
301
302
  if (!rootDir) {
302
- const config = await _chunkJNBNKAGFjs.loadStormConfig.call(void 0, );
303
+ const config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, );
303
304
  rootDir = config.workspaceRoot;
304
305
  }
305
- const nxJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, rootDir, "nx.json");
306
- if (!await _node.hfs.isFile(nxJsonPath)) {
306
+ const nxJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, rootDir, "nx.json");
307
+ if (!_fs.existsSync.call(void 0, nxJsonPath)) {
307
308
  throw new Error("Cannot find project.json configuration");
308
309
  }
309
- return _node.hfs.json(nxJsonPath);
310
+ const configContent = await _promises.readFile.call(void 0, nxJsonPath, "utf8");
311
+ return JSON.parse(configContent);
310
312
  }, "readNxConfig");
311
313
 
312
314
  // ../build-tools/src/utilities/copy-assets.ts
@@ -341,16 +343,14 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
341
343
  });
342
344
  }
343
345
  const nxJson = readNxConfig(config.workspaceRoot);
344
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
345
- exitOnError: true
346
- });
346
+ const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
347
347
  const projectsConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
348
348
  if (!_optionalChain([projectsConfigurations, 'optionalAccess', _11 => _11.projects, 'optionalAccess', _12 => _12[projectName]])) {
349
349
  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.");
350
350
  }
351
- const buildTarget = _optionalChain([projectsConfigurations, 'access', _13 => _13.projects, 'access', _14 => _14[projectName], 'optionalAccess', _15 => _15.targets, 'optionalAccess', _16 => _16.build]);
351
+ const buildTarget = _optionalChain([projectsConfigurations, 'access', _13 => _13.projects, 'access', _14 => _14[projectName], 'access', _15 => _15.targets, 'optionalAccess', _16 => _16.build]);
352
352
  if (!buildTarget) {
353
- 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 ${_chunkJNBNKAGFjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
353
+ 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 ${_chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
354
354
  }
355
355
  const result = await _js.copyAssets.call(void 0, {
356
356
  assets,
@@ -365,55 +365,43 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
365
365
  projectsConfigurations,
366
366
  nxJsonConfiguration: nxJson,
367
367
  cwd: config.workspaceRoot,
368
- isVerbose: _chunkJNBNKAGFjs.isVerbose.call(void 0, config.logLevel)
368
+ isVerbose: _chunkZW3ZP7CVjs.isVerbose.call(void 0, config.logLevel)
369
369
  });
370
370
  if (!result.success) {
371
371
  throw new Error("The Build process failed trying to copy assets");
372
372
  }
373
373
  if (includeSrc === true) {
374
- _chunkJNBNKAGFjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkJNBNKAGFjs.joinPaths.call(void 0, outputPath, "src")}`, config);
374
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkZW3ZP7CVjs.joinPaths.call(void 0, outputPath, "src")}`, config);
375
375
  const files = await _glob.glob.call(void 0, [
376
- _chunkJNBNKAGFjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
377
- _chunkJNBNKAGFjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
378
- _chunkJNBNKAGFjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
379
- _chunkJNBNKAGFjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
376
+ _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
377
+ _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
378
+ _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
379
+ _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
380
380
  ]);
381
- await Promise.allSettled(files.map(async (file) => _node.hfs.write(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
381
+ await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
382
382
 
383
- ${await _node.hfs.text(file)}
383
+ ${await _promises.readFile.call(void 0, file, "utf8")}
384
384
 
385
385
  ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
386
386
  }
387
387
  }, "copyAssets");
388
388
 
389
389
  // ../build-tools/src/utilities/generate-package-json.ts
390
-
391
390
  var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
392
391
 
392
+
393
+
393
394
  var _projectgraph = require('nx/src/project-graph/project-graph');
394
395
  var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot3, projectRoot, projectName, packageJson) => {
395
- const projectGraph = await _projectgraph.createProjectGraphAsync.call(void 0, {
396
- exitOnError: true
397
- });
398
- const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
399
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _17 => _17.projects, 'optionalAccess', _18 => _18[projectName]])) {
400
- 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.");
401
- }
402
- const projectJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3, projectRoot, "project.json");
403
- if (!await _node.hfs.isFile(projectJsonPath)) {
404
- throw new Error("Cannot find project.json configuration");
405
- }
406
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _19 => _19.projects, 'optionalAccess', _20 => _20[projectName]])) {
407
- 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.");
408
- }
409
- const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
396
+ const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, _projectgraph.readCachedProjectGraph.call(void 0, ), workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
410
397
  const localPackages = [];
411
398
  for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
412
399
  const projectNode = project.node;
413
400
  if (projectNode.data.root) {
414
- const projectPackageJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
415
- if (await _node.hfs.isFile(projectPackageJsonPath)) {
416
- const projectPackageJson = await _node.hfs.json(projectPackageJsonPath);
401
+ const projectPackageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
402
+ if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
403
+ const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
404
+ const projectPackageJson = JSON.parse(projectPackageJsonContent);
417
405
  if (projectPackageJson.private !== false) {
418
406
  localPackages.push(projectPackageJson);
419
407
  }
@@ -421,7 +409,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
421
409
  }
422
410
  }
423
411
  if (localPackages.length > 0) {
424
- _chunkJNBNKAGFjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
412
+ _chunkZW3ZP7CVjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
425
413
  packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
426
414
  if (!ret[localPackage.name]) {
427
415
  ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
@@ -443,13 +431,14 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
443
431
  return ret;
444
432
  }, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
445
433
  } else {
446
- _chunkJNBNKAGFjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
434
+ _chunkZW3ZP7CVjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
447
435
  }
448
436
  return packageJson;
449
437
  }, "addPackageDependencies");
450
438
  var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
451
- const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkJNBNKAGFjs.findWorkspaceRoot.call(void 0, );
452
- const workspacePackageJson = await _node.hfs.json(_chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3, "package.json"));
439
+ const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkZW3ZP7CVjs.findWorkspaceRoot.call(void 0, );
440
+ const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
441
+ const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
453
442
  packageJson.type ??= "module";
454
443
  packageJson.sideEffects ??= false;
455
444
  if (includeSrc === true) {
@@ -457,7 +446,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
457
446
  if (distSrc.startsWith("/")) {
458
447
  distSrc = distSrc.substring(1);
459
448
  }
460
- packageJson.source ??= `${_chunkJNBNKAGFjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
449
+ packageJson.source ??= `${_chunkZW3ZP7CVjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
461
450
  }
462
451
  packageJson.files ??= [
463
452
  "dist/**/*"
@@ -488,7 +477,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
488
477
  ];
489
478
  }
490
479
  packageJson.repository ??= workspacePackageJson.repository;
491
- packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkJNBNKAGFjs.joinPaths.call(void 0, "packages", projectName);
480
+ packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkZW3ZP7CVjs.joinPaths.call(void 0, "packages", projectName);
492
481
  return packageJson;
493
482
  }, "addWorkspacePackageJsonFields");
494
483
  var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
@@ -543,7 +532,7 @@ var addPackageJsonExports = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
543
532
  // ../build-tools/src/utilities/get-entry-points.ts
544
533
 
545
534
  var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
546
- const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkJNBNKAGFjs.findWorkspaceRoot.call(void 0, );
535
+ const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkZW3ZP7CVjs.findWorkspaceRoot.call(void 0, );
547
536
  const entryPoints = [];
548
537
  if (entry) {
549
538
  if (Array.isArray(entry)) {
@@ -555,7 +544,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
555
544
  }
556
545
  }
557
546
  if (emitOnAll) {
558
- entryPoints.push(_chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
547
+ entryPoints.push(_chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
559
548
  }
560
549
  const results = [];
561
550
  for (const entryPoint in entryPoints) {
@@ -564,9 +553,9 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
564
553
  withFileTypes: true
565
554
  });
566
555
  results.push(...files.reduce((ret, filePath) => {
567
- const result = _chunkJNBNKAGFjs.correctPaths.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkJNBNKAGFjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkJNBNKAGFjs.correctPaths.call(void 0, projectRoot), ""));
556
+ const result = _chunkZW3ZP7CVjs.correctPaths.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkZW3ZP7CVjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkZW3ZP7CVjs.correctPaths.call(void 0, projectRoot), ""));
568
557
  if (result) {
569
- _chunkJNBNKAGFjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkJNBNKAGFjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
558
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkZW3ZP7CVjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
570
559
  if (!results.includes(result)) {
571
560
  results.push(result);
572
561
  }
@@ -595,18 +584,18 @@ var getEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (builder, opti
595
584
  }, "getEnv");
596
585
 
597
586
  // ../build-tools/src/utilities/get-out-extension.ts
598
- function getOutExtension(format, pkgType) {
587
+ function getOutExtension(format2, pkgType) {
599
588
  let jsExtension = ".js";
600
589
  let dtsExtension = ".d.ts";
601
- if (pkgType === "module" && format === "cjs") {
590
+ if (pkgType === "module" && format2 === "cjs") {
602
591
  jsExtension = ".cjs";
603
592
  dtsExtension = ".d.cts";
604
593
  }
605
- if (pkgType !== "module" && format === "esm") {
594
+ if (pkgType !== "module" && format2 === "esm") {
606
595
  jsExtension = ".mjs";
607
596
  dtsExtension = ".d.mts";
608
597
  }
609
- if (format === "iife") {
598
+ if (format2 === "iife") {
610
599
  jsExtension = ".global.js";
611
600
  }
612
601
  return {
@@ -694,15 +683,15 @@ var RendererEngine = class {
694
683
  if (!relativePath.startsWith("\\\\?\\")) {
695
684
  relativePath = relativePath.replace(/\\/g, "/");
696
685
  }
697
- const meta = _optionalChain([metafile, 'optionalAccess', _21 => _21.outputs, 'access', _22 => _22[relativePath]]);
686
+ const meta = _optionalChain([metafile, 'optionalAccess', _17 => _17.outputs, 'access', _18 => _18[relativePath]]);
698
687
  return {
699
688
  type: "chunk",
700
689
  path: file.path,
701
690
  code: file.text,
702
- map: _optionalChain([outputFiles, 'access', _23 => _23.find, 'call', _24 => _24((f) => f.path === `${file.path}.map`), 'optionalAccess', _25 => _25.text]),
703
- entryPoint: _optionalChain([meta, 'optionalAccess', _26 => _26.entryPoint]),
704
- exports: _optionalChain([meta, 'optionalAccess', _27 => _27.exports]),
705
- imports: _optionalChain([meta, 'optionalAccess', _28 => _28.imports])
691
+ map: _optionalChain([outputFiles, 'access', _19 => _19.find, 'call', _20 => _20((f) => f.path === `${file.path}.map`), 'optionalAccess', _21 => _21.text]),
692
+ entryPoint: _optionalChain([meta, 'optionalAccess', _22 => _22.entryPoint]),
693
+ exports: _optionalChain([meta, 'optionalAccess', _23 => _23.exports]),
694
+ imports: _optionalChain([meta, 'optionalAccess', _24 => _24.imports])
706
695
  };
707
696
  } else {
708
697
  return {
@@ -772,8 +761,8 @@ var RendererEngine = class {
772
761
  // ../esbuild/src/clean.ts
773
762
 
774
763
  async function clean(name = "ESBuild", directory, config) {
775
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
776
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, `${name} output clean`);
764
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
765
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${name} output clean`);
777
766
  await _node.hfs.deleteAll(directory);
778
767
  stopwatch();
779
768
  }
@@ -785,7 +774,7 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
785
774
  name: "storm:esm-split-code-to-cjs",
786
775
  setup(build6) {
787
776
  build6.onEnd(async (result) => {
788
- const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _29 => _29.metafile, 'optionalAccess', _30 => _30.outputs]), () => ( {})));
777
+ const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _25 => _25.metafile, 'optionalAccess', _26 => _26.outputs]), () => ( {})));
789
778
  const jsFiles = outFiles.filter((f) => f.endsWith("js"));
790
779
  await esbuild.build({
791
780
  outdir: resolvedOptions.outdir,
@@ -894,7 +883,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
894
883
  setup(build6) {
895
884
  build6.onEnd((result) => {
896
885
  if (result.errors.length > 0 && process.env.WATCH !== "true") {
897
- _chunkJNBNKAGFjs.writeError.call(void 0, `The following errors occurred during the build:
886
+ _chunkZW3ZP7CVjs.writeError.call(void 0, `The following errors occurred during the build:
898
887
  ${result.errors.map((error) => error.text).join("\n")}
899
888
 
900
889
  `, resolvedOptions.config);
@@ -907,7 +896,7 @@ ${result.errors.map((error) => error.text).join("\n")}
907
896
  // ../esbuild/src/plugins/resolve-paths.ts
908
897
 
909
898
  function resolvePathsConfig(options, cwd) {
910
- if (_optionalChain([options, 'optionalAccess', _31 => _31.compilerOptions, 'optionalAccess', _32 => _32.paths])) {
899
+ if (_optionalChain([options, 'optionalAccess', _27 => _27.compilerOptions, 'optionalAccess', _28 => _28.paths])) {
911
900
  const paths = Object.entries(options.compilerOptions.paths);
912
901
  const resolvedPaths = paths.map(([key, paths2]) => {
913
902
  return [
@@ -929,13 +918,13 @@ _chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
929
918
  var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
930
919
  name: "storm:resolve-paths",
931
920
  setup(build6) {
932
- const parentTsConfig = build6.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build6.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
921
+ const parentTsConfig = build6.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build6.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
933
922
  const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
934
923
  const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
935
924
  build6.onResolve({
936
925
  filter: packagesRegex
937
926
  }, (args) => {
938
- if (_optionalChain([build6, 'access', _33 => _33.initialOptions, 'access', _34 => _34.external, 'optionalAccess', _35 => _35.includes, 'call', _36 => _36(args.path)])) {
927
+ if (_optionalChain([build6, 'access', _29 => _29.initialOptions, 'access', _30 => _30.external, 'optionalAccess', _31 => _31.includes, 'call', _32 => _32(args.path)])) {
939
928
  return {
940
929
  path: args.path,
941
930
  external: true
@@ -952,7 +941,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
952
941
 
953
942
  var _apiextractor = require('@microsoft/api-extractor');
954
943
  function bundleTypeDefinitions(filename, outfile, externals, options) {
955
- const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
944
+ const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
956
945
  const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
957
946
  p,
958
947
  getTypeDependencyPackageName(p)
@@ -988,13 +977,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
988
977
  },
989
978
  dtsRollup: {
990
979
  enabled: true,
991
- untrimmedFilePath: _chunkJNBNKAGFjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
980
+ untrimmedFilePath: _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
992
981
  },
993
982
  tsdocMetadata: {
994
983
  enabled: false
995
984
  }
996
985
  },
997
- packageJsonFullPath: _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
986
+ packageJsonFullPath: _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
998
987
  configObjectFullPath: void 0
999
988
  });
1000
989
  const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
@@ -1002,7 +991,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
1002
991
  localBuild: true
1003
992
  });
1004
993
  if (extractorResult.succeeded === false) {
1005
- _chunkJNBNKAGFjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
994
+ _chunkZW3ZP7CVjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
1006
995
  throw new Error("API Extractor completed with errors");
1007
996
  }
1008
997
  }
@@ -1015,18 +1004,18 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
1015
1004
  }
1016
1005
  build6.onStart(async () => {
1017
1006
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
1018
- await _chunkJNBNKAGFjs.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
1007
+ await _chunkZW3ZP7CVjs.run.call(void 0, resolvedOptions.config, `pnpm exec tsc --project ${resolvedOptions.tsconfig}`, resolvedOptions.config.workspaceRoot);
1019
1008
  }
1020
1009
  if (resolvedOptions.bundle && resolvedOptions.entryPoints && resolvedOptions.entryPoints.length > 0 && resolvedOptions.entryPoints[0] && resolvedOptions.entryPoints[0].endsWith(".ts")) {
1021
1010
  const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
1022
1011
  const typeOutDir = resolvedOptions.outdir;
1023
1012
  const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
1024
- const bundlePath = _chunkJNBNKAGFjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
1013
+ const bundlePath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
1025
1014
  let dtsPath;
1026
- if (await _node.hfs.isFile(_chunkJNBNKAGFjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
1027
- dtsPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
1028
- } else if (await _node.hfs.isFile(_chunkJNBNKAGFjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
1029
- dtsPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
1015
+ if (await _node.hfs.isFile(_chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
1016
+ dtsPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
1017
+ } else if (await _node.hfs.isFile(_chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
1018
+ dtsPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
1030
1019
  }
1031
1020
  const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
1032
1021
  if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
@@ -1043,7 +1032,7 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
1043
1032
  function getTypeDependencyPackageName(npmPackage) {
1044
1033
  if (npmPackage.startsWith("@")) {
1045
1034
  const [scope, name] = npmPackage.split("/");
1046
- return `@types/${_optionalChain([scope, 'optionalAccess', _37 => _37.slice, 'call', _38 => _38(1)])}__${name}`;
1035
+ return `@types/${_optionalChain([scope, 'optionalAccess', _33 => _33.slice, 'call', _34 => _34(1)])}__${name}`;
1047
1036
  }
1048
1037
  return `@types/${npmPackage}`;
1049
1038
  }
@@ -1181,8 +1170,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
1181
1170
  const filteredMissingDeps = missingDependencies.filter((dep) => {
1182
1171
  return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
1183
1172
  });
1184
- _chunkJNBNKAGFjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
1185
- _chunkJNBNKAGFjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
1173
+ _chunkZW3ZP7CVjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
1174
+ _chunkZW3ZP7CVjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
1186
1175
  if (filteredMissingDeps.length > 0) {
1187
1176
  throw new Error(`Missing dependencies detected - please install them:
1188
1177
  ${JSON.stringify(filteredMissingDeps)}
@@ -1250,7 +1239,7 @@ function pipeSync(fn, ...fns) {
1250
1239
  return (...args) => {
1251
1240
  let result = fn(...args);
1252
1241
  for (let i = 0; result !== skip && i < fns.length; ++i) {
1253
- result = _optionalChain([fns, 'access', _39 => _39[i], 'optionalCall', _40 => _40(result)]);
1242
+ result = _optionalChain([fns, 'access', _35 => _35[i], 'optionalCall', _36 => _36(result)]);
1254
1243
  }
1255
1244
  return result;
1256
1245
  };
@@ -1260,7 +1249,7 @@ function pipeAsync(fn, ...fns) {
1260
1249
  return async (...args) => {
1261
1250
  let result = await fn(...args);
1262
1251
  for (let i = 0; result !== skip && i < fns.length; ++i) {
1263
- result = await _optionalChain([fns, 'access', _41 => _41[i], 'optionalCall', _42 => _42(result)]);
1252
+ result = await _optionalChain([fns, 'access', _37 => _37[i], 'optionalCall', _38 => _38(result)]);
1264
1253
  }
1265
1254
  return result;
1266
1255
  };
@@ -1276,26 +1265,26 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1276
1265
  if (!workspaceRoot3) {
1277
1266
  throw new Error("Cannot find Nx workspace root");
1278
1267
  }
1279
- const config = await _chunkJNBNKAGFjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
1280
- _chunkJNBNKAGFjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1281
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, "Build options resolution");
1268
+ const config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
1269
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1270
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Build options resolution");
1282
1271
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
1283
1272
  exitOnError: true
1284
1273
  });
1285
- const projectJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
1274
+ const projectJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
1286
1275
  if (!await _node.hfs.isFile(projectJsonPath)) {
1287
1276
  throw new Error("Cannot find project.json configuration");
1288
1277
  }
1289
1278
  const projectJson = await _node.hfs.json(projectJsonPath);
1290
1279
  const projectName = projectJson.name;
1291
1280
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1292
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _43 => _43.projects, 'optionalAccess', _44 => _44[projectName]])) {
1281
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _39 => _39.projects, 'optionalAccess', _40 => _40[projectName]])) {
1293
1282
  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.");
1294
1283
  }
1295
1284
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
1296
1285
  options.name ??= `${projectName}-${options.format}`;
1297
1286
  options.target ??= DEFAULT_TARGET;
1298
- const packageJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
1287
+ const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
1299
1288
  if (!await _node.hfs.isFile(packageJsonPath)) {
1300
1289
  throw new Error("Cannot find package.json configuration");
1301
1290
  }
@@ -1319,20 +1308,20 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1319
1308
  ".node"
1320
1309
  ],
1321
1310
  ...userOptions,
1322
- tsconfig: _chunkJNBNKAGFjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1311
+ tsconfig: _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1323
1312
  format: options.format || "cjs",
1324
1313
  entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
1325
1314
  "./src/index.ts"
1326
1315
  ], userOptions.emitOnAll),
1327
- outdir: userOptions.outputPath || _chunkJNBNKAGFjs.joinPaths.call(void 0, "dist", projectRoot),
1316
+ outdir: userOptions.outputPath || _chunkZW3ZP7CVjs.joinPaths.call(void 0, "dist", projectRoot),
1328
1317
  plugins: [],
1329
1318
  name: userOptions.name || projectName,
1330
1319
  projectConfigurations,
1331
1320
  projectName,
1332
1321
  projectGraph,
1333
- sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkJNBNKAGFjs.joinPaths.call(void 0, projectRoot, "src"),
1322
+ sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, "src"),
1334
1323
  minify: userOptions.minify || !userOptions.debug,
1335
- verbose: userOptions.verbose || _chunkJNBNKAGFjs.isVerbose.call(void 0, ) || userOptions.debug === true,
1324
+ verbose: userOptions.verbose || _chunkZW3ZP7CVjs.isVerbose.call(void 0, ) || userOptions.debug === true,
1336
1325
  includeSrc: userOptions.includeSrc === true,
1337
1326
  metafile: userOptions.metafile !== false,
1338
1327
  generatePackageJson: userOptions.generatePackageJson !== false,
@@ -1368,8 +1357,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1368
1357
  }, {})
1369
1358
  },
1370
1359
  inject: [
1371
- options.format === "cjs" && options.injectShims ? _chunkJNBNKAGFjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
1372
- options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkJNBNKAGFjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
1360
+ options.format === "cjs" && options.injectShims ? _chunkZW3ZP7CVjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
1361
+ options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkZW3ZP7CVjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
1373
1362
  ..._nullishCoalesce(options.inject, () => ( []))
1374
1363
  ].filter(Boolean)
1375
1364
  };
@@ -1378,14 +1367,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1378
1367
  return result;
1379
1368
  }, "resolveOptions");
1380
1369
  async function generatePackageJson(context2) {
1381
- if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(_chunkJNBNKAGFjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
1382
- _chunkJNBNKAGFjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
1383
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, "Write package.json file");
1384
- const packageJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
1370
+ if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(_chunkZW3ZP7CVjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
1371
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
1372
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Write package.json file");
1373
+ const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
1385
1374
  if (!await _node.hfs.isFile(packageJsonPath)) {
1386
1375
  throw new Error("Cannot find package.json configuration");
1387
1376
  }
1388
- let packageJson = await _node.hfs.json(_chunkJNBNKAGFjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
1377
+ let packageJson = await _node.hfs.json(_chunkZW3ZP7CVjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
1389
1378
  if (!packageJson) {
1390
1379
  throw new Error("Cannot find package.json configuration file");
1391
1380
  }
@@ -1423,7 +1412,7 @@ async function generatePackageJson(context2) {
1423
1412
  }
1424
1413
  return ret;
1425
1414
  }, packageJson.exports);
1426
- await _devkit.writeJsonFile.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
1415
+ await _devkit.writeJsonFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
1427
1416
  stopwatch();
1428
1417
  }
1429
1418
  return context2;
@@ -1449,8 +1438,8 @@ async function generateContext(getOptions) {
1449
1438
  }
1450
1439
  _chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
1451
1440
  async function executeEsBuild(context2) {
1452
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
1453
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, `${context2.options.name} build`);
1441
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
1442
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${context2.options.name} build`);
1454
1443
  if (process.env.WATCH === "true") {
1455
1444
  const ctx = await esbuild2.context(context2.options);
1456
1445
  watch(ctx, context2.options);
@@ -1465,9 +1454,9 @@ async function executeEsBuild(context2) {
1465
1454
  }
1466
1455
  _chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
1467
1456
  async function copyBuildAssets(context2) {
1468
- if (_optionalChain([context2, 'access', _45 => _45.result, 'optionalAccess', _46 => _46.errors, 'access', _47 => _47.length]) === 0) {
1469
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
1470
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
1457
+ if (_optionalChain([context2, 'access', _41 => _41.result, 'optionalAccess', _42 => _42.errors, 'access', _43 => _43.length]) === 0) {
1458
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
1459
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
1471
1460
  await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
1472
1461
  stopwatch();
1473
1462
  }
@@ -1475,11 +1464,11 @@ async function copyBuildAssets(context2) {
1475
1464
  }
1476
1465
  _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
1477
1466
  async function reportResults(context2) {
1478
- if (_optionalChain([context2, 'access', _48 => _48.result, 'optionalAccess', _49 => _49.errors, 'access', _50 => _50.length]) === 0) {
1467
+ if (_optionalChain([context2, 'access', _44 => _44.result, 'optionalAccess', _45 => _45.errors, 'access', _46 => _46.length]) === 0) {
1479
1468
  if (context2.result.warnings.length > 0) {
1480
- _chunkJNBNKAGFjs.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);
1469
+ _chunkZW3ZP7CVjs.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);
1481
1470
  }
1482
- _chunkJNBNKAGFjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
1471
+ _chunkZW3ZP7CVjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
1483
1472
  }
1484
1473
  }
1485
1474
  _chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
@@ -1521,8 +1510,8 @@ async function cleanOutputPath(context2) {
1521
1510
  }
1522
1511
  _chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
1523
1512
  async function build3(options) {
1524
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
1525
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, "ESBuild pipeline");
1513
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
1514
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "ESBuild pipeline");
1526
1515
  try {
1527
1516
  const opts = Array.isArray(options) ? options : [
1528
1517
  options
@@ -1532,9 +1521,9 @@ async function build3(options) {
1532
1521
  }
1533
1522
  void transduce.async(opts, dependencyCheck);
1534
1523
  await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
1535
- _chunkJNBNKAGFjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
1524
+ _chunkZW3ZP7CVjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
1536
1525
  } catch (error) {
1537
- _chunkJNBNKAGFjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1526
+ _chunkZW3ZP7CVjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1538
1527
  throw error;
1539
1528
  } finally {
1540
1529
  stopwatch();
@@ -1562,9 +1551,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
1562
1551
  return context2.rebuild();
1563
1552
  });
1564
1553
  if (rebuildResult instanceof Error) {
1565
- _chunkJNBNKAGFjs.writeError.call(void 0, rebuildResult.message);
1554
+ _chunkZW3ZP7CVjs.writeError.call(void 0, rebuildResult.message);
1566
1555
  }
1567
- _chunkJNBNKAGFjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
1556
+ _chunkZW3ZP7CVjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
1568
1557
  }, 10);
1569
1558
  changeWatcher.on("change", fastRebuild);
1570
1559
  return void 0;
@@ -1572,15 +1561,15 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
1572
1561
 
1573
1562
  // ../workspace-tools/src/executors/esbuild/executor.ts
1574
1563
  async function esbuildExecutorFn(options, context2, config) {
1575
- _chunkJNBNKAGFjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
1576
- if (!_optionalChain([context2, 'access', _51 => _51.projectsConfigurations, 'optionalAccess', _52 => _52.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _53 => _53.projectsConfigurations, 'access', _54 => _54.projects, 'access', _55 => _55[context2.projectName], 'optionalAccess', _56 => _56.root])) {
1564
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
1565
+ if (!_optionalChain([context2, 'access', _47 => _47.projectsConfigurations, 'optionalAccess', _48 => _48.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _49 => _49.projectsConfigurations, 'access', _50 => _50.projects, 'access', _51 => _51[context2.projectName], 'optionalAccess', _52 => _52.root])) {
1577
1566
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1578
1567
  }
1579
1568
  await build3({
1580
1569
  ...options,
1581
- projectRoot: _optionalChain([context2, 'access', _57 => _57.projectsConfigurations, 'access', _58 => _58.projects, 'optionalAccess', _59 => _59[context2.projectName], 'access', _60 => _60.root]),
1570
+ projectRoot: _optionalChain([context2, 'access', _53 => _53.projectsConfigurations, 'access', _54 => _54.projects, 'optionalAccess', _55 => _55[context2.projectName], 'access', _56 => _56.root]),
1582
1571
  projectName: context2.projectName,
1583
- sourceRoot: _optionalChain([context2, 'access', _61 => _61.projectsConfigurations, 'access', _62 => _62.projects, 'optionalAccess', _63 => _63[context2.projectName], 'optionalAccess', _64 => _64.sourceRoot]),
1572
+ sourceRoot: _optionalChain([context2, 'access', _57 => _57.projectsConfigurations, 'access', _58 => _58.projects, 'optionalAccess', _59 => _59[context2.projectName], 'optionalAccess', _60 => _60.sourceRoot]),
1584
1573
  format: options.format,
1585
1574
  platform: options.format
1586
1575
  });
@@ -1589,7 +1578,7 @@ async function esbuildExecutorFn(options, context2, config) {
1589
1578
  };
1590
1579
  }
1591
1580
  _chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
1592
- var executor_default6 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
1581
+ var executor_default6 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
1593
1582
  skipReadingConfig: false,
1594
1583
  hooks: {
1595
1584
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
@@ -1605,11 +1594,12 @@ var executor_default6 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Storm ESB
1605
1594
 
1606
1595
  // ../workspace-tools/src/executors/npm-publish/executor.ts
1607
1596
 
1608
- var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
1597
+
1609
1598
 
1610
1599
  // ../workspace-tools/src/utils/pnpm-deps-update.ts
1611
1600
 
1612
1601
 
1602
+ var _prettier = require('prettier');
1613
1603
  var _readyamlfile = require('read-yaml-file'); var _readyamlfile2 = _interopRequireDefault(_readyamlfile);
1614
1604
 
1615
1605
  // ../workspace-tools/src/executors/npm-publish/executor.ts
@@ -1622,25 +1612,25 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
1622
1612
  var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
1623
1613
  var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
1624
1614
  async function sizeLimitExecutorFn(options, context2, config) {
1625
- if (!_optionalChain([context2, 'optionalAccess', _65 => _65.projectName]) || !_optionalChain([context2, 'access', _66 => _66.projectsConfigurations, 'optionalAccess', _67 => _67.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
1615
+ if (!_optionalChain([context2, 'optionalAccess', _61 => _61.projectName]) || !_optionalChain([context2, 'access', _62 => _62.projectsConfigurations, 'optionalAccess', _63 => _63.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
1626
1616
  throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
1627
1617
  }
1628
- _chunkJNBNKAGFjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
1618
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
1629
1619
  _sizelimit2.default.call(void 0, [
1630
1620
  _file2.default,
1631
1621
  _esbuild3.default,
1632
1622
  _esbuildwhy2.default
1633
1623
  ], {
1634
- checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _68 => _68.projectsConfigurations, 'access', _69 => _69.projects, 'access', _70 => _70[context2.projectName], 'optionalAccess', _71 => _71.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _72 => _72.projectsConfigurations, 'access', _73 => _73.projects, 'access', _74 => _74[context2.projectName], 'optionalAccess', _75 => _75.root]), () => ( "./")), "src")))
1624
+ checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _64 => _64.projectsConfigurations, 'access', _65 => _65.projects, 'access', _66 => _66[context2.projectName], 'optionalAccess', _67 => _67.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _68 => _68.projectsConfigurations, 'access', _69 => _69.projects, 'access', _70 => _70[context2.projectName], 'optionalAccess', _71 => _71.root]), () => ( "./")), "src")))
1635
1625
  }).then((result) => {
1636
- _chunkJNBNKAGFjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
1626
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
1637
1627
  });
1638
1628
  return {
1639
1629
  success: true
1640
1630
  };
1641
1631
  }
1642
1632
  _chunk3GQAWCBQjs.__name.call(void 0, sizeLimitExecutorFn, "sizeLimitExecutorFn");
1643
- var executor_default7 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
1633
+ var executor_default7 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
1644
1634
  skipReadingConfig: false,
1645
1635
  hooks: {
1646
1636
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
@@ -1659,8 +1649,8 @@ var _tsdown = require('tsdown');
1659
1649
  // ../tsdown/src/clean.ts
1660
1650
 
1661
1651
  async function clean2(name = "ESBuild", directory, config) {
1662
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
1663
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, `${name} output clean`);
1652
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
1653
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${name} output clean`);
1664
1654
  await _node.hfs.deleteAll(directory);
1665
1655
  stopwatch();
1666
1656
  }
@@ -1695,26 +1685,26 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1695
1685
  if (!workspaceRoot3) {
1696
1686
  throw new Error("Cannot find Nx workspace root");
1697
1687
  }
1698
- const config = await _chunkJNBNKAGFjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
1699
- _chunkJNBNKAGFjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1700
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, "Build options resolution");
1688
+ const config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
1689
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
1690
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Build options resolution");
1701
1691
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
1702
1692
  exitOnError: true
1703
1693
  });
1704
- const projectJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
1694
+ const projectJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
1705
1695
  if (!await _node.hfs.isFile(projectJsonPath)) {
1706
1696
  throw new Error("Cannot find project.json configuration");
1707
1697
  }
1708
1698
  const projectJson = await _node.hfs.json(projectJsonPath);
1709
1699
  const projectName = projectJson.name;
1710
1700
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1711
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _76 => _76.projects, 'optionalAccess', _77 => _77[projectName]])) {
1701
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _72 => _72.projects, 'optionalAccess', _73 => _73[projectName]])) {
1712
1702
  throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
1713
1703
  }
1714
1704
  const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
1715
1705
  options.name ??= `${projectName}-${options.format}`;
1716
1706
  options.target ??= DEFAULT_TARGET;
1717
- const packageJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
1707
+ const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
1718
1708
  if (!await _node.hfs.isFile(packageJsonPath)) {
1719
1709
  throw new Error("Cannot find package.json configuration");
1720
1710
  }
@@ -1723,20 +1713,20 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1723
1713
  ...options,
1724
1714
  config,
1725
1715
  ...userOptions,
1726
- tsconfig: _chunkJNBNKAGFjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1716
+ tsconfig: _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
1727
1717
  format: options.format || "cjs",
1728
1718
  entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
1729
1719
  "./src/index.ts"
1730
1720
  ], userOptions.emitOnAll),
1731
- outdir: userOptions.outputPath || _chunkJNBNKAGFjs.joinPaths.call(void 0, "dist", projectRoot),
1721
+ outdir: userOptions.outputPath || _chunkZW3ZP7CVjs.joinPaths.call(void 0, "dist", projectRoot),
1732
1722
  plugins: [],
1733
1723
  name: userOptions.name || projectName,
1734
1724
  projectConfigurations,
1735
1725
  projectName,
1736
1726
  projectGraph,
1737
- sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkJNBNKAGFjs.joinPaths.call(void 0, projectRoot, "src"),
1727
+ sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, "src"),
1738
1728
  minify: userOptions.minify || !userOptions.debug,
1739
- verbose: userOptions.verbose || _chunkJNBNKAGFjs.isVerbose.call(void 0, ) || userOptions.debug === true,
1729
+ verbose: userOptions.verbose || _chunkZW3ZP7CVjs.isVerbose.call(void 0, ) || userOptions.debug === true,
1740
1730
  includeSrc: userOptions.includeSrc === true,
1741
1731
  metafile: userOptions.metafile !== false,
1742
1732
  generatePackageJson: userOptions.generatePackageJson !== false,
@@ -1770,14 +1760,14 @@ var resolveOptions2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
1770
1760
  return result;
1771
1761
  }, "resolveOptions");
1772
1762
  async function generatePackageJson2(options) {
1773
- if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
1774
- _chunkJNBNKAGFjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
1775
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, "Write package.json file");
1776
- const packageJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "project.json");
1763
+ if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
1764
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
1765
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Write package.json file");
1766
+ const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "project.json");
1777
1767
  if (!await _node.hfs.isFile(packageJsonPath)) {
1778
1768
  throw new Error("Cannot find package.json configuration");
1779
1769
  }
1780
- let packageJson = await _node.hfs.json(_chunkJNBNKAGFjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
1770
+ let packageJson = await _node.hfs.json(_chunkZW3ZP7CVjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
1781
1771
  if (!packageJson) {
1782
1772
  throw new Error("Cannot find package.json configuration file");
1783
1773
  }
@@ -1815,15 +1805,15 @@ async function generatePackageJson2(options) {
1815
1805
  }
1816
1806
  return ret;
1817
1807
  }, packageJson.exports);
1818
- await _devkit.writeJsonFile.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
1808
+ await _devkit.writeJsonFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
1819
1809
  stopwatch();
1820
1810
  }
1821
1811
  return options;
1822
1812
  }
1823
1813
  _chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
1824
1814
  async function executeTSDown(options) {
1825
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
1826
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, `${options.name} build`);
1815
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
1816
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} build`);
1827
1817
  await _tsdown.build.call(void 0, {
1828
1818
  ...options,
1829
1819
  entry: options.entryPoints,
@@ -1835,15 +1825,15 @@ async function executeTSDown(options) {
1835
1825
  }
1836
1826
  _chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
1837
1827
  async function copyBuildAssets2(options) {
1838
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
1839
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, `${options.name} asset copy`);
1828
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
1829
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} asset copy`);
1840
1830
  await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
1841
1831
  stopwatch();
1842
1832
  return options;
1843
1833
  }
1844
1834
  _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
1845
1835
  async function reportResults2(options) {
1846
- _chunkJNBNKAGFjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
1836
+ _chunkZW3ZP7CVjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
1847
1837
  }
1848
1838
  _chunk3GQAWCBQjs.__name.call(void 0, reportResults2, "reportResults");
1849
1839
  async function cleanOutputPath2(options) {
@@ -1854,8 +1844,8 @@ async function cleanOutputPath2(options) {
1854
1844
  }
1855
1845
  _chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
1856
1846
  async function build4(options) {
1857
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
1858
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, "TSDown pipeline");
1847
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
1848
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "TSDown pipeline");
1859
1849
  try {
1860
1850
  const opts = Array.isArray(options) ? options : [
1861
1851
  options
@@ -1873,11 +1863,11 @@ async function build4(options) {
1873
1863
  await reportResults2(opt);
1874
1864
  }));
1875
1865
  } else {
1876
- _chunkJNBNKAGFjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
1866
+ _chunkZW3ZP7CVjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
1877
1867
  }
1878
- _chunkJNBNKAGFjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
1868
+ _chunkZW3ZP7CVjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
1879
1869
  } catch (error) {
1880
- _chunkJNBNKAGFjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1870
+ _chunkZW3ZP7CVjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
1881
1871
  throw error;
1882
1872
  } finally {
1883
1873
  stopwatch();
@@ -1887,15 +1877,15 @@ _chunk3GQAWCBQjs.__name.call(void 0, build4, "build");
1887
1877
 
1888
1878
  // ../workspace-tools/src/executors/tsdown/executor.ts
1889
1879
  async function tsdownExecutorFn(options, context2, config) {
1890
- _chunkJNBNKAGFjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
1891
- if (!_optionalChain([context2, 'access', _78 => _78.projectsConfigurations, 'optionalAccess', _79 => _79.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _80 => _80.projectsConfigurations, 'access', _81 => _81.projects, 'access', _82 => _82[context2.projectName], 'optionalAccess', _83 => _83.root])) {
1880
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
1881
+ if (!_optionalChain([context2, 'access', _74 => _74.projectsConfigurations, 'optionalAccess', _75 => _75.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _76 => _76.projectsConfigurations, 'access', _77 => _77.projects, 'access', _78 => _78[context2.projectName], 'optionalAccess', _79 => _79.root])) {
1892
1882
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1893
1883
  }
1894
1884
  await build4({
1895
1885
  ...options,
1896
- projectRoot: _optionalChain([context2, 'access', _84 => _84.projectsConfigurations, 'access', _85 => _85.projects, 'optionalAccess', _86 => _86[context2.projectName], 'access', _87 => _87.root]),
1886
+ projectRoot: _optionalChain([context2, 'access', _80 => _80.projectsConfigurations, 'access', _81 => _81.projects, 'optionalAccess', _82 => _82[context2.projectName], 'access', _83 => _83.root]),
1897
1887
  projectName: context2.projectName,
1898
- sourceRoot: _optionalChain([context2, 'access', _88 => _88.projectsConfigurations, 'access', _89 => _89.projects, 'optionalAccess', _90 => _90[context2.projectName], 'optionalAccess', _91 => _91.sourceRoot]),
1888
+ sourceRoot: _optionalChain([context2, 'access', _84 => _84.projectsConfigurations, 'access', _85 => _85.projects, 'optionalAccess', _86 => _86[context2.projectName], 'optionalAccess', _87 => _87.sourceRoot]),
1899
1889
  format: options.format,
1900
1890
  platform: options.platform
1901
1891
  });
@@ -1904,7 +1894,7 @@ async function tsdownExecutorFn(options, context2, config) {
1904
1894
  };
1905
1895
  }
1906
1896
  _chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
1907
- var executor_default8 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
1897
+ var executor_default8 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
1908
1898
  skipReadingConfig: false,
1909
1899
  hooks: {
1910
1900
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
@@ -1923,11 +1913,11 @@ var _fsextra = require('fs-extra');
1923
1913
  var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
1924
1914
  async function typiaExecutorFn(options, _, config) {
1925
1915
  if (options.clean !== false) {
1926
- _chunkJNBNKAGFjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
1916
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
1927
1917
  _fsextra.removeSync.call(void 0, options.outputPath);
1928
1918
  }
1929
1919
  await Promise.all(options.entry.map((entry) => {
1930
- _chunkJNBNKAGFjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
1920
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
1931
1921
  return _TypiaProgrammerjs.TypiaProgrammer.build({
1932
1922
  input: entry,
1933
1923
  output: options.outputPath,
@@ -1939,7 +1929,7 @@ async function typiaExecutorFn(options, _, config) {
1939
1929
  };
1940
1930
  }
1941
1931
  _chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
1942
- var executor_default9 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
1932
+ var executor_default9 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
1943
1933
  skipReadingConfig: false,
1944
1934
  hooks: {
1945
1935
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
@@ -1959,17 +1949,17 @@ var executor_default9 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "Typia run
1959
1949
 
1960
1950
 
1961
1951
 
1952
+ var _jiti = require('jiti');
1962
1953
 
1963
1954
 
1964
1955
 
1965
1956
 
1966
- var _unbuild = require('unbuild');
1967
1957
 
1968
1958
  // ../unbuild/src/clean.ts
1969
1959
 
1970
1960
  async function clean3(name = "Unbuild", directory, config) {
1971
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
1972
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, `${name} output clean`);
1961
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
1962
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${name} output clean`);
1973
1963
  await _promises.rm.call(void 0, directory, {
1974
1964
  recursive: true,
1975
1965
  force: true
@@ -1998,7 +1988,7 @@ var analyzePlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
1998
1988
  renderChunk(source, chunk) {
1999
1989
  const sourceBytes = formatBytes(source.length);
2000
1990
  const fileName = chunk.fileName;
2001
- _chunkJNBNKAGFjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
1991
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, resolvedOptions.config);
2002
1992
  }
2003
1993
  };
2004
1994
  }, "analyzePlugin");
@@ -2008,7 +1998,7 @@ var onErrorPlugin2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (optio
2008
1998
  name: "storm:on-error",
2009
1999
  buildEnd(error) {
2010
2000
  if (error) {
2011
- _chunkJNBNKAGFjs.writeError.call(void 0, `The following errors occurred during the build:
2001
+ _chunkZW3ZP7CVjs.writeError.call(void 0, `The following errors occurred during the build:
2012
2002
  ${error ? error.message : "Unknown build error"}
2013
2003
 
2014
2004
  `, resolvedOptions.config);
@@ -2016,7 +2006,7 @@ ${error ? error.message : "Unknown build error"}
2016
2006
  }
2017
2007
  },
2018
2008
  renderError(error) {
2019
- _chunkJNBNKAGFjs.writeError.call(void 0, `The following errors occurred during the build:
2009
+ _chunkZW3ZP7CVjs.writeError.call(void 0, `The following errors occurred during the build:
2020
2010
  ${error ? error.message : "Unknown build error"}
2021
2011
 
2022
2012
  `, resolvedOptions.config);
@@ -2024,26 +2014,6 @@ ${error ? error.message : "Unknown build error"}
2024
2014
  }
2025
2015
  }), "onErrorPlugin");
2026
2016
 
2027
- // ../unbuild/src/plugins/swc.ts
2028
- var swcPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => {
2029
- const { transform: transform3 } = _chunk3GQAWCBQjs.__require.call(void 0, "@swc/core");
2030
- return {
2031
- name: "storm:swc",
2032
- transform(code, filename) {
2033
- return transform3(code, {
2034
- filename,
2035
- jsc: {
2036
- transform: {
2037
- react: {
2038
- runtime: "automatic"
2039
- }
2040
- }
2041
- }
2042
- });
2043
- }
2044
- };
2045
- }, "swcPlugin");
2046
-
2047
2017
  // ../unbuild/src/plugins/tsc.ts
2048
2018
 
2049
2019
 
@@ -2071,16 +2041,14 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
2071
2041
  declaration: true,
2072
2042
  paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
2073
2043
  };
2074
- _chunkJNBNKAGFjs.writeTrace.call(void 0, compilerOptions, config);
2044
+ _chunkZW3ZP7CVjs.writeTrace.call(void 0, compilerOptions, config);
2075
2045
  return compilerOptions;
2076
2046
  }
2077
2047
  _chunk3GQAWCBQjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
2078
2048
 
2079
2049
  // ../unbuild/src/plugins/tsc.ts
2080
2050
  var tscPlugin2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, resolvedOptions) => {
2081
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
2082
- exitOnError: true
2083
- });
2051
+ const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
2084
2052
  const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, resolvedOptions.config.workspaceRoot, resolvedOptions.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
2085
2053
  let dependencies = result.dependencies;
2086
2054
  const tsLibDependency = _compilerhelperdependency.getHelperDependency.call(void 0, _compilerhelperdependency.HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
@@ -2099,37 +2067,39 @@ var tscPlugin2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (opt
2099
2067
 
2100
2068
  // ../unbuild/src/plugins/type-definitions.ts
2101
2069
 
2102
- var typeDefinitions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
2103
- name: "storm:dts-bundle",
2104
- async generateBundle(_opts, bundle) {
2105
- for (const file of Object.values(bundle)) {
2106
- if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
2107
- continue;
2108
- }
2109
- const hasDefaultExport = file.exports.includes("default");
2110
- const entrySourceFileName = _path.relative.call(void 0, options.projectRoot, file.facadeModuleId);
2111
- const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
2112
- const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
2113
- const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
2114
- const dtsFileSource = hasDefaultExport ? `
2070
+ function typeDefinitions(projectRoot) {
2071
+ return {
2072
+ name: "storm:dts-bundle",
2073
+ async generateBundle(_opts, bundle) {
2074
+ for (const file of Object.values(bundle)) {
2075
+ if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
2076
+ continue;
2077
+ }
2078
+ const hasDefaultExport = file.exports.includes("default");
2079
+ const entrySourceFileName = _path.relative.call(void 0, projectRoot, file.facadeModuleId);
2080
+ const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
2081
+ const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
2082
+ const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
2083
+ const dtsFileSource = hasDefaultExport ? `
2115
2084
  export * from ${relativeSourceDtsName};
2116
2085
  export { default } from ${relativeSourceDtsName};
2117
2086
  ` : `export * from ${relativeSourceDtsName};
2118
2087
  `;
2119
- this.emitFile({
2120
- type: "asset",
2121
- fileName: dtsFileName,
2122
- source: dtsFileSource
2123
- });
2088
+ this.emitFile({
2089
+ type: "asset",
2090
+ fileName: dtsFileName,
2091
+ source: dtsFileSource
2092
+ });
2093
+ }
2124
2094
  }
2125
- }
2126
- }), "typeDefinitions");
2095
+ };
2096
+ }
2097
+ _chunk3GQAWCBQjs.__name.call(void 0, typeDefinitions, "typeDefinitions");
2127
2098
 
2128
2099
  // ../unbuild/src/config.ts
2129
2100
  var getDefaultBuildPlugins2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, resolvedOptions) => Promise.all([
2130
2101
  analyzePlugin(options, resolvedOptions),
2131
- swcPlugin(options, resolvedOptions),
2132
- typeDefinitions(options, resolvedOptions),
2102
+ typeDefinitions(resolvedOptions.projectRoot),
2133
2103
  tscPlugin2(options, resolvedOptions),
2134
2104
  onErrorPlugin2(options, resolvedOptions)
2135
2105
  ].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
@@ -2140,31 +2110,29 @@ async function resolveOptions3(options) {
2140
2110
  if (!projectRoot) {
2141
2111
  throw new Error("Cannot find project root");
2142
2112
  }
2143
- const outputPath = options.outputPath || _chunkJNBNKAGFjs.joinPaths.call(void 0, "dist", projectRoot);
2113
+ const outputPath = options.outputPath || _chunkZW3ZP7CVjs.joinPaths.call(void 0, "dist", projectRoot);
2144
2114
  const workspaceRoot3 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
2145
2115
  if (!workspaceRoot3) {
2146
2116
  throw new Error("Cannot find workspace root");
2147
2117
  }
2148
- const config = await _chunkJNBNKAGFjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
2149
- _chunkJNBNKAGFjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
2150
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, "Build options resolution");
2118
+ const config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, workspaceRoot3.dir);
2119
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
2120
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Build options resolution");
2151
2121
  if (options.configPath) {
2152
2122
  const configFile = await loadConfig(options.configPath);
2153
2123
  if (configFile) {
2154
2124
  options = _defu2.default.call(void 0, options, configFile);
2155
2125
  }
2156
2126
  }
2157
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
2158
- exitOnError: true
2159
- });
2160
- const projectJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot, "project.json");
2127
+ const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
2128
+ const projectJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot, "project.json");
2161
2129
  if (!_fs.existsSync.call(void 0, projectJsonPath)) {
2162
2130
  throw new Error("Cannot find project.json configuration");
2163
2131
  }
2164
2132
  const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
2165
2133
  const projectJson = JSON.parse(projectJsonContent);
2166
2134
  const projectName = projectJson.name;
2167
- const packageJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "package.json");
2135
+ const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "package.json");
2168
2136
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
2169
2137
  throw new Error("Cannot find package.json configuration");
2170
2138
  }
@@ -2172,22 +2140,18 @@ async function resolveOptions3(options) {
2172
2140
  const packageJson = JSON.parse(packageJsonContent);
2173
2141
  let tsconfig = options.tsconfig;
2174
2142
  if (!tsconfig) {
2175
- tsconfig = _chunkJNBNKAGFjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json");
2143
+ tsconfig = _chunkZW3ZP7CVjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json");
2176
2144
  }
2177
2145
  if (!_fs.existsSync.call(void 0, tsconfig)) {
2178
2146
  throw new Error("Cannot find tsconfig.json configuration");
2179
2147
  }
2180
2148
  let sourceRoot = projectJson.sourceRoot;
2181
2149
  if (!sourceRoot) {
2182
- sourceRoot = _chunkJNBNKAGFjs.joinPaths.call(void 0, projectRoot, "src");
2150
+ sourceRoot = _chunkZW3ZP7CVjs.joinPaths.call(void 0, projectRoot, "src");
2183
2151
  }
2184
2152
  if (!_fs.existsSync.call(void 0, sourceRoot)) {
2185
2153
  throw new Error("Cannot find sourceRoot directory");
2186
2154
  }
2187
- const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
2188
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _92 => _92.projects, 'optionalAccess', _93 => _93[projectName]])) {
2189
- 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.");
2190
- }
2191
2155
  const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot3.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
2192
2156
  let dependencies = result.dependencies;
2193
2157
  const tsLibDependency = _js.getHelperDependency.call(void 0, _js.HelperDependency.tsc, tsconfig, dependencies, projectGraph, true);
@@ -2195,6 +2159,11 @@ async function resolveOptions3(options) {
2195
2159
  dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
2196
2160
  dependencies.push(tsLibDependency);
2197
2161
  }
2162
+ const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
2163
+ cache: true,
2164
+ fsCache: config.skipCache ? false : _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.directories.cache || "node_modules/.cache/storm", "jiti"),
2165
+ interopDefault: true
2166
+ });
2198
2167
  const resolvedOptions = {
2199
2168
  name: projectName,
2200
2169
  config,
@@ -2202,19 +2171,20 @@ async function resolveOptions3(options) {
2202
2171
  sourceRoot,
2203
2172
  projectName,
2204
2173
  tsconfig,
2174
+ jiti,
2205
2175
  clean: false,
2206
2176
  entries: [
2207
2177
  {
2208
2178
  builder: "mkdist",
2209
2179
  input: `.${sourceRoot.replace(projectRoot, "")}`,
2210
- outDir: _chunkJNBNKAGFjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
2180
+ outDir: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
2211
2181
  declaration: options.emitTypes !== false,
2212
2182
  format: "esm"
2213
2183
  },
2214
2184
  {
2215
2185
  builder: "mkdist",
2216
2186
  input: `.${sourceRoot.replace(projectRoot, "")}`,
2217
- outDir: _chunkJNBNKAGFjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
2187
+ outDir: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot), config.workspaceRoot).replaceAll("\\", "/"), outputPath, "dist").replaceAll("\\", "/"),
2218
2188
  declaration: options.emitTypes !== false,
2219
2189
  format: "cjs",
2220
2190
  ext: "cjs"
@@ -2268,11 +2238,11 @@ async function resolveOptions3(options) {
2268
2238
  ]
2269
2239
  },
2270
2240
  esbuild: {
2271
- minify: !!options.minify,
2241
+ minify: options.minify !== false,
2272
2242
  splitting: options.splitting !== false,
2273
2243
  treeShaking: options.treeShaking !== false,
2274
2244
  color: true,
2275
- logLevel: config.logLevel === _chunkJNBNKAGFjs.LogLevelLabel.FATAL ? _chunkJNBNKAGFjs.LogLevelLabel.ERROR : _chunkJNBNKAGFjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
2245
+ logLevel: config.logLevel === _chunkZW3ZP7CVjs.LogLevelLabel.FATAL ? _chunkZW3ZP7CVjs.LogLevelLabel.ERROR : _chunkZW3ZP7CVjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
2276
2246
  }
2277
2247
  }
2278
2248
  };
@@ -2308,32 +2278,44 @@ async function resolveOptions3(options) {
2308
2278
  }
2309
2279
  _chunk3GQAWCBQjs.__name.call(void 0, resolveOptions3, "resolveOptions");
2310
2280
  async function generatePackageJson3(options) {
2311
- if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
2312
- _chunkJNBNKAGFjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
2313
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, "Write package.json file");
2314
- const packageJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "project.json");
2281
+ if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
2282
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
2283
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Write package.json file");
2284
+ const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "project.json");
2315
2285
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
2316
2286
  throw new Error("Cannot find package.json configuration");
2317
2287
  }
2318
- let packageJsonContent = await _promises.readFile.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
2288
+ let packageJsonContent = await _promises.readFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
2319
2289
  if (!packageJsonContent) {
2320
2290
  throw new Error("Cannot find package.json configuration file");
2321
2291
  }
2322
2292
  let packageJson = JSON.parse(packageJsonContent);
2323
2293
  packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
2324
2294
  packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
2325
- packageJson = await addPackageJsonExports(options.sourceRoot, packageJson);
2326
- await _devkit.writeJsonFile.call(void 0, _chunkJNBNKAGFjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
2295
+ await _devkit.writeJsonFile.call(void 0, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
2327
2296
  stopwatch();
2328
2297
  }
2329
2298
  return options;
2330
2299
  }
2331
2300
  _chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson3, "generatePackageJson");
2301
+ async function resolveUnbuild(options) {
2302
+ _chunkZW3ZP7CVjs.writeTrace.call(void 0, `Resolving Unbuild package with Jiti`, options.config);
2303
+ try {
2304
+ return options.jiti.import("unbuild");
2305
+ } catch (error) {
2306
+ _chunkZW3ZP7CVjs.writeError.call(void 0, " \u274C An error occurred while resolving the Unbuild package", options.config);
2307
+ throw new Error("An error occurred while resolving the Unbuild package", {
2308
+ cause: error
2309
+ });
2310
+ }
2311
+ }
2312
+ _chunk3GQAWCBQjs.__name.call(void 0, resolveUnbuild, "resolveUnbuild");
2332
2313
  async function executeUnbuild(options) {
2333
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
2334
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
2314
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
2315
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
2335
2316
  try {
2336
- await _unbuild.build.call(void 0, options.projectRoot, false, {
2317
+ const unbuild = await resolveUnbuild(options);
2318
+ await unbuild.build(options.projectRoot, false, {
2337
2319
  ...options,
2338
2320
  rootDir: options.projectRoot
2339
2321
  });
@@ -2344,8 +2326,8 @@ async function executeUnbuild(options) {
2344
2326
  }
2345
2327
  _chunk3GQAWCBQjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
2346
2328
  async function copyBuildAssets3(options) {
2347
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
2348
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, `${options.name} asset copy`);
2329
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
2330
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, `${options.name} asset copy`);
2349
2331
  await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.projectName, options.sourceRoot, options.generatePackageJson, options.includeSrc);
2350
2332
  stopwatch();
2351
2333
  return options;
@@ -2359,17 +2341,17 @@ async function cleanOutputPath3(options) {
2359
2341
  }
2360
2342
  _chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath3, "cleanOutputPath");
2361
2343
  async function build5(options) {
2362
- _chunkJNBNKAGFjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`);
2363
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, "Unbuild pipeline");
2344
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`);
2345
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, "Unbuild pipeline");
2364
2346
  try {
2365
2347
  const resolvedOptions = await resolveOptions3(options);
2366
2348
  await cleanOutputPath3(resolvedOptions);
2367
2349
  await generatePackageJson3(resolvedOptions);
2368
2350
  await executeUnbuild(resolvedOptions);
2369
2351
  await copyBuildAssets3(resolvedOptions);
2370
- _chunkJNBNKAGFjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, resolvedOptions.config);
2352
+ _chunkZW3ZP7CVjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, resolvedOptions.config);
2371
2353
  } catch (error) {
2372
- _chunkJNBNKAGFjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
2354
+ _chunkZW3ZP7CVjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
2373
2355
  throw error;
2374
2356
  } finally {
2375
2357
  stopwatch();
@@ -2380,15 +2362,15 @@ _chunk3GQAWCBQjs.__name.call(void 0, build5, "build");
2380
2362
  // ../workspace-tools/src/executors/unbuild/executor.ts
2381
2363
 
2382
2364
  async function unbuildExecutorFn(options, context2, config) {
2383
- _chunkJNBNKAGFjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
2384
- if (!_optionalChain([context2, 'access', _94 => _94.projectsConfigurations, 'optionalAccess', _95 => _95.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _96 => _96.projectsConfigurations, 'access', _97 => _97.projects, 'access', _98 => _98[context2.projectName], 'optionalAccess', _99 => _99.root])) {
2365
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
2366
+ if (!_optionalChain([context2, 'access', _88 => _88.projectsConfigurations, 'optionalAccess', _89 => _89.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _90 => _90.projectsConfigurations, 'access', _91 => _91.projects, 'access', _92 => _92[context2.projectName], 'optionalAccess', _93 => _93.root])) {
2385
2367
  throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
2386
2368
  }
2387
2369
  await build5(_defu.defu.call(void 0, {
2388
2370
  ...options,
2389
- projectRoot: _optionalChain([context2, 'access', _100 => _100.projectsConfigurations, 'access', _101 => _101.projects, 'optionalAccess', _102 => _102[context2.projectName], 'access', _103 => _103.root]),
2371
+ projectRoot: _optionalChain([context2, 'access', _94 => _94.projectsConfigurations, 'access', _95 => _95.projects, 'optionalAccess', _96 => _96[context2.projectName], 'access', _97 => _97.root]),
2390
2372
  projectName: context2.projectName,
2391
- sourceRoot: _optionalChain([context2, 'access', _104 => _104.projectsConfigurations, 'access', _105 => _105.projects, 'optionalAccess', _106 => _106[context2.projectName], 'optionalAccess', _107 => _107.sourceRoot]),
2373
+ sourceRoot: _optionalChain([context2, 'access', _98 => _98.projectsConfigurations, 'access', _99 => _99.projects, 'optionalAccess', _100 => _100[context2.projectName], 'optionalAccess', _101 => _101.sourceRoot]),
2392
2374
  platform: options.platform,
2393
2375
  name: context2.projectName
2394
2376
  }, {
@@ -2423,7 +2405,7 @@ async function unbuildExecutorFn(options, context2, config) {
2423
2405
  };
2424
2406
  }
2425
2407
  _chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
2426
- var executor_default10 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
2408
+ var executor_default10 = _chunkZW3ZP7CVjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
2427
2409
  skipReadingConfig: false,
2428
2410
  hooks: {
2429
2411
  applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
@@ -2444,58 +2426,58 @@ var executor_default10 = _chunkJNBNKAGFjs.withRunExecutor.call(void 0, "TypeScri
2444
2426
  var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
2445
2427
  skipReadingConfig: false
2446
2428
  }) => async (tree, _options) => {
2447
- const stopwatch = _chunkJNBNKAGFjs.getStopwatch.call(void 0, name);
2429
+ const stopwatch = _chunkZW3ZP7CVjs.getStopwatch.call(void 0, name);
2448
2430
  let options = _options;
2449
2431
  let config;
2450
2432
  try {
2451
- _chunkJNBNKAGFjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
2433
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
2452
2434
 
2453
2435
  `, config);
2454
- const workspaceRoot3 = _chunkJNBNKAGFjs.findWorkspaceRoot.call(void 0, );
2436
+ const workspaceRoot3 = _chunkZW3ZP7CVjs.findWorkspaceRoot.call(void 0, );
2455
2437
  if (!generatorOptions.skipReadingConfig) {
2456
- _chunkJNBNKAGFjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
2438
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
2457
2439
  - workspaceRoot: ${workspaceRoot3}`, config);
2458
- config = await _chunkJNBNKAGFjs.loadStormConfig.call(void 0, workspaceRoot3);
2440
+ config = await _chunkZW3ZP7CVjs.loadStormConfig.call(void 0, workspaceRoot3);
2459
2441
  }
2460
- if (_optionalChain([generatorOptions, 'optionalAccess', _108 => _108.hooks, 'optionalAccess', _109 => _109.applyDefaultOptions])) {
2461
- _chunkJNBNKAGFjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
2442
+ if (_optionalChain([generatorOptions, 'optionalAccess', _102 => _102.hooks, 'optionalAccess', _103 => _103.applyDefaultOptions])) {
2443
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
2462
2444
  options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
2463
- _chunkJNBNKAGFjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
2445
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
2464
2446
  }
2465
- _chunkJNBNKAGFjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
2447
+ _chunkZW3ZP7CVjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
2466
2448
  ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
2467
- const tokenized = await _chunkJNBNKAGFjs.applyWorkspaceTokens.call(void 0, options, {
2449
+ const tokenized = await _chunkZW3ZP7CVjs.applyWorkspaceTokens.call(void 0, options, {
2468
2450
  workspaceRoot: tree.root,
2469
2451
  config
2470
- }, _chunkJNBNKAGFjs.applyWorkspaceBaseTokens);
2471
- if (_optionalChain([generatorOptions, 'optionalAccess', _110 => _110.hooks, 'optionalAccess', _111 => _111.preProcess])) {
2472
- _chunkJNBNKAGFjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
2452
+ }, _chunkZW3ZP7CVjs.applyWorkspaceBaseTokens);
2453
+ if (_optionalChain([generatorOptions, 'optionalAccess', _104 => _104.hooks, 'optionalAccess', _105 => _105.preProcess])) {
2454
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
2473
2455
  await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
2474
- _chunkJNBNKAGFjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
2456
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
2475
2457
  }
2476
2458
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
2477
2459
  if (result) {
2478
- 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") {
2460
+ 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") {
2479
2461
  throw new Error(`The ${name} generator failed to run`, {
2480
- cause: _optionalChain([result, 'optionalAccess', _120 => _120.error])
2462
+ cause: _optionalChain([result, 'optionalAccess', _114 => _114.error])
2481
2463
  });
2482
2464
  } else if (result.success && result.data) {
2483
2465
  return result;
2484
2466
  }
2485
2467
  }
2486
- if (_optionalChain([generatorOptions, 'optionalAccess', _121 => _121.hooks, 'optionalAccess', _122 => _122.postProcess])) {
2487
- _chunkJNBNKAGFjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
2468
+ if (_optionalChain([generatorOptions, 'optionalAccess', _115 => _115.hooks, 'optionalAccess', _116 => _116.postProcess])) {
2469
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
2488
2470
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
2489
- _chunkJNBNKAGFjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
2471
+ _chunkZW3ZP7CVjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
2490
2472
  }
2491
2473
  return () => {
2492
- _chunkJNBNKAGFjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
2474
+ _chunkZW3ZP7CVjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
2493
2475
  `, config);
2494
2476
  };
2495
2477
  } catch (error) {
2496
2478
  return () => {
2497
- _chunkJNBNKAGFjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
2498
- _chunkJNBNKAGFjs.writeError.call(void 0, `An exception was thrown in the generator's process
2479
+ _chunkZW3ZP7CVjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
2480
+ _chunkZW3ZP7CVjs.writeError.call(void 0, `An exception was thrown in the generator's process
2499
2481
  - Details: ${error.message}
2500
2482
  - Stacktrace: ${error.stack}`, config);
2501
2483
  };
@@ -2597,7 +2579,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2597
2579
  const projectConfig = {
2598
2580
  root: options.directory,
2599
2581
  projectType: "library",
2600
- sourceRoot: _chunkJNBNKAGFjs.joinPaths.call(void 0, _nullishCoalesce(options.directory, () => ( "")), "src"),
2582
+ sourceRoot: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _nullishCoalesce(options.directory, () => ( "")), "src"),
2601
2583
  targets: {
2602
2584
  build: {
2603
2585
  executor: schema.buildExecutor,
@@ -2606,11 +2588,11 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2606
2588
  ],
2607
2589
  options: {
2608
2590
  entry: [
2609
- _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "src", "index.ts")
2591
+ _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "src", "index.ts")
2610
2592
  ],
2611
2593
  outputPath: getOutputPath(options),
2612
- tsconfig: _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
2613
- project: _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
2594
+ tsconfig: _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
2595
+ project: _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
2614
2596
  defaultConfiguration: "production",
2615
2597
  platform: "neutral",
2616
2598
  assets: [
@@ -2649,22 +2631,22 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2649
2631
  _devkit.addProjectConfiguration.call(void 0, tree, options.name, projectConfig);
2650
2632
  let repository = {
2651
2633
  type: "github",
2652
- 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`
2634
+ 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`
2653
2635
  };
2654
2636
  let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
2655
2637
  if (tree.exists("package.json")) {
2656
2638
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
2657
- if (_optionalChain([packageJson, 'optionalAccess', _127 => _127.repository])) {
2639
+ if (_optionalChain([packageJson, 'optionalAccess', _121 => _121.repository])) {
2658
2640
  repository = packageJson.repository;
2659
2641
  }
2660
- if (_optionalChain([packageJson, 'optionalAccess', _128 => _128.description])) {
2642
+ if (_optionalChain([packageJson, 'optionalAccess', _122 => _122.description])) {
2661
2643
  description = packageJson.description;
2662
2644
  }
2663
2645
  }
2664
2646
  if (!options.importPath) {
2665
2647
  options.importPath = options.name;
2666
2648
  }
2667
- const packageJsonPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "package.json");
2649
+ const packageJsonPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "package.json");
2668
2650
  if (tree.exists(packageJsonPath)) {
2669
2651
  _devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
2670
2652
  if (!options.importPath) {
@@ -2712,30 +2694,30 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
2712
2694
  _devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
2713
2695
  ...json,
2714
2696
  pnpm: {
2715
- ..._optionalChain([json, 'optionalAccess', _129 => _129.pnpm]),
2697
+ ..._optionalChain([json, 'optionalAccess', _123 => _123.pnpm]),
2716
2698
  overrides: {
2717
- ..._optionalChain([json, 'optionalAccess', _130 => _130.pnpm, 'optionalAccess', _131 => _131.overrides]),
2699
+ ..._optionalChain([json, 'optionalAccess', _124 => _124.pnpm, 'optionalAccess', _125 => _125.overrides]),
2718
2700
  [_nullishCoalesce(options.importPath, () => ( ""))]: "workspace:*"
2719
2701
  }
2720
2702
  }
2721
2703
  }));
2722
2704
  }
2723
2705
  _js.addTsConfigPath.call(void 0, tree, options.importPath, [
2724
- _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
2706
+ _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
2725
2707
  ]);
2726
- _js.addTsConfigPath.call(void 0, tree, _chunkJNBNKAGFjs.joinPaths.call(void 0, options.importPath, "/*"), [
2727
- _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "./src", "/*")
2708
+ _js.addTsConfigPath.call(void 0, tree, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.importPath, "/*"), [
2709
+ _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "./src", "/*")
2728
2710
  ]);
2729
2711
  if (tree.exists("package.json")) {
2730
2712
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
2731
- if (_optionalChain([packageJson, 'optionalAccess', _132 => _132.repository])) {
2713
+ if (_optionalChain([packageJson, 'optionalAccess', _126 => _126.repository])) {
2732
2714
  repository = packageJson.repository;
2733
2715
  }
2734
- if (_optionalChain([packageJson, 'optionalAccess', _133 => _133.description])) {
2716
+ if (_optionalChain([packageJson, 'optionalAccess', _127 => _127.description])) {
2735
2717
  description = packageJson.description;
2736
2718
  }
2737
2719
  }
2738
- const tsconfigPath = _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
2720
+ const tsconfigPath = _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
2739
2721
  if (tree.exists(tsconfigPath)) {
2740
2722
  _devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
2741
2723
  json.composite ??= true;
@@ -2773,36 +2755,36 @@ function getOutputPath(options) {
2773
2755
  } else {
2774
2756
  parts.push(options.projectRoot);
2775
2757
  }
2776
- return _chunkJNBNKAGFjs.joinPaths.call(void 0, ...parts);
2758
+ return _chunkZW3ZP7CVjs.joinPaths.call(void 0, ...parts);
2777
2759
  }
2778
2760
  _chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
2779
2761
  function createProjectTsConfigJson(tree, options) {
2780
2762
  const tsconfig = {
2781
2763
  extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
2782
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _134 => _134.tsconfigOptions]), () => ( {})),
2764
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _128 => _128.tsconfigOptions]), () => ( {})),
2783
2765
  compilerOptions: {
2784
2766
  ...options.rootProject ? _js.tsConfigBaseOptions : {},
2785
- outDir: _chunkJNBNKAGFjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
2767
+ outDir: _chunkZW3ZP7CVjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
2786
2768
  noEmit: true,
2787
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.tsconfigOptions, 'optionalAccess', _136 => _136.compilerOptions]), () => ( {}))
2769
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.tsconfigOptions, 'optionalAccess', _130 => _130.compilerOptions]), () => ( {}))
2788
2770
  },
2789
2771
  files: [
2790
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _137 => _137.tsconfigOptions, 'optionalAccess', _138 => _138.files]), () => ( []))
2772
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _131 => _131.tsconfigOptions, 'optionalAccess', _132 => _132.files]), () => ( []))
2791
2773
  ],
2792
2774
  include: [
2793
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _139 => _139.tsconfigOptions, 'optionalAccess', _140 => _140.include]), () => ( [])),
2775
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _133 => _133.tsconfigOptions, 'optionalAccess', _134 => _134.include]), () => ( [])),
2794
2776
  "src/**/*.ts",
2795
2777
  "src/**/*.js",
2796
2778
  "bin/**/*"
2797
2779
  ],
2798
2780
  exclude: [
2799
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _141 => _141.tsconfigOptions, 'optionalAccess', _142 => _142.exclude]), () => ( [])),
2781
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.tsconfigOptions, 'optionalAccess', _136 => _136.exclude]), () => ( [])),
2800
2782
  "jest.config.ts",
2801
2783
  "src/**/*.spec.ts",
2802
2784
  "src/**/*.test.ts"
2803
2785
  ]
2804
2786
  };
2805
- _devkit.writeJson.call(void 0, tree, _chunkJNBNKAGFjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
2787
+ _devkit.writeJson.call(void 0, tree, _chunkZW3ZP7CVjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
2806
2788
  }
2807
2789
  _chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
2808
2790
  async function normalizeOptions(tree, options) {
@@ -2928,19 +2910,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
2928
2910
 
2929
2911
  var _zodtojsonschema = require('zod-to-json-schema');
2930
2912
  async function configSchemaGeneratorFn(tree, options, config) {
2931
- _chunkJNBNKAGFjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
2932
- _chunkJNBNKAGFjs.writeTrace.call(void 0, `Determining the Storm Configuration JSON Schema...`, config);
2933
- const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkJNBNKAGFjs.StormConfigSchema, {
2913
+ _chunkZW3ZP7CVjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
2914
+ _chunkZW3ZP7CVjs.writeTrace.call(void 0, `Determining the Storm Configuration JSON Schema...`, config);
2915
+ const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkZW3ZP7CVjs.StormConfigSchema, {
2934
2916
  name: "StormWorkspaceConfiguration"
2935
2917
  });
2936
- _chunkJNBNKAGFjs.writeTrace.call(void 0, jsonSchema, config);
2937
- const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _143 => _143.workspaceRoot]), () => ( _chunkJNBNKAGFjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _144 => _144.outputFile, 'optionalAccess', _145 => _145.startsWith, 'call', _146 => _146("./")]) ? "" : "./");
2938
- _chunkJNBNKAGFjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
2918
+ _chunkZW3ZP7CVjs.writeTrace.call(void 0, jsonSchema, config);
2919
+ const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _137 => _137.workspaceRoot]), () => ( _chunkZW3ZP7CVjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _138 => _138.outputFile, 'optionalAccess', _139 => _139.startsWith, 'call', _140 => _140("./")]) ? "" : "./");
2920
+ _chunkZW3ZP7CVjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
2939
2921
  _devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
2940
2922
  spaces: 2
2941
2923
  });
2942
2924
  await _devkit.formatFiles.call(void 0, tree);
2943
- _chunkJNBNKAGFjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
2925
+ _chunkZW3ZP7CVjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
2944
2926
  return {
2945
2927
  success: true
2946
2928
  };