@storm-software/projen 0.9.76 → 0.9.78

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.
@@ -1,17 +1,21 @@
1
1
  import {
2
2
  correctPaths,
3
3
  joinPaths
4
- } from "./chunk-EJSKIRCS.mjs";
4
+ } from "./chunk-PEM26WKS.mjs";
5
5
  import {
6
6
  __dirname,
7
- __name,
8
7
  __require,
9
8
  init_esm_shims
10
- } from "./chunk-JSBLU2B7.mjs";
9
+ } from "./chunk-SHIGQSVE.mjs";
11
10
 
12
11
  // src/generators/init/generator.ts
13
12
  init_esm_shims();
14
- import { addDependenciesToPackageJson as addDependenciesToPackageJson4, formatFiles as formatFiles9, readJsonFile as readJsonFile4, runTasksInSerial } from "@nx/devkit";
13
+ import {
14
+ addDependenciesToPackageJson as addDependenciesToPackageJson4,
15
+ formatFiles as formatFiles9,
16
+ readJsonFile as readJsonFile4,
17
+ runTasksInSerial
18
+ } from "@nx/devkit";
15
19
 
16
20
  // ../workspace-tools/index.ts
17
21
  init_esm_shims();
@@ -167,23 +171,39 @@ var RegistryConfigSchema = z.object({
167
171
  cyclone: RegistryUrlConfigSchema,
168
172
  container: RegistryUrlConfigSchema
169
173
  }).default({}).describe("A list of remote registry URLs used by Storm Software");
170
- var ColorConfigSchema = SingleThemeColorConfigSchema.or(MultiThemeColorConfigSchema).describe("Colors used for various workspace elements");
174
+ var ColorConfigSchema = SingleThemeColorConfigSchema.or(
175
+ MultiThemeColorConfigSchema
176
+ ).describe("Colors used for various workspace elements");
171
177
  var ColorConfigMapSchema = z.union([
172
- z.object({
173
- base: ColorConfigSchema
174
- }),
178
+ z.object({ base: ColorConfigSchema }),
175
179
  z.record(z.string(), ColorConfigSchema)
176
180
  ]);
177
- var ExtendsItemSchema = z.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
178
- var ExtendsSchema = ExtendsItemSchema.or(z.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
181
+ var ExtendsItemSchema = z.string().trim().describe(
182
+ "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
183
+ );
184
+ var ExtendsSchema = ExtendsItemSchema.or(
185
+ z.array(ExtendsItemSchema)
186
+ ).describe(
187
+ "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
188
+ );
179
189
  var WorkspaceBotConfigSchema = z.object({
180
- name: z.string().trim().default("stormie-bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
190
+ name: z.string().trim().default("stormie-bot").describe(
191
+ "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
192
+ ),
181
193
  email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
182
- }).describe("The workspace's bot user's config used to automated various operations tasks");
194
+ }).describe(
195
+ "The workspace's bot user's config used to automated various operations tasks"
196
+ );
183
197
  var WorkspaceReleaseConfigSchema = z.object({
184
- banner: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("A URL to a banner image used to display the workspace's release"),
185
- header: z.string().trim().optional().describe("A header message appended to the start of the workspace's release notes"),
186
- footer: z.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe("A footer message appended to the end of the workspace's release notes")
198
+ banner: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
199
+ "A URL to a banner image used to display the workspace's release"
200
+ ),
201
+ header: z.string().trim().optional().describe(
202
+ "A header message appended to the start of the workspace's release notes"
203
+ ),
204
+ footer: z.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe(
205
+ "A footer message appended to the end of the workspace's release notes"
206
+ )
187
207
  }).describe("The workspace's release config used during the release process");
188
208
  var WorkspaceAccountConfigSchema = z.object({
189
209
  twitter: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
@@ -192,23 +212,41 @@ var WorkspaceAccountConfigSchema = z.object({
192
212
  slack: z.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
193
213
  medium: z.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
194
214
  github: z.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
195
- }).describe("The workspace's account config used to store various social media links");
215
+ }).describe(
216
+ "The workspace's account config used to store various social media links"
217
+ );
196
218
  var WorkspaceDirectoryConfigSchema = z.object({
197
- cache: z.string().trim().optional().describe("The directory used to store the environment's cached file data"),
219
+ cache: z.string().trim().optional().describe(
220
+ "The directory used to store the environment's cached file data"
221
+ ),
198
222
  data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
199
- config: z.string().trim().optional().describe("The directory used to store the environment's configuration files"),
223
+ config: z.string().trim().optional().describe(
224
+ "The directory used to store the environment's configuration files"
225
+ ),
200
226
  temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
201
227
  log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
202
- build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
203
- }).describe("Various directories used by the workspace to store data, cache, and configuration files");
228
+ build: z.string().trim().default("dist").describe(
229
+ "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
230
+ )
231
+ }).describe(
232
+ "Various directories used by the workspace to store data, cache, and configuration files"
233
+ );
204
234
  var errorConfigSchema = z.object({
205
235
  codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
206
- url: z.string().trim().url().optional().describe("A URL to a page that looks up the workspace's error messages given a specific error code")
236
+ url: z.string().trim().url().optional().describe(
237
+ "A URL to a page that looks up the workspace's error messages given a specific error code"
238
+ )
207
239
  }).describe("The workspace's error config used during the error process");
208
240
  var stormWorkspaceConfigSchema = z.object({
209
- $schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
241
+ $schema: z.string().trim().default(
242
+ "https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
243
+ ).optional().nullish().describe(
244
+ "The URL to the JSON schema file that describes the Storm configuration file"
245
+ ),
210
246
  extends: ExtendsSchema.optional(),
211
- name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
247
+ name: z.string().trim().toLowerCase().optional().describe(
248
+ "The name of the service/package/scope using this configuration"
249
+ ),
212
250
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
213
251
  organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
214
252
  repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
@@ -224,21 +262,16 @@ var stormWorkspaceConfigSchema = z.object({
224
262
  release: WorkspaceReleaseConfigSchema,
225
263
  account: WorkspaceAccountConfigSchema,
226
264
  error: errorConfigSchema,
227
- mode: z.enum([
228
- "development",
229
- "staging",
230
- "production"
231
- ]).default("production").describe("The current runtime environment mode for the package"),
265
+ mode: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment mode for the package"),
232
266
  workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
233
- externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
267
+ externalPackagePatterns: z.array(z.string()).default([]).describe(
268
+ "The build will use these package patterns to determine if they should be external to the bundle"
269
+ ),
234
270
  skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
235
271
  directories: WorkspaceDirectoryConfigSchema,
236
- packageManager: z.enum([
237
- "npm",
238
- "yarn",
239
- "pnpm",
240
- "bun"
241
- ]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
272
+ packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
273
+ "The JavaScript/TypeScript package manager used by the repository"
274
+ ),
242
275
  timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
243
276
  locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
244
277
  logLevel: z.enum([
@@ -251,13 +284,23 @@ var stormWorkspaceConfigSchema = z.object({
251
284
  "debug",
252
285
  "trace",
253
286
  "all"
254
- ]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
255
- skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
287
+ ]).default("info").describe(
288
+ "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
289
+ ),
290
+ skipConfigLogging: z.boolean().optional().describe(
291
+ "Should the logging of the current Storm Workspace configuration be skipped?"
292
+ ),
256
293
  registry: RegistryConfigSchema,
257
- configFile: z.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
258
- colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
294
+ configFile: z.string().trim().nullable().default(null).describe(
295
+ "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
296
+ ),
297
+ colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
298
+ "Storm theme config values used for styling various package elements"
299
+ ),
259
300
  extensions: z.record(z.any()).optional().default({}).describe("Configuration of each used extension")
260
- }).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");
301
+ }).describe(
302
+ "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo."
303
+ );
261
304
 
262
305
  // ../config/src/types.ts
263
306
  init_esm_shims();
@@ -295,10 +338,14 @@ var MAX_PATH_SEARCH_DEPTH = 30;
295
338
  var depth = 0;
296
339
  function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
297
340
  const _startPath = startPath ?? process.cwd();
298
- if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
341
+ if (endDirectoryNames.some(
342
+ (endDirName) => existsSync(join(_startPath, endDirName))
343
+ )) {
299
344
  return _startPath;
300
345
  }
301
- if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
346
+ if (endFileNames.some(
347
+ (endFileName) => existsSync(join(_startPath, endFileName))
348
+ )) {
302
349
  return _startPath;
303
350
  }
304
351
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
@@ -307,7 +354,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
307
354
  }
308
355
  return void 0;
309
356
  }
310
- __name(findFolderUp, "findFolderUp");
311
357
 
312
358
  // ../config-tools/src/utilities/find-workspace-root.ts
313
359
  var rootFiles = [
@@ -354,21 +400,31 @@ var rootDirectories = [
354
400
  ];
355
401
  function findWorkspaceRootSafe(pathInsideMonorepo) {
356
402
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
357
- return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
358
- }
359
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
403
+ return correctPaths(
404
+ process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
405
+ );
406
+ }
407
+ return correctPaths(
408
+ findFolderUp(
409
+ pathInsideMonorepo ?? process.cwd(),
410
+ rootFiles,
411
+ rootDirectories
412
+ )
413
+ );
360
414
  }
361
- __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
362
415
  function findWorkspaceRoot(pathInsideMonorepo) {
363
416
  const result = findWorkspaceRootSafe(pathInsideMonorepo);
364
417
  if (!result) {
365
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
366
- ${rootFiles.join("\n")}
367
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
418
+ throw new Error(
419
+ `Cannot find workspace root upwards from known path. Files search list includes:
420
+ ${rootFiles.join(
421
+ "\n"
422
+ )}
423
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
424
+ );
368
425
  }
369
426
  return result;
370
427
  }
371
- __name(findWorkspaceRoot, "findWorkspaceRoot");
372
428
 
373
429
  // ../config-tools/src/utilities/get-default-config.ts
374
430
  var DEFAULT_COLOR_CONFIG = {
@@ -399,7 +455,7 @@ var DEFAULT_COLOR_CONFIG = {
399
455
  negative: "#dc2626"
400
456
  }
401
457
  };
402
- var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
458
+ var getDefaultConfig = async (root) => {
403
459
  let license = STORM_DEFAULT_LICENSE;
404
460
  let homepage = STORM_DEFAULT_HOMEPAGE;
405
461
  let name = void 0;
@@ -407,7 +463,10 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
407
463
  let repository = void 0;
408
464
  const workspaceRoot3 = findWorkspaceRoot(root);
409
465
  if (existsSync2(join2(workspaceRoot3, "package.json"))) {
410
- const file = await readFile(joinPaths(workspaceRoot3, "package.json"), "utf8");
466
+ const file = await readFile(
467
+ joinPaths(workspaceRoot3, "package.json"),
468
+ "utf8"
469
+ );
411
470
  if (file) {
412
471
  const packageJson = JSON.parse(file);
413
472
  if (packageJson.name) {
@@ -444,37 +503,37 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
444
503
  url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
445
504
  }
446
505
  };
447
- }, "getDefaultConfig");
506
+ };
448
507
 
449
508
  // ../config-tools/src/logger/chalk.ts
450
509
  init_esm_shims();
451
510
  import chalk from "chalk";
452
511
  var chalkDefault = {
453
- hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
454
- bgHex: /* @__PURE__ */ __name((_) => ({
455
- whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
456
- }), "bgHex"),
457
- whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright"),
458
- gray: /* @__PURE__ */ __name((message) => message, "gray"),
512
+ hex: (_) => (message) => message,
513
+ bgHex: (_) => ({
514
+ whiteBright: (message) => message
515
+ }),
516
+ whiteBright: (message) => message,
517
+ gray: (message) => message,
459
518
  bold: {
460
- hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
461
- bgHex: /* @__PURE__ */ __name((_) => ({
462
- whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
463
- }), "bgHex"),
464
- whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
519
+ hex: (_) => (message) => message,
520
+ bgHex: (_) => ({
521
+ whiteBright: (message) => message
522
+ }),
523
+ whiteBright: (message) => message
465
524
  },
466
525
  dim: {
467
- hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
468
- gray: /* @__PURE__ */ __name((message) => message, "gray")
526
+ hex: (_) => (message) => message,
527
+ gray: (message) => message
469
528
  }
470
529
  };
471
- var getChalk = /* @__PURE__ */ __name(() => {
530
+ var getChalk = () => {
472
531
  let _chalk = chalk;
473
532
  if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright) {
474
533
  _chalk = chalkDefault;
475
534
  }
476
535
  return _chalk;
477
- }, "getChalk");
536
+ };
478
537
 
479
538
  // ../config-tools/src/logger/console-icons.ts
480
539
  init_esm_shims();
@@ -490,10 +549,9 @@ function isUnicodeSupported() {
490
549
  process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
491
550
  process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
492
551
  }
493
- __name(isUnicodeSupported, "isUnicodeSupported");
494
552
 
495
553
  // ../config-tools/src/logger/console-icons.ts
496
- var useIcon = /* @__PURE__ */ __name((c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
554
+ var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
497
555
  var CONSOLE_ICONS = {
498
556
  [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
499
557
  [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
@@ -507,13 +565,13 @@ var CONSOLE_ICONS = {
507
565
 
508
566
  // ../config-tools/src/logger/format-timestamp.ts
509
567
  init_esm_shims();
510
- var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
568
+ var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
511
569
  return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
512
- }, "formatTimestamp");
570
+ };
513
571
 
514
572
  // ../config-tools/src/logger/get-log-level.ts
515
573
  init_esm_shims();
516
- var getLogLevel = /* @__PURE__ */ __name((label) => {
574
+ var getLogLevel = (label) => {
517
575
  switch (label) {
518
576
  case "all":
519
577
  return LogLevel.ALL;
@@ -534,8 +592,8 @@ var getLogLevel = /* @__PURE__ */ __name((label) => {
534
592
  default:
535
593
  return LogLevel.INFO;
536
594
  }
537
- }, "getLogLevel");
538
- var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
595
+ };
596
+ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
539
597
  if (logLevel >= LogLevel.ALL) {
540
598
  return LogLevelLabel.ALL;
541
599
  }
@@ -561,10 +619,10 @@ var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
561
619
  return LogLevelLabel.SILENT;
562
620
  }
563
621
  return LogLevelLabel.INFO;
564
- }, "getLogLevelLabel");
622
+ };
565
623
 
566
624
  // ../config-tools/src/logger/console.ts
567
- var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
625
+ var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
568
626
  const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
569
627
  const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
570
628
  if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
@@ -573,103 +631,123 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _c
573
631
  }
574
632
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
575
633
  return (message) => {
576
- console.error(`
634
+ console.error(
635
+ `
577
636
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
578
- `);
637
+ `
638
+ );
579
639
  };
580
640
  }
581
641
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
582
642
  return (message) => {
583
- console.error(`
643
+ console.error(
644
+ `
584
645
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
585
- `);
646
+ `
647
+ );
586
648
  };
587
649
  }
588
650
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
589
651
  return (message) => {
590
- console.warn(`
652
+ console.warn(
653
+ `
591
654
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
592
- `);
655
+ `
656
+ );
593
657
  };
594
658
  }
595
659
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
596
660
  return (message) => {
597
- console.info(`
661
+ console.info(
662
+ `
598
663
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
599
- `);
664
+ `
665
+ );
600
666
  };
601
667
  }
602
668
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
603
669
  return (message) => {
604
- console.info(`
670
+ console.info(
671
+ `
605
672
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
606
- `);
673
+ `
674
+ );
607
675
  };
608
676
  }
609
677
  if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
610
678
  return (message) => {
611
- console.debug(`
679
+ console.debug(
680
+ `
612
681
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
613
- `);
682
+ `
683
+ );
614
684
  };
615
685
  }
616
686
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
617
687
  return (message) => {
618
- console.debug(`
688
+ console.debug(
689
+ `
619
690
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
620
- `);
691
+ `
692
+ );
621
693
  };
622
694
  }
623
695
  return (message) => {
624
- console.log(`
696
+ console.log(
697
+ `
625
698
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
626
- `);
699
+ `
700
+ );
627
701
  };
628
- }, "getLogFn");
629
- var writeFatal = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.FATAL, config)(message), "writeFatal");
630
- var writeError = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
631
- var writeWarning = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.WARN, config)(message), "writeWarning");
632
- var writeInfo = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
633
- var writeSuccess = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
634
- var writeDebug = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
635
- var writeTrace = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
636
- var getStopwatch = /* @__PURE__ */ __name((name) => {
702
+ };
703
+ var writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
704
+ var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
705
+ var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
706
+ var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
707
+ var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
708
+ var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
709
+ var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
710
+ var getStopwatch = (name) => {
637
711
  const start = process.hrtime();
638
712
  return () => {
639
713
  const end = process.hrtime(start);
640
- console.info(`
641
- > \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(end[0] * 1e3 + end[1] / 1e6)}ms to complete
642
- `);
714
+ console.info(
715
+ `
716
+ > \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
717
+ end[0] * 1e3 + end[1] / 1e6
718
+ )}ms to complete
719
+ `
720
+ );
643
721
  };
644
- }, "getStopwatch");
722
+ };
645
723
  var MAX_DEPTH = 4;
646
- var formatLogMessage = /* @__PURE__ */ __name((message, options = {}, depth2 = 0) => {
724
+ var formatLogMessage = (message, options = {}, depth2 = 0) => {
647
725
  if (depth2 > MAX_DEPTH) {
648
726
  return "<max depth>";
649
727
  }
650
728
  const prefix = options.prefix ?? "-";
651
729
  const skip = options.skip ?? [];
652
730
  return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
653
- ${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, {
654
- prefix: `${prefix}-`,
655
- skip
656
- }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
657
- ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], {
658
- prefix: `${prefix}-`,
659
- skip
660
- }, depth2 + 1) : message[key]}`).join("\n")}` : message;
661
- }, "formatLogMessage");
662
- var _isFunction = /* @__PURE__ */ __name((value) => {
731
+ ${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
732
+ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
733
+ (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
734
+ message[key],
735
+ { prefix: `${prefix}-`, skip },
736
+ depth2 + 1
737
+ ) : message[key]}`
738
+ ).join("\n")}` : message;
739
+ };
740
+ var _isFunction = (value) => {
663
741
  try {
664
742
  return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
665
743
  } catch (e) {
666
744
  return false;
667
745
  }
668
- }, "_isFunction");
746
+ };
669
747
 
670
748
  // ../config-tools/src/utilities/apply-workspace-tokens.ts
671
749
  init_esm_shims();
672
- var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams) => {
750
+ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
673
751
  let result = option;
674
752
  if (!result) {
675
753
  return result;
@@ -679,7 +757,10 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams
679
757
  if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
680
758
  for (const optionKey of optionKeys) {
681
759
  if (result.includes(`{${optionKey}}`)) {
682
- result = result.replaceAll(`{${optionKey}}`, tokenParams?.[optionKey] || "");
760
+ result = result.replaceAll(
761
+ `{${optionKey}}`,
762
+ tokenParams?.[optionKey] || ""
763
+ );
683
764
  }
684
765
  }
685
766
  }
@@ -689,40 +770,56 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams
689
770
  if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
690
771
  for (const configKey of configKeys) {
691
772
  if (result.includes(`{${configKey}}`)) {
692
- result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
773
+ result = result.replaceAll(
774
+ `{${configKey}}`,
775
+ tokenParams.config[configKey] || ""
776
+ );
693
777
  }
694
778
  }
695
779
  }
696
780
  }
697
781
  if (result.includes("{workspaceRoot}")) {
698
- result = result.replaceAll("{workspaceRoot}", tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot());
782
+ result = result.replaceAll(
783
+ "{workspaceRoot}",
784
+ tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot()
785
+ );
699
786
  }
700
787
  return result;
701
- }, "applyWorkspaceBaseTokens");
702
- var applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option, tokenParams) => {
788
+ };
789
+ var applyWorkspaceProjectTokens = (option, tokenParams) => {
703
790
  return applyWorkspaceBaseTokens(option, tokenParams);
704
- }, "applyWorkspaceProjectTokens");
705
- var applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, tokenParams, tokenizerFn) => {
791
+ };
792
+ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
706
793
  if (!options) {
707
794
  return {};
708
795
  }
709
796
  const result = {};
710
797
  for (const option of Object.keys(options)) {
711
798
  if (typeof options[option] === "string") {
712
- result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
799
+ result[option] = await Promise.resolve(
800
+ tokenizerFn(options[option], tokenParams)
801
+ );
713
802
  } else if (Array.isArray(options[option])) {
714
- result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
803
+ result[option] = await Promise.all(
804
+ options[option].map(
805
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item
806
+ )
807
+ );
715
808
  } else if (typeof options[option] === "object") {
716
- result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
809
+ result[option] = await applyWorkspaceTokens(
810
+ options[option],
811
+ tokenParams,
812
+ tokenizerFn
813
+ );
717
814
  } else {
718
815
  result[option] = options[option];
719
816
  }
720
817
  }
721
818
  return result;
722
- }, "applyWorkspaceTokens");
819
+ };
723
820
 
724
821
  // ../config-tools/src/config-file/get-config-file.ts
725
- var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
822
+ var getConfigFileByName = async (fileName, filePath, options = {}) => {
726
823
  const workspacePath = filePath || findWorkspaceRoot(filePath);
727
824
  const configs = await Promise.all([
728
825
  loadConfig({
@@ -732,7 +829,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
732
829
  envName: fileName?.toUpperCase(),
733
830
  jitiOptions: {
734
831
  debug: false,
735
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
832
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
833
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
834
+ "jiti"
835
+ )
736
836
  },
737
837
  ...options
738
838
  }),
@@ -743,32 +843,45 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
743
843
  envName: fileName?.toUpperCase(),
744
844
  jitiOptions: {
745
845
  debug: false,
746
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
846
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
847
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
848
+ "jiti"
849
+ )
747
850
  },
748
851
  configFile: fileName,
749
852
  ...options
750
853
  })
751
854
  ]);
752
855
  return defu(configs[0] ?? {}, configs[1] ?? {});
753
- }, "getConfigFileByName");
754
- var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
856
+ };
857
+ var getConfigFile = async (filePath, additionalFileNames = []) => {
755
858
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
756
859
  const result = await getConfigFileByName("storm-workspace", workspacePath);
757
860
  let config = result.config;
758
861
  const configFile = result.configFile;
759
862
  if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
760
- writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
761
- logLevel: "all"
762
- });
863
+ writeTrace(
864
+ `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
865
+ {
866
+ logLevel: "all"
867
+ }
868
+ );
763
869
  }
764
870
  if (additionalFileNames && additionalFileNames.length > 0) {
765
- const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
871
+ const results = await Promise.all(
872
+ additionalFileNames.map(
873
+ (fileName) => getConfigFileByName(fileName, workspacePath)
874
+ )
875
+ );
766
876
  for (const result2 of results) {
767
877
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
768
878
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
769
- writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
770
- logLevel: "all"
771
- });
879
+ writeTrace(
880
+ `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
881
+ {
882
+ logLevel: "all"
883
+ }
884
+ );
772
885
  }
773
886
  config = defu(result2.config ?? {}, config ?? {});
774
887
  }
@@ -779,7 +892,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
779
892
  }
780
893
  config.configFile = configFile;
781
894
  return config;
782
- }, "getConfigFile");
895
+ };
783
896
 
784
897
  // ../config-tools/src/create-storm-config.ts
785
898
  init_esm_shims();
@@ -787,17 +900,19 @@ import defu2 from "defu";
787
900
 
788
901
  // ../config-tools/src/env/get-env.ts
789
902
  init_esm_shims();
790
- var getExtensionEnv = /* @__PURE__ */ __name((extensionName) => {
903
+ var getExtensionEnv = (extensionName) => {
791
904
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
792
905
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
793
- const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
906
+ const name = key.replace(prefix, "").split("_").map(
907
+ (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
908
+ ).join("");
794
909
  if (name) {
795
910
  ret[name] = process.env[key];
796
911
  }
797
912
  return ret;
798
913
  }, {});
799
- }, "getExtensionEnv");
800
- var getConfigEnv = /* @__PURE__ */ __name(() => {
914
+ };
915
+ var getConfigEnv = () => {
801
916
  const prefix = "STORM_";
802
917
  let config = {
803
918
  extends: process.env[`${prefix}EXTENDS`] || void 0,
@@ -865,14 +980,25 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
865
980
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
866
981
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
867
982
  },
868
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
983
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
984
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
985
+ ) ? getLogLevelLabel(
986
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
987
+ ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
869
988
  skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
870
989
  };
871
- const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
872
- config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
873
- ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
874
- return ret;
875
- }, {}) : getThemeColorConfigEnv(prefix);
990
+ const themeNames = Object.keys(process.env).filter(
991
+ (envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
992
+ (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
993
+ )
994
+ );
995
+ config.colors = themeNames.length > 0 ? themeNames.reduce(
996
+ (ret, themeName) => {
997
+ ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
998
+ return ret;
999
+ },
1000
+ {}
1001
+ ) : getThemeColorConfigEnv(prefix);
876
1002
  if (config.docs === STORM_DEFAULT_DOCS) {
877
1003
  if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
878
1004
  config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
@@ -893,23 +1019,17 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
893
1019
  config = {
894
1020
  ...config,
895
1021
  ...parsed,
896
- colors: {
897
- ...config.colors,
898
- ...parsed.colors
899
- },
900
- extensions: {
901
- ...config.extensions,
902
- ...parsed.extensions
903
- }
1022
+ colors: { ...config.colors, ...parsed.colors },
1023
+ extensions: { ...config.extensions, ...parsed.extensions }
904
1024
  };
905
1025
  }
906
1026
  return config;
907
- }, "getConfigEnv");
908
- var getThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, theme) => {
1027
+ };
1028
+ var getThemeColorConfigEnv = (prefix, theme) => {
909
1029
  const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
910
1030
  return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
911
- }, "getThemeColorConfigEnv");
912
- var getSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
1031
+ };
1032
+ var getSingleThemeColorConfigEnv = (prefix) => {
913
1033
  return {
914
1034
  dark: process.env[`${prefix}DARK`],
915
1035
  light: process.env[`${prefix}LIGHT`],
@@ -926,14 +1046,16 @@ var getSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
926
1046
  positive: process.env[`${prefix}POSITIVE`],
927
1047
  negative: process.env[`${prefix}NEGATIVE`]
928
1048
  };
929
- }, "getSingleThemeColorConfigEnv");
930
- var getMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
1049
+ };
1050
+ var getMultiThemeColorConfigEnv = (prefix) => {
931
1051
  return {
932
- light: getBaseThemeColorConfigEnv(`${prefix}_LIGHT_`),
1052
+ light: getBaseThemeColorConfigEnv(
1053
+ `${prefix}_LIGHT_`
1054
+ ),
933
1055
  dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
934
1056
  };
935
- }, "getMultiThemeColorConfigEnv");
936
- var getBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
1057
+ };
1058
+ var getBaseThemeColorConfigEnv = (prefix) => {
937
1059
  return {
938
1060
  foreground: process.env[`${prefix}FOREGROUND`],
939
1061
  background: process.env[`${prefix}BACKGROUND`],
@@ -950,14 +1072,17 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
950
1072
  positive: process.env[`${prefix}POSITIVE`],
951
1073
  negative: process.env[`${prefix}NEGATIVE`]
952
1074
  };
953
- }, "getBaseThemeColorConfigEnv");
1075
+ };
954
1076
 
955
1077
  // ../config-tools/src/env/set-env.ts
956
1078
  init_esm_shims();
957
- var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
1079
+ var setExtensionEnv = (extensionName, extension) => {
958
1080
  for (const key of Object.keys(extension ?? {})) {
959
1081
  if (extension[key]) {
960
- const result = key?.replace(/([A-Z])+/g, (input) => input ? input[0]?.toUpperCase() + input.slice(1) : "").split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
1082
+ const result = key?.replace(
1083
+ /([A-Z])+/g,
1084
+ (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
1085
+ ).split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
961
1086
  let extensionKey;
962
1087
  if (result.length === 0) {
963
1088
  return;
@@ -972,8 +1097,8 @@ var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
972
1097
  process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
973
1098
  }
974
1099
  }
975
- }, "setExtensionEnv");
976
- var setConfigEnv = /* @__PURE__ */ __name((config) => {
1100
+ };
1101
+ var setConfigEnv = (config) => {
977
1102
  const prefix = "STORM_";
978
1103
  if (config.extends) {
979
1104
  process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
@@ -1062,7 +1187,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1062
1187
  }
1063
1188
  if (config.directories) {
1064
1189
  if (!config.skipCache && config.directories.cache) {
1065
- process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
1190
+ process.env[`${prefix}CACHE_DIR`] = correctPaths(
1191
+ config.directories.cache
1192
+ );
1066
1193
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
1067
1194
  }
1068
1195
  if (config.directories.data) {
@@ -1070,7 +1197,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1070
1197
  process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
1071
1198
  }
1072
1199
  if (config.directories.config) {
1073
- process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
1200
+ process.env[`${prefix}CONFIG_DIR`] = correctPaths(
1201
+ config.directories.config
1202
+ );
1074
1203
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
1075
1204
  }
1076
1205
  if (config.directories.temp) {
@@ -1082,7 +1211,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1082
1211
  process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
1083
1212
  }
1084
1213
  if (config.directories.build) {
1085
- process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
1214
+ process.env[`${prefix}BUILD_DIR`] = correctPaths(
1215
+ config.directories.build
1216
+ );
1086
1217
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
1087
1218
  }
1088
1219
  }
@@ -1103,7 +1234,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1103
1234
  setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1104
1235
  }
1105
1236
  } else {
1106
- setThemeColorConfigEnv(`${prefix}COLOR_`, config.colors);
1237
+ setThemeColorConfigEnv(
1238
+ `${prefix}COLOR_`,
1239
+ config.colors
1240
+ );
1107
1241
  }
1108
1242
  if (config.repository) {
1109
1243
  process.env[`${prefix}REPOSITORY`] = config.repository;
@@ -1115,7 +1249,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1115
1249
  process.env[`${prefix}PRE_ID`] = String(config.preid);
1116
1250
  }
1117
1251
  if (config.externalPackagePatterns) {
1118
- process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(config.externalPackagePatterns);
1252
+ process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(
1253
+ config.externalPackagePatterns
1254
+ );
1119
1255
  }
1120
1256
  if (config.registry) {
1121
1257
  if (config.registry.github) {
@@ -1128,20 +1264,28 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1128
1264
  process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
1129
1265
  }
1130
1266
  if (config.registry.cyclone) {
1131
- process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
1267
+ process.env[`${prefix}REGISTRY_CYCLONE`] = String(
1268
+ config.registry.cyclone
1269
+ );
1132
1270
  }
1133
1271
  if (config.registry.container) {
1134
- process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
1272
+ process.env[`${prefix}REGISTRY_CONTAINER`] = String(
1273
+ config.registry.container
1274
+ );
1135
1275
  }
1136
1276
  }
1137
1277
  if (config.logLevel) {
1138
1278
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
1139
1279
  process.env.LOG_LEVEL = String(config.logLevel);
1140
- process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
1280
+ process.env.NX_VERBOSE_LOGGING = String(
1281
+ getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
1282
+ );
1141
1283
  process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
1142
1284
  }
1143
1285
  if (config.skipConfigLogging !== void 0) {
1144
- process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
1286
+ process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
1287
+ config.skipConfigLogging
1288
+ );
1145
1289
  }
1146
1290
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
1147
1291
  for (const key of Object.keys(config.extensions ?? {})) {
@@ -1149,11 +1293,11 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1149
1293
  setExtensionEnv(key, config.extensions[key]);
1150
1294
  }
1151
1295
  }
1152
- }, "setConfigEnv");
1153
- var setThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1296
+ };
1297
+ var setThemeColorConfigEnv = (prefix, config) => {
1154
1298
  return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
1155
- }, "setThemeColorConfigEnv");
1156
- var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1299
+ };
1300
+ var setSingleThemeColorConfigEnv = (prefix, config) => {
1157
1301
  if (config.dark) {
1158
1302
  process.env[`${prefix}DARK`] = config.dark;
1159
1303
  }
@@ -1196,14 +1340,14 @@ var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1196
1340
  if (config.negative) {
1197
1341
  process.env[`${prefix}NEGATIVE`] = config.negative;
1198
1342
  }
1199
- }, "setSingleThemeColorConfigEnv");
1200
- var setMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1343
+ };
1344
+ var setMultiThemeColorConfigEnv = (prefix, config) => {
1201
1345
  return {
1202
1346
  light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
1203
1347
  dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
1204
1348
  };
1205
- }, "setMultiThemeColorConfigEnv");
1206
- var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1349
+ };
1350
+ var setBaseThemeColorConfigEnv = (prefix, config) => {
1207
1351
  if (config.foreground) {
1208
1352
  process.env[`${prefix}FOREGROUND`] = config.foreground;
1209
1353
  }
@@ -1246,12 +1390,12 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1246
1390
  if (config.negative) {
1247
1391
  process.env[`${prefix}NEGATIVE`] = config.negative;
1248
1392
  }
1249
- }, "setBaseThemeColorConfigEnv");
1393
+ };
1250
1394
 
1251
1395
  // ../config-tools/src/create-storm-config.ts
1252
1396
  var _extension_cache = /* @__PURE__ */ new WeakMap();
1253
1397
  var _static_cache = void 0;
1254
- var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot3, skipLogs = false, useDefault = true) => {
1398
+ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot3, skipLogs = false, useDefault = true) => {
1255
1399
  let result;
1256
1400
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
1257
1401
  let _workspaceRoot = workspaceRoot3;
@@ -1262,16 +1406,19 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
1262
1406
  const configFile = await getConfigFile(_workspaceRoot);
1263
1407
  if (!configFile) {
1264
1408
  if (!skipLogs) {
1265
- writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
1266
- logLevel: "all"
1267
- });
1409
+ writeWarning(
1410
+ "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
1411
+ { logLevel: "all" }
1412
+ );
1268
1413
  }
1269
1414
  if (useDefault === false) {
1270
1415
  return void 0;
1271
1416
  }
1272
1417
  }
1273
1418
  const defaultConfig = await getDefaultConfig(_workspaceRoot);
1274
- result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
1419
+ result = await stormWorkspaceConfigSchema.parseAsync(
1420
+ defu2(configEnv, configFile, defaultConfig)
1421
+ );
1275
1422
  result.workspaceRoot ??= _workspaceRoot;
1276
1423
  } else {
1277
1424
  result = _static_cache.data;
@@ -1287,11 +1434,9 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
1287
1434
  data: result
1288
1435
  };
1289
1436
  return result;
1290
- }, "createStormWorkspaceConfig");
1291
- var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1292
- const extension_cache_key = {
1293
- extensionName
1294
- };
1437
+ };
1438
+ var createConfigExtension = (extensionName, schema) => {
1439
+ const extension_cache_key = { extensionName };
1295
1440
  if (_extension_cache.has(extension_cache_key)) {
1296
1441
  return _extension_cache.get(extension_cache_key);
1297
1442
  }
@@ -1301,39 +1446,50 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1301
1446
  }
1302
1447
  _extension_cache.set(extension_cache_key, extension);
1303
1448
  return extension;
1304
- }, "createConfigExtension");
1305
- var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot3, skipLogs = false) => {
1306
- const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot3, skipLogs, true);
1449
+ };
1450
+ var loadStormWorkspaceConfig = async (workspaceRoot3, skipLogs = false) => {
1451
+ const config = await createStormWorkspaceConfig(
1452
+ void 0,
1453
+ void 0,
1454
+ workspaceRoot3,
1455
+ skipLogs,
1456
+ true
1457
+ );
1307
1458
  setConfigEnv(config);
1308
1459
  if (!skipLogs && !config.skipConfigLogging) {
1309
- writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
1310
- ${formatLogMessage(config)}`, config);
1460
+ writeTrace(
1461
+ `\u2699\uFE0F Using Storm Workspace configuration:
1462
+ ${formatLogMessage(config)}`,
1463
+ config
1464
+ );
1311
1465
  }
1312
1466
  return config;
1313
- }, "loadStormWorkspaceConfig");
1467
+ };
1314
1468
 
1315
1469
  // ../config-tools/src/get-config.ts
1316
1470
  init_esm_shims();
1317
- var getConfig = /* @__PURE__ */ __name((workspaceRoot3, skipLogs = false) => {
1471
+ var getConfig = (workspaceRoot3, skipLogs = false) => {
1318
1472
  return loadStormWorkspaceConfig(workspaceRoot3, skipLogs);
1319
- }, "getConfig");
1320
- var getWorkspaceConfig = /* @__PURE__ */ __name((skipLogs = false, options = {}) => {
1473
+ };
1474
+ var getWorkspaceConfig = (skipLogs = false, options = {}) => {
1321
1475
  let workspaceRoot3 = options.workspaceRoot;
1322
1476
  if (!workspaceRoot3) {
1323
1477
  workspaceRoot3 = findWorkspaceRoot(options.cwd);
1324
1478
  }
1325
1479
  return getConfig(workspaceRoot3, skipLogs);
1326
- }, "getWorkspaceConfig");
1480
+ };
1327
1481
 
1328
1482
  // ../workspace-tools/src/base/base-executor.ts
1329
1483
  import { defu as defu3 } from "defu";
1330
- var withRunExecutor = /* @__PURE__ */ __name((name, executorFn, executorOptions = {}) => async (_options, context) => {
1484
+ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
1331
1485
  const stopwatch = getStopwatch(name);
1332
1486
  let options = _options;
1333
1487
  let config = {};
1334
1488
  try {
1335
1489
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
1336
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1490
+ throw new Error(
1491
+ "The Build process failed because the context is not valid. Please run this command from a workspace."
1492
+ );
1337
1493
  }
1338
1494
  const workspaceRoot3 = findWorkspaceRoot();
1339
1495
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot3;
@@ -1342,35 +1498,50 @@ var withRunExecutor = /* @__PURE__ */ __name((name, executorFn, executorOptions
1342
1498
  config.workspaceRoot = workspaceRoot3;
1343
1499
  writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
1344
1500
  if (!executorOptions.skipReadingConfig) {
1345
- writeTrace(`Loading the Storm Config from environment variables and storm.config.js file...
1501
+ writeTrace(
1502
+ `Loading the Storm Config from environment variables and storm.config.js file...
1346
1503
  - workspaceRoot: ${workspaceRoot3}
1347
1504
  - projectRoot: ${projectRoot}
1348
1505
  - sourceRoot: ${sourceRoot}
1349
1506
  - projectName: ${projectName}
1350
- `, config);
1507
+ `,
1508
+ config
1509
+ );
1351
1510
  config = await getConfig(workspaceRoot3);
1352
1511
  }
1353
1512
  if (executorOptions?.hooks?.applyDefaultOptions) {
1354
1513
  writeDebug("Running the applyDefaultOptions hook...", config);
1355
- options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
1514
+ options = await Promise.resolve(
1515
+ executorOptions.hooks.applyDefaultOptions(options, config)
1516
+ );
1356
1517
  writeDebug("Completed the applyDefaultOptions hook", config);
1357
1518
  }
1358
- writeTrace(`Executor schema options \u2699\uFE0F
1519
+ writeTrace(
1520
+ `Executor schema options \u2699\uFE0F
1359
1521
  ${formatLogMessage(options)}
1360
- `, config);
1361
- const tokenized = await applyWorkspaceTokens(options, defu3({
1362
- workspaceRoot: workspaceRoot3,
1363
- projectRoot,
1364
- sourceRoot,
1365
- projectName,
1522
+ `,
1366
1523
  config
1367
- }, config, context.projectsConfigurations.projects[context.projectName]), applyWorkspaceProjectTokens);
1368
- writeTrace(`Executor schema tokenized options \u2699\uFE0F
1524
+ );
1525
+ const tokenized = await applyWorkspaceTokens(
1526
+ options,
1527
+ defu3(
1528
+ { workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config },
1529
+ config,
1530
+ context.projectsConfigurations.projects[context.projectName]
1531
+ ),
1532
+ applyWorkspaceProjectTokens
1533
+ );
1534
+ writeTrace(
1535
+ `Executor schema tokenized options \u2699\uFE0F
1369
1536
  ${formatLogMessage(tokenized)}
1370
- `, config);
1537
+ `,
1538
+ config
1539
+ );
1371
1540
  if (executorOptions?.hooks?.preProcess) {
1372
1541
  writeDebug("Running the preProcess hook...", config);
1373
- await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
1542
+ await Promise.resolve(
1543
+ executorOptions.hooks.preProcess(tokenized, config)
1544
+ );
1374
1545
  writeDebug("Completed the preProcess hook", config);
1375
1546
  }
1376
1547
  const ret = executorFn(tokenized, context, config);
@@ -1380,10 +1551,15 @@ ${formatLogMessage(tokenized)}
1380
1551
  void iter;
1381
1552
  }
1382
1553
  }
1383
- const result = await Promise.resolve(ret);
1554
+ const result = await Promise.resolve(
1555
+ ret
1556
+ );
1384
1557
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
1385
- writeTrace(`Failure determined by the ${name} executor
1386
- ${formatLogMessage(result)}`, config);
1558
+ writeTrace(
1559
+ `Failure determined by the ${name} executor
1560
+ ${formatLogMessage(result)}`,
1561
+ config
1562
+ );
1387
1563
  console.error(result);
1388
1564
  throw new Error(`The ${name} executor failed to run`, {
1389
1565
  cause: result?.error
@@ -1400,29 +1576,38 @@ ${formatLogMessage(result)}`, config);
1400
1576
  success: true
1401
1577
  };
1402
1578
  } catch (error) {
1403
- writeFatal("A fatal error occurred while running the executor - the process was forced to terminate", config);
1404
- writeError(`An exception was thrown in the executor's process
1579
+ writeFatal(
1580
+ "A fatal error occurred while running the executor - the process was forced to terminate",
1581
+ config
1582
+ );
1583
+ writeError(
1584
+ `An exception was thrown in the executor's process
1405
1585
  - Details: ${error.message}
1406
- - Stacktrace: ${error.stack}`, config);
1586
+ - Stacktrace: ${error.stack}`,
1587
+ config
1588
+ );
1407
1589
  return {
1408
1590
  success: false
1409
1591
  };
1410
1592
  } finally {
1411
1593
  stopwatch();
1412
1594
  }
1413
- }, "withRunExecutor");
1414
- var _isFunction2 = /* @__PURE__ */ __name((value) => {
1595
+ };
1596
+ var _isFunction2 = (value) => {
1415
1597
  try {
1416
1598
  return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
1417
1599
  } catch (e) {
1418
1600
  return false;
1419
1601
  }
1420
- }, "_isFunction");
1602
+ };
1421
1603
 
1422
1604
  // ../workspace-tools/src/utils/cargo.ts
1423
1605
  init_esm_shims();
1424
1606
  import { joinPathFragments, workspaceRoot } from "@nx/devkit";
1425
- import { execSync, spawn } from "node:child_process";
1607
+ import {
1608
+ execSync,
1609
+ spawn
1610
+ } from "node:child_process";
1426
1611
  import { relative } from "node:path";
1427
1612
  var INVALID_CARGO_ARGS = [
1428
1613
  "allFeatures",
@@ -1432,7 +1617,7 @@ var INVALID_CARGO_ARGS = [
1432
1617
  "package",
1433
1618
  "tsConfig"
1434
1619
  ];
1435
- var buildCargoCommand = /* @__PURE__ */ __name((baseCommand, options, context) => {
1620
+ var buildCargoCommand = (baseCommand, options, context) => {
1436
1621
  const args = [];
1437
1622
  if (options.toolchain && options.toolchain !== "stable") {
1438
1623
  args.push(`+${options.toolchain}`);
@@ -1470,13 +1655,12 @@ var buildCargoCommand = /* @__PURE__ */ __name((baseCommand, options, context) =
1470
1655
  args.push("--target-dir", options.outputPath);
1471
1656
  }
1472
1657
  return args;
1473
- }, "buildCargoCommand");
1658
+ };
1474
1659
  async function cargoCommand(...args) {
1475
1660
  console.log(`> cargo ${args.join(" ")}`);
1476
1661
  args.push("--color", "always");
1477
1662
  return await Promise.resolve(runProcess("cargo", ...args));
1478
1663
  }
1479
- __name(cargoCommand, "cargoCommand");
1480
1664
  function cargoCommandSync(args = "", options) {
1481
1665
  const normalizedOptions = {
1482
1666
  stdio: options?.stdio ?? "inherit",
@@ -1503,7 +1687,6 @@ function cargoCommandSync(args = "", options) {
1503
1687
  };
1504
1688
  }
1505
1689
  }
1506
- __name(cargoCommandSync, "cargoCommandSync");
1507
1690
  function cargoMetadata() {
1508
1691
  const output3 = cargoCommandSync("metadata --format-version=1", {
1509
1692
  stdio: "pipe"
@@ -1514,15 +1697,12 @@ function cargoMetadata() {
1514
1697
  }
1515
1698
  return JSON.parse(output3.output);
1516
1699
  }
1517
- __name(cargoMetadata, "cargoMetadata");
1518
1700
  function runProcess(processCmd, ...args) {
1519
1701
  const metadata = cargoMetadata();
1520
1702
  const targetDir = metadata?.target_directory ?? joinPathFragments(workspaceRoot, "dist", "cargo");
1521
1703
  return new Promise((resolve) => {
1522
1704
  if (process.env.VERCEL) {
1523
- return resolve({
1524
- success: true
1525
- });
1705
+ return resolve({ success: true });
1526
1706
  }
1527
1707
  execSync(`${processCmd} ${args.join(" ")}`, {
1528
1708
  cwd: process.cwd(),
@@ -1533,35 +1713,31 @@ function runProcess(processCmd, ...args) {
1533
1713
  CARGO_BUILD_TARGET_DIR: targetDir
1534
1714
  },
1535
1715
  windowsHide: true,
1536
- stdio: [
1537
- "inherit",
1538
- "inherit",
1539
- "inherit"
1540
- ]
1541
- });
1542
- resolve({
1543
- success: true
1716
+ stdio: ["inherit", "inherit", "inherit"]
1544
1717
  });
1718
+ resolve({ success: true });
1545
1719
  });
1546
1720
  }
1547
- __name(runProcess, "runProcess");
1548
1721
 
1549
1722
  // ../workspace-tools/src/executors/cargo-build/executor.ts
1550
1723
  async function cargoBuildExecutor(options, context) {
1551
1724
  const command = buildCargoCommand("build", options, context);
1552
1725
  return await cargoCommand(...command);
1553
1726
  }
1554
- __name(cargoBuildExecutor, "cargoBuildExecutor");
1555
- var executor_default = withRunExecutor("Cargo Build", cargoBuildExecutor, {
1556
- skipReadingConfig: false,
1557
- hooks: {
1558
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1559
- options.outputPath ??= "dist/target/{projectRoot}";
1560
- options.toolchain ??= "stable";
1561
- return options;
1562
- }, "applyDefaultOptions")
1727
+ var executor_default = withRunExecutor(
1728
+ "Cargo Build",
1729
+ cargoBuildExecutor,
1730
+ {
1731
+ skipReadingConfig: false,
1732
+ hooks: {
1733
+ applyDefaultOptions: (options) => {
1734
+ options.outputPath ??= "dist/target/{projectRoot}";
1735
+ options.toolchain ??= "stable";
1736
+ return options;
1737
+ }
1738
+ }
1563
1739
  }
1564
- });
1740
+ );
1565
1741
 
1566
1742
  // ../workspace-tools/src/executors/cargo-check/executor.ts
1567
1743
  init_esm_shims();
@@ -1569,16 +1745,19 @@ async function cargoCheckExecutor(options, context) {
1569
1745
  const command = buildCargoCommand("check", options, context);
1570
1746
  return await cargoCommand(...command);
1571
1747
  }
1572
- __name(cargoCheckExecutor, "cargoCheckExecutor");
1573
- var executor_default2 = withRunExecutor("Cargo Check", cargoCheckExecutor, {
1574
- skipReadingConfig: false,
1575
- hooks: {
1576
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1577
- options.toolchain ??= "stable";
1578
- return options;
1579
- }, "applyDefaultOptions")
1748
+ var executor_default2 = withRunExecutor(
1749
+ "Cargo Check",
1750
+ cargoCheckExecutor,
1751
+ {
1752
+ skipReadingConfig: false,
1753
+ hooks: {
1754
+ applyDefaultOptions: (options) => {
1755
+ options.toolchain ??= "stable";
1756
+ return options;
1757
+ }
1758
+ }
1580
1759
  }
1581
- });
1760
+ );
1582
1761
 
1583
1762
  // ../workspace-tools/src/executors/cargo-clippy/executor.ts
1584
1763
  init_esm_shims();
@@ -1586,46 +1765,50 @@ async function cargoClippyExecutor(options, context) {
1586
1765
  const command = buildCargoCommand("clippy", options, context);
1587
1766
  return await cargoCommand(...command);
1588
1767
  }
1589
- __name(cargoClippyExecutor, "cargoClippyExecutor");
1590
- var executor_default3 = withRunExecutor("Cargo Clippy", cargoClippyExecutor, {
1591
- skipReadingConfig: false,
1592
- hooks: {
1593
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1594
- options.toolchain ??= "stable";
1595
- options.fix ??= false;
1596
- return options;
1597
- }, "applyDefaultOptions")
1768
+ var executor_default3 = withRunExecutor(
1769
+ "Cargo Clippy",
1770
+ cargoClippyExecutor,
1771
+ {
1772
+ skipReadingConfig: false,
1773
+ hooks: {
1774
+ applyDefaultOptions: (options) => {
1775
+ options.toolchain ??= "stable";
1776
+ options.fix ??= false;
1777
+ return options;
1778
+ }
1779
+ }
1598
1780
  }
1599
- });
1781
+ );
1600
1782
 
1601
1783
  // ../workspace-tools/src/executors/cargo-doc/executor.ts
1602
1784
  init_esm_shims();
1603
1785
  async function cargoDocExecutor(options, context) {
1604
- const opts = {
1605
- ...options
1606
- };
1786
+ const opts = { ...options };
1607
1787
  opts["no-deps"] = opts.noDeps;
1608
1788
  delete opts.noDeps;
1609
1789
  const command = buildCargoCommand("doc", options, context);
1610
1790
  return await cargoCommand(...command);
1611
1791
  }
1612
- __name(cargoDocExecutor, "cargoDocExecutor");
1613
- var executor_default4 = withRunExecutor("Cargo Doc", cargoDocExecutor, {
1614
- skipReadingConfig: false,
1615
- hooks: {
1616
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1617
- options.outputPath ??= "dist/docs/{projectRoot}";
1618
- options.toolchain ??= "stable";
1619
- options.release ??= options.profile ? false : true;
1620
- options.allFeatures ??= true;
1621
- options.lib ??= true;
1622
- options.bins ??= true;
1623
- options.examples ??= true;
1624
- options.noDeps ??= false;
1625
- return options;
1626
- }, "applyDefaultOptions")
1792
+ var executor_default4 = withRunExecutor(
1793
+ "Cargo Doc",
1794
+ cargoDocExecutor,
1795
+ {
1796
+ skipReadingConfig: false,
1797
+ hooks: {
1798
+ applyDefaultOptions: (options) => {
1799
+ options.outputPath ??= "dist/docs/{projectRoot}";
1800
+ options.toolchain ??= "stable";
1801
+ options.release ??= options.profile ? false : true;
1802
+ options.allFeatures ??= true;
1803
+ options.lib ??= true;
1804
+ options.bins ??= true;
1805
+ options.examples ??= true;
1806
+ options.noDeps ??= false;
1807
+ return options;
1808
+ }
1809
+ }
1627
1810
  }
1628
- });
1811
+ );
1629
1812
 
1630
1813
  // ../workspace-tools/src/executors/cargo-format/executor.ts
1631
1814
  init_esm_shims();
@@ -1633,17 +1816,20 @@ async function cargoFormatExecutor(options, context) {
1633
1816
  const command = buildCargoCommand("fmt", options, context);
1634
1817
  return await cargoCommand(...command);
1635
1818
  }
1636
- __name(cargoFormatExecutor, "cargoFormatExecutor");
1637
- var executor_default5 = withRunExecutor("Cargo Format", cargoFormatExecutor, {
1638
- skipReadingConfig: false,
1639
- hooks: {
1640
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1641
- options.outputPath ??= "dist/target/{projectRoot}";
1642
- options.toolchain ??= "stable";
1643
- return options;
1644
- }, "applyDefaultOptions")
1819
+ var executor_default5 = withRunExecutor(
1820
+ "Cargo Format",
1821
+ cargoFormatExecutor,
1822
+ {
1823
+ skipReadingConfig: false,
1824
+ hooks: {
1825
+ applyDefaultOptions: (options) => {
1826
+ options.outputPath ??= "dist/target/{projectRoot}";
1827
+ options.toolchain ??= "stable";
1828
+ return options;
1829
+ }
1830
+ }
1645
1831
  }
1646
- });
1832
+ );
1647
1833
 
1648
1834
  // ../workspace-tools/src/executors/cargo-publish/executor.ts
1649
1835
  init_esm_shims();
@@ -1718,7 +1904,7 @@ init_esm_shims();
1718
1904
  import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
1719
1905
  import { glob } from "glob";
1720
1906
  import { readFile as readFile2, writeFile } from "node:fs/promises";
1721
- var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
1907
+ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
1722
1908
  const pendingAssets = Array.from(assets ?? []);
1723
1909
  pendingAssets.push({
1724
1910
  input: projectRoot,
@@ -1744,8 +1930,11 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
1744
1930
  output: "src/"
1745
1931
  });
1746
1932
  }
1747
- writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
1748
- ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`, config);
1933
+ writeTrace(
1934
+ `\u{1F4DD} Copying the following assets to the output directory:
1935
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
1936
+ config
1937
+ );
1749
1938
  const assetHandler = new CopyAssetsHandler({
1750
1939
  projectDir: projectRoot,
1751
1940
  rootDir: config.workspaceRoot,
@@ -1754,20 +1943,33 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
1754
1943
  });
1755
1944
  await assetHandler.processAllAssetsOnce();
1756
1945
  if (includeSrc === true) {
1757
- writeDebug(`\u{1F4DD} Adding banner and writing source files: ${joinPaths(outputPath, "src")}`, config);
1946
+ writeDebug(
1947
+ `\u{1F4DD} Adding banner and writing source files: ${joinPaths(
1948
+ outputPath,
1949
+ "src"
1950
+ )}`,
1951
+ config
1952
+ );
1758
1953
  const files = await glob([
1759
1954
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.ts"),
1760
1955
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.tsx"),
1761
1956
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
1762
1957
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
1763
1958
  ]);
1764
- await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
1959
+ await Promise.allSettled(
1960
+ files.map(
1961
+ async (file) => writeFile(
1962
+ file,
1963
+ `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
1765
1964
 
1766
1965
  ${await readFile2(file, "utf8")}
1767
1966
 
1768
- ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
1967
+ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
1968
+ )
1969
+ )
1970
+ );
1769
1971
  }
1770
- }, "copyAssets");
1972
+ };
1771
1973
 
1772
1974
  // ../build-tools/src/utilities/generate-package-json.ts
1773
1975
  init_esm_shims();
@@ -1775,8 +1977,12 @@ import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildabl
1775
1977
  import { Glob } from "glob";
1776
1978
  import { existsSync as existsSync3, readFileSync as readFileSync2 } from "node:fs";
1777
1979
  import { readFile as readFile3 } from "node:fs/promises";
1778
- import { createProjectGraphAsync, readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "nx/src/project-graph/project-graph";
1779
- var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, projectRoot, projectName, packageJson) => {
1980
+ import {
1981
+ createProjectGraphAsync,
1982
+ readCachedProjectGraph,
1983
+ readProjectsConfigurationFromProjectGraph
1984
+ } from "nx/src/project-graph/project-graph";
1985
+ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, packageJson) => {
1780
1986
  let projectGraph;
1781
1987
  try {
1782
1988
  projectGraph = readCachedProjectGraph();
@@ -1785,16 +1991,35 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
1785
1991
  projectGraph = readCachedProjectGraph();
1786
1992
  }
1787
1993
  if (!projectGraph) {
1788
- throw new Error("The Build process failed because the project graph is not available. Please run the build command again.");
1994
+ throw new Error(
1995
+ "The Build process failed because the project graph is not available. Please run the build command again."
1996
+ );
1789
1997
  }
1790
- const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
1998
+ const projectDependencies = calculateProjectBuildableDependencies(
1999
+ void 0,
2000
+ projectGraph,
2001
+ workspaceRoot3,
2002
+ projectName,
2003
+ process.env.NX_TASK_TARGET_TARGET || "build",
2004
+ process.env.NX_TASK_TARGET_CONFIGURATION || "production",
2005
+ true
2006
+ );
1791
2007
  const localPackages = [];
1792
- for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot3)) {
2008
+ for (const project of projectDependencies.dependencies.filter(
2009
+ (dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot3
2010
+ )) {
1793
2011
  const projectNode = project.node;
1794
2012
  if (projectNode.data.root) {
1795
- const projectPackageJsonPath = joinPaths(workspaceRoot3, projectNode.data.root, "package.json");
2013
+ const projectPackageJsonPath = joinPaths(
2014
+ workspaceRoot3,
2015
+ projectNode.data.root,
2016
+ "package.json"
2017
+ );
1796
2018
  if (existsSync3(projectPackageJsonPath)) {
1797
- const projectPackageJsonContent = await readFile3(projectPackageJsonPath, "utf8");
2019
+ const projectPackageJsonContent = await readFile3(
2020
+ projectPackageJsonPath,
2021
+ "utf8"
2022
+ );
1798
2023
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
1799
2024
  if (projectPackageJson.private !== true) {
1800
2025
  localPackages.push(projectPackageJson);
@@ -1803,19 +2028,33 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
1803
2028
  }
1804
2029
  }
1805
2030
  if (localPackages.length > 0) {
1806
- writeTrace(`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
1807
- const projectJsonFile = await readFile3(joinPaths(projectRoot, "project.json"), "utf8");
2031
+ writeTrace(
2032
+ `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
2033
+ );
2034
+ const projectJsonFile = await readFile3(
2035
+ joinPaths(projectRoot, "project.json"),
2036
+ "utf8"
2037
+ );
1808
2038
  const projectJson = JSON.parse(projectJsonFile);
1809
2039
  const projectName2 = projectJson.name;
1810
2040
  const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
1811
2041
  if (!projectConfigurations?.projects?.[projectName2]) {
1812
- throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
2042
+ throw new Error(
2043
+ "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."
2044
+ );
1813
2045
  }
1814
2046
  const implicitDependencies = projectConfigurations.projects?.[projectName2].implicitDependencies?.reduce((ret, dep) => {
1815
2047
  if (projectConfigurations.projects?.[dep]) {
1816
- const depPackageJsonPath = joinPaths(workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
2048
+ const depPackageJsonPath = joinPaths(
2049
+ workspaceRoot3,
2050
+ projectConfigurations.projects[dep].root,
2051
+ "package.json"
2052
+ );
1817
2053
  if (existsSync3(depPackageJsonPath)) {
1818
- const depPackageJsonContent = readFileSync2(depPackageJsonPath, "utf8");
2054
+ const depPackageJsonContent = readFileSync2(
2055
+ depPackageJsonPath,
2056
+ "utf8"
2057
+ );
1819
2058
  const depPackageJson = JSON.parse(depPackageJsonContent);
1820
2059
  if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
1821
2060
  ret.push(depPackageJson.name);
@@ -1840,10 +2079,13 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
1840
2079
  writeTrace("\u{1F4E6} No local packages dependencies to add to package.json");
1841
2080
  }
1842
2081
  return packageJson;
1843
- }, "addPackageDependencies");
1844
- var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
2082
+ };
2083
+ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
1845
2084
  const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
1846
- const workspacePackageJsonContent = await readFile3(joinPaths(workspaceRoot3, "package.json"), "utf8");
2085
+ const workspacePackageJsonContent = await readFile3(
2086
+ joinPaths(workspaceRoot3, "package.json"),
2087
+ "utf8"
2088
+ );
1847
2089
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
1848
2090
  packageJson.type ??= "module";
1849
2091
  packageJson.sideEffects ??= false;
@@ -1854,9 +2096,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfi
1854
2096
  }
1855
2097
  packageJson.source ??= `${joinPaths(distSrc, "index.ts").replaceAll("\\", "/")}`;
1856
2098
  }
1857
- packageJson.files ??= [
1858
- "dist/**/*"
1859
- ];
2099
+ packageJson.files ??= ["dist/**/*"];
1860
2100
  if (includeSrc === true && !packageJson.files.includes("src")) {
1861
2101
  packageJson.files.push("src/**/*");
1862
2102
  }
@@ -1872,20 +2112,16 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfi
1872
2112
  packageJson.author ??= workspacePackageJson.author;
1873
2113
  packageJson.maintainers ??= workspacePackageJson.maintainers;
1874
2114
  if (!packageJson.maintainers && packageJson.author) {
1875
- packageJson.maintainers = [
1876
- packageJson.author
1877
- ];
2115
+ packageJson.maintainers = [packageJson.author];
1878
2116
  }
1879
2117
  packageJson.contributors ??= workspacePackageJson.contributors;
1880
2118
  if (!packageJson.contributors && packageJson.author) {
1881
- packageJson.contributors = [
1882
- packageJson.author
1883
- ];
2119
+ packageJson.contributors = [packageJson.author];
1884
2120
  }
1885
2121
  packageJson.repository ??= workspacePackageJson.repository;
1886
2122
  packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
1887
2123
  return packageJson;
1888
- }, "addWorkspacePackageJsonFields");
2124
+ };
1889
2125
 
1890
2126
  // ../build-tools/src/utilities/get-entry-points.ts
1891
2127
  init_esm_shims();
@@ -1893,7 +2129,7 @@ import { glob as glob2 } from "glob";
1893
2129
 
1894
2130
  // ../build-tools/src/utilities/get-env.ts
1895
2131
  init_esm_shims();
1896
- var getEnv = /* @__PURE__ */ __name((builder, options) => {
2132
+ var getEnv = (builder, options) => {
1897
2133
  return {
1898
2134
  STORM_BUILD: builder,
1899
2135
  STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
@@ -1904,7 +2140,7 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
1904
2140
  STORM_TARGET: JSON.stringify(options.target),
1905
2141
  ...options.env
1906
2142
  };
1907
- }, "getEnv");
2143
+ };
1908
2144
 
1909
2145
  // ../build-tools/src/utilities/get-file-banner.ts
1910
2146
  init_esm_shims();
@@ -1922,34 +2158,46 @@ import { readFile as readFile4 } from "node:fs/promises";
1922
2158
 
1923
2159
  // ../build-tools/src/utilities/task-graph.ts
1924
2160
  init_esm_shims();
1925
- import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-runner/create-task-graph";
2161
+ import {
2162
+ createTaskGraph,
2163
+ mapTargetDefaultsToDependencies
2164
+ } from "nx/src/tasks-runner/create-task-graph";
1926
2165
 
1927
2166
  // ../esbuild/src/assets.ts
1928
2167
  async function copyBuildAssets(context) {
1929
2168
  if (context.result?.errors.length === 0) {
1930
- writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
2169
+ writeDebug(
2170
+ ` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
2171
+ context.workspaceConfig
2172
+ );
1931
2173
  const stopwatch = getStopwatch(`${context.options.name} asset copy`);
1932
- await copyAssets(context.workspaceConfig, context.options.assets ?? [], context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
2174
+ await copyAssets(
2175
+ context.workspaceConfig,
2176
+ context.options.assets ?? [],
2177
+ context.outputPath,
2178
+ context.options.projectRoot,
2179
+ context.sourceRoot,
2180
+ true,
2181
+ false
2182
+ );
1933
2183
  stopwatch();
1934
2184
  }
1935
2185
  return context;
1936
2186
  }
1937
- __name(copyBuildAssets, "copyBuildAssets");
1938
2187
 
1939
2188
  // ../esbuild/src/clean.ts
1940
2189
  init_esm_shims();
1941
2190
  import { rm } from "node:fs/promises";
1942
2191
  async function cleanDirectories(directory) {
1943
- await rm(directory, {
1944
- recursive: true,
1945
- force: true
1946
- });
2192
+ await rm(directory, { recursive: true, force: true });
1947
2193
  }
1948
- __name(cleanDirectories, "cleanDirectories");
1949
2194
 
1950
2195
  // ../esbuild/src/context.ts
1951
2196
  init_esm_shims();
1952
- import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2 } from "@nx/devkit";
2197
+ import {
2198
+ createProjectGraphAsync as createProjectGraphAsync2,
2199
+ readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2
2200
+ } from "@nx/devkit";
1953
2201
  import defu4 from "defu";
1954
2202
  import { existsSync as existsSync5 } from "node:fs";
1955
2203
  import hf from "node:fs/promises";
@@ -2008,43 +2256,46 @@ function resolvePathsConfig(options, cwd, projectRoot) {
2008
2256
  if (options?.compilerOptions?.paths) {
2009
2257
  const paths = Object.entries(options.compilerOptions.paths);
2010
2258
  const resolvedPaths = paths.map(([key, paths2]) => {
2011
- return [
2012
- key,
2013
- paths2.map((v) => path2.resolve(cwd, v))
2014
- ];
2259
+ return [key, paths2.map((v) => path2.resolve(cwd, v))];
2015
2260
  });
2016
2261
  return Object.fromEntries(resolvedPaths);
2017
2262
  }
2018
2263
  if (options.extends) {
2019
- const extendsPath = path2.resolve(projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends));
2264
+ const extendsPath = path2.resolve(
2265
+ projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends)
2266
+ );
2020
2267
  const extendsDir = path2.dirname(extendsPath);
2021
2268
  const extendsConfig = __require(extendsPath);
2022
2269
  return resolvePathsConfig(extendsConfig, extendsDir);
2023
2270
  }
2024
2271
  return [];
2025
2272
  }
2026
- __name(resolvePathsConfig, "resolvePathsConfig");
2027
- var resolvePathsPlugin = /* @__PURE__ */ __name((context) => ({
2273
+ var resolvePathsPlugin = (context) => ({
2028
2274
  name: "storm:resolve-paths",
2029
2275
  setup(build3) {
2030
- const parentTsConfig = build3.initialOptions.tsconfig ? __require(joinPaths(context.workspaceConfig.workspaceRoot, build3.initialOptions.tsconfig.replace(context.workspaceConfig.workspaceRoot, ""))) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
2031
- const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot, context.options.projectRoot);
2032
- const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
2033
- build3.onResolve({
2034
- filter: packagesRegex
2035
- }, (args) => {
2276
+ const parentTsConfig = build3.initialOptions.tsconfig ? __require(joinPaths(
2277
+ context.workspaceConfig.workspaceRoot,
2278
+ build3.initialOptions.tsconfig.replace(
2279
+ context.workspaceConfig.workspaceRoot,
2280
+ ""
2281
+ )
2282
+ )) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
2283
+ const resolvedTsPaths = resolvePathsConfig(
2284
+ parentTsConfig,
2285
+ context.workspaceConfig.workspaceRoot,
2286
+ context.options.projectRoot
2287
+ );
2288
+ const packagesRegex = new RegExp(
2289
+ `^(${Object.keys(resolvedTsPaths).join("|")})$`
2290
+ );
2291
+ build3.onResolve({ filter: packagesRegex }, (args) => {
2036
2292
  if (build3.initialOptions.external?.includes(args.path)) {
2037
- return {
2038
- path: args.path,
2039
- external: true
2040
- };
2293
+ return { path: args.path, external: true };
2041
2294
  }
2042
- return {
2043
- path: `${resolvedTsPaths[args.path][0]}/index.ts`
2044
- };
2295
+ return { path: `${resolvedTsPaths[args.path][0]}/index.ts` };
2045
2296
  });
2046
2297
  }
2047
- }), "resolvePathsPlugin");
2298
+ });
2048
2299
 
2049
2300
  // ../esbuild/src/context.ts
2050
2301
  async function resolveContext(userOptions) {
@@ -2061,7 +2312,11 @@ async function resolveContext(userOptions) {
2061
2312
  const projectGraph = await createProjectGraphAsync2({
2062
2313
  exitOnError: true
2063
2314
  });
2064
- const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
2315
+ const projectJsonPath = joinPaths(
2316
+ workspaceRoot3.dir,
2317
+ projectRoot,
2318
+ "project.json"
2319
+ );
2065
2320
  if (!existsSync5(projectJsonPath)) {
2066
2321
  throw new Error("Cannot find project.json configuration");
2067
2322
  }
@@ -2070,11 +2325,17 @@ async function resolveContext(userOptions) {
2070
2325
  const projectName = projectJson.name || userOptions.name;
2071
2326
  const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
2072
2327
  if (!projectConfigurations?.projects?.[projectName]) {
2073
- throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
2328
+ throw new Error(
2329
+ "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."
2330
+ );
2074
2331
  }
2075
2332
  const options = defu4(userOptions, DEFAULT_BUILD_OPTIONS);
2076
2333
  options.name ??= projectName;
2077
- const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
2334
+ const packageJsonPath = joinPaths(
2335
+ workspaceRoot3.dir,
2336
+ options.projectRoot,
2337
+ "package.json"
2338
+ );
2078
2339
  if (!existsSync5(packageJsonPath)) {
2079
2340
  throw new Error("Cannot find package.json configuration");
2080
2341
  }
@@ -2108,7 +2369,11 @@ async function resolveContext(userOptions) {
2108
2369
  projectName,
2109
2370
  projectGraph,
2110
2371
  sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || joinPaths(resolvedOptions.projectRoot, "src"),
2111
- outputPath: resolvedOptions.outputPath || joinPaths(workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
2372
+ outputPath: resolvedOptions.outputPath || joinPaths(
2373
+ workspaceConfig.workspaceRoot,
2374
+ "dist",
2375
+ resolvedOptions.projectRoot
2376
+ ),
2112
2377
  minify: resolvedOptions.minify || resolvedOptions.mode === "production"
2113
2378
  };
2114
2379
  context.options.esbuildPlugins = [
@@ -2117,7 +2382,6 @@ async function resolveContext(userOptions) {
2117
2382
  ];
2118
2383
  return context;
2119
2384
  }
2120
- __name(resolveContext, "resolveContext");
2121
2385
 
2122
2386
  // ../esbuild/src/package-json.ts
2123
2387
  init_esm_shims();
@@ -2128,17 +2392,39 @@ async function generatePackageJson(context) {
2128
2392
  if (context.options.generatePackageJson !== false && existsSync6(joinPaths(context.options.projectRoot, "package.json"))) {
2129
2393
  writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
2130
2394
  const stopwatch = getStopwatch("Write package.json file");
2131
- const packageJsonPath = joinPaths(context.options.projectRoot, "project.json");
2395
+ const packageJsonPath = joinPaths(
2396
+ context.options.projectRoot,
2397
+ "project.json"
2398
+ );
2132
2399
  if (!existsSync6(packageJsonPath)) {
2133
2400
  throw new Error("Cannot find package.json configuration");
2134
2401
  }
2135
- const packageJsonFile = await hf2.readFile(joinPaths(context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
2402
+ const packageJsonFile = await hf2.readFile(
2403
+ joinPaths(
2404
+ context.workspaceConfig.workspaceRoot,
2405
+ context.options.projectRoot,
2406
+ "package.json"
2407
+ ),
2408
+ "utf8"
2409
+ );
2136
2410
  let packageJson = JSON.parse(packageJsonFile);
2137
2411
  if (!packageJson) {
2138
2412
  throw new Error("Cannot find package.json configuration file");
2139
2413
  }
2140
- packageJson = await addPackageDependencies(context.workspaceConfig.workspaceRoot, context.options.projectRoot, context.projectName, packageJson);
2141
- packageJson = await addWorkspacePackageJsonFields(context.workspaceConfig, context.options.projectRoot, context.sourceRoot, context.projectName, false, packageJson);
2414
+ packageJson = await addPackageDependencies(
2415
+ context.workspaceConfig.workspaceRoot,
2416
+ context.options.projectRoot,
2417
+ context.projectName,
2418
+ packageJson
2419
+ );
2420
+ packageJson = await addWorkspacePackageJsonFields(
2421
+ context.workspaceConfig,
2422
+ context.options.projectRoot,
2423
+ context.sourceRoot,
2424
+ context.projectName,
2425
+ false,
2426
+ packageJson
2427
+ );
2142
2428
  if (context.options.entry) {
2143
2429
  packageJson.exports ??= {};
2144
2430
  packageJson.exports["./package.json"] ??= "./package.json";
@@ -2208,20 +2494,25 @@ async function generatePackageJson(context) {
2208
2494
  if (isDts) {
2209
2495
  packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
2210
2496
  }
2211
- packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
2212
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
2213
- ret[key.replace("/index", "")] = packageJson.exports[key];
2214
- }
2215
- return ret;
2216
- }, packageJson.exports);
2497
+ packageJson.exports = Object.keys(packageJson.exports).reduce(
2498
+ (ret, key) => {
2499
+ if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
2500
+ ret[key.replace("/index", "")] = packageJson.exports[key];
2501
+ }
2502
+ return ret;
2503
+ },
2504
+ packageJson.exports
2505
+ );
2217
2506
  }
2218
2507
  }
2219
- await writeJsonFile(joinPaths(context.outputPath, "package.json"), packageJson);
2508
+ await writeJsonFile(
2509
+ joinPaths(context.outputPath, "package.json"),
2510
+ packageJson
2511
+ );
2220
2512
  stopwatch();
2221
2513
  }
2222
2514
  return context;
2223
2515
  }
2224
- __name(generatePackageJson, "generatePackageJson");
2225
2516
 
2226
2517
  // ../esbuild/src/plugins/deps-check.ts
2227
2518
  init_esm_shims();
@@ -2251,12 +2542,8 @@ var unusedIgnore = [
2251
2542
  // these are indirectly used by build
2252
2543
  "buffer"
2253
2544
  ];
2254
- var missingIgnore = [
2255
- ".prisma",
2256
- "@prisma/client",
2257
- "ts-toolbelt"
2258
- ];
2259
- var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
2545
+ var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
2546
+ var depsCheckPlugin = (bundle) => ({
2260
2547
  name: "storm:deps-check",
2261
2548
  setup(build3) {
2262
2549
  const pkgJsonPath = path3.join(process.cwd(), "package.json");
@@ -2270,9 +2557,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
2270
2557
  ];
2271
2558
  const collectedDependencies = /* @__PURE__ */ new Set();
2272
2559
  const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
2273
- build3.onResolve({
2274
- filter: onlyPackages
2275
- }, (args) => {
2560
+ build3.onResolve({ filter: onlyPackages }, (args) => {
2276
2561
  if (args.importer.includes(process.cwd())) {
2277
2562
  if (args.path[0] === "@") {
2278
2563
  const [org, pkg] = args.path.split("/");
@@ -2282,19 +2567,13 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
2282
2567
  collectedDependencies.add(pkg);
2283
2568
  }
2284
2569
  }
2285
- return {
2286
- external: true
2287
- };
2570
+ return { external: true };
2288
2571
  });
2289
2572
  build3.onEnd(() => {
2290
- const unusedDependencies = [
2291
- ...dependencies
2292
- ].filter((dep) => {
2573
+ const unusedDependencies = [...dependencies].filter((dep) => {
2293
2574
  return !collectedDependencies.has(dep) || builtinModules2.includes(dep);
2294
2575
  });
2295
- const missingDependencies = [
2296
- ...collectedDependencies
2297
- ].filter((dep) => {
2576
+ const missingDependencies = [...collectedDependencies].filter((dep) => {
2298
2577
  return !dependencies.includes(dep) && !builtinModules2.includes(dep);
2299
2578
  });
2300
2579
  const filteredUnusedDeps = unusedDependencies.filter((dep) => {
@@ -2303,8 +2582,12 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
2303
2582
  const filteredMissingDeps = missingDependencies.filter((dep) => {
2304
2583
  return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
2305
2584
  });
2306
- writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
2307
- writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
2585
+ writeWarning(
2586
+ `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
2587
+ );
2588
+ writeError(
2589
+ `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
2590
+ );
2308
2591
  if (filteredMissingDeps.length > 0) {
2309
2592
  throw new Error(`Missing dependencies detected - please install them:
2310
2593
  ${JSON.stringify(filteredMissingDeps)}
@@ -2312,13 +2595,16 @@ ${JSON.stringify(filteredMissingDeps)}
2312
2595
  }
2313
2596
  });
2314
2597
  }
2315
- }), "depsCheckPlugin");
2598
+ });
2316
2599
 
2317
2600
  // ../esbuild/src/tsup.ts
2318
2601
  init_esm_shims();
2319
2602
  import { build as tsup } from "tsup";
2320
2603
  async function executeTsup(context) {
2321
- writeDebug(` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
2604
+ writeDebug(
2605
+ ` \u{1F680} Running ${context.options.name} build`,
2606
+ context.workspaceConfig
2607
+ );
2322
2608
  const stopwatch = getStopwatch(`${context.options.name} build`);
2323
2609
  await tsup({
2324
2610
  ...context.options,
@@ -2328,21 +2614,30 @@ async function executeTsup(context) {
2328
2614
  stopwatch();
2329
2615
  return context;
2330
2616
  }
2331
- __name(executeTsup, "executeTsup");
2332
2617
 
2333
2618
  // ../esbuild/src/build.ts
2334
2619
  async function reportResults(context) {
2335
2620
  if (context.result?.errors.length === 0) {
2336
2621
  if (context.result.warnings.length > 0) {
2337
- writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`, context.workspaceConfig);
2622
+ writeWarning(
2623
+ ` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
2624
+ context.workspaceConfig
2625
+ );
2338
2626
  }
2339
- writeSuccess(` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
2627
+ writeSuccess(
2628
+ ` \u{1F4E6} The ${context.options.name} build completed successfully`,
2629
+ context.workspaceConfig
2630
+ );
2340
2631
  } else if (context.result?.errors && context.result?.errors.length > 0) {
2341
- writeError(` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`, context.workspaceConfig);
2342
- throw new Error(`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`);
2632
+ writeError(
2633
+ ` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
2634
+ context.workspaceConfig
2635
+ );
2636
+ throw new Error(
2637
+ `The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
2638
+ );
2343
2639
  }
2344
2640
  }
2345
- __name(reportResults, "reportResults");
2346
2641
  async function dependencyCheck(options) {
2347
2642
  if (process.env.DEV === "true") {
2348
2643
  return void 0;
@@ -2353,43 +2648,39 @@ async function dependencyCheck(options) {
2353
2648
  const buildPromise = esbuild.build({
2354
2649
  entryPoints: globbySync("**/*.{j,t}s", {
2355
2650
  // We don't check dependencies in ecosystem tests because tests are isolated from the build.
2356
- ignore: [
2357
- "./src/__tests__/**/*",
2358
- "./tests/e2e/**/*",
2359
- "./dist/**/*"
2360
- ],
2651
+ ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
2361
2652
  gitignore: true
2362
2653
  }),
2363
2654
  logLevel: "silent",
2655
+ // there will be errors
2364
2656
  bundle: true,
2657
+ // we bundle to get everything
2365
2658
  write: false,
2659
+ // no need to write for analysis
2366
2660
  outdir: "out",
2367
- plugins: [
2368
- depsCheckPlugin(options.bundle)
2369
- ]
2661
+ plugins: [depsCheckPlugin(options.bundle)]
2370
2662
  });
2371
2663
  await buildPromise.catch(() => {
2372
2664
  });
2373
2665
  return void 0;
2374
2666
  }
2375
- __name(dependencyCheck, "dependencyCheck");
2376
2667
  async function cleanOutputPath(context) {
2377
2668
  if (context.clean !== false && context.outputPath) {
2378
- writeDebug(` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`, context.workspaceConfig);
2669
+ writeDebug(
2670
+ ` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
2671
+ context.workspaceConfig
2672
+ );
2379
2673
  const stopwatch = getStopwatch(`${context.options.name} output clean`);
2380
2674
  await cleanDirectories(context.outputPath);
2381
2675
  stopwatch();
2382
2676
  }
2383
2677
  return context;
2384
2678
  }
2385
- __name(cleanOutputPath, "cleanOutputPath");
2386
2679
  async function build2(options) {
2387
2680
  writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
2388
2681
  const stopwatch = getStopwatch("ESBuild pipeline");
2389
2682
  try {
2390
- const opts = Array.isArray(options) ? options : [
2391
- options
2392
- ];
2683
+ const opts = Array.isArray(options) ? options : [options];
2393
2684
  if (opts.length === 0) {
2394
2685
  throw new Error("No build options were provided");
2395
2686
  }
@@ -2404,19 +2695,22 @@ async function build2(options) {
2404
2695
  await reportResults(context);
2405
2696
  writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
2406
2697
  } catch (error) {
2407
- writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
2698
+ writeFatal(
2699
+ "Fatal errors that the build process could not recover from have occured. The build process has been terminated."
2700
+ );
2408
2701
  throw error;
2409
2702
  } finally {
2410
2703
  stopwatch();
2411
2704
  }
2412
2705
  }
2413
- __name(build2, "build");
2414
2706
 
2415
2707
  // ../workspace-tools/src/executors/esbuild/executor.ts
2416
2708
  async function esbuildExecutorFn(options, context, config) {
2417
2709
  writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
2418
2710
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
2419
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
2711
+ throw new Error(
2712
+ "The Build process failed because the context is not valid. Please run this command from a workspace."
2713
+ );
2420
2714
  }
2421
2715
  await build2({
2422
2716
  ...options,
@@ -2430,20 +2724,21 @@ async function esbuildExecutorFn(options, context, config) {
2430
2724
  success: true
2431
2725
  };
2432
2726
  }
2433
- __name(esbuildExecutorFn, "esbuildExecutorFn");
2434
- var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn, {
2435
- skipReadingConfig: false,
2436
- hooks: {
2437
- applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
2438
- options.entry ??= [
2439
- "src/index.ts"
2440
- ];
2441
- options.outputPath ??= "dist/{projectRoot}";
2442
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
2443
- return options;
2444
- }, "applyDefaultOptions")
2727
+ var executor_default6 = withRunExecutor(
2728
+ "Storm ESBuild build",
2729
+ esbuildExecutorFn,
2730
+ {
2731
+ skipReadingConfig: false,
2732
+ hooks: {
2733
+ applyDefaultOptions: async (options, config) => {
2734
+ options.entry ??= ["src/index.ts"];
2735
+ options.outputPath ??= "dist/{projectRoot}";
2736
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
2737
+ return options;
2738
+ }
2739
+ }
2445
2740
  }
2446
- });
2741
+ );
2447
2742
 
2448
2743
  // ../workspace-tools/src/executors/npm-publish/executor.ts
2449
2744
  init_esm_shims();
@@ -2469,31 +2764,38 @@ import filePlugin from "@size-limit/file";
2469
2764
  import sizeLimit from "size-limit";
2470
2765
  async function sizeLimitExecutorFn(options, context, config) {
2471
2766
  if (!context?.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName]) {
2472
- throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
2767
+ throw new Error(
2768
+ "The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
2769
+ );
2473
2770
  }
2474
2771
  writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
2475
- sizeLimit([
2476
- filePlugin,
2477
- esBuildPlugin,
2478
- esBuildWhyPlugin
2479
- ], {
2480
- checks: options.entry ?? context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? joinPathFragments3(context.projectsConfigurations.projects[context.projectName]?.root ?? "./", "src")
2772
+ sizeLimit([filePlugin, esBuildPlugin, esBuildWhyPlugin], {
2773
+ checks: options.entry ?? context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? joinPathFragments3(
2774
+ context.projectsConfigurations.projects[context.projectName]?.root ?? "./",
2775
+ "src"
2776
+ )
2481
2777
  }).then((result) => {
2482
- writeInfo(`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
2778
+ writeInfo(
2779
+ `\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
2780
+ config
2781
+ );
2483
2782
  });
2484
2783
  return {
2485
2784
  success: true
2486
2785
  };
2487
2786
  }
2488
- __name(sizeLimitExecutorFn, "sizeLimitExecutorFn");
2489
- var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
2490
- skipReadingConfig: false,
2491
- hooks: {
2492
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
2493
- return options;
2494
- }, "applyDefaultOptions")
2787
+ var executor_default7 = withRunExecutor(
2788
+ "Size-Limit Performance Test Executor",
2789
+ sizeLimitExecutorFn,
2790
+ {
2791
+ skipReadingConfig: false,
2792
+ hooks: {
2793
+ applyDefaultOptions: (options) => {
2794
+ return options;
2795
+ }
2796
+ }
2495
2797
  }
2496
- });
2798
+ );
2497
2799
 
2498
2800
  // ../workspace-tools/src/executors/typia/executor.ts
2499
2801
  init_esm_shims();
@@ -2504,33 +2806,36 @@ async function typiaExecutorFn(options, _, config) {
2504
2806
  writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
2505
2807
  removeSync(options.outputPath);
2506
2808
  }
2507
- await Promise.all(options.entry.map((entry) => {
2508
- writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
2509
- return TypiaProgrammer.build({
2510
- input: entry,
2511
- output: options.outputPath,
2512
- project: options.tsconfig
2513
- });
2514
- }));
2809
+ await Promise.all(
2810
+ options.entry.map((entry) => {
2811
+ writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
2812
+ return TypiaProgrammer.build({
2813
+ input: entry,
2814
+ output: options.outputPath,
2815
+ project: options.tsconfig
2816
+ });
2817
+ })
2818
+ );
2515
2819
  return {
2516
2820
  success: true
2517
2821
  };
2518
2822
  }
2519
- __name(typiaExecutorFn, "typiaExecutorFn");
2520
- var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
2521
- skipReadingConfig: false,
2522
- hooks: {
2523
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
2524
- options.entry ??= [
2525
- "{sourceRoot}/index.ts"
2526
- ];
2527
- options.outputPath ??= "{sourceRoot}/__generated__/typia";
2528
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
2529
- options.clean ??= true;
2530
- return options;
2531
- }, "applyDefaultOptions")
2823
+ var executor_default8 = withRunExecutor(
2824
+ "Typia runtime validation generator",
2825
+ typiaExecutorFn,
2826
+ {
2827
+ skipReadingConfig: false,
2828
+ hooks: {
2829
+ applyDefaultOptions: (options) => {
2830
+ options.entry ??= ["{sourceRoot}/index.ts"];
2831
+ options.outputPath ??= "{sourceRoot}/__generated__/typia";
2832
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
2833
+ options.clean ??= true;
2834
+ return options;
2835
+ }
2836
+ }
2532
2837
  }
2533
- });
2838
+ );
2534
2839
 
2535
2840
  // ../workspace-tools/src/executors/unbuild/executor.ts
2536
2841
  init_esm_shims();
@@ -2539,79 +2844,106 @@ import { createJiti } from "jiti";
2539
2844
  async function unbuildExecutorFn(options, context, config) {
2540
2845
  writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
2541
2846
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
2542
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
2847
+ throw new Error(
2848
+ "The Build process failed because the context is not valid. Please run this command from a workspace root directory."
2849
+ );
2543
2850
  }
2544
2851
  if (!context.projectsConfigurations.projects[context.projectName].root) {
2545
- throw new Error("The Build process failed because the project root is not valid. Please run this command from a workspace root directory.");
2852
+ throw new Error(
2853
+ "The Build process failed because the project root is not valid. Please run this command from a workspace root directory."
2854
+ );
2546
2855
  }
2547
2856
  if (!context.projectsConfigurations.projects[context.projectName].sourceRoot) {
2548
- throw new Error("The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory.");
2857
+ throw new Error(
2858
+ "The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory."
2859
+ );
2549
2860
  }
2550
2861
  const jiti = createJiti(config.workspaceRoot, {
2551
- fsCache: config.skipCache ? false : joinPaths(config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
2862
+ fsCache: config.skipCache ? false : joinPaths(
2863
+ config.workspaceRoot,
2864
+ config.directories.cache || "node_modules/.cache/storm",
2865
+ "jiti"
2866
+ ),
2552
2867
  interopDefault: true
2553
2868
  });
2554
- const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
2555
- await stormUnbuild.build(defu5({
2556
- ...options,
2557
- projectRoot: context.projectsConfigurations.projects[context.projectName].root,
2558
- projectName: context.projectName,
2559
- sourceRoot: context.projectsConfigurations.projects[context.projectName].sourceRoot,
2560
- platform: options.platform
2561
- }, {
2562
- stubOptions: {
2563
- jiti: {
2564
- fsCache: config.skipCache ? false : joinPaths(config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
2565
- }
2566
- },
2567
- rollup: {
2568
- emitCJS: true,
2569
- watch: false,
2570
- dts: {
2571
- respectExternal: true
2869
+ const stormUnbuild = await jiti.import(
2870
+ jiti.esmResolve("@storm-software/unbuild/build")
2871
+ );
2872
+ await stormUnbuild.build(
2873
+ defu5(
2874
+ {
2875
+ ...options,
2876
+ projectRoot: context.projectsConfigurations.projects[context.projectName].root,
2877
+ projectName: context.projectName,
2878
+ sourceRoot: context.projectsConfigurations.projects[context.projectName].sourceRoot,
2879
+ platform: options.platform
2572
2880
  },
2573
- esbuild: {
2574
- target: options.target,
2575
- format: "esm",
2576
- platform: options.platform,
2577
- minify: options.minify ?? !options.debug,
2578
- sourcemap: options.sourcemap ?? options.debug,
2579
- treeShaking: options.treeShaking
2881
+ {
2882
+ stubOptions: {
2883
+ jiti: {
2884
+ fsCache: config.skipCache ? false : joinPaths(
2885
+ config.workspaceRoot,
2886
+ config.directories.cache || "node_modules/.cache/storm",
2887
+ "jiti"
2888
+ )
2889
+ }
2890
+ },
2891
+ rollup: {
2892
+ emitCJS: true,
2893
+ watch: false,
2894
+ dts: {
2895
+ respectExternal: true
2896
+ },
2897
+ esbuild: {
2898
+ target: options.target,
2899
+ format: "esm",
2900
+ platform: options.platform,
2901
+ minify: options.minify ?? !options.debug,
2902
+ sourcemap: options.sourcemap ?? options.debug,
2903
+ treeShaking: options.treeShaking
2904
+ }
2905
+ }
2580
2906
  }
2581
- }
2582
- }));
2907
+ )
2908
+ );
2583
2909
  return {
2584
2910
  success: true
2585
2911
  };
2586
2912
  }
2587
- __name(unbuildExecutorFn, "unbuildExecutorFn");
2588
- var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
2589
- skipReadingConfig: false,
2590
- hooks: {
2591
- applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
2592
- options.debug ??= false;
2593
- options.treeShaking ??= true;
2594
- options.buildOnly ??= false;
2595
- options.platform ??= "neutral";
2596
- options.entry ??= [
2597
- "{sourceRoot}"
2598
- ];
2599
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
2600
- return options;
2601
- }, "applyDefaultOptions")
2913
+ var executor_default9 = withRunExecutor(
2914
+ "TypeScript Unbuild build",
2915
+ unbuildExecutorFn,
2916
+ {
2917
+ skipReadingConfig: false,
2918
+ hooks: {
2919
+ applyDefaultOptions: async (options, config) => {
2920
+ options.debug ??= false;
2921
+ options.treeShaking ??= true;
2922
+ options.buildOnly ??= false;
2923
+ options.platform ??= "neutral";
2924
+ options.entry ??= ["{sourceRoot}"];
2925
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
2926
+ return options;
2927
+ }
2928
+ }
2602
2929
  }
2603
- });
2930
+ );
2604
2931
 
2605
2932
  // ../workspace-tools/generators.ts
2606
2933
  init_esm_shims();
2607
2934
 
2608
2935
  // ../workspace-tools/src/generators/browser-library/generator.ts
2609
2936
  init_esm_shims();
2610
- import { formatFiles as formatFiles2, generateFiles, names as names2, offsetFromRoot as offsetFromRoot2 } from "@nx/devkit";
2937
+ import {
2938
+ formatFiles as formatFiles2,
2939
+ generateFiles,
2940
+ names as names2,
2941
+ offsetFromRoot as offsetFromRoot2
2942
+ } from "@nx/devkit";
2611
2943
 
2612
2944
  // ../workspace-tools/src/base/base-generator.ts
2613
2945
  init_esm_shims();
2614
- var withRunGenerator = /* @__PURE__ */ __name((name, generatorFn, generatorOptions = {
2946
+ var withRunGenerator = (name, generatorFn, generatorOptions = {
2615
2947
  skipReadingConfig: false
2616
2948
  }) => async (tree, _options) => {
2617
2949
  const stopwatch = getStopwatch(name);
@@ -2623,27 +2955,40 @@ var withRunGenerator = /* @__PURE__ */ __name((name, generatorFn, generatorOptio
2623
2955
  `, config);
2624
2956
  const workspaceRoot3 = findWorkspaceRoot();
2625
2957
  if (!generatorOptions.skipReadingConfig) {
2626
- writeDebug(`Loading the Storm Config from environment variables and storm.config.js file...
2627
- - workspaceRoot: ${workspaceRoot3}`, config);
2958
+ writeDebug(
2959
+ `Loading the Storm Config from environment variables and storm.config.js file...
2960
+ - workspaceRoot: ${workspaceRoot3}`,
2961
+ config
2962
+ );
2628
2963
  config = await getConfig(workspaceRoot3);
2629
2964
  }
2630
2965
  if (generatorOptions?.hooks?.applyDefaultOptions) {
2631
2966
  writeDebug("Running the applyDefaultOptions hook...", config);
2632
- options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
2967
+ options = await Promise.resolve(
2968
+ generatorOptions.hooks.applyDefaultOptions(options, config)
2969
+ );
2633
2970
  writeDebug("Completed the applyDefaultOptions hook", config);
2634
2971
  }
2635
- writeTrace(`Generator schema options \u2699\uFE0F
2636
- ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
2637
- const tokenized = await applyWorkspaceTokens(options, {
2638
- workspaceRoot: tree.root,
2972
+ writeTrace(
2973
+ `Generator schema options \u2699\uFE0F
2974
+ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
2639
2975
  config
2640
- }, applyWorkspaceBaseTokens);
2976
+ );
2977
+ const tokenized = await applyWorkspaceTokens(
2978
+ options,
2979
+ { workspaceRoot: tree.root, config },
2980
+ applyWorkspaceBaseTokens
2981
+ );
2641
2982
  if (generatorOptions?.hooks?.preProcess) {
2642
2983
  writeDebug("Running the preProcess hook...", config);
2643
- await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
2984
+ await Promise.resolve(
2985
+ generatorOptions.hooks.preProcess(tokenized, config)
2986
+ );
2644
2987
  writeDebug("Completed the preProcess hook", config);
2645
2988
  }
2646
- const result = await Promise.resolve(generatorFn(tree, tokenized, config));
2989
+ const result = await Promise.resolve(
2990
+ generatorFn(tree, tokenized, config)
2991
+ );
2647
2992
  if (result) {
2648
2993
  if (result.success === false || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string") {
2649
2994
  throw new Error(`The ${name} generator failed to run`, {
@@ -2664,21 +3009,41 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
2664
3009
  };
2665
3010
  } catch (error) {
2666
3011
  return () => {
2667
- writeFatal("A fatal error occurred while running the generator - the process was forced to terminate", config);
2668
- writeError(`An exception was thrown in the generator's process
3012
+ writeFatal(
3013
+ "A fatal error occurred while running the generator - the process was forced to terminate",
3014
+ config
3015
+ );
3016
+ writeError(
3017
+ `An exception was thrown in the generator's process
2669
3018
  - Details: ${error.message}
2670
- - Stacktrace: ${error.stack}`, config);
3019
+ - Stacktrace: ${error.stack}`,
3020
+ config
3021
+ );
2671
3022
  };
2672
3023
  } finally {
2673
3024
  stopwatch();
2674
3025
  }
2675
- }, "withRunGenerator");
3026
+ };
2676
3027
 
2677
3028
  // ../workspace-tools/src/base/typescript-library-generator.ts
2678
3029
  init_esm_shims();
2679
- import { addDependenciesToPackageJson, addProjectConfiguration, ensurePackage, formatFiles, names, offsetFromRoot, readJson, updateJson, writeJson } from "@nx/devkit";
3030
+ import {
3031
+ addDependenciesToPackageJson,
3032
+ addProjectConfiguration,
3033
+ ensurePackage,
3034
+ formatFiles,
3035
+ names,
3036
+ offsetFromRoot,
3037
+ readJson,
3038
+ updateJson,
3039
+ writeJson
3040
+ } from "@nx/devkit";
2680
3041
  import { determineProjectNameAndRootOptions } from "@nx/devkit/src/generators/project-name-and-root-utils";
2681
- import { addTsConfigPath, getRelativePathToRootTsConfig, tsConfigBaseOptions } from "@nx/js";
3042
+ import {
3043
+ addTsConfigPath,
3044
+ getRelativePathToRootTsConfig,
3045
+ tsConfigBaseOptions
3046
+ } from "@nx/js";
2682
3047
  import jsInitGenerator from "@nx/js/src/generators/init/init";
2683
3048
  import setupVerdaccio from "@nx/js/src/generators/setup-verdaccio/generator";
2684
3049
 
@@ -2721,23 +3086,27 @@ var ProjectTagConstants = {
2721
3086
  TAG_ID: "plugin"
2722
3087
  }
2723
3088
  };
2724
- var formatProjectTag = /* @__PURE__ */ __name((variant, value) => {
3089
+ var formatProjectTag = (variant, value) => {
2725
3090
  return `${variant}:${value}`;
2726
- }, "formatProjectTag");
2727
- var hasProjectTag = /* @__PURE__ */ __name((project, variant) => {
3091
+ };
3092
+ var hasProjectTag = (project, variant) => {
2728
3093
  project.tags = project.tags ?? [];
2729
3094
  const prefix = formatProjectTag(variant, "");
2730
- return project.tags.some((tag) => tag.startsWith(prefix) && tag.length > prefix.length);
2731
- }, "hasProjectTag");
2732
- var addProjectTag = /* @__PURE__ */ __name((project, variant, value, options = {
3095
+ return project.tags.some(
3096
+ (tag) => tag.startsWith(prefix) && tag.length > prefix.length
3097
+ );
3098
+ };
3099
+ var addProjectTag = (project, variant, value, options = {
2733
3100
  overwrite: false
2734
3101
  }) => {
2735
3102
  project.tags = project.tags ?? [];
2736
3103
  if (options.overwrite || !hasProjectTag(project, variant)) {
2737
- project.tags = project.tags.filter((tag) => !tag.startsWith(formatProjectTag(variant, "")));
3104
+ project.tags = project.tags.filter(
3105
+ (tag) => !tag.startsWith(formatProjectTag(variant, ""))
3106
+ );
2738
3107
  project.tags.push(formatProjectTag(variant, value));
2739
3108
  }
2740
- }, "addProjectTag");
3109
+ };
2741
3110
 
2742
3111
  // ../workspace-tools/src/utils/versions.ts
2743
3112
  init_esm_shims();
@@ -2748,24 +3117,27 @@ var pnpmVersion = "8.10.2";
2748
3117
 
2749
3118
  // ../workspace-tools/src/base/typescript-library-generator.ts
2750
3119
  async function typeScriptLibraryGeneratorFn(tree, options, config) {
2751
- const normalized = await normalizeOptions(tree, {
2752
- ...options
2753
- });
3120
+ const normalized = await normalizeOptions(tree, { ...options });
2754
3121
  const tasks = [];
2755
- tasks.push(await jsInitGenerator(tree, {
2756
- ...normalized,
2757
- tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
2758
- }));
2759
- tasks.push(addDependenciesToPackageJson(tree, {}, {
2760
- "@storm-software/workspace-tools": "latest",
2761
- "@storm-software/testing-tools": "latest",
2762
- ...options.devDependencies ?? {}
2763
- }));
2764
- if (normalized.publishable) {
2765
- tasks.push(await setupVerdaccio(tree, {
3122
+ tasks.push(
3123
+ await jsInitGenerator(tree, {
2766
3124
  ...normalized,
2767
- skipFormat: true
2768
- }));
3125
+ tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
3126
+ })
3127
+ );
3128
+ tasks.push(
3129
+ addDependenciesToPackageJson(
3130
+ tree,
3131
+ {},
3132
+ {
3133
+ "@storm-software/workspace-tools": "latest",
3134
+ "@storm-software/testing-tools": "latest",
3135
+ ...options.devDependencies ?? {}
3136
+ }
3137
+ )
3138
+ );
3139
+ if (normalized.publishable) {
3140
+ tasks.push(await setupVerdaccio(tree, { ...normalized, skipFormat: true }));
2769
3141
  }
2770
3142
  const projectConfig = {
2771
3143
  root: normalized.directory,
@@ -2774,13 +3146,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2774
3146
  targets: {
2775
3147
  build: {
2776
3148
  executor: options.buildExecutor,
2777
- outputs: [
2778
- "{options.outputPath}"
2779
- ],
3149
+ outputs: ["{options.outputPath}"],
2780
3150
  options: {
2781
- entry: [
2782
- joinPaths(normalized.projectRoot, "src", "index.ts")
2783
- ],
3151
+ entry: [joinPaths(normalized.projectRoot, "src", "index.ts")],
2784
3152
  outputPath: getOutputPath(normalized),
2785
3153
  tsconfig: joinPaths(normalized.projectRoot, "tsconfig.json"),
2786
3154
  project: joinPaths(normalized.projectRoot, "package.json"),
@@ -2815,9 +3183,12 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2815
3183
  if (options.platform) {
2816
3184
  projectConfig.targets.build.options.platform = options.platform === "worker" ? "node" : options.platform;
2817
3185
  }
2818
- addProjectTag(projectConfig, ProjectTagConstants.Platform.TAG_ID, options.platform === "node" ? ProjectTagConstants.Platform.NODE : options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL, {
2819
- overwrite: false
2820
- });
3186
+ addProjectTag(
3187
+ projectConfig,
3188
+ ProjectTagConstants.Platform.TAG_ID,
3189
+ options.platform === "node" ? ProjectTagConstants.Platform.NODE : options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL,
3190
+ { overwrite: false }
3191
+ );
2821
3192
  createProjectTsConfigJson(tree, normalized);
2822
3193
  addProjectConfiguration(tree, normalized.name, projectConfig);
2823
3194
  let repository = {
@@ -2894,7 +3265,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2894
3265
  }));
2895
3266
  }
2896
3267
  addTsConfigPath(tree, normalized.importPath, [
2897
- joinPaths(normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
3268
+ joinPaths(
3269
+ normalized.projectRoot,
3270
+ "./src",
3271
+ `index.${normalized.js ? "js" : "ts"}`
3272
+ )
2898
3273
  ]);
2899
3274
  addTsConfigPath(tree, joinPaths(normalized.importPath, "/*"), [
2900
3275
  joinPaths(normalized.projectRoot, "./src", "/*")
@@ -2922,25 +3297,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2922
3297
  outDir: `${offsetFromRoot(normalized.projectRoot)}dist/out-tsc`
2923
3298
  },
2924
3299
  files: [],
2925
- include: [
2926
- "src/**/*.ts",
2927
- "src/**/*.js"
2928
- ],
2929
- exclude: [
2930
- "jest.config.ts",
2931
- "src/**/*.spec.ts",
2932
- "src/**/*.test.ts"
2933
- ]
3300
+ include: ["src/**/*.ts", "src/**/*.js"],
3301
+ exclude: ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
2934
3302
  });
2935
3303
  }
2936
3304
  await formatFiles(tree);
2937
3305
  return null;
2938
3306
  }
2939
- __name(typeScriptLibraryGeneratorFn, "typeScriptLibraryGeneratorFn");
2940
3307
  function getOutputPath(options) {
2941
- const parts = [
2942
- "dist"
2943
- ];
3308
+ const parts = ["dist"];
2944
3309
  if (options.projectRoot === ".") {
2945
3310
  parts.push(options.name);
2946
3311
  } else {
@@ -2948,7 +3313,6 @@ function getOutputPath(options) {
2948
3313
  }
2949
3314
  return joinPaths(...parts);
2950
3315
  }
2951
- __name(getOutputPath, "getOutputPath");
2952
3316
  function createProjectTsConfigJson(tree, options) {
2953
3317
  const tsconfig = {
2954
3318
  extends: options.rootProject ? void 0 : getRelativePathToRootTsConfig(tree, options.projectRoot),
@@ -2959,9 +3323,7 @@ function createProjectTsConfigJson(tree, options) {
2959
3323
  noEmit: true,
2960
3324
  ...options?.tsconfigOptions?.compilerOptions ?? {}
2961
3325
  },
2962
- files: [
2963
- ...options?.tsconfigOptions?.files ?? []
2964
- ],
3326
+ files: [...options?.tsconfigOptions?.files ?? []],
2965
3327
  include: [
2966
3328
  ...options?.tsconfigOptions?.include ?? [],
2967
3329
  "src/**/*.ts",
@@ -2977,7 +3339,6 @@ function createProjectTsConfigJson(tree, options) {
2977
3339
  };
2978
3340
  writeJson(tree, joinPaths(options.projectRoot, "tsconfig.json"), tsconfig);
2979
3341
  }
2980
- __name(createProjectTsConfigJson, "createProjectTsConfigJson");
2981
3342
  async function normalizeOptions(tree, options, config) {
2982
3343
  let importPath = options.importPath;
2983
3344
  if (!importPath && config?.namespace) {
@@ -2985,7 +3346,9 @@ async function normalizeOptions(tree, options, config) {
2985
3346
  }
2986
3347
  if (options.publishable) {
2987
3348
  if (!importPath) {
2988
- throw new Error(`For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`);
3349
+ throw new Error(
3350
+ `For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`
3351
+ );
2989
3352
  }
2990
3353
  }
2991
3354
  let bundler = "tsc";
@@ -2994,7 +3357,12 @@ async function normalizeOptions(tree, options, config) {
2994
3357
  }
2995
3358
  const { Linter } = ensurePackage("@nx/eslint", nxVersion);
2996
3359
  const rootProject = false;
2997
- const { projectName, names: projectNames, projectRoot, importPath: normalizedImportPath } = await determineProjectNameAndRootOptions(tree, {
3360
+ const {
3361
+ projectName,
3362
+ names: projectNames,
3363
+ projectRoot,
3364
+ importPath: normalizedImportPath
3365
+ } = await determineProjectNameAndRootOptions(tree, {
2998
3366
  name: options.name,
2999
3367
  projectType: "library",
3000
3368
  directory: options.directory,
@@ -3031,11 +3399,16 @@ async function normalizeOptions(tree, options, config) {
3031
3399
  shouldUseSwcJest: false
3032
3400
  };
3033
3401
  }
3034
- __name(normalizeOptions, "normalizeOptions");
3035
3402
 
3036
3403
  // ../workspace-tools/src/generators/browser-library/generator.ts
3037
3404
  async function browserLibraryGeneratorFn(tree, schema, config) {
3038
- const filesDir = joinPaths(__dirname, "src", "generators", "browser-library", "files");
3405
+ const filesDir = joinPaths(
3406
+ __dirname,
3407
+ "src",
3408
+ "generators",
3409
+ "browser-library",
3410
+ "files"
3411
+ );
3039
3412
  const tsLibraryGeneratorOptions = {
3040
3413
  buildExecutor: "@storm-software/workspace-tools:unbuild",
3041
3414
  platform: "browser",
@@ -3061,7 +3434,9 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
3061
3434
  directory: schema.directory
3062
3435
  };
3063
3436
  const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
3064
- const { className, name, propertyName } = names2(options.projectNames.projectFileName);
3437
+ const { className, name, propertyName } = names2(
3438
+ options.projectNames.projectFileName
3439
+ );
3065
3440
  generateFiles(tree, filesDir, options.projectRoot, {
3066
3441
  ...schema,
3067
3442
  dot: ".",
@@ -3092,76 +3467,112 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
3092
3467
  await formatFiles2(tree);
3093
3468
  return null;
3094
3469
  }
3095
- __name(browserLibraryGeneratorFn, "browserLibraryGeneratorFn");
3096
- var generator_default = withRunGenerator("TypeScript Library Creator (Browser Platform)", browserLibraryGeneratorFn, {
3097
- hooks: {
3098
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
3099
- options.description ??= "A library used by Storm Software to support browser applications";
3100
- options.platform ??= "browser";
3101
- return options;
3102
- }, "applyDefaultOptions")
3470
+ var generator_default = withRunGenerator(
3471
+ "TypeScript Library Creator (Browser Platform)",
3472
+ browserLibraryGeneratorFn,
3473
+ {
3474
+ hooks: {
3475
+ applyDefaultOptions: (options) => {
3476
+ options.description ??= "A library used by Storm Software to support browser applications";
3477
+ options.platform ??= "browser";
3478
+ return options;
3479
+ }
3480
+ }
3103
3481
  }
3104
- });
3482
+ );
3105
3483
 
3106
3484
  // ../workspace-tools/src/generators/config-schema/generator.ts
3107
3485
  init_esm_shims();
3108
3486
  import { formatFiles as formatFiles3, writeJson as writeJson2 } from "@nx/devkit";
3109
3487
  import { zodToJsonSchema } from "zod-to-json-schema";
3110
3488
  async function configSchemaGeneratorFn(tree, options, config) {
3111
- writeInfo("\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
3112
- writeTrace(`Determining the Storm Workspace Configuration JSON Schema...`, config);
3489
+ writeInfo(
3490
+ "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
3491
+ config
3492
+ );
3493
+ writeTrace(
3494
+ `Determining the Storm Workspace Configuration JSON Schema...`,
3495
+ config
3496
+ );
3113
3497
  const jsonSchema = zodToJsonSchema(stormWorkspaceConfigSchema, {
3114
3498
  name: "StormWorkspaceConfiguration"
3115
3499
  });
3116
3500
  writeTrace(jsonSchema, config);
3117
- const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(config?.workspaceRoot ?? findWorkspaceRoot(), options.outputFile?.startsWith("./") ? "" : "./");
3118
- writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
3119
- writeJson2(tree, outputPath, jsonSchema, {
3120
- spaces: 2
3121
- });
3501
+ const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
3502
+ config?.workspaceRoot ?? findWorkspaceRoot(),
3503
+ options.outputFile?.startsWith("./") ? "" : "./"
3504
+ );
3505
+ writeTrace(
3506
+ `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
3507
+ config
3508
+ );
3509
+ writeJson2(tree, outputPath, jsonSchema, { spaces: 2 });
3122
3510
  await formatFiles3(tree);
3123
- writeSuccess("\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
3511
+ writeSuccess(
3512
+ "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
3513
+ config
3514
+ );
3124
3515
  return {
3125
3516
  success: true
3126
3517
  };
3127
3518
  }
3128
- __name(configSchemaGeneratorFn, "configSchemaGeneratorFn");
3129
- var generator_default2 = withRunGenerator("Configuration Schema Creator", configSchemaGeneratorFn, {
3130
- hooks: {
3131
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
3132
- options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
3133
- return options;
3134
- }, "applyDefaultOptions")
3519
+ var generator_default2 = withRunGenerator(
3520
+ "Configuration Schema Creator",
3521
+ configSchemaGeneratorFn,
3522
+ {
3523
+ hooks: {
3524
+ applyDefaultOptions: (options) => {
3525
+ options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
3526
+ return options;
3527
+ }
3528
+ }
3135
3529
  }
3136
- });
3530
+ );
3137
3531
 
3138
3532
  // ../workspace-tools/src/generators/init/init.ts
3139
3533
  init_esm_shims();
3140
- import { addDependenciesToPackageJson as addDependenciesToPackageJson2, formatFiles as formatFiles4 } from "@nx/devkit";
3534
+ import {
3535
+ addDependenciesToPackageJson as addDependenciesToPackageJson2,
3536
+ formatFiles as formatFiles4
3537
+ } from "@nx/devkit";
3141
3538
  async function initGenerator(tree, schema) {
3142
- const task = addDependenciesToPackageJson2(tree, {
3143
- nx: "^19.6.2",
3144
- "@nx/workspace": "^19.6.2",
3145
- "@nx/js": "^19.6.2",
3146
- "@storm-software/eslint": "latest",
3147
- "@storm-software/prettier": "latest",
3148
- "@storm-software/config-tools": "latest",
3149
- "@storm-software/testing-tools": "latest",
3150
- "@storm-software/git-tools": "latest",
3151
- "@storm-software/linting-tools": "latest"
3152
- }, {});
3539
+ const task = addDependenciesToPackageJson2(
3540
+ tree,
3541
+ {
3542
+ nx: "^19.6.2",
3543
+ "@nx/workspace": "^19.6.2",
3544
+ "@nx/js": "^19.6.2",
3545
+ "@storm-software/eslint": "latest",
3546
+ "@storm-software/prettier": "latest",
3547
+ "@storm-software/config-tools": "latest",
3548
+ "@storm-software/testing-tools": "latest",
3549
+ "@storm-software/git-tools": "latest",
3550
+ "@storm-software/linting-tools": "latest"
3551
+ },
3552
+ {}
3553
+ );
3153
3554
  if (!schema.skipFormat) {
3154
3555
  await formatFiles4(tree);
3155
3556
  }
3156
3557
  return task;
3157
3558
  }
3158
- __name(initGenerator, "initGenerator");
3159
3559
 
3160
3560
  // ../workspace-tools/src/generators/neutral-library/generator.ts
3161
3561
  init_esm_shims();
3162
- import { formatFiles as formatFiles5, generateFiles as generateFiles2, names as names3, offsetFromRoot as offsetFromRoot3 } from "@nx/devkit";
3562
+ import {
3563
+ formatFiles as formatFiles5,
3564
+ generateFiles as generateFiles2,
3565
+ names as names3,
3566
+ offsetFromRoot as offsetFromRoot3
3567
+ } from "@nx/devkit";
3163
3568
  async function neutralLibraryGeneratorFn(tree, schema, config) {
3164
- const filesDir = joinPaths(__dirname, "src", "generators", "neutral-library", "files");
3569
+ const filesDir = joinPaths(
3570
+ __dirname,
3571
+ "src",
3572
+ "generators",
3573
+ "neutral-library",
3574
+ "files"
3575
+ );
3165
3576
  const tsLibraryGeneratorOptions = {
3166
3577
  ...schema,
3167
3578
  platform: "neutral",
@@ -3169,7 +3580,9 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
3169
3580
  buildExecutor: "@storm-software/workspace-tools:unbuild"
3170
3581
  };
3171
3582
  const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
3172
- const { className, name, propertyName } = names3(options.projectNames.projectFileName);
3583
+ const { className, name, propertyName } = names3(
3584
+ options.projectNames.projectFileName
3585
+ );
3173
3586
  generateFiles2(tree, filesDir, options.projectRoot, {
3174
3587
  ...schema,
3175
3588
  dot: ".",
@@ -3190,22 +3603,36 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
3190
3603
  await formatFiles5(tree);
3191
3604
  return null;
3192
3605
  }
3193
- __name(neutralLibraryGeneratorFn, "neutralLibraryGeneratorFn");
3194
- var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral Platform)", neutralLibraryGeneratorFn, {
3195
- hooks: {
3196
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
3197
- options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
3198
- options.platform = "neutral";
3199
- return options;
3200
- }, "applyDefaultOptions")
3606
+ var generator_default3 = withRunGenerator(
3607
+ "TypeScript Library Creator (Neutral Platform)",
3608
+ neutralLibraryGeneratorFn,
3609
+ {
3610
+ hooks: {
3611
+ applyDefaultOptions: (options) => {
3612
+ options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
3613
+ options.platform = "neutral";
3614
+ return options;
3615
+ }
3616
+ }
3201
3617
  }
3202
- });
3618
+ );
3203
3619
 
3204
3620
  // ../workspace-tools/src/generators/node-library/generator.ts
3205
3621
  init_esm_shims();
3206
- import { formatFiles as formatFiles6, generateFiles as generateFiles3, names as names4, offsetFromRoot as offsetFromRoot4 } from "@nx/devkit";
3622
+ import {
3623
+ formatFiles as formatFiles6,
3624
+ generateFiles as generateFiles3,
3625
+ names as names4,
3626
+ offsetFromRoot as offsetFromRoot4
3627
+ } from "@nx/devkit";
3207
3628
  async function nodeLibraryGeneratorFn(tree, schema, config) {
3208
- const filesDir = joinPaths(__dirname, "src", "generators", "node-library", "files");
3629
+ const filesDir = joinPaths(
3630
+ __dirname,
3631
+ "src",
3632
+ "generators",
3633
+ "node-library",
3634
+ "files"
3635
+ );
3209
3636
  const tsLibraryGeneratorOptions = {
3210
3637
  platform: "node",
3211
3638
  devDependencies: {
@@ -3238,20 +3665,30 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
3238
3665
  await formatFiles6(tree);
3239
3666
  return null;
3240
3667
  }
3241
- __name(nodeLibraryGeneratorFn, "nodeLibraryGeneratorFn");
3242
- var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Platform)", nodeLibraryGeneratorFn, {
3243
- hooks: {
3244
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
3245
- options.description ??= "A library used by Storm Software to support NodeJs applications";
3246
- options.platform ??= "node";
3247
- return options;
3248
- }, "applyDefaultOptions")
3668
+ var generator_default4 = withRunGenerator(
3669
+ "TypeScript Library Creator (NodeJs Platform)",
3670
+ nodeLibraryGeneratorFn,
3671
+ {
3672
+ hooks: {
3673
+ applyDefaultOptions: (options) => {
3674
+ options.description ??= "A library used by Storm Software to support NodeJs applications";
3675
+ options.platform ??= "node";
3676
+ return options;
3677
+ }
3678
+ }
3249
3679
  }
3250
- });
3680
+ );
3251
3681
 
3252
3682
  // ../workspace-tools/src/generators/preset/generator.ts
3253
3683
  init_esm_shims();
3254
- import { addDependenciesToPackageJson as addDependenciesToPackageJson3, addProjectConfiguration as addProjectConfiguration2, formatFiles as formatFiles7, generateFiles as generateFiles4, joinPathFragments as joinPathFragments4, updateJson as updateJson2 } from "@nx/devkit";
3684
+ import {
3685
+ addDependenciesToPackageJson as addDependenciesToPackageJson3,
3686
+ addProjectConfiguration as addProjectConfiguration2,
3687
+ formatFiles as formatFiles7,
3688
+ generateFiles as generateFiles4,
3689
+ joinPathFragments as joinPathFragments4,
3690
+ updateJson as updateJson2
3691
+ } from "@nx/devkit";
3255
3692
  import * as path4 from "node:path";
3256
3693
  async function presetGeneratorFn(tree, options) {
3257
3694
  const projectRoot = ".";
@@ -3466,15 +3903,31 @@ async function presetGeneratorFn(tree, options) {
3466
3903
  "nx-cloud": "latest"
3467
3904
  };
3468
3905
  }
3469
- await Promise.resolve(addDependenciesToPackageJson3(tree, dependencies, {}, joinPathFragments4(projectRoot, "package.json")));
3906
+ await Promise.resolve(
3907
+ addDependenciesToPackageJson3(
3908
+ tree,
3909
+ dependencies,
3910
+ {},
3911
+ joinPathFragments4(projectRoot, "package.json")
3912
+ )
3913
+ );
3470
3914
  return null;
3471
3915
  }
3472
- __name(presetGeneratorFn, "presetGeneratorFn");
3473
- var generator_default5 = withRunGenerator("Storm Workspace Preset Generator", presetGeneratorFn);
3916
+ var generator_default5 = withRunGenerator(
3917
+ "Storm Workspace Preset Generator",
3918
+ presetGeneratorFn
3919
+ );
3474
3920
 
3475
3921
  // ../workspace-tools/src/generators/release-version/generator.ts
3476
3922
  init_esm_shims();
3477
- import { formatFiles as formatFiles8, joinPathFragments as joinPathFragments5, output, readJson as readJson2, updateJson as updateJson3, writeJson as writeJson3 } from "@nx/devkit";
3923
+ import {
3924
+ formatFiles as formatFiles8,
3925
+ joinPathFragments as joinPathFragments5,
3926
+ output,
3927
+ readJson as readJson2,
3928
+ updateJson as updateJson3,
3929
+ writeJson as writeJson3
3930
+ } from "@nx/devkit";
3478
3931
  import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies } from "@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies";
3479
3932
  import { updateLockFile } from "@nx/js/src/release/utils/update-lock-file";
3480
3933
 
@@ -3620,7 +4073,9 @@ var DEFAULT_COMMIT_QUESTIONS = {
3620
4073
  type: "select",
3621
4074
  title: "Commit Type",
3622
4075
  description: "Select the commit type that best describes your changes",
3623
- enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
4076
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
4077
+ (type) => DEFAULT_COMMIT_TYPES[type].hidden !== true
4078
+ ).reduce((ret, type) => {
3624
4079
  ret[type] = DEFAULT_COMMIT_TYPES[type];
3625
4080
  return ret;
3626
4081
  }, {}),
@@ -3660,7 +4115,7 @@ var DEFAULT_COMMIT_QUESTIONS = {
3660
4115
  type: "input",
3661
4116
  title: "Breaking Changes (Details)",
3662
4117
  description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
3663
- when: /* @__PURE__ */ __name((answers) => answers.isBreaking === true, "when"),
4118
+ when: (answers) => answers.isBreaking === true,
3664
4119
  maxLength: 600,
3665
4120
  minLength: 3
3666
4121
  },
@@ -3674,17 +4129,11 @@ var DEFAULT_COMMIT_QUESTIONS = {
3674
4129
  type: "input",
3675
4130
  title: "Open Issue Affected (Details)",
3676
4131
  description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
3677
- when: /* @__PURE__ */ __name((answers) => answers.isIssueAffected === true, "when"),
4132
+ when: (answers) => answers.isIssueAffected === true,
3678
4133
  maxLength: 600,
3679
4134
  minLength: 3
3680
4135
  }
3681
4136
  };
3682
- var RuleConfigSeverity;
3683
- (function(RuleConfigSeverity2) {
3684
- RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
3685
- RuleConfigSeverity2[RuleConfigSeverity2["Warning"] = 1] = "Warning";
3686
- RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
3687
- })(RuleConfigSeverity || (RuleConfigSeverity = {}));
3688
4137
 
3689
4138
  // ../git-tools/src/release/config.ts
3690
4139
  init_esm_shims();
@@ -3693,10 +4142,19 @@ init_esm_shims();
3693
4142
  import { exec, execSync as execSync4 } from "node:child_process";
3694
4143
  import { relative as relative3 } from "node:path";
3695
4144
  import { IMPLICIT_DEFAULT_RELEASE_GROUP } from "nx/src/command-line/release/config/config";
3696
- import { getFirstGitCommit, getLatestGitTagForPattern } from "nx/src/command-line/release/utils/git";
3697
- import { resolveSemverSpecifierFromConventionalCommits, resolveSemverSpecifierFromPrompt } from "nx/src/command-line/release/utils/resolve-semver-specifier";
4145
+ import {
4146
+ getFirstGitCommit,
4147
+ getLatestGitTagForPattern
4148
+ } from "nx/src/command-line/release/utils/git";
4149
+ import {
4150
+ resolveSemverSpecifierFromConventionalCommits,
4151
+ resolveSemverSpecifierFromPrompt
4152
+ } from "nx/src/command-line/release/utils/resolve-semver-specifier";
3698
4153
  import { isValidSemverSpecifier } from "nx/src/command-line/release/utils/semver";
3699
- import { deriveNewSemverVersion, validReleaseVersionPrefixes } from "nx/src/command-line/release/version-legacy";
4154
+ import {
4155
+ deriveNewSemverVersion,
4156
+ validReleaseVersionPrefixes
4157
+ } from "nx/src/command-line/release/version-legacy";
3700
4158
  import { interpolate } from "nx/src/tasks-runner/utils";
3701
4159
  import { prerelease } from "semver";
3702
4160
 
@@ -3764,11 +4222,7 @@ var cargo_base_executor_untyped_default = defineUntypedSchema3({
3764
4222
  $schema: {
3765
4223
  title: "Toolchain",
3766
4224
  description: "The type of toolchain to use for the build",
3767
- enum: [
3768
- "stable",
3769
- "beta",
3770
- "nightly"
3771
- ],
4225
+ enum: ["stable", "beta", "nightly"],
3772
4226
  default: "stable"
3773
4227
  },
3774
4228
  $default: "stable"
@@ -3806,17 +4260,7 @@ var cargo_base_executor_untyped_default = defineUntypedSchema3({
3806
4260
  title: "Features",
3807
4261
  type: "string",
3808
4262
  description: "The features to build",
3809
- oneOf: [
3810
- {
3811
- type: "string"
3812
- },
3813
- {
3814
- type: "array",
3815
- items: {
3816
- type: "string"
3817
- }
3818
- }
3819
- ]
4263
+ oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }]
3820
4264
  }
3821
4265
  },
3822
4266
  allFeatures: {
@@ -3837,10 +4281,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3837
4281
  id: "TypeScriptBuildExecutorSchema",
3838
4282
  title: "TypeScript Build Executor",
3839
4283
  description: "A type definition for the base TypeScript build executor schema",
3840
- required: [
3841
- "entry",
3842
- "tsconfig"
3843
- ]
4284
+ required: ["entry", "tsconfig"]
3844
4285
  },
3845
4286
  entry: {
3846
4287
  $schema: {
@@ -3848,13 +4289,9 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3848
4289
  format: "path",
3849
4290
  type: "array",
3850
4291
  description: "The entry file or files to build",
3851
- items: {
3852
- type: "string"
3853
- }
4292
+ items: { type: "string" }
3854
4293
  },
3855
- $default: [
3856
- "{sourceRoot}/index.ts"
3857
- ]
4294
+ $default: ["{sourceRoot}/index.ts"]
3858
4295
  },
3859
4296
  tsconfig: {
3860
4297
  $schema: {
@@ -3934,7 +4371,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3934
4371
  ]
3935
4372
  },
3936
4373
  $default: "esnext",
3937
- $resolve: /* @__PURE__ */ __name((val = "esnext") => val.toLowerCase(), "$resolve")
4374
+ $resolve: (val = "esnext") => val.toLowerCase()
3938
4375
  },
3939
4376
  format: {
3940
4377
  $schema: {
@@ -3943,28 +4380,17 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3943
4380
  description: "The format to build",
3944
4381
  items: {
3945
4382
  type: "string",
3946
- enum: [
3947
- "cjs",
3948
- "esm",
3949
- "iife"
3950
- ]
4383
+ enum: ["cjs", "esm", "iife"]
3951
4384
  }
3952
4385
  },
3953
- $resolve: /* @__PURE__ */ __name((val = [
3954
- "cjs",
3955
- "esm"
3956
- ]) => [].concat(val), "$resolve")
4386
+ $resolve: (val = ["cjs", "esm"]) => [].concat(val)
3957
4387
  },
3958
4388
  platform: {
3959
4389
  $schema: {
3960
4390
  title: "Platform",
3961
4391
  type: "string",
3962
4392
  description: "The platform to build",
3963
- enum: [
3964
- "neutral",
3965
- "node",
3966
- "browser"
3967
- ]
4393
+ enum: ["neutral", "node", "browser"]
3968
4394
  },
3969
4395
  $default: "neutral"
3970
4396
  },
@@ -3974,7 +4400,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3974
4400
  type: "array",
3975
4401
  description: "The external dependencies"
3976
4402
  },
3977
- $resolve: /* @__PURE__ */ __name((val = []) => [].concat(val), "$resolve")
4403
+ $resolve: (val = []) => [].concat(val)
3978
4404
  },
3979
4405
  define: {
3980
4406
  $schema: {
@@ -3983,7 +4409,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3983
4409
  tsType: "Record<string, string>",
3984
4410
  description: "The define values"
3985
4411
  },
3986
- $resolve: /* @__PURE__ */ __name((val = {}) => val, "$resolve"),
4412
+ $resolve: (val = {}) => val,
3987
4413
  $default: {}
3988
4414
  },
3989
4415
  env: {
@@ -3993,7 +4419,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3993
4419
  tsType: "Record<string, string>",
3994
4420
  description: "The environment variable values"
3995
4421
  },
3996
- $resolve: /* @__PURE__ */ __name((val = {}) => val, "$resolve"),
4422
+ $resolve: (val = {}) => val,
3997
4423
  $default: {}
3998
4424
  }
3999
4425
  });
@@ -4007,10 +4433,7 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
4007
4433
  id: "TypeScriptLibraryGeneratorSchema",
4008
4434
  title: "TypeScript Library Generator",
4009
4435
  description: "A type definition for the base TypeScript Library Generator schema",
4010
- required: [
4011
- "directory",
4012
- "name"
4013
- ]
4436
+ required: ["directory", "name"]
4014
4437
  },
4015
4438
  name: {
4016
4439
  $schema: {
@@ -4039,12 +4462,7 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
4039
4462
  title: "Platform",
4040
4463
  type: "string",
4041
4464
  description: "The platform to target with the library",
4042
- enum: [
4043
- "neutral",
4044
- "node",
4045
- "worker",
4046
- "browser"
4047
- ]
4465
+ enum: ["neutral", "node", "worker", "browser"]
4048
4466
  },
4049
4467
  $default: "neutral"
4050
4468
  },
@@ -4066,11 +4484,7 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
4066
4484
  $schema: {
4067
4485
  title: "Unit Test Runner",
4068
4486
  type: "string",
4069
- enum: [
4070
- "jest",
4071
- "vitest",
4072
- "none"
4073
- ],
4487
+ enum: ["jest", "vitest", "none"],
4074
4488
  description: "The unit test runner to use"
4075
4489
  }
4076
4490
  },
@@ -4078,10 +4492,7 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
4078
4492
  $schema: {
4079
4493
  title: "Test Environment",
4080
4494
  type: "string",
4081
- enum: [
4082
- "jsdom",
4083
- "node"
4084
- ],
4495
+ enum: ["jsdom", "node"],
4085
4496
  description: "The test environment to use"
4086
4497
  }
4087
4498
  },
@@ -4138,12 +4549,25 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
4138
4549
 
4139
4550
  // ../workspace-tools/src/utils/lock-file.ts
4140
4551
  init_esm_shims();
4141
- import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "@nx/devkit";
4552
+ import {
4553
+ output as output2,
4554
+ readJsonFile,
4555
+ workspaceRoot as workspaceRoot2
4556
+ } from "@nx/devkit";
4142
4557
  import { existsSync as existsSync8 } from "node:fs";
4143
4558
  import { join as join4 } from "node:path";
4144
- import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
4145
- import { getPnpmLockfileDependencies, getPnpmLockfileNodes } from "nx/src/plugins/js/lock-file/pnpm-parser";
4146
- import { getYarnLockfileDependencies, getYarnLockfileNodes } from "nx/src/plugins/js/lock-file/yarn-parser";
4559
+ import {
4560
+ getNpmLockfileDependencies,
4561
+ getNpmLockfileNodes
4562
+ } from "nx/src/plugins/js/lock-file/npm-parser";
4563
+ import {
4564
+ getPnpmLockfileDependencies,
4565
+ getPnpmLockfileNodes
4566
+ } from "nx/src/plugins/js/lock-file/pnpm-parser";
4567
+ import {
4568
+ getYarnLockfileDependencies,
4569
+ getYarnLockfileNodes
4570
+ } from "nx/src/plugins/js/lock-file/yarn-parser";
4147
4571
  var YARN_LOCK_FILE = "yarn.lock";
4148
4572
  var NPM_LOCK_FILE = "package-lock.json";
4149
4573
  var PNPM_LOCK_FILE = "pnpm-lock.yaml";
@@ -4153,7 +4577,10 @@ var PNPM_LOCK_PATH = join4(workspaceRoot2, PNPM_LOCK_FILE);
4153
4577
 
4154
4578
  // ../workspace-tools/src/utils/package-helpers.ts
4155
4579
  init_esm_shims();
4156
- import { joinPathFragments as joinPathFragments6, readJsonFile as readJsonFile2 } from "@nx/devkit";
4580
+ import {
4581
+ joinPathFragments as joinPathFragments6,
4582
+ readJsonFile as readJsonFile2
4583
+ } from "@nx/devkit";
4157
4584
  import { existsSync as existsSync9 } from "node:fs";
4158
4585
 
4159
4586
  // ../workspace-tools/src/utils/plugin-helpers.ts
@@ -4176,18 +4603,23 @@ async function initGeneratorFn(tree, options, config) {
4176
4603
  }
4177
4604
  return task;
4178
4605
  }
4179
- __name(initGeneratorFn, "initGeneratorFn");
4180
- var generator_default6 = withRunGenerator("Initialize Storm Projen workspace", initGeneratorFn);
4606
+ var generator_default6 = withRunGenerator(
4607
+ "Initialize Storm Projen workspace",
4608
+ initGeneratorFn
4609
+ );
4181
4610
  function addProjenDeps(tree, options) {
4182
4611
  return () => {
4183
4612
  const packageJson = readJsonFile4(`${options.directory}/package.json`);
4184
4613
  packageJson.dependencies["projen"] ??= "^0.91.6";
4185
4614
  if (packageJson) {
4186
- addDependenciesToPackageJson4(tree, packageJson.dependencies || {}, packageJson.devDependencies || {})();
4615
+ addDependenciesToPackageJson4(
4616
+ tree,
4617
+ packageJson.dependencies || {},
4618
+ packageJson.devDependencies || {}
4619
+ )();
4187
4620
  }
4188
4621
  };
4189
4622
  }
4190
- __name(addProjenDeps, "addProjenDeps");
4191
4623
 
4192
4624
  export {
4193
4625
  initGeneratorFn,