@storm-software/terraform-tools 0.66.268 → 0.66.272

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 (54) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-BOLIQGHH.js → chunk-3PPOJGPM.js} +2 -2
  4. package/dist/{chunk-SVHLNLWI.js → chunk-6XRBUSRZ.js} +2 -2
  5. package/dist/{chunk-PPWYTBXH.js → chunk-7SJNXGGY.js} +2 -2
  6. package/dist/{chunk-MH7PQUPL.mjs → chunk-BTFCJA4P.mjs} +1 -1
  7. package/dist/{chunk-7GR34ULJ.mjs → chunk-DWFH4BRZ.mjs} +1 -1
  8. package/dist/{chunk-ABYTODGS.mjs → chunk-F3NMHTBD.mjs} +0 -1
  9. package/dist/{chunk-A6WNSDR7.js → chunk-FUIR6CV3.js} +1 -2
  10. package/dist/{chunk-QQOA6GG4.js → chunk-LIBELAPY.js} +2 -2
  11. package/dist/{chunk-NEH3N2A3.mjs → chunk-RN7QGFQC.mjs} +1 -1
  12. package/dist/{chunk-P4PQWAMH.mjs → chunk-SU4DPIOS.mjs} +1 -1
  13. package/dist/{chunk-TJMO7T74.js → chunk-T7VMRGBY.js} +630 -1025
  14. package/dist/{chunk-BGDEJKQP.js → chunk-TL7BE6RW.js} +2 -2
  15. package/dist/{chunk-LITP5RJ4.mjs → chunk-W3GP53VK.mjs} +1 -1
  16. package/dist/{chunk-G7C6GYSO.mjs → chunk-Y46WRPCF.mjs} +407 -802
  17. package/dist/{chunk-VEA5XEHB.mjs → chunk-ZAQLCGRJ.mjs} +1 -1
  18. package/dist/executors.d.mts +0 -1
  19. package/dist/executors.d.ts +0 -1
  20. package/dist/executors.js +6 -6
  21. package/dist/executors.mjs +7 -7
  22. package/dist/generators.js +3 -3
  23. package/dist/generators.mjs +3 -3
  24. package/dist/index.d.mts +0 -1
  25. package/dist/index.d.ts +0 -1
  26. package/dist/index.js +10 -10
  27. package/dist/index.mjs +10 -10
  28. package/dist/src/base/base-terraform-executor.untyped.mjs +1 -1
  29. package/dist/src/base/index.d.mts +0 -1
  30. package/dist/src/base/index.d.ts +0 -1
  31. package/dist/src/base/index.js +3 -3
  32. package/dist/src/base/index.mjs +3 -3
  33. package/dist/src/base/terraform-executor.d.mts +1 -2
  34. package/dist/src/base/terraform-executor.d.ts +1 -2
  35. package/dist/src/base/terraform-executor.js +3 -3
  36. package/dist/src/base/terraform-executor.mjs +3 -3
  37. package/dist/src/executors/apply/executor.d.mts +0 -1
  38. package/dist/src/executors/apply/executor.d.ts +0 -1
  39. package/dist/src/executors/apply/executor.js +4 -4
  40. package/dist/src/executors/apply/executor.mjs +4 -4
  41. package/dist/src/executors/destroy/executor.d.mts +0 -1
  42. package/dist/src/executors/destroy/executor.d.ts +0 -1
  43. package/dist/src/executors/destroy/executor.js +4 -4
  44. package/dist/src/executors/destroy/executor.mjs +4 -4
  45. package/dist/src/executors/output/executor.js +4 -4
  46. package/dist/src/executors/output/executor.mjs +4 -4
  47. package/dist/src/executors/plan/executor.d.mts +0 -1
  48. package/dist/src/executors/plan/executor.d.ts +0 -1
  49. package/dist/src/executors/plan/executor.js +4 -4
  50. package/dist/src/executors/plan/executor.mjs +4 -4
  51. package/dist/src/generators/init/init.js +3 -3
  52. package/dist/src/generators/init/init.mjs +3 -3
  53. package/dist/tsup.config.mjs +1 -1
  54. package/package.json +5 -5
@@ -20,8 +20,7 @@
20
20
 
21
21
 
22
22
 
23
-
24
- var _chunkA6WNSDR7js = require('./chunk-A6WNSDR7.js');
23
+ var _chunkFUIR6CV3js = require('./chunk-FUIR6CV3.js');
25
24
 
26
25
  // src/generators/init/init.ts
27
26
  var _devkit = require('@nx/devkit');
@@ -171,7 +170,7 @@ async function cargoBuildExecutor(options, context) {
171
170
  const command = buildCargoCommand("build", options, context);
172
171
  return await cargoCommand(context.root, ...command);
173
172
  }
174
- var executor_default = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
173
+ var executor_default = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
175
174
  "Cargo - Build",
176
175
  cargoBuildExecutor,
177
176
  {
@@ -191,7 +190,7 @@ async function cargoCheckExecutor(options, context) {
191
190
  const command = buildCargoCommand("check", options, context);
192
191
  return await cargoCommand(context.root, ...command);
193
192
  }
194
- var executor_default2 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
193
+ var executor_default2 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
195
194
  "Cargo - Check",
196
195
  cargoCheckExecutor,
197
196
  {
@@ -210,7 +209,7 @@ async function cargoClippyExecutor(options, context) {
210
209
  const command = buildCargoCommand("clippy", options, context);
211
210
  return await cargoCommand(context.root, ...command);
212
211
  }
213
- var executor_default3 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
212
+ var executor_default3 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
214
213
  "Cargo - Clippy",
215
214
  cargoClippyExecutor,
216
215
  {
@@ -233,7 +232,7 @@ async function cargoDocExecutor(options, context) {
233
232
  const command = buildCargoCommand("doc", options, context);
234
233
  return await cargoCommand(context.root, ...command);
235
234
  }
236
- var executor_default4 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
235
+ var executor_default4 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
237
236
  "Cargo - Doc",
238
237
  cargoDocExecutor,
239
238
  {
@@ -259,7 +258,7 @@ async function cargoFormatExecutor(options, context) {
259
258
  const command = buildCargoCommand("fmt", options, context);
260
259
  return await cargoCommand(context.root, ...command);
261
260
  }
262
- var executor_default5 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
261
+ var executor_default5 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
263
262
  "Cargo - Format",
264
263
  cargoFormatExecutor,
265
264
  {
@@ -281,876 +280,192 @@ var executor_default5 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
281
280
  var _https = require('https'); var _https2 = _interopRequireDefault(_https);
282
281
  var LARGE_BUFFER = 1024 * 1e6;
283
282
 
284
- // ../build-tools/src/config.ts
285
- var DEFAULT_JS_BANNER = `
286
- // ---------------------------------------
287
- // \u{1F5F2} Built by Storm Software
288
- // ---------------------------------------
289
- `;
290
- var DEFAULT_CSS_BANNER = `
291
- /* ---------------------------------------
292
- \u{1F5F2} Built by Storm Software
293
- --------------------------------------- */
294
- `;
295
- var DEFAULT_ENVIRONMENT = "production";
296
- var DEFAULT_TARGET = "esnext";
297
- var DEFAULT_ORGANIZATION = "storm-software";
283
+ // ../workspace-tools/src/executors/esbuild/executor.ts
284
+ var _jiti = require('jiti');
285
+ async function esbuildExecutorFn(options, context, config) {
286
+ _chunkFUIR6CV3js.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
287
+ if (!_optionalChain([context, 'access', _20 => _20.projectsConfigurations, 'optionalAccess', _21 => _21.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _22 => _22.projectsConfigurations, 'access', _23 => _23.projects, 'access', _24 => _24[context.projectName], 'optionalAccess', _25 => _25.root])) {
288
+ throw new Error(
289
+ "The Build process failed because the context is not valid. Please run this command from a workspace."
290
+ );
291
+ }
292
+ const jiti = _jiti.createJiti.call(void 0, _optionalChain([config, 'optionalAccess', _26 => _26.workspaceRoot]) || process.cwd(), {
293
+ fsCache: _optionalChain([config, 'optionalAccess', _27 => _27.skipCache]) ? false : _chunkFUIR6CV3js.joinPaths.call(void 0,
294
+ _optionalChain([config, 'optionalAccess', _28 => _28.workspaceRoot]) || process.cwd(),
295
+ _optionalChain([config, 'optionalAccess', _29 => _29.directories, 'optionalAccess', _30 => _30.cache]) || "node_modules/.cache/storm",
296
+ "jiti"
297
+ ),
298
+ interopDefault: true
299
+ });
300
+ const { build: build2 } = await jiti.import(jiti.esmResolve("@storm-software/esbuild"));
301
+ await build2({
302
+ ...options,
303
+ projectRoot: (
304
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
305
+ _optionalChain([context, 'access', _31 => _31.projectsConfigurations, 'access', _32 => _32.projects, 'optionalAccess', _33 => _33[context.projectName], 'access', _34 => _34.root])
306
+ ),
307
+ name: context.projectName,
308
+ sourceRoot: _optionalChain([context, 'access', _35 => _35.projectsConfigurations, 'access', _36 => _36.projects, 'optionalAccess', _37 => _37[context.projectName], 'optionalAccess', _38 => _38.sourceRoot]),
309
+ format: options.format,
310
+ platform: options.platform
311
+ });
312
+ return {
313
+ success: true
314
+ };
315
+ }
316
+ var executor_default6 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
317
+ "Storm ESBuild build",
318
+ esbuildExecutorFn,
319
+ {
320
+ skipReadingConfig: false,
321
+ hooks: {
322
+ applyDefaultOptions: async (options) => {
323
+ options.entry ??= ["src/index.ts"];
324
+ options.outputPath ??= "dist/{projectRoot}";
325
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
326
+ return options;
327
+ }
328
+ }
329
+ }
330
+ );
298
331
 
299
- // ../build-tools/src/plugins/swc.ts
300
- var _core = require('@swc/core');
332
+ // ../workspace-tools/src/executors/napi/executor.ts
301
333
 
302
- // ../build-tools/src/plugins/ts-resolve.ts
334
+ var _fileutils = require('nx/src/utils/fileutils');
335
+ async function napiExecutor(options, context, config) {
336
+ const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
337
+ fsCache: config.skipCache ? false : _chunkFUIR6CV3js.joinPaths.call(void 0,
338
+ config.workspaceRoot,
339
+ config.directories.cache || "node_modules/.cache/storm",
340
+ "jiti"
341
+ ),
342
+ interopDefault: true
343
+ });
344
+ const { NapiCli } = await jiti.import(
345
+ jiti.esmResolve("@napi-rs/cli")
346
+ );
347
+ if (!_optionalChain([context, 'access', _39 => _39.projectGraph, 'optionalAccess', _40 => _40.nodes, 'access', _41 => _41[_nullishCoalesce(context.projectName, () => ( ""))]])) {
348
+ throw new Error(
349
+ "The Napi Build process failed because the project could not be found in the project graph. Please run this command from a workspace root directory."
350
+ );
351
+ }
352
+ const projectRoot = _optionalChain([context, 'access', _42 => _42.projectGraph, 'optionalAccess', _43 => _43.nodes, 'access', _44 => _44[_nullishCoalesce(context.projectName, () => ( ""))], 'optionalAccess', _45 => _45.data, 'access', _46 => _46.root]);
353
+ const packageJson = _chunkFUIR6CV3js.joinPaths.call(void 0, _nullishCoalesce(projectRoot, () => ( ".")), "package.json");
354
+ if (!_fileutils.fileExists.call(void 0, packageJson)) {
355
+ throw new Error(`Could not find package.json at ${packageJson}`);
356
+ }
357
+ const napi = new NapiCli();
358
+ const normalizedOptions = { ...options };
359
+ const metadata = cargoMetadata();
360
+ normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _47 => _47.target_directory]) || _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, "dist", "target");
361
+ normalizedOptions.outputDir = options.outputPath;
362
+ normalizedOptions.packageJsonPath ??= packageJson;
363
+ if (options.cwd) {
364
+ normalizedOptions.cwd = _chunkFUIR6CV3js.correctPaths.call(void 0, options.cwd);
365
+ } else {
366
+ const absoluteProjectRoot = _chunkFUIR6CV3js.correctPaths.call(void 0,
367
+ _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, projectRoot || ".")
368
+ );
369
+ normalizedOptions.cwd = absoluteProjectRoot;
370
+ if (normalizedOptions.outputDir) {
371
+ normalizedOptions.outputDir = _chunkFUIR6CV3js.relative.call(void 0,
372
+ normalizedOptions.cwd,
373
+ _chunkFUIR6CV3js.correctPaths.call(void 0,
374
+ _chunkFUIR6CV3js.isAbsolute.call(void 0, normalizedOptions.outputDir) ? normalizedOptions.outputDir : _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.outputDir)
375
+ )
376
+ );
377
+ }
378
+ if (normalizedOptions.packageJsonPath) {
379
+ normalizedOptions.packageJsonPath = _chunkFUIR6CV3js.relative.call(void 0,
380
+ normalizedOptions.cwd,
381
+ _chunkFUIR6CV3js.correctPaths.call(void 0,
382
+ _chunkFUIR6CV3js.isAbsolute.call(void 0, normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.packageJsonPath)
383
+ )
384
+ );
385
+ }
386
+ if (normalizedOptions.configPath) {
387
+ normalizedOptions.configPath = _chunkFUIR6CV3js.relative.call(void 0,
388
+ normalizedOptions.cwd,
389
+ _chunkFUIR6CV3js.correctPaths.call(void 0,
390
+ _chunkFUIR6CV3js.isAbsolute.call(void 0, normalizedOptions.configPath) ? normalizedOptions.configPath : _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.configPath)
391
+ )
392
+ );
393
+ }
394
+ if (normalizedOptions.manifestPath) {
395
+ normalizedOptions.manifestPath = _chunkFUIR6CV3js.relative.call(void 0,
396
+ normalizedOptions.cwd,
397
+ _chunkFUIR6CV3js.correctPaths.call(void 0,
398
+ _chunkFUIR6CV3js.isAbsolute.call(void 0, normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.manifestPath)
399
+ )
400
+ );
401
+ }
402
+ }
403
+ if (process.env.VERCEL) {
404
+ return { success: true };
405
+ }
406
+ _chunkFUIR6CV3js.writeDebug.call(void 0,
407
+ `Normalized Napi Options:
408
+ packageJsonPath: ${normalizedOptions.packageJsonPath}
409
+ outputDir: ${normalizedOptions.outputDir}
410
+ targetDir: ${normalizedOptions.targetDir}
411
+ manifestPath: ${normalizedOptions.manifestPath}
412
+ configPath: ${normalizedOptions.configPath}
413
+ cwd: ${normalizedOptions.cwd}`,
414
+ config
415
+ );
416
+ const { task } = await napi.build(normalizedOptions);
417
+ return { success: true, terminalOutput: await task };
418
+ }
419
+ var executor_default7 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
420
+ "Napi - Build Bindings",
421
+ napiExecutor,
422
+ {
423
+ skipReadingConfig: false,
424
+ hooks: {
425
+ applyDefaultOptions: (options) => {
426
+ options.outputPath ??= "{sourceRoot}";
427
+ options.toolchain ??= "stable";
428
+ options.dtsCache ??= true;
429
+ options.platform ??= true;
430
+ options.constEnum ??= false;
431
+ options.verbose ??= false;
432
+ options.jsBinding ??= "binding.js";
433
+ options.dts ??= "binding.d.ts";
434
+ return options;
435
+ }
436
+ }
437
+ }
438
+ );
303
439
 
304
- var _module = require('module');
440
+ // ../npm-tools/src/helpers/get-version.ts
305
441
 
306
- var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
442
+ var _semver = require('semver');
443
+ var _stripansi = require('strip-ansi'); var _stripansi2 = _interopRequireDefault(_stripansi);
307
444
 
308
- // ../build-tools/src/plugins/type-definitions.ts
445
+ // ../npm-tools/src/helpers/get-registry.ts
309
446
 
310
447
 
448
+ // ../pnpm-tools/src/helpers/catalog.ts
449
+
450
+
451
+ // ../pnpm-tools/src/helpers/pnpm-workspace.ts
311
452
 
312
- // ../build-tools/src/utilities/copy-assets.ts
313
- var _internal = require('@nx/js/internal');
314
- var _glob = require('glob');
315
453
  var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
316
- var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
317
- const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
318
- pendingAssets.push({
319
- input: projectRoot,
320
- glob: "*.md",
321
- output: "."
322
- });
323
- pendingAssets.push({
324
- input: ".",
325
- glob: "LICENSE",
326
- output: "."
327
- });
328
- if (generatePackageJson3 === false) {
329
- pendingAssets.push({
330
- input: projectRoot,
331
- glob: "package.json",
332
- output: "."
333
- });
334
- }
335
- if (includeSrc === true) {
336
- pendingAssets.push({
337
- input: sourceRoot,
338
- glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
339
- output: "src/"
340
- });
341
- }
342
- _chunkA6WNSDR7js.writeTrace.call(void 0,
343
- `\u{1F4DD} Copying the following assets to the output directory:
344
- ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkA6WNSDR7js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
345
- config
346
- );
347
- const assetHandler = new (0, _internal.CopyAssetsHandler)({
348
- projectDir: projectRoot,
349
- rootDir: config.workspaceRoot,
350
- outputDir: outputPath,
351
- assets: pendingAssets
352
- });
353
- await assetHandler.processAllAssetsOnce();
354
- _chunkA6WNSDR7js.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
355
- if (includeSrc === true) {
356
- _chunkA6WNSDR7js.writeDebug.call(void 0,
357
- `\u{1F4DD} Adding banner and writing source files: ${_chunkA6WNSDR7js.joinPaths.call(void 0,
358
- outputPath,
359
- "src"
360
- )}`,
361
- config
362
- );
363
- const files = await _glob.glob.call(void 0, [
364
- _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
365
- _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
366
- _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
367
- _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
368
- ]);
369
- await Promise.allSettled(
370
- files.map(
371
- async (file) => _promises.writeFile.call(void 0,
372
- file,
373
- `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
454
+ var _yaml = require('yaml');
374
455
 
375
- ${await _promises.readFile.call(void 0, file, "utf8")}
456
+ // ../pnpm-tools/src/helpers/replace-deps-aliases.ts
376
457
 
377
- ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
378
- )
379
- )
380
- );
381
- }
382
- };
383
458
 
384
- // ../build-tools/src/utilities/generate-package-json.ts
385
459
 
386
460
 
387
461
 
388
462
 
463
+ var _prettier = require('prettier');
389
464
 
465
+ // ../workspace-tools/src/executors/npm-publish/executor.ts
390
466
 
391
467
 
392
468
 
393
- var _projectgraph = require('nx/src/project-graph/project-graph');
394
- var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, packageJson) => {
395
- let projectGraph;
396
- try {
397
- projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
398
- } catch (e2) {
399
- await _projectgraph.createProjectGraphAsync.call(void 0, );
400
- projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
401
- }
402
- if (!projectGraph) {
403
- throw new Error(
404
- "The Build process failed because the project graph is not available. Please run the build command again."
405
- );
406
- }
407
- const projectDependencies = _internal.calculateProjectBuildableDependencies.call(void 0,
408
- void 0,
409
- projectGraph,
410
- workspaceRoot2,
411
- projectName,
412
- process.env.NX_TASK_TARGET_TARGET || "build",
413
- process.env.NX_TASK_TARGET_CONFIGURATION || "production",
414
- true
415
- );
416
- const localPackages = [];
417
- for (const project of projectDependencies.dependencies.filter(
418
- (dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _20 => _20.node, 'access', _21 => _21.data, 'optionalAccess', _22 => _22.root]) !== projectRoot && _optionalChain([dep, 'access', _23 => _23.node, 'access', _24 => _24.data, 'optionalAccess', _25 => _25.root]) !== workspaceRoot2
419
- )) {
420
- const projectNode = project.node;
421
- if (projectNode.data.root) {
422
- const projectPackageJsonPath = _chunkA6WNSDR7js.joinPaths.call(void 0,
423
- workspaceRoot2,
424
- projectNode.data.root,
425
- "package.json"
426
- );
427
- if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
428
- const projectPackageJsonContent = await _promises.readFile.call(void 0,
429
- projectPackageJsonPath,
430
- "utf8"
431
- );
432
- const projectPackageJson = JSON.parse(projectPackageJsonContent);
433
- if (projectPackageJson.private !== true) {
434
- localPackages.push(projectPackageJson);
435
- }
436
- }
437
- }
438
- }
439
- if (localPackages.length > 0) {
440
- _chunkA6WNSDR7js.writeTrace.call(void 0,
441
- `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
442
- );
443
- const projectJsonFile = await _promises.readFile.call(void 0,
444
- _chunkA6WNSDR7js.joinPaths.call(void 0, projectRoot, "project.json"),
445
- "utf8"
446
- );
447
- const projectJson = JSON.parse(projectJsonFile);
448
- const projectName2 = projectJson.name;
449
- const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
450
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _26 => _26.projects, 'optionalAccess', _27 => _27[projectName2]])) {
451
- throw new Error(
452
- "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."
453
- );
454
- }
455
- const implicitDependencies = _optionalChain([projectConfigurations, 'access', _28 => _28.projects, 'optionalAccess', _29 => _29[projectName2], 'access', _30 => _30.implicitDependencies, 'optionalAccess', _31 => _31.reduce, 'call', _32 => _32((ret, dep) => {
456
- if (_optionalChain([projectConfigurations, 'access', _33 => _33.projects, 'optionalAccess', _34 => _34[dep]])) {
457
- const depPackageJsonPath = _chunkA6WNSDR7js.joinPaths.call(void 0,
458
- workspaceRoot2,
459
- projectConfigurations.projects[dep].root,
460
- "package.json"
461
- );
462
- if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
463
- const depPackageJsonContent = _fs.readFileSync.call(void 0,
464
- depPackageJsonPath,
465
- "utf8"
466
- );
467
- const depPackageJson = JSON.parse(depPackageJsonContent);
468
- if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
469
- ret.push(depPackageJson.name);
470
- }
471
- }
472
- }
473
- return ret;
474
- }, [])]);
475
- packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
476
- if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _35 => _35.includes, 'call', _36 => _36(localPackage.name)]) && _optionalChain([packageJson, 'access', _37 => _37.devDependencies, 'optionalAccess', _38 => _38[localPackage.name]]) === void 0) {
477
- ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
478
- }
479
- return ret;
480
- }, _nullishCoalesce(packageJson.dependencies, () => ( {})));
481
- packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
482
- if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _39 => _39.includes, 'call', _40 => _40(localPackage.name)]) && _optionalChain([packageJson, 'access', _41 => _41.dependencies, 'optionalAccess', _42 => _42[localPackage.name]]) === void 0) {
483
- ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
484
- }
485
- return ret;
486
- }, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
487
- } else {
488
- _chunkA6WNSDR7js.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
489
- }
490
- return packageJson;
491
- };
492
- var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
493
- const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkA6WNSDR7js.findWorkspaceRoot.call(void 0, );
494
- const workspacePackageJsonContent = await _promises.readFile.call(void 0,
495
- _chunkA6WNSDR7js.joinPaths.call(void 0, workspaceRoot2, "package.json"),
496
- "utf8"
497
- );
498
- const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
499
- packageJson.type ??= "module";
500
- packageJson.sideEffects ??= false;
501
- if (includeSrc === true) {
502
- let distSrc = sourceRoot.replace(projectRoot, "");
503
- if (distSrc.startsWith("/")) {
504
- distSrc = distSrc.substring(1);
505
- }
506
- packageJson.source ??= `${_chunkA6WNSDR7js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
507
- }
508
- packageJson.files ??= ["dist/**/*"];
509
- if (includeSrc === true && !packageJson.files.includes("src")) {
510
- packageJson.files.push("src/**/*");
511
- }
512
- packageJson.publishConfig ??= {
513
- access: "public"
514
- };
515
- packageJson.description ??= workspacePackageJson.description;
516
- packageJson.homepage ??= workspacePackageJson.homepage;
517
- packageJson.bugs ??= workspacePackageJson.bugs;
518
- packageJson.license ??= workspacePackageJson.license;
519
- packageJson.keywords ??= workspacePackageJson.keywords;
520
- packageJson.funding ??= workspacePackageJson.funding;
521
- packageJson.author ??= workspacePackageJson.author;
522
- packageJson.maintainers ??= workspacePackageJson.maintainers;
523
- if (!packageJson.maintainers && packageJson.author) {
524
- packageJson.maintainers = [packageJson.author];
525
- }
526
- packageJson.contributors ??= workspacePackageJson.contributors;
527
- if (!packageJson.contributors && packageJson.author) {
528
- packageJson.contributors = [packageJson.author];
529
- }
530
- packageJson.repository ??= workspacePackageJson.repository;
531
- packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkA6WNSDR7js.joinPaths.call(void 0, "packages", projectName);
532
- return packageJson;
533
- };
534
- var addPackageJsonExport = (file, type = "module", sourceRoot) => {
535
- let entry = file.replaceAll("\\", "/");
536
- if (sourceRoot) {
537
- entry = entry.replace(sourceRoot, "");
538
- }
539
- return {
540
- import: {
541
- types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
542
- default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
543
- },
544
- require: {
545
- types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
546
- default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
547
- },
548
- default: {
549
- types: `./dist/${entry}.d.${type !== "fixed" ? "ts" : "mts"}`,
550
- default: `./dist/${entry}.${type !== "fixed" ? "js" : "mjs"}`
551
- }
552
- };
553
- };
554
-
555
- // ../build-tools/src/utilities/get-entry-points.ts
556
-
557
-
558
- // ../build-tools/src/utilities/get-env.ts
559
- var getEnv = (builder, options) => {
560
- return {
561
- STORM_BUILD: builder,
562
- STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
563
- STORM_NAME: options.name,
564
- STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
565
- STORM_PLATFORM: options.platform,
566
- STORM_FORMAT: JSON.stringify(options.format),
567
- STORM_TARGET: JSON.stringify(options.target),
568
- ...options.env
569
- };
570
- };
571
-
572
- // ../build-tools/src/utilities/read-nx-config.ts
573
-
574
-
575
-
576
- // ../build-tools/src/utilities/task-graph.ts
577
-
578
-
579
-
580
- var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
581
-
582
- // ../esbuild/src/assets.ts
583
- async function copyBuildAssets(context) {
584
- if (!_optionalChain([context, 'access', _43 => _43.result, 'optionalAccess', _44 => _44.errors, 'access', _45 => _45.length]) && _optionalChain([context, 'access', _46 => _46.options, 'access', _47 => _47.assets, 'optionalAccess', _48 => _48.length])) {
585
- _chunkA6WNSDR7js.writeDebug.call(void 0,
586
- ` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
587
- context.workspaceConfig
588
- );
589
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, `${context.options.name} asset copy`);
590
- await copyAssets(
591
- context.workspaceConfig,
592
- _nullishCoalesce(context.options.assets, () => ( [])),
593
- context.outputPath,
594
- context.options.projectRoot,
595
- context.sourceRoot,
596
- true,
597
- false
598
- );
599
- stopwatch();
600
- }
601
- return context;
602
- }
603
-
604
- // ../esbuild/src/clean.ts
605
-
606
- async function cleanDirectories(directory) {
607
- await _promises.rm.call(void 0, directory, { recursive: true, force: true });
608
- }
609
-
610
- // ../esbuild/src/context.ts
611
-
612
-
613
-
614
-
615
- var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
616
-
617
-
618
- var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
619
-
620
- // ../esbuild/src/config.ts
621
- var DEFAULT_BUILD_OPTIONS = {
622
- platform: "node",
623
- target: "node22",
624
- format: "esm",
625
- mode: "production",
626
- generatePackageJson: true,
627
- includeSrc: false,
628
- keepNames: true,
629
- metafile: false,
630
- treeshake: true,
631
- splitting: true,
632
- shims: false,
633
- watch: false,
634
- bundle: true,
635
- distDir: "dist",
636
- loader: {
637
- ".aac": "file",
638
- ".css": "file",
639
- ".eot": "file",
640
- ".flac": "file",
641
- ".gif": "file",
642
- ".jpeg": "file",
643
- ".jpg": "file",
644
- ".mp3": "file",
645
- ".mp4": "file",
646
- ".ogg": "file",
647
- ".otf": "file",
648
- ".png": "file",
649
- ".svg": "file",
650
- ".ttf": "file",
651
- ".wav": "file",
652
- ".webm": "file",
653
- ".webp": "file",
654
- ".woff": "file",
655
- ".woff2": "file"
656
- },
657
- banner: {
658
- js: DEFAULT_JS_BANNER,
659
- css: DEFAULT_CSS_BANNER
660
- }
661
- };
662
-
663
- // ../esbuild/src/context.ts
664
- async function resolveContext(userOptions) {
665
- const projectRoot = userOptions.projectRoot;
666
- const workspaceRoot2 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
667
- if (!workspaceRoot2) {
668
- throw new Error("Cannot find Nx workspace root");
669
- }
670
- const workspaceConfig = await _chunkA6WNSDR7js.getWorkspaceConfig.call(void 0, true, {
671
- workspaceRoot: workspaceRoot2.dir
672
- });
673
- _chunkA6WNSDR7js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
674
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, "Build options resolution");
675
- const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
676
- exitOnError: true
677
- });
678
- const projectJsonPath = _chunkA6WNSDR7js.joinPaths.call(void 0,
679
- workspaceRoot2.dir,
680
- projectRoot,
681
- "project.json"
682
- );
683
- if (!_fs.existsSync.call(void 0, projectJsonPath)) {
684
- throw new Error("Cannot find project.json configuration");
685
- }
686
- const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
687
- const projectJson = JSON.parse(projectJsonFile);
688
- const projectName = projectJson.name || userOptions.name;
689
- const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
690
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _49 => _49.projects, 'optionalAccess', _50 => _50[projectName]])) {
691
- throw new Error(
692
- "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."
693
- );
694
- }
695
- const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
696
- options.name ??= projectName;
697
- const packageJsonPath = _chunkA6WNSDR7js.joinPaths.call(void 0,
698
- workspaceRoot2.dir,
699
- options.projectRoot,
700
- "package.json"
701
- );
702
- if (!_fs.existsSync.call(void 0, packageJsonPath)) {
703
- throw new Error("Cannot find package.json configuration");
704
- }
705
- const env = getEnv("esbuild", options);
706
- const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
707
- const resolvedOptions = {
708
- ...options,
709
- tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunkA6WNSDR7js.joinPaths.call(void 0, workspaceRoot2.dir, projectRoot, "tsconfig.json"),
710
- metafile: userOptions.mode === "development",
711
- clean: false,
712
- env,
713
- define: {
714
- STORM_FORMAT: JSON.stringify(options.format),
715
- ...Object.keys(define).filter((key) => define[key] !== void 0).reduce((res, key) => {
716
- const value = JSON.stringify(define[key]);
717
- const safeKey = key.replaceAll("(", "").replaceAll(")", "");
718
- return {
719
- ...res,
720
- [`process.env.${safeKey}`]: value,
721
- [`import.meta.env.${safeKey}`]: value
722
- };
723
- }, {})
724
- }
725
- };
726
- stopwatch();
727
- const context = {
728
- options: resolvedOptions,
729
- clean: userOptions.clean !== false,
730
- workspaceConfig,
731
- projectConfigurations,
732
- projectName,
733
- projectGraph,
734
- sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkA6WNSDR7js.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
735
- outputPath: resolvedOptions.outputPath || _chunkA6WNSDR7js.joinPaths.call(void 0,
736
- workspaceConfig.workspaceRoot,
737
- "dist",
738
- resolvedOptions.projectRoot
739
- ),
740
- minify: resolvedOptions.minify || resolvedOptions.mode === "production"
741
- };
742
- context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
743
- if (context.options.verbose) {
744
- _chunkA6WNSDR7js.writeDebug.call(void 0,
745
- ` \u2699\uFE0F Build options resolved:
746
-
747
- ${_chunkA6WNSDR7js.formatLogMessage.call(void 0, context.options)}`,
748
- workspaceConfig
749
- );
750
- }
751
- return context;
752
- }
753
-
754
- // ../esbuild/src/package-json.ts
755
-
756
-
757
-
758
- async function generatePackageJson(context) {
759
- if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkA6WNSDR7js.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
760
- _chunkA6WNSDR7js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
761
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, "Write package.json file");
762
- const packageJsonPath = _chunkA6WNSDR7js.joinPaths.call(void 0,
763
- context.options.projectRoot,
764
- "project.json"
765
- );
766
- if (!_fs.existsSync.call(void 0, packageJsonPath)) {
767
- throw new Error("Cannot find package.json configuration");
768
- }
769
- const packageJsonFile = await _promises2.default.readFile(
770
- _chunkA6WNSDR7js.joinPaths.call(void 0,
771
- context.workspaceConfig.workspaceRoot,
772
- context.options.projectRoot,
773
- "package.json"
774
- ),
775
- "utf8"
776
- );
777
- let packageJson = JSON.parse(packageJsonFile);
778
- if (!packageJson) {
779
- throw new Error("Cannot find package.json configuration file");
780
- }
781
- packageJson = await addPackageDependencies(
782
- context.workspaceConfig.workspaceRoot,
783
- context.options.projectRoot,
784
- context.projectName,
785
- packageJson
786
- );
787
- packageJson = await addWorkspacePackageJsonFields(
788
- context.workspaceConfig,
789
- context.options.projectRoot,
790
- context.sourceRoot,
791
- context.projectName,
792
- false,
793
- packageJson
794
- );
795
- if (context.options.entry) {
796
- packageJson.exports ??= {};
797
- packageJson.exports["./package.json"] ??= "./package.json";
798
- const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
799
- if (entryPoints.length > 0) {
800
- const defaultEntry = entryPoints.includes("index") ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entryPoints[0]}`;
801
- const isEsm = Array.isArray(context.options.format) ? context.options.format.includes("esm") : context.options.format === "esm";
802
- const isCjs = Array.isArray(context.options.format) ? context.options.format.includes("cjs") : context.options.format === "cjs";
803
- const isDts = context.options.dts || context.options.experimentalDts;
804
- packageJson.exports["."] ??= `${defaultEntry}.${isEsm ? "mjs" : isCjs ? "cjs" : "js"}`;
805
- for (const entryPoint of entryPoints) {
806
- packageJson.exports[`./${entryPoint}`] ??= {};
807
- if (isEsm) {
808
- if (isDts) {
809
- packageJson.exports[`./${entryPoint}`].import = {
810
- types: `./dist/${entryPoint}.d.mts`,
811
- default: `./dist/${entryPoint}.mjs`
812
- };
813
- } else {
814
- packageJson.exports[`./${entryPoint}`].import = `./dist/${entryPoint}.mjs`;
815
- }
816
- if (isDts) {
817
- packageJson.exports[`./${entryPoint}`].default = {
818
- types: `./dist/${entryPoint}.d.mts`,
819
- default: `./dist/${entryPoint}.mjs`
820
- };
821
- } else {
822
- packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.mjs`;
823
- }
824
- }
825
- if (isCjs) {
826
- if (isDts) {
827
- packageJson.exports[`./${entryPoint}`].require = {
828
- types: `./dist/${entryPoint}.d.cts`,
829
- default: `./dist/${entryPoint}.cjs`
830
- };
831
- } else {
832
- packageJson.exports[`./${entryPoint}`].require = `./dist/${entryPoint}.cjs`;
833
- }
834
- if (!isEsm) {
835
- if (isDts) {
836
- packageJson.exports[`./${entryPoint}`].default = {
837
- types: `./dist/${entryPoint}.d.cts`,
838
- default: `./dist/${entryPoint}.cjs`
839
- };
840
- } else {
841
- packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.cjs`;
842
- }
843
- }
844
- }
845
- if (!isEsm && !isCjs) {
846
- if (isDts) {
847
- packageJson.exports[`./${entryPoint}`].default = {
848
- types: `./dist/${entryPoint}.d.ts`,
849
- default: `./dist/${entryPoint}.js`
850
- };
851
- } else {
852
- packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.js`;
853
- }
854
- }
855
- }
856
- if (isEsm) {
857
- packageJson.module = `${defaultEntry}.mjs`;
858
- } else {
859
- packageJson.main = `${defaultEntry}.cjs`;
860
- }
861
- if (isDts) {
862
- packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
863
- }
864
- packageJson.exports = Object.keys(packageJson.exports).reduce(
865
- (ret, key) => {
866
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
867
- ret[key.replace("/index", "")] = packageJson.exports[key];
868
- }
869
- return ret;
870
- },
871
- packageJson.exports
872
- );
873
- }
874
- }
875
- await _devkit.writeJsonFile.call(void 0,
876
- _chunkA6WNSDR7js.joinPaths.call(void 0, context.outputPath, "package.json"),
877
- packageJson
878
- );
879
- stopwatch();
880
- }
881
- return context;
882
- }
883
-
884
- // ../tsup/src/index.ts
885
- var _tsup = require('tsup');
886
- async function build(options) {
887
- if (!options.silent) {
888
- _chunkA6WNSDR7js.writeDebug.call(void 0,
889
- ` \u{1F680} Running ${options.name || "tsup"} build`,
890
- options.workspaceConfig
891
- );
892
- }
893
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, `${options.name || "tsup"} build`);
894
- await _tsup.build.call(void 0, options);
895
- if (!options.silent) {
896
- stopwatch();
897
- }
898
- }
899
-
900
- // ../esbuild/src/tsup.ts
901
- async function executeTsup(context) {
902
- _chunkA6WNSDR7js.writeDebug.call(void 0,
903
- ` \u{1F680} Running ${context.options.name} build`,
904
- context.workspaceConfig
905
- );
906
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, `${context.options.name} build`);
907
- await build({
908
- ...context.options,
909
- outDir: context.options.distDir ? _chunkA6WNSDR7js.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
910
- workspaceConfig: context.workspaceConfig
911
- });
912
- stopwatch();
913
- return context;
914
- }
915
-
916
- // ../esbuild/src/build.ts
917
- async function reportResults(context) {
918
- if (_optionalChain([context, 'access', _51 => _51.result, 'optionalAccess', _52 => _52.errors, 'access', _53 => _53.length]) === 0) {
919
- if (context.result.warnings.length > 0) {
920
- _chunkA6WNSDR7js.writeWarning.call(void 0,
921
- ` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
922
- context.workspaceConfig
923
- );
924
- }
925
- _chunkA6WNSDR7js.writeSuccess.call(void 0,
926
- ` \u{1F4E6} The ${context.options.name} build completed successfully`,
927
- context.workspaceConfig
928
- );
929
- } else if (_optionalChain([context, 'access', _54 => _54.result, 'optionalAccess', _55 => _55.errors]) && _optionalChain([context, 'access', _56 => _56.result, 'optionalAccess', _57 => _57.errors, 'access', _58 => _58.length]) > 0) {
930
- _chunkA6WNSDR7js.writeError.call(void 0,
931
- ` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
932
- context.workspaceConfig
933
- );
934
- throw new Error(
935
- `The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
936
- );
937
- }
938
- }
939
- async function cleanOutputPath(context) {
940
- if (context.clean !== false && context.outputPath) {
941
- _chunkA6WNSDR7js.writeDebug.call(void 0,
942
- ` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
943
- context.workspaceConfig
944
- );
945
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, `${context.options.name} output clean`);
946
- await cleanDirectories(context.outputPath);
947
- stopwatch();
948
- }
949
- return context;
950
- }
951
- async function build2(options) {
952
- _chunkA6WNSDR7js.writeDebug.call(void 0, ` ${_chunkA6WNSDR7js.brandIcon.call(void 0, )} Executing Storm ESBuild pipeline`);
953
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, "ESBuild pipeline");
954
- try {
955
- const opts = Array.isArray(options) ? options : [options];
956
- if (opts.length === 0) {
957
- throw new Error("No build options were provided");
958
- }
959
- const context = await resolveContext(options);
960
- await cleanOutputPath(context);
961
- await Promise.all([
962
- // dependencyCheck(context.options),
963
- generatePackageJson(context),
964
- copyBuildAssets(context),
965
- executeTsup(context)
966
- ]);
967
- await reportResults(context);
968
- _chunkA6WNSDR7js.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
969
- } catch (error) {
970
- _chunkA6WNSDR7js.writeFatal.call(void 0,
971
- "Fatal errors that the build process could not recover from have occured. The build process has been terminated."
972
- );
973
- throw error;
974
- } finally {
975
- stopwatch();
976
- }
977
- }
978
-
979
- // ../workspace-tools/src/executors/esbuild/executor.ts
980
- async function esbuildExecutorFn(options, context, config) {
981
- _chunkA6WNSDR7js.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
982
- if (!_optionalChain([context, 'access', _59 => _59.projectsConfigurations, 'optionalAccess', _60 => _60.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _61 => _61.projectsConfigurations, 'access', _62 => _62.projects, 'access', _63 => _63[context.projectName], 'optionalAccess', _64 => _64.root])) {
983
- throw new Error(
984
- "The Build process failed because the context is not valid. Please run this command from a workspace."
985
- );
986
- }
987
- await build2({
988
- ...options,
989
- projectRoot: (
990
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
991
- _optionalChain([context, 'access', _65 => _65.projectsConfigurations, 'access', _66 => _66.projects, 'optionalAccess', _67 => _67[context.projectName], 'access', _68 => _68.root])
992
- ),
993
- name: context.projectName,
994
- sourceRoot: _optionalChain([context, 'access', _69 => _69.projectsConfigurations, 'access', _70 => _70.projects, 'optionalAccess', _71 => _71[context.projectName], 'optionalAccess', _72 => _72.sourceRoot]),
995
- format: options.format,
996
- platform: options.platform
997
- });
998
- return {
999
- success: true
1000
- };
1001
- }
1002
- var executor_default6 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
1003
- "Storm ESBuild build",
1004
- esbuildExecutorFn,
1005
- {
1006
- skipReadingConfig: false,
1007
- hooks: {
1008
- applyDefaultOptions: async (options) => {
1009
- options.entry ??= ["src/index.ts"];
1010
- options.outputPath ??= "dist/{projectRoot}";
1011
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
1012
- return options;
1013
- }
1014
- }
1015
- }
1016
- );
1017
-
1018
- // ../workspace-tools/src/executors/napi/executor.ts
1019
- var _jiti = require('jiti');
1020
- var _fileutils = require('nx/src/utils/fileutils');
1021
- async function napiExecutor(options, context, config) {
1022
- const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
1023
- fsCache: config.skipCache ? false : _chunkA6WNSDR7js.joinPaths.call(void 0,
1024
- config.workspaceRoot,
1025
- config.directories.cache || "node_modules/.cache/storm",
1026
- "jiti"
1027
- ),
1028
- interopDefault: true
1029
- });
1030
- const { NapiCli } = await jiti.import(
1031
- jiti.esmResolve("@napi-rs/cli")
1032
- );
1033
- if (!_optionalChain([context, 'access', _73 => _73.projectGraph, 'optionalAccess', _74 => _74.nodes, 'access', _75 => _75[_nullishCoalesce(context.projectName, () => ( ""))]])) {
1034
- throw new Error(
1035
- "The Napi Build process failed because the project could not be found in the project graph. Please run this command from a workspace root directory."
1036
- );
1037
- }
1038
- const projectRoot = _optionalChain([context, 'access', _76 => _76.projectGraph, 'optionalAccess', _77 => _77.nodes, 'access', _78 => _78[_nullishCoalesce(context.projectName, () => ( ""))], 'optionalAccess', _79 => _79.data, 'access', _80 => _80.root]);
1039
- const packageJson = _chunkA6WNSDR7js.joinPaths.call(void 0, _nullishCoalesce(projectRoot, () => ( ".")), "package.json");
1040
- if (!_fileutils.fileExists.call(void 0, packageJson)) {
1041
- throw new Error(`Could not find package.json at ${packageJson}`);
1042
- }
1043
- const napi = new NapiCli();
1044
- const normalizedOptions = { ...options };
1045
- const metadata = cargoMetadata();
1046
- normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _81 => _81.target_directory]) || _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, "dist", "target");
1047
- normalizedOptions.outputDir = options.outputPath;
1048
- normalizedOptions.packageJsonPath ??= packageJson;
1049
- if (options.cwd) {
1050
- normalizedOptions.cwd = _chunkA6WNSDR7js.correctPaths.call(void 0, options.cwd);
1051
- } else {
1052
- const absoluteProjectRoot = _chunkA6WNSDR7js.correctPaths.call(void 0,
1053
- _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, projectRoot || ".")
1054
- );
1055
- normalizedOptions.cwd = absoluteProjectRoot;
1056
- if (normalizedOptions.outputDir) {
1057
- normalizedOptions.outputDir = _chunkA6WNSDR7js.relative.call(void 0,
1058
- normalizedOptions.cwd,
1059
- _chunkA6WNSDR7js.correctPaths.call(void 0,
1060
- _chunkA6WNSDR7js.isAbsolute.call(void 0, normalizedOptions.outputDir) ? normalizedOptions.outputDir : _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.outputDir)
1061
- )
1062
- );
1063
- }
1064
- if (normalizedOptions.packageJsonPath) {
1065
- normalizedOptions.packageJsonPath = _chunkA6WNSDR7js.relative.call(void 0,
1066
- normalizedOptions.cwd,
1067
- _chunkA6WNSDR7js.correctPaths.call(void 0,
1068
- _chunkA6WNSDR7js.isAbsolute.call(void 0, normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.packageJsonPath)
1069
- )
1070
- );
1071
- }
1072
- if (normalizedOptions.configPath) {
1073
- normalizedOptions.configPath = _chunkA6WNSDR7js.relative.call(void 0,
1074
- normalizedOptions.cwd,
1075
- _chunkA6WNSDR7js.correctPaths.call(void 0,
1076
- _chunkA6WNSDR7js.isAbsolute.call(void 0, normalizedOptions.configPath) ? normalizedOptions.configPath : _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.configPath)
1077
- )
1078
- );
1079
- }
1080
- if (normalizedOptions.manifestPath) {
1081
- normalizedOptions.manifestPath = _chunkA6WNSDR7js.relative.call(void 0,
1082
- normalizedOptions.cwd,
1083
- _chunkA6WNSDR7js.correctPaths.call(void 0,
1084
- _chunkA6WNSDR7js.isAbsolute.call(void 0, normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : _chunkA6WNSDR7js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.manifestPath)
1085
- )
1086
- );
1087
- }
1088
- }
1089
- if (process.env.VERCEL) {
1090
- return { success: true };
1091
- }
1092
- _chunkA6WNSDR7js.writeDebug.call(void 0,
1093
- `Normalized Napi Options:
1094
- packageJsonPath: ${normalizedOptions.packageJsonPath}
1095
- outputDir: ${normalizedOptions.outputDir}
1096
- targetDir: ${normalizedOptions.targetDir}
1097
- manifestPath: ${normalizedOptions.manifestPath}
1098
- configPath: ${normalizedOptions.configPath}
1099
- cwd: ${normalizedOptions.cwd}`,
1100
- config
1101
- );
1102
- const { task } = await napi.build(normalizedOptions);
1103
- return { success: true, terminalOutput: await task };
1104
- }
1105
- var executor_default7 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
1106
- "Napi - Build Bindings",
1107
- napiExecutor,
1108
- {
1109
- skipReadingConfig: false,
1110
- hooks: {
1111
- applyDefaultOptions: (options) => {
1112
- options.outputPath ??= "{sourceRoot}";
1113
- options.toolchain ??= "stable";
1114
- options.dtsCache ??= true;
1115
- options.platform ??= true;
1116
- options.constEnum ??= false;
1117
- options.verbose ??= false;
1118
- options.jsBinding ??= "binding.js";
1119
- options.dts ??= "binding.d.ts";
1120
- return options;
1121
- }
1122
- }
1123
- }
1124
- );
1125
-
1126
- // ../npm-tools/src/helpers/get-registry.ts
1127
-
1128
-
1129
- // ../pnpm-tools/src/helpers/replace-deps-aliases.ts
1130
-
1131
-
1132
-
1133
-
1134
-
1135
-
1136
- var _prettier = require('prettier');
1137
-
1138
- // ../npm-tools/src/helpers/get-version.ts
1139
-
1140
- var _semver = require('semver');
1141
- var _stripansi = require('strip-ansi'); var _stripansi2 = _interopRequireDefault(_stripansi);
1142
-
1143
- // ../pnpm-tools/src/helpers/catalog.ts
1144
-
1145
-
1146
- // ../pnpm-tools/src/helpers/pnpm-workspace.ts
1147
-
1148
-
1149
- var _yaml = require('yaml');
1150
-
1151
- // ../workspace-tools/src/executors/npm-publish/executor.ts
1152
-
1153
-
1154
469
 
1155
470
 
1156
471
  // ../workspace-tools/src/utils/github.ts
@@ -1217,89 +532,379 @@ var ProjectTagConstants = {
1217
532
  VITE: "vite",
1218
533
  ROLLDOWN: "rolldown"
1219
534
  }
1220
- };
1221
- var formatProjectTag = (variant, value) => {
1222
- return `${variant}:${value}`;
1223
- };
1224
- var hasProjectTag = (project, variant) => {
1225
- project.tags = _nullishCoalesce(project.tags, () => ( []));
1226
- const prefix = formatProjectTag(variant, "");
1227
- return project.tags.some(
1228
- (tag) => tag.startsWith(prefix) && tag.length > prefix.length
535
+ };
536
+ var formatProjectTag = (variant, value) => {
537
+ return `${variant}:${value}`;
538
+ };
539
+ var hasProjectTag = (project, variant) => {
540
+ project.tags = _nullishCoalesce(project.tags, () => ( []));
541
+ const prefix = formatProjectTag(variant, "");
542
+ return project.tags.some(
543
+ (tag) => tag.startsWith(prefix) && tag.length > prefix.length
544
+ );
545
+ };
546
+
547
+ // ../workspace-tools/src/utils/project-tags.ts
548
+ var addProjectTag = (project, variant, value, options = {
549
+ overwrite: false
550
+ }) => {
551
+ project.tags = _nullishCoalesce(project.tags, () => ( []));
552
+ if (options.overwrite || !hasProjectTag(project, variant)) {
553
+ project.tags = project.tags.filter(
554
+ (tag) => !tag.startsWith(formatProjectTag(variant, ""))
555
+ );
556
+ project.tags.push(formatProjectTag(variant, value));
557
+ }
558
+ };
559
+
560
+ // ../workspace-tools/src/executors/npm-publish/executor.ts
561
+ var LARGE_BUFFER2 = 1024 * 1e6;
562
+
563
+ // ../workspace-tools/src/executors/size-limit/executor.ts
564
+
565
+ var _esbuild = require('@size-limit/esbuild'); var _esbuild2 = _interopRequireDefault(_esbuild);
566
+ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _interopRequireDefault(_esbuildwhy);
567
+ var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
568
+ var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
569
+ async function sizeLimitExecutorFn(options, context, config) {
570
+ if (!_optionalChain([context, 'optionalAccess', _48 => _48.projectName]) || !_optionalChain([context, 'access', _49 => _49.projectsConfigurations, 'optionalAccess', _50 => _50.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
571
+ throw new Error(
572
+ "The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
573
+ );
574
+ }
575
+ _chunkFUIR6CV3js.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
576
+ _sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
577
+ checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _51 => _51.projectsConfigurations, 'access', _52 => _52.projects, 'access', _53 => _53[context.projectName], 'optionalAccess', _54 => _54.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
578
+ _nullishCoalesce(_optionalChain([context, 'access', _55 => _55.projectsConfigurations, 'access', _56 => _56.projects, 'access', _57 => _57[context.projectName], 'optionalAccess', _58 => _58.root]), () => ( "./")),
579
+ "src"
580
+ )))
581
+ }).then((result) => {
582
+ _chunkFUIR6CV3js.writeInfo.call(void 0,
583
+ `\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
584
+ config
585
+ );
586
+ });
587
+ return {
588
+ success: true
589
+ };
590
+ }
591
+ var executor_default8 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
592
+ "Size-Limit Performance Test Executor",
593
+ sizeLimitExecutorFn,
594
+ {
595
+ skipReadingConfig: false,
596
+ hooks: {
597
+ applyDefaultOptions: (options) => {
598
+ return options;
599
+ }
600
+ }
601
+ }
602
+ );
603
+
604
+ // ../tsdown/src/build.ts
605
+
606
+
607
+
608
+
609
+
610
+
611
+ // ../build-tools/src/config.ts
612
+ var DEFAULT_ENVIRONMENT = "production";
613
+ var DEFAULT_TARGET = "esnext";
614
+ var DEFAULT_ORGANIZATION = "storm-software";
615
+
616
+ // ../build-tools/src/plugins/swc.ts
617
+ var _core = require('@swc/core');
618
+
619
+ // ../build-tools/src/plugins/ts-resolve.ts
620
+
621
+ var _module = require('module');
622
+
623
+ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
624
+
625
+ // ../build-tools/src/plugins/type-definitions.ts
626
+
627
+
628
+
629
+ // ../build-tools/src/utilities/copy-assets.ts
630
+ var _internal = require('@nx/js/internal');
631
+ var _glob = require('glob');
632
+
633
+ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
634
+ const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
635
+ pendingAssets.push({
636
+ input: projectRoot,
637
+ glob: "*.md",
638
+ output: "."
639
+ });
640
+ pendingAssets.push({
641
+ input: ".",
642
+ glob: "LICENSE",
643
+ output: "."
644
+ });
645
+ if (generatePackageJson2 === false) {
646
+ pendingAssets.push({
647
+ input: projectRoot,
648
+ glob: "package.json",
649
+ output: "."
650
+ });
651
+ }
652
+ if (includeSrc === true) {
653
+ pendingAssets.push({
654
+ input: sourceRoot,
655
+ glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
656
+ output: "src/"
657
+ });
658
+ }
659
+ _chunkFUIR6CV3js.writeTrace.call(void 0,
660
+ `\u{1F4DD} Copying the following assets to the output directory:
661
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkFUIR6CV3js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
662
+ config
1229
663
  );
1230
- };
664
+ const assetHandler = new (0, _internal.CopyAssetsHandler)({
665
+ projectDir: projectRoot,
666
+ rootDir: config.workspaceRoot,
667
+ outputDir: outputPath,
668
+ assets: pendingAssets
669
+ });
670
+ await assetHandler.processAllAssetsOnce();
671
+ _chunkFUIR6CV3js.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
672
+ if (includeSrc === true) {
673
+ _chunkFUIR6CV3js.writeDebug.call(void 0,
674
+ `\u{1F4DD} Adding banner and writing source files: ${_chunkFUIR6CV3js.joinPaths.call(void 0,
675
+ outputPath,
676
+ "src"
677
+ )}`,
678
+ config
679
+ );
680
+ const files = await _glob.glob.call(void 0, [
681
+ _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
682
+ _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
683
+ _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
684
+ _chunkFUIR6CV3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
685
+ ]);
686
+ await Promise.allSettled(
687
+ files.map(
688
+ async (file) => _promises.writeFile.call(void 0,
689
+ file,
690
+ `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
1231
691
 
1232
- // ../workspace-tools/src/utils/project-tags.ts
1233
- var addProjectTag = (project, variant, value, options = {
1234
- overwrite: false
1235
- }) => {
1236
- project.tags = _nullishCoalesce(project.tags, () => ( []));
1237
- if (options.overwrite || !hasProjectTag(project, variant)) {
1238
- project.tags = project.tags.filter(
1239
- (tag) => !tag.startsWith(formatProjectTag(variant, ""))
692
+ ${await _promises.readFile.call(void 0, file, "utf8")}
693
+
694
+ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
695
+ )
696
+ )
1240
697
  );
1241
- project.tags.push(formatProjectTag(variant, value));
1242
698
  }
1243
699
  };
1244
700
 
1245
- // ../workspace-tools/src/executors/npm-publish/executor.ts
1246
- var LARGE_BUFFER2 = 1024 * 1e6;
701
+ // ../build-tools/src/utilities/generate-package-json.ts
1247
702
 
1248
- // ../workspace-tools/src/executors/size-limit/executor.ts
1249
703
 
1250
- var _esbuild = require('@size-limit/esbuild'); var _esbuild2 = _interopRequireDefault(_esbuild);
1251
- var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _interopRequireDefault(_esbuildwhy);
1252
- var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
1253
- var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
1254
- async function sizeLimitExecutorFn(options, context, config) {
1255
- if (!_optionalChain([context, 'optionalAccess', _82 => _82.projectName]) || !_optionalChain([context, 'access', _83 => _83.projectsConfigurations, 'optionalAccess', _84 => _84.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
704
+
705
+
706
+
707
+
708
+
709
+
710
+ var _projectgraph = require('nx/src/project-graph/project-graph');
711
+ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, packageJson) => {
712
+ let projectGraph;
713
+ try {
714
+ projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
715
+ } catch (e2) {
716
+ await _projectgraph.createProjectGraphAsync.call(void 0, );
717
+ projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
718
+ }
719
+ if (!projectGraph) {
1256
720
  throw new Error(
1257
- "The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
721
+ "The Build process failed because the project graph is not available. Please run the build command again."
1258
722
  );
1259
723
  }
1260
- _chunkA6WNSDR7js.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
1261
- _sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
1262
- checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _85 => _85.projectsConfigurations, 'access', _86 => _86.projects, 'access', _87 => _87[context.projectName], 'optionalAccess', _88 => _88.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
1263
- _nullishCoalesce(_optionalChain([context, 'access', _89 => _89.projectsConfigurations, 'access', _90 => _90.projects, 'access', _91 => _91[context.projectName], 'optionalAccess', _92 => _92.root]), () => ( "./")),
1264
- "src"
1265
- )))
1266
- }).then((result) => {
1267
- _chunkA6WNSDR7js.writeInfo.call(void 0,
1268
- `\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
1269
- config
724
+ const projectDependencies = _internal.calculateProjectBuildableDependencies.call(void 0,
725
+ void 0,
726
+ projectGraph,
727
+ workspaceRoot2,
728
+ projectName,
729
+ process.env.NX_TASK_TARGET_TARGET || "build",
730
+ process.env.NX_TASK_TARGET_CONFIGURATION || "production",
731
+ true
732
+ );
733
+ const localPackages = [];
734
+ for (const project of projectDependencies.dependencies.filter(
735
+ (dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _59 => _59.node, 'access', _60 => _60.data, 'optionalAccess', _61 => _61.root]) !== projectRoot && _optionalChain([dep, 'access', _62 => _62.node, 'access', _63 => _63.data, 'optionalAccess', _64 => _64.root]) !== workspaceRoot2
736
+ )) {
737
+ const projectNode = project.node;
738
+ if (projectNode.data.root) {
739
+ const projectPackageJsonPath = _chunkFUIR6CV3js.joinPaths.call(void 0,
740
+ workspaceRoot2,
741
+ projectNode.data.root,
742
+ "package.json"
743
+ );
744
+ if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
745
+ const projectPackageJsonContent = await _promises.readFile.call(void 0,
746
+ projectPackageJsonPath,
747
+ "utf8"
748
+ );
749
+ const projectPackageJson = JSON.parse(projectPackageJsonContent);
750
+ if (projectPackageJson.private !== true) {
751
+ localPackages.push(projectPackageJson);
752
+ }
753
+ }
754
+ }
755
+ }
756
+ if (localPackages.length > 0) {
757
+ _chunkFUIR6CV3js.writeTrace.call(void 0,
758
+ `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
1270
759
  );
1271
- });
1272
- return {
1273
- success: true
1274
- };
1275
- }
1276
- var executor_default8 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
1277
- "Size-Limit Performance Test Executor",
1278
- sizeLimitExecutorFn,
1279
- {
1280
- skipReadingConfig: false,
1281
- hooks: {
1282
- applyDefaultOptions: (options) => {
1283
- return options;
760
+ const projectJsonFile = await _promises.readFile.call(void 0,
761
+ _chunkFUIR6CV3js.joinPaths.call(void 0, projectRoot, "project.json"),
762
+ "utf8"
763
+ );
764
+ const projectJson = JSON.parse(projectJsonFile);
765
+ const projectName2 = projectJson.name;
766
+ const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
767
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _65 => _65.projects, 'optionalAccess', _66 => _66[projectName2]])) {
768
+ throw new Error(
769
+ "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."
770
+ );
771
+ }
772
+ const implicitDependencies = _optionalChain([projectConfigurations, 'access', _67 => _67.projects, 'optionalAccess', _68 => _68[projectName2], 'access', _69 => _69.implicitDependencies, 'optionalAccess', _70 => _70.reduce, 'call', _71 => _71((ret, dep) => {
773
+ if (_optionalChain([projectConfigurations, 'access', _72 => _72.projects, 'optionalAccess', _73 => _73[dep]])) {
774
+ const depPackageJsonPath = _chunkFUIR6CV3js.joinPaths.call(void 0,
775
+ workspaceRoot2,
776
+ projectConfigurations.projects[dep].root,
777
+ "package.json"
778
+ );
779
+ if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
780
+ const depPackageJsonContent = _fs.readFileSync.call(void 0,
781
+ depPackageJsonPath,
782
+ "utf8"
783
+ );
784
+ const depPackageJson = JSON.parse(depPackageJsonContent);
785
+ if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
786
+ ret.push(depPackageJson.name);
787
+ }
788
+ }
789
+ }
790
+ return ret;
791
+ }, [])]);
792
+ packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
793
+ if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _74 => _74.includes, 'call', _75 => _75(localPackage.name)]) && _optionalChain([packageJson, 'access', _76 => _76.devDependencies, 'optionalAccess', _77 => _77[localPackage.name]]) === void 0) {
794
+ ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
795
+ }
796
+ return ret;
797
+ }, _nullishCoalesce(packageJson.dependencies, () => ( {})));
798
+ packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
799
+ if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _78 => _78.includes, 'call', _79 => _79(localPackage.name)]) && _optionalChain([packageJson, 'access', _80 => _80.dependencies, 'optionalAccess', _81 => _81[localPackage.name]]) === void 0) {
800
+ ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
1284
801
  }
802
+ return ret;
803
+ }, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
804
+ } else {
805
+ _chunkFUIR6CV3js.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
806
+ }
807
+ return packageJson;
808
+ };
809
+ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
810
+ const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkFUIR6CV3js.findWorkspaceRoot.call(void 0, );
811
+ const workspacePackageJsonContent = await _promises.readFile.call(void 0,
812
+ _chunkFUIR6CV3js.joinPaths.call(void 0, workspaceRoot2, "package.json"),
813
+ "utf8"
814
+ );
815
+ const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
816
+ packageJson.type ??= "module";
817
+ packageJson.sideEffects ??= false;
818
+ if (includeSrc === true) {
819
+ let distSrc = sourceRoot.replace(projectRoot, "");
820
+ if (distSrc.startsWith("/")) {
821
+ distSrc = distSrc.substring(1);
1285
822
  }
823
+ packageJson.source ??= `${_chunkFUIR6CV3js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
1286
824
  }
1287
- );
825
+ packageJson.files ??= ["dist/**/*"];
826
+ if (includeSrc === true && !packageJson.files.includes("src")) {
827
+ packageJson.files.push("src/**/*");
828
+ }
829
+ packageJson.publishConfig ??= {
830
+ access: "public"
831
+ };
832
+ packageJson.description ??= workspacePackageJson.description;
833
+ packageJson.homepage ??= workspacePackageJson.homepage;
834
+ packageJson.bugs ??= workspacePackageJson.bugs;
835
+ packageJson.license ??= workspacePackageJson.license;
836
+ packageJson.keywords ??= workspacePackageJson.keywords;
837
+ packageJson.funding ??= workspacePackageJson.funding;
838
+ packageJson.author ??= workspacePackageJson.author;
839
+ packageJson.maintainers ??= workspacePackageJson.maintainers;
840
+ if (!packageJson.maintainers && packageJson.author) {
841
+ packageJson.maintainers = [packageJson.author];
842
+ }
843
+ packageJson.contributors ??= workspacePackageJson.contributors;
844
+ if (!packageJson.contributors && packageJson.author) {
845
+ packageJson.contributors = [packageJson.author];
846
+ }
847
+ packageJson.repository ??= workspacePackageJson.repository;
848
+ packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkFUIR6CV3js.joinPaths.call(void 0, "packages", projectName);
849
+ return packageJson;
850
+ };
851
+ var addPackageJsonExport = (file, type = "module", sourceRoot) => {
852
+ let entry = file.replaceAll("\\", "/");
853
+ if (sourceRoot) {
854
+ entry = entry.replace(sourceRoot, "");
855
+ }
856
+ return {
857
+ import: {
858
+ types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
859
+ default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
860
+ },
861
+ require: {
862
+ types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
863
+ default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
864
+ },
865
+ default: {
866
+ types: `./dist/${entry}.d.${type !== "fixed" ? "ts" : "mts"}`,
867
+ default: `./dist/${entry}.${type !== "fixed" ? "js" : "mjs"}`
868
+ }
869
+ };
870
+ };
871
+
872
+ // ../build-tools/src/utilities/get-entry-points.ts
873
+
874
+
875
+ // ../build-tools/src/utilities/get-env.ts
876
+ var getEnv = (builder, options) => {
877
+ return {
878
+ STORM_BUILD: builder,
879
+ STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
880
+ STORM_NAME: options.name,
881
+ STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
882
+ STORM_PLATFORM: options.platform,
883
+ STORM_FORMAT: JSON.stringify(options.format),
884
+ STORM_TARGET: JSON.stringify(options.target),
885
+ ...options.env
886
+ };
887
+ };
888
+
889
+ // ../build-tools/src/utilities/read-nx-config.ts
1288
890
 
1289
- // ../tsdown/src/build.ts
1290
891
 
1291
892
 
893
+ // ../build-tools/src/utilities/task-graph.ts
1292
894
 
1293
895
 
1294
896
 
897
+ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
1295
898
 
899
+ // ../tsdown/src/build.ts
900
+ var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
1296
901
 
1297
902
 
1298
903
  var _tsdown = require('tsdown');
1299
904
 
1300
905
  // ../tsdown/src/clean.ts
1301
906
 
1302
- async function cleanDirectories2(name = "TSDown", directory, config) {
907
+ async function cleanDirectories(name = "TSDown", directory, config) {
1303
908
  await _promises.rm.call(void 0, directory, { recursive: true, force: true });
1304
909
  }
1305
910
 
@@ -1334,19 +939,19 @@ function toTSDownFormat(format4) {
1334
939
  // ../tsdown/src/build.ts
1335
940
  var resolveOptions = async (userOptions) => {
1336
941
  const options = getDefaultOptions(userOptions);
1337
- const workspaceRoot2 = _chunkA6WNSDR7js.findWorkspaceRoot.call(void 0, options.projectRoot);
942
+ const workspaceRoot2 = _chunkFUIR6CV3js.findWorkspaceRoot.call(void 0, options.projectRoot);
1338
943
  if (!workspaceRoot2) {
1339
944
  throw new Error("Cannot find Nx workspace root");
1340
945
  }
1341
- const workspaceConfig = await _chunkA6WNSDR7js.getWorkspaceConfig.call(void 0, options.debug === true, {
946
+ const workspaceConfig = await _chunkFUIR6CV3js.getWorkspaceConfig.call(void 0, options.debug === true, {
1342
947
  workspaceRoot: workspaceRoot2
1343
948
  });
1344
- _chunkA6WNSDR7js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
1345
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, "Build options resolution");
949
+ _chunkFUIR6CV3js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
950
+ const stopwatch = _chunkFUIR6CV3js.getStopwatch.call(void 0, "Build options resolution");
1346
951
  const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
1347
952
  exitOnError: true
1348
953
  });
1349
- const projectJsonPath = _chunkA6WNSDR7js.joinPaths.call(void 0,
954
+ const projectJsonPath = _chunkFUIR6CV3js.joinPaths.call(void 0,
1350
955
  workspaceRoot2,
1351
956
  options.projectRoot,
1352
957
  "project.json"
@@ -1358,12 +963,12 @@ var resolveOptions = async (userOptions) => {
1358
963
  const projectJson = JSON.parse(projectJsonFile);
1359
964
  const projectName = projectJson.name;
1360
965
  const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
1361
- if (!_optionalChain([projectConfigurations, 'optionalAccess', _93 => _93.projects, 'optionalAccess', _94 => _94[projectName]])) {
966
+ if (!_optionalChain([projectConfigurations, 'optionalAccess', _82 => _82.projects, 'optionalAccess', _83 => _83[projectName]])) {
1362
967
  throw new Error(
1363
968
  "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."
1364
969
  );
1365
970
  }
1366
- const packageJsonPath = _chunkA6WNSDR7js.joinPaths.call(void 0,
971
+ const packageJsonPath = _chunkFUIR6CV3js.joinPaths.call(void 0,
1367
972
  workspaceRoot2,
1368
973
  options.projectRoot,
1369
974
  "package.json"
@@ -1372,13 +977,13 @@ var resolveOptions = async (userOptions) => {
1372
977
  throw new Error("Cannot find package.json configuration");
1373
978
  }
1374
979
  const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
1375
- const sourceRoot = projectJson.sourceRoot || _chunkA6WNSDR7js.joinPaths.call(void 0, options.projectRoot, "src");
980
+ const sourceRoot = projectJson.sourceRoot || _chunkFUIR6CV3js.joinPaths.call(void 0, options.projectRoot, "src");
1376
981
  const result = {
1377
982
  name: projectName,
1378
983
  mode: "production",
1379
984
  target: DEFAULT_TARGET,
1380
985
  generatePackageJson: true,
1381
- outDir: _chunkA6WNSDR7js.joinPaths.call(void 0, "dist", options.projectRoot),
986
+ outDir: _chunkFUIR6CV3js.joinPaths.call(void 0, "dist", options.projectRoot),
1382
987
  minify: !debug,
1383
988
  plugins: [],
1384
989
  assets: [],
@@ -1389,12 +994,12 @@ var resolveOptions = async (userOptions) => {
1389
994
  clean: false,
1390
995
  fixedExtension: true,
1391
996
  nodeProtocol: true,
1392
- tsconfig: _chunkA6WNSDR7js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
997
+ tsconfig: _chunkFUIR6CV3js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
1393
998
  debug,
1394
999
  sourceRoot,
1395
1000
  cwd: workspaceConfig.workspaceRoot,
1396
1001
  entry: {
1397
- ["index"]: _chunkA6WNSDR7js.joinPaths.call(void 0, sourceRoot, "index.ts")
1002
+ ["index"]: _chunkFUIR6CV3js.joinPaths.call(void 0, sourceRoot, "index.ts")
1398
1003
  },
1399
1004
  workspace: true,
1400
1005
  ...options,
@@ -1412,16 +1017,16 @@ var resolveOptions = async (userOptions) => {
1412
1017
  stopwatch();
1413
1018
  return result;
1414
1019
  };
1415
- async function generatePackageJson2(options) {
1416
- if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkA6WNSDR7js.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
1417
- _chunkA6WNSDR7js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
1418
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, "Write package.json file");
1419
- const packageJsonPath = _chunkA6WNSDR7js.joinPaths.call(void 0, options.projectRoot, "project.json");
1020
+ async function generatePackageJson(options) {
1021
+ if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkFUIR6CV3js.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
1022
+ _chunkFUIR6CV3js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
1023
+ const stopwatch = _chunkFUIR6CV3js.getStopwatch.call(void 0, "Write package.json file");
1024
+ const packageJsonPath = _chunkFUIR6CV3js.joinPaths.call(void 0, options.projectRoot, "project.json");
1420
1025
  if (!_fs.existsSync.call(void 0, packageJsonPath)) {
1421
1026
  throw new Error("Cannot find package.json configuration");
1422
1027
  }
1423
1028
  const packageJsonFile = await _promises2.default.readFile(
1424
- _chunkA6WNSDR7js.joinPaths.call(void 0,
1029
+ _chunkFUIR6CV3js.joinPaths.call(void 0,
1425
1030
  options.workspaceConfig.workspaceRoot,
1426
1031
  options.projectRoot,
1427
1032
  "package.json"
@@ -1483,14 +1088,14 @@ async function generatePackageJson2(options) {
1483
1088
  },
1484
1089
  packageJson.exports
1485
1090
  );
1486
- await _devkit.writeJsonFile.call(void 0, _chunkA6WNSDR7js.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
1091
+ await _devkit.writeJsonFile.call(void 0, _chunkFUIR6CV3js.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
1487
1092
  stopwatch();
1488
1093
  }
1489
1094
  return options;
1490
1095
  }
1491
1096
  async function executeTSDown(options) {
1492
- _chunkA6WNSDR7js.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
1493
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, `${options.name} build`);
1097
+ _chunkFUIR6CV3js.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
1098
+ const stopwatch = _chunkFUIR6CV3js.getStopwatch.call(void 0, `${options.name} build`);
1494
1099
  await _tsdown.build.call(void 0, {
1495
1100
  ...options,
1496
1101
  entry: options.entry,
@@ -1499,12 +1104,12 @@ async function executeTSDown(options) {
1499
1104
  stopwatch();
1500
1105
  return options;
1501
1106
  }
1502
- async function copyBuildAssets2(options) {
1503
- _chunkA6WNSDR7js.writeDebug.call(void 0,
1107
+ async function copyBuildAssets(options) {
1108
+ _chunkFUIR6CV3js.writeDebug.call(void 0,
1504
1109
  ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
1505
1110
  options.workspaceConfig
1506
1111
  );
1507
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, `${options.name} asset copy`);
1112
+ const stopwatch = _chunkFUIR6CV3js.getStopwatch.call(void 0, `${options.name} asset copy`);
1508
1113
  await copyAssets(
1509
1114
  options.workspaceConfig,
1510
1115
  _nullishCoalesce(options.assets, () => ( [])),
@@ -1517,20 +1122,20 @@ async function copyBuildAssets2(options) {
1517
1122
  stopwatch();
1518
1123
  return options;
1519
1124
  }
1520
- async function reportResults2(options) {
1521
- _chunkA6WNSDR7js.writeSuccess.call(void 0,
1125
+ async function reportResults(options) {
1126
+ _chunkFUIR6CV3js.writeSuccess.call(void 0,
1522
1127
  ` \u{1F4E6} The ${options.name} build completed successfully`,
1523
1128
  options.workspaceConfig
1524
1129
  );
1525
1130
  }
1526
- async function cleanOutputPath2(options) {
1131
+ async function cleanOutputPath(options) {
1527
1132
  if (options.clean !== false && options.workspaceConfig) {
1528
- _chunkA6WNSDR7js.writeDebug.call(void 0,
1133
+ _chunkFUIR6CV3js.writeDebug.call(void 0,
1529
1134
  ` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
1530
1135
  options.workspaceConfig
1531
1136
  );
1532
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, `${options.name} output clean`);
1533
- await cleanDirectories2(
1137
+ const stopwatch = _chunkFUIR6CV3js.getStopwatch.call(void 0, `${options.name} output clean`);
1138
+ await cleanDirectories(
1534
1139
  options.name,
1535
1140
  options.outDir,
1536
1141
  options.workspaceConfig
@@ -1539,9 +1144,9 @@ async function cleanOutputPath2(options) {
1539
1144
  }
1540
1145
  return options;
1541
1146
  }
1542
- async function build3(options) {
1543
- _chunkA6WNSDR7js.writeDebug.call(void 0, ` ${_chunkA6WNSDR7js.brandIcon.call(void 0, )} Executing Storm TSDown pipeline`);
1544
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, "TSDown pipeline");
1147
+ async function build(options) {
1148
+ _chunkFUIR6CV3js.writeDebug.call(void 0, ` ${_chunkFUIR6CV3js.brandIcon.call(void 0, )} Executing Storm TSDown pipeline`);
1149
+ const stopwatch = _chunkFUIR6CV3js.getStopwatch.call(void 0, "TSDown pipeline");
1545
1150
  try {
1546
1151
  const opts = Array.isArray(options) ? options : [options];
1547
1152
  if (opts.length === 0) {
@@ -1551,23 +1156,23 @@ async function build3(options) {
1551
1156
  opts.map(async (opt) => await resolveOptions(opt))
1552
1157
  );
1553
1158
  if (resolved.length > 0) {
1554
- await cleanOutputPath2(resolved[0]);
1555
- await generatePackageJson2(resolved[0]);
1159
+ await cleanOutputPath(resolved[0]);
1160
+ await generatePackageJson(resolved[0]);
1556
1161
  await Promise.all(
1557
1162
  resolved.map(async (opt) => {
1558
1163
  await executeTSDown(opt);
1559
- await copyBuildAssets2(opt);
1560
- await reportResults2(opt);
1164
+ await copyBuildAssets(opt);
1165
+ await reportResults(opt);
1561
1166
  })
1562
1167
  );
1563
1168
  } else {
1564
- _chunkA6WNSDR7js.writeWarning.call(void 0,
1169
+ _chunkFUIR6CV3js.writeWarning.call(void 0,
1565
1170
  " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
1566
1171
  );
1567
1172
  }
1568
- _chunkA6WNSDR7js.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
1173
+ _chunkFUIR6CV3js.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
1569
1174
  } catch (error) {
1570
- _chunkA6WNSDR7js.writeFatal.call(void 0,
1175
+ _chunkFUIR6CV3js.writeFatal.call(void 0,
1571
1176
  "Fatal errors that the build process could not recover from have occured. The build process has been terminated."
1572
1177
  );
1573
1178
  throw error;
@@ -1578,20 +1183,20 @@ async function build3(options) {
1578
1183
 
1579
1184
  // ../workspace-tools/src/executors/tsdown/executor.ts
1580
1185
  async function tsdownExecutorFn(options, context, config) {
1581
- _chunkA6WNSDR7js.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config);
1582
- if (!_optionalChain([context, 'access', _95 => _95.projectsConfigurations, 'optionalAccess', _96 => _96.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _97 => _97.projectsConfigurations, 'access', _98 => _98.projects, 'access', _99 => _99[context.projectName], 'optionalAccess', _100 => _100.root])) {
1186
+ _chunkFUIR6CV3js.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config);
1187
+ if (!_optionalChain([context, 'access', _84 => _84.projectsConfigurations, 'optionalAccess', _85 => _85.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _86 => _86.projectsConfigurations, 'access', _87 => _87.projects, 'access', _88 => _88[context.projectName], 'optionalAccess', _89 => _89.root])) {
1583
1188
  throw new Error(
1584
1189
  "The Build process failed because the context is not valid. Please run this command from a workspace."
1585
1190
  );
1586
1191
  }
1587
- await build3({
1192
+ await build({
1588
1193
  ...options,
1589
1194
  projectRoot: (
1590
1195
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1591
- _optionalChain([context, 'access', _101 => _101.projectsConfigurations, 'access', _102 => _102.projects, 'optionalAccess', _103 => _103[context.projectName], 'access', _104 => _104.root])
1196
+ _optionalChain([context, 'access', _90 => _90.projectsConfigurations, 'access', _91 => _91.projects, 'optionalAccess', _92 => _92[context.projectName], 'access', _93 => _93.root])
1592
1197
  ),
1593
1198
  name: context.projectName,
1594
- sourceRoot: _optionalChain([context, 'access', _105 => _105.projectsConfigurations, 'access', _106 => _106.projects, 'optionalAccess', _107 => _107[context.projectName], 'optionalAccess', _108 => _108.sourceRoot]),
1199
+ sourceRoot: _optionalChain([context, 'access', _94 => _94.projectsConfigurations, 'access', _95 => _95.projects, 'optionalAccess', _96 => _96[context.projectName], 'optionalAccess', _97 => _97.sourceRoot]),
1595
1200
  format: options.format,
1596
1201
  platform: options.platform
1597
1202
  });
@@ -1599,7 +1204,7 @@ async function tsdownExecutorFn(options, context, config) {
1599
1204
  success: true
1600
1205
  };
1601
1206
  }
1602
- var executor_default9 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
1207
+ var executor_default9 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
1603
1208
  "Storm TSDown build",
1604
1209
  tsdownExecutorFn,
1605
1210
  {
@@ -1620,12 +1225,12 @@ var _fsextra = require('fs-extra');
1620
1225
  var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
1621
1226
  async function typiaExecutorFn(options, _, config) {
1622
1227
  if (options.clean !== false) {
1623
- _chunkA6WNSDR7js.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
1228
+ _chunkFUIR6CV3js.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
1624
1229
  _fsextra.removeSync.call(void 0, options.outputPath);
1625
1230
  }
1626
1231
  await Promise.all(
1627
1232
  options.entry.map((entry) => {
1628
- _chunkA6WNSDR7js.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
1233
+ _chunkFUIR6CV3js.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
1629
1234
  return _TypiaProgrammerjs.TypiaProgrammer.build({
1630
1235
  input: entry,
1631
1236
  output: options.outputPath,
@@ -1637,7 +1242,7 @@ async function typiaExecutorFn(options, _, config) {
1637
1242
  success: true
1638
1243
  };
1639
1244
  }
1640
- var executor_default10 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
1245
+ var executor_default10 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
1641
1246
  "Typia runtime validation generator",
1642
1247
  typiaExecutorFn,
1643
1248
  {
@@ -1658,8 +1263,8 @@ var executor_default10 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
1658
1263
 
1659
1264
 
1660
1265
  async function unbuildExecutorFn(options, context, config) {
1661
- _chunkA6WNSDR7js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
1662
- if (!_optionalChain([context, 'access', _109 => _109.projectsConfigurations, 'optionalAccess', _110 => _110.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
1266
+ _chunkFUIR6CV3js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
1267
+ if (!_optionalChain([context, 'access', _98 => _98.projectsConfigurations, 'optionalAccess', _99 => _99.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
1663
1268
  throw new Error(
1664
1269
  "The Build process failed because the context is not valid. Please run this command from a workspace root directory."
1665
1270
  );
@@ -1675,7 +1280,7 @@ async function unbuildExecutorFn(options, context, config) {
1675
1280
  );
1676
1281
  }
1677
1282
  const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
1678
- fsCache: config.skipCache ? false : _chunkA6WNSDR7js.joinPaths.call(void 0,
1283
+ fsCache: config.skipCache ? false : _chunkFUIR6CV3js.joinPaths.call(void 0,
1679
1284
  config.workspaceRoot,
1680
1285
  config.directories.cache || "node_modules/.cache/storm",
1681
1286
  "jiti"
@@ -1697,7 +1302,7 @@ async function unbuildExecutorFn(options, context, config) {
1697
1302
  {
1698
1303
  stubOptions: {
1699
1304
  jiti: {
1700
- fsCache: config.skipCache ? false : _chunkA6WNSDR7js.joinPaths.call(void 0,
1305
+ fsCache: config.skipCache ? false : _chunkFUIR6CV3js.joinPaths.call(void 0,
1701
1306
  config.workspaceRoot,
1702
1307
  config.directories.cache || "node_modules/.cache/storm",
1703
1308
  "jiti"
@@ -1726,7 +1331,7 @@ async function unbuildExecutorFn(options, context, config) {
1726
1331
  success: true
1727
1332
  };
1728
1333
  }
1729
- var executor_default11 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
1334
+ var executor_default11 = _chunkFUIR6CV3js.withRunExecutor.call(void 0,
1730
1335
  "TypeScript Unbuild build",
1731
1336
  unbuildExecutorFn,
1732
1337
  {
@@ -1757,77 +1362,77 @@ var executor_default11 = _chunkA6WNSDR7js.withRunExecutor.call(void 0,
1757
1362
  var withRunGenerator = (name, generatorFn, generatorOptions = {
1758
1363
  skipReadingConfig: false
1759
1364
  }) => async (tree, _options) => {
1760
- const stopwatch = _chunkA6WNSDR7js.getStopwatch.call(void 0, name);
1365
+ const stopwatch = _chunkFUIR6CV3js.getStopwatch.call(void 0, name);
1761
1366
  let options = _options;
1762
1367
  let config;
1763
1368
  try {
1764
- _chunkA6WNSDR7js.writeInfo.call(void 0,
1765
- `${_chunkA6WNSDR7js.brandIcon.call(void 0, config)} Running the ${name} generator...
1369
+ _chunkFUIR6CV3js.writeInfo.call(void 0,
1370
+ `${_chunkFUIR6CV3js.brandIcon.call(void 0, config)} Running the ${name} generator...
1766
1371
 
1767
1372
  `,
1768
1373
  config
1769
1374
  );
1770
- const workspaceRoot2 = _chunkA6WNSDR7js.findWorkspaceRoot.call(void 0, );
1375
+ const workspaceRoot2 = _chunkFUIR6CV3js.findWorkspaceRoot.call(void 0, );
1771
1376
  if (!generatorOptions.skipReadingConfig) {
1772
- _chunkA6WNSDR7js.writeDebug.call(void 0,
1377
+ _chunkFUIR6CV3js.writeDebug.call(void 0,
1773
1378
  `Loading the Storm Config from environment variables and storm.config.js file...
1774
1379
  - workspaceRoot: ${workspaceRoot2}`,
1775
1380
  config
1776
1381
  );
1777
- config = await _chunkA6WNSDR7js.getConfig.call(void 0, workspaceRoot2);
1382
+ config = await _chunkFUIR6CV3js.getConfig.call(void 0, workspaceRoot2);
1778
1383
  }
1779
- if (_optionalChain([generatorOptions, 'optionalAccess', _111 => _111.hooks, 'optionalAccess', _112 => _112.applyDefaultOptions])) {
1780
- _chunkA6WNSDR7js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
1384
+ if (_optionalChain([generatorOptions, 'optionalAccess', _100 => _100.hooks, 'optionalAccess', _101 => _101.applyDefaultOptions])) {
1385
+ _chunkFUIR6CV3js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
1781
1386
  options = await Promise.resolve(
1782
1387
  generatorOptions.hooks.applyDefaultOptions(options, config)
1783
1388
  );
1784
- _chunkA6WNSDR7js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
1389
+ _chunkFUIR6CV3js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
1785
1390
  }
1786
- _chunkA6WNSDR7js.writeTrace.call(void 0,
1391
+ _chunkFUIR6CV3js.writeTrace.call(void 0,
1787
1392
  `Generator schema options \u2699\uFE0F
1788
1393
  ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
1789
1394
  config
1790
1395
  );
1791
- const tokenized = await _chunkA6WNSDR7js.applyWorkspaceTokens.call(void 0,
1396
+ const tokenized = await _chunkFUIR6CV3js.applyWorkspaceTokens.call(void 0,
1792
1397
  options,
1793
1398
  { workspaceRoot: tree.root, config },
1794
- _chunkA6WNSDR7js.applyWorkspaceBaseTokens
1399
+ _chunkFUIR6CV3js.applyWorkspaceBaseTokens
1795
1400
  );
1796
- if (_optionalChain([generatorOptions, 'optionalAccess', _113 => _113.hooks, 'optionalAccess', _114 => _114.preProcess])) {
1797
- _chunkA6WNSDR7js.writeDebug.call(void 0, "Running the preProcess hook...", config);
1401
+ if (_optionalChain([generatorOptions, 'optionalAccess', _102 => _102.hooks, 'optionalAccess', _103 => _103.preProcess])) {
1402
+ _chunkFUIR6CV3js.writeDebug.call(void 0, "Running the preProcess hook...", config);
1798
1403
  await Promise.resolve(
1799
1404
  generatorOptions.hooks.preProcess(tokenized, config)
1800
1405
  );
1801
- _chunkA6WNSDR7js.writeDebug.call(void 0, "Completed the preProcess hook", config);
1406
+ _chunkFUIR6CV3js.writeDebug.call(void 0, "Completed the preProcess hook", config);
1802
1407
  }
1803
1408
  const result = await Promise.resolve(
1804
1409
  generatorFn(tree, tokenized, config)
1805
1410
  );
1806
1411
  if (result) {
1807
- if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _115 => _115.error, 'optionalAccess', _116 => _116.message]) && typeof _optionalChain([result, 'optionalAccess', _117 => _117.error, 'optionalAccess', _118 => _118.message]) === "string" && _optionalChain([result, 'optionalAccess', _119 => _119.error, 'optionalAccess', _120 => _120.name]) && typeof _optionalChain([result, 'optionalAccess', _121 => _121.error, 'optionalAccess', _122 => _122.name]) === "string") {
1412
+ if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _104 => _104.error, 'optionalAccess', _105 => _105.message]) && typeof _optionalChain([result, 'optionalAccess', _106 => _106.error, 'optionalAccess', _107 => _107.message]) === "string" && _optionalChain([result, 'optionalAccess', _108 => _108.error, 'optionalAccess', _109 => _109.name]) && typeof _optionalChain([result, 'optionalAccess', _110 => _110.error, 'optionalAccess', _111 => _111.name]) === "string") {
1808
1413
  throw new Error(`The ${name} generator failed to run`, {
1809
- cause: _optionalChain([result, 'optionalAccess', _123 => _123.error])
1414
+ cause: _optionalChain([result, 'optionalAccess', _112 => _112.error])
1810
1415
  });
1811
1416
  } else if (result.success && result.data) {
1812
1417
  return result;
1813
1418
  }
1814
1419
  }
1815
- if (_optionalChain([generatorOptions, 'optionalAccess', _124 => _124.hooks, 'optionalAccess', _125 => _125.postProcess])) {
1816
- _chunkA6WNSDR7js.writeDebug.call(void 0, "Running the postProcess hook...", config);
1420
+ if (_optionalChain([generatorOptions, 'optionalAccess', _113 => _113.hooks, 'optionalAccess', _114 => _114.postProcess])) {
1421
+ _chunkFUIR6CV3js.writeDebug.call(void 0, "Running the postProcess hook...", config);
1817
1422
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
1818
- _chunkA6WNSDR7js.writeDebug.call(void 0, "Completed the postProcess hook", config);
1423
+ _chunkFUIR6CV3js.writeDebug.call(void 0, "Completed the postProcess hook", config);
1819
1424
  }
1820
1425
  return () => {
1821
- _chunkA6WNSDR7js.writeSuccess.call(void 0, `Completed running the ${name} generator!
1426
+ _chunkFUIR6CV3js.writeSuccess.call(void 0, `Completed running the ${name} generator!
1822
1427
  `, config);
1823
1428
  };
1824
1429
  } catch (error) {
1825
1430
  return () => {
1826
- _chunkA6WNSDR7js.writeFatal.call(void 0,
1431
+ _chunkFUIR6CV3js.writeFatal.call(void 0,
1827
1432
  "A fatal error occurred while running the generator - the process was forced to terminate",
1828
1433
  config
1829
1434
  );
1830
- _chunkA6WNSDR7js.writeError.call(void 0,
1435
+ _chunkFUIR6CV3js.writeError.call(void 0,
1831
1436
  `An exception was thrown in the generator's process
1832
1437
  - Details: ${error.message}
1833
1438
  - Stacktrace: ${error.stack}`,
@@ -1882,16 +1487,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
1882
1487
  const projectConfig = {
1883
1488
  root: normalized.directory,
1884
1489
  projectType: "library",
1885
- sourceRoot: _chunkA6WNSDR7js.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
1490
+ sourceRoot: _chunkFUIR6CV3js.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
1886
1491
  targets: {
1887
1492
  build: {
1888
1493
  executor: options.buildExecutor,
1889
1494
  outputs: ["{options.outputPath}"],
1890
1495
  options: {
1891
- entry: [_chunkA6WNSDR7js.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
1496
+ entry: [_chunkFUIR6CV3js.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
1892
1497
  outputPath: getOutputPath(normalized),
1893
- tsconfig: _chunkA6WNSDR7js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
1894
- project: _chunkA6WNSDR7js.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
1498
+ tsconfig: _chunkFUIR6CV3js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
1499
+ project: _chunkFUIR6CV3js.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
1895
1500
  defaultConfiguration: "production",
1896
1501
  platform: "neutral",
1897
1502
  assets: [
@@ -1933,22 +1538,22 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
1933
1538
  _devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
1934
1539
  let repository = {
1935
1540
  type: "github",
1936
- url: _optionalChain([config, 'optionalAccess', _126 => _126.repository]) || `https://github.com/${(typeof _optionalChain([config, 'optionalAccess', _127 => _127.organization]) === "string" ? _optionalChain([config, 'optionalAccess', _128 => _128.organization]) : _optionalChain([config, 'optionalAccess', _129 => _129.organization, 'optionalAccess', _130 => _130.name])) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _131 => _131.namespace]) || _optionalChain([config, 'optionalAccess', _132 => _132.name]) || "repository"}.git`
1541
+ url: _optionalChain([config, 'optionalAccess', _115 => _115.repository]) || `https://github.com/${(typeof _optionalChain([config, 'optionalAccess', _116 => _116.organization]) === "string" ? _optionalChain([config, 'optionalAccess', _117 => _117.organization]) : _optionalChain([config, 'optionalAccess', _118 => _118.organization, 'optionalAccess', _119 => _119.name])) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _120 => _120.namespace]) || _optionalChain([config, 'optionalAccess', _121 => _121.name]) || "repository"}.git`
1937
1542
  };
1938
1543
  let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
1939
1544
  if (tree.exists("package.json")) {
1940
1545
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
1941
- if (_optionalChain([packageJson, 'optionalAccess', _133 => _133.repository])) {
1546
+ if (_optionalChain([packageJson, 'optionalAccess', _122 => _122.repository])) {
1942
1547
  repository = packageJson.repository;
1943
1548
  }
1944
- if (_optionalChain([packageJson, 'optionalAccess', _134 => _134.description])) {
1549
+ if (_optionalChain([packageJson, 'optionalAccess', _123 => _123.description])) {
1945
1550
  description = packageJson.description;
1946
1551
  }
1947
1552
  }
1948
1553
  if (!normalized.importPath) {
1949
1554
  normalized.importPath = normalized.name;
1950
1555
  }
1951
- const packageJsonPath = _chunkA6WNSDR7js.joinPaths.call(void 0, normalized.projectRoot, "package.json");
1556
+ const packageJsonPath = _chunkFUIR6CV3js.joinPaths.call(void 0, normalized.projectRoot, "package.json");
1952
1557
  if (tree.exists(packageJsonPath)) {
1953
1558
  _devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
1954
1559
  if (!normalized.importPath) {
@@ -1996,34 +1601,34 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
1996
1601
  _devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
1997
1602
  ...json,
1998
1603
  pnpm: {
1999
- ..._optionalChain([json, 'optionalAccess', _135 => _135.pnpm]),
1604
+ ..._optionalChain([json, 'optionalAccess', _124 => _124.pnpm]),
2000
1605
  overrides: {
2001
- ..._optionalChain([json, 'optionalAccess', _136 => _136.pnpm, 'optionalAccess', _137 => _137.overrides]),
1606
+ ..._optionalChain([json, 'optionalAccess', _125 => _125.pnpm, 'optionalAccess', _126 => _126.overrides]),
2002
1607
  [_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
2003
1608
  }
2004
1609
  }
2005
1610
  }));
2006
1611
  }
2007
1612
  _js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
2008
- _chunkA6WNSDR7js.joinPaths.call(void 0,
1613
+ _chunkFUIR6CV3js.joinPaths.call(void 0,
2009
1614
  normalized.projectRoot,
2010
1615
  "./src",
2011
1616
  `index.${normalized.js ? "js" : "ts"}`
2012
1617
  )
2013
1618
  ]);
2014
- _js.addTsConfigPath.call(void 0, tree, _chunkA6WNSDR7js.joinPaths.call(void 0, normalized.importPath, "/*"), [
2015
- _chunkA6WNSDR7js.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
1619
+ _js.addTsConfigPath.call(void 0, tree, _chunkFUIR6CV3js.joinPaths.call(void 0, normalized.importPath, "/*"), [
1620
+ _chunkFUIR6CV3js.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
2016
1621
  ]);
2017
1622
  if (tree.exists("package.json")) {
2018
1623
  const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
2019
- if (_optionalChain([packageJson, 'optionalAccess', _138 => _138.repository])) {
1624
+ if (_optionalChain([packageJson, 'optionalAccess', _127 => _127.repository])) {
2020
1625
  repository = packageJson.repository;
2021
1626
  }
2022
- if (_optionalChain([packageJson, 'optionalAccess', _139 => _139.description])) {
1627
+ if (_optionalChain([packageJson, 'optionalAccess', _128 => _128.description])) {
2023
1628
  description = packageJson.description;
2024
1629
  }
2025
1630
  }
2026
- const tsconfigPath = _chunkA6WNSDR7js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
1631
+ const tsconfigPath = _chunkFUIR6CV3js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
2027
1632
  if (tree.exists(tsconfigPath)) {
2028
1633
  _devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
2029
1634
  json.composite ??= true;
@@ -2051,38 +1656,38 @@ function getOutputPath(options) {
2051
1656
  } else {
2052
1657
  parts.push(options.projectRoot);
2053
1658
  }
2054
- return _chunkA6WNSDR7js.joinPaths.call(void 0, ...parts);
1659
+ return _chunkFUIR6CV3js.joinPaths.call(void 0, ...parts);
2055
1660
  }
2056
1661
  function createProjectTsConfigJson(tree, options) {
2057
1662
  const tsconfig = {
2058
1663
  extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
2059
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _140 => _140.tsconfigOptions]), () => ( {})),
1664
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _129 => _129.tsconfigOptions]), () => ( {})),
2060
1665
  compilerOptions: {
2061
1666
  ...options.rootProject ? _js.tsConfigBaseOptions : {},
2062
- outDir: _chunkA6WNSDR7js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
1667
+ outDir: _chunkFUIR6CV3js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
2063
1668
  noEmit: true,
2064
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _141 => _141.tsconfigOptions, 'optionalAccess', _142 => _142.compilerOptions]), () => ( {}))
1669
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _130 => _130.tsconfigOptions, 'optionalAccess', _131 => _131.compilerOptions]), () => ( {}))
2065
1670
  },
2066
- files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _143 => _143.tsconfigOptions, 'optionalAccess', _144 => _144.files]), () => ( []))],
1671
+ files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _132 => _132.tsconfigOptions, 'optionalAccess', _133 => _133.files]), () => ( []))],
2067
1672
  include: [
2068
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _145 => _145.tsconfigOptions, 'optionalAccess', _146 => _146.include]), () => ( [])),
1673
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _134 => _134.tsconfigOptions, 'optionalAccess', _135 => _135.include]), () => ( [])),
2069
1674
  "src/**/*.ts",
2070
1675
  "src/**/*.js",
2071
1676
  "bin/**/*"
2072
1677
  ],
2073
1678
  exclude: [
2074
- ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _147 => _147.tsconfigOptions, 'optionalAccess', _148 => _148.exclude]), () => ( [])),
1679
+ ..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _136 => _136.tsconfigOptions, 'optionalAccess', _137 => _137.exclude]), () => ( [])),
2075
1680
  "jest.config.ts",
2076
1681
  "src/**/*.spec.ts",
2077
1682
  "src/**/*.test.ts"
2078
1683
  ]
2079
1684
  };
2080
- _devkit.writeJson.call(void 0, tree, _chunkA6WNSDR7js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
1685
+ _devkit.writeJson.call(void 0, tree, _chunkFUIR6CV3js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
2081
1686
  }
2082
1687
  async function normalizeOptions(tree, options, config) {
2083
1688
  let importPath = options.importPath;
2084
- if (!importPath && _optionalChain([config, 'optionalAccess', _149 => _149.namespace])) {
2085
- importPath = `@${_optionalChain([config, 'optionalAccess', _150 => _150.namespace])}/${options.name}`;
1689
+ if (!importPath && _optionalChain([config, 'optionalAccess', _138 => _138.namespace])) {
1690
+ importPath = `@${_optionalChain([config, 'optionalAccess', _139 => _139.namespace])}/${options.name}`;
2086
1691
  }
2087
1692
  if (options.publishable) {
2088
1693
  if (!importPath) {
@@ -2142,7 +1747,7 @@ async function normalizeOptions(tree, options, config) {
2142
1747
 
2143
1748
  // ../workspace-tools/src/generators/browser-library/generator.ts
2144
1749
  async function browserLibraryGeneratorFn(tree, schema, config) {
2145
- const filesDir = _chunkA6WNSDR7js.joinPaths.call(void 0,
1750
+ const filesDir = _chunkFUIR6CV3js.joinPaths.call(void 0,
2146
1751
  __dirname,
2147
1752
  "src",
2148
1753
  "generators",
@@ -2225,38 +1830,38 @@ var generator_default = withRunGenerator(
2225
1830
 
2226
1831
  var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
2227
1832
  async function configSchemaGeneratorFn(tree, options, config) {
2228
- _chunkA6WNSDR7js.writeInfo.call(void 0,
1833
+ _chunkFUIR6CV3js.writeInfo.call(void 0,
2229
1834
  "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
2230
1835
  config
2231
1836
  );
2232
- _chunkA6WNSDR7js.writeTrace.call(void 0,
1837
+ _chunkFUIR6CV3js.writeTrace.call(void 0,
2233
1838
  `Determining the Storm Workspace Configuration JSON Schema...`,
2234
1839
  config
2235
1840
  );
2236
- const jsonSchema = z.toJSONSchema(_chunkA6WNSDR7js.workspaceConfigSchema, {
1841
+ const jsonSchema = z.toJSONSchema(_chunkFUIR6CV3js.workspaceConfigSchema, {
2237
1842
  target: "draft-7",
2238
- metadata: _chunkA6WNSDR7js.schemaRegistry
1843
+ metadata: _chunkFUIR6CV3js.schemaRegistry
2239
1844
  });
2240
1845
  jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
2241
1846
  jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
2242
1847
  jsonSchema.description ??= "This JSON Schema defines the structure of the Storm Workspace configuration file (`storm-workspace.json`). It is used to validate the configuration file and ensure that it adheres to the expected format.";
2243
- _chunkA6WNSDR7js.writeTrace.call(void 0, jsonSchema, config);
1848
+ _chunkFUIR6CV3js.writeTrace.call(void 0, jsonSchema, config);
2244
1849
  if (!options.outputFile) {
2245
1850
  throw new Error(
2246
1851
  "The `outputFile` option is required. Please specify the output file path."
2247
1852
  );
2248
1853
  }
2249
1854
  const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
2250
- _nullishCoalesce(_optionalChain([config, 'optionalAccess', _151 => _151.workspaceRoot]), () => ( _chunkA6WNSDR7js.findWorkspaceRoot.call(void 0, ))),
1855
+ _nullishCoalesce(_optionalChain([config, 'optionalAccess', _140 => _140.workspaceRoot]), () => ( _chunkFUIR6CV3js.findWorkspaceRoot.call(void 0, ))),
2251
1856
  options.outputFile.startsWith("./") ? "" : "./"
2252
1857
  );
2253
- _chunkA6WNSDR7js.writeTrace.call(void 0,
1858
+ _chunkFUIR6CV3js.writeTrace.call(void 0,
2254
1859
  `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
2255
1860
  config
2256
1861
  );
2257
1862
  _devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
2258
1863
  await _devkit.formatFiles.call(void 0, tree);
2259
- _chunkA6WNSDR7js.writeSuccess.call(void 0,
1864
+ _chunkFUIR6CV3js.writeSuccess.call(void 0,
2260
1865
  "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
2261
1866
  config
2262
1867
  );
@@ -2312,7 +1917,7 @@ async function initGenerator(tree, schema) {
2312
1917
 
2313
1918
 
2314
1919
  async function neutralLibraryGeneratorFn(tree, schema, config) {
2315
- const filesDir = _chunkA6WNSDR7js.joinPaths.call(void 0,
1920
+ const filesDir = _chunkFUIR6CV3js.joinPaths.call(void 0,
2316
1921
  __dirname,
2317
1922
  "src",
2318
1923
  "generators",
@@ -2371,7 +1976,7 @@ var generator_default3 = withRunGenerator(
2371
1976
 
2372
1977
 
2373
1978
  async function nodeLibraryGeneratorFn(tree, schema, config) {
2374
- const filesDir = _chunkA6WNSDR7js.joinPaths.call(void 0,
1979
+ const filesDir = _chunkFUIR6CV3js.joinPaths.call(void 0,
2375
1980
  __dirname,
2376
1981
  "src",
2377
1982
  "generators",