@storm-software/pulumi-tools 0.7.79 → 0.7.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-DD4EVDG7.mjs → chunk-2MM34QNY.mjs} +1189 -769
  4. package/dist/chunk-2QAZEBOG.js +42 -0
  5. package/dist/chunk-3RG5ZIWI.js +10 -0
  6. package/dist/chunk-5ZBO7GC6.js +16 -0
  7. package/dist/chunk-C6HV3VOH.mjs +16 -0
  8. package/dist/{chunk-AJICSYTL.mjs → chunk-ESHAP37L.mjs} +1 -1
  9. package/dist/{chunk-DBLK3NPE.js → chunk-HUKXHFCA.js} +4 -9
  10. package/dist/chunk-IBJKPAXV.mjs +42 -0
  11. package/dist/{chunk-L2DHGVS5.mjs → chunk-IEZKYJSF.mjs} +3 -6
  12. package/dist/{chunk-GZGV3XVE.js → chunk-J5NVVVHZ.js} +2 -2
  13. package/dist/{chunk-KXK6HK7Z.mjs → chunk-JWQAUSXZ.mjs} +1 -1
  14. package/dist/{chunk-FOZFHF2O.mjs → chunk-KPFHCT4A.mjs} +3 -8
  15. package/dist/{chunk-U7IKOXSI.mjs → chunk-LVBND7MN.mjs} +1 -1
  16. package/dist/chunk-MHBRG7UB.js +18 -0
  17. package/dist/chunk-QW6YGFF7.js +133 -0
  18. package/dist/{chunk-AKO3NFBS.js → chunk-S3CLNYH2.js} +1171 -751
  19. package/dist/chunk-TCPQS3FC.mjs +133 -0
  20. package/dist/{chunk-I3FRKBMS.js → chunk-TRMMILFW.js} +2 -2
  21. package/dist/{chunk-QNQZE4KJ.js → chunk-XOH426DW.js} +2 -2
  22. package/dist/chunk-YTI55E4Z.mjs +18 -0
  23. package/dist/executors.js +8 -8
  24. package/dist/executors.mjs +8 -8
  25. package/dist/generators.js +5 -5
  26. package/dist/generators.mjs +4 -4
  27. package/dist/index.js +11 -11
  28. package/dist/index.mjs +10 -10
  29. package/dist/src/base/base-executor.js +4 -4
  30. package/dist/src/base/base-executor.mjs +3 -3
  31. package/dist/src/base/index.js +5 -5
  32. package/dist/src/base/index.mjs +4 -4
  33. package/dist/src/base/providers.js +3 -3
  34. package/dist/src/base/providers.mjs +2 -2
  35. package/dist/src/executors/config/executor.js +5 -5
  36. package/dist/src/executors/config/executor.mjs +4 -4
  37. package/dist/src/executors/import/executor.js +5 -5
  38. package/dist/src/executors/import/executor.mjs +4 -4
  39. package/dist/src/executors/preview/executor.js +5 -5
  40. package/dist/src/executors/preview/executor.mjs +4 -4
  41. package/dist/src/executors/refresh/executor.js +5 -5
  42. package/dist/src/executors/refresh/executor.mjs +4 -4
  43. package/dist/src/executors/up/executor.js +5 -5
  44. package/dist/src/executors/up/executor.mjs +4 -4
  45. package/dist/src/generators/init/generator.js +5 -5
  46. package/dist/src/generators/init/generator.mjs +4 -4
  47. package/dist/tsup.config.js +3 -8
  48. package/dist/tsup.config.mjs +3 -8
  49. package/package.json +1 -1
  50. package/dist/chunk-2FBBYFXH.js +0 -15
  51. package/dist/chunk-3GQAWCBQ.js +0 -13
  52. package/dist/chunk-A6G6LISR.js +0 -109
  53. package/dist/chunk-DFGQICYB.mjs +0 -13
  54. package/dist/chunk-P47FZNOX.js +0 -35
  55. package/dist/chunk-Q5MONGV7.mjs +0 -109
  56. package/dist/chunk-UV2ERO6Z.js +0 -13
  57. package/dist/chunk-WEKJLMNL.mjs +0 -35
  58. package/dist/chunk-ZNKCM4HA.mjs +0 -15
@@ -1,13 +1,12 @@
1
1
  import {
2
2
  __dirname,
3
- __name,
4
3
  __require
5
- } from "./chunk-L2DHGVS5.mjs";
4
+ } from "./chunk-IEZKYJSF.mjs";
6
5
 
7
6
  // ../config-tools/src/utilities/run.ts
8
7
  import { exec, execSync } from "node:child_process";
9
8
  var LARGE_BUFFER = 1024 * 1e6;
10
- var run = /* @__PURE__ */ __name((config, command, cwd = config.workspaceRoot ?? process.cwd(), stdio = "inherit", env = process.env) => {
9
+ var run = (config, command, cwd = config.workspaceRoot ?? process.cwd(), stdio = "inherit", env = process.env) => {
11
10
  return execSync(command, {
12
11
  cwd,
13
12
  env: {
@@ -21,7 +20,7 @@ var run = /* @__PURE__ */ __name((config, command, cwd = config.workspaceRoot ??
21
20
  maxBuffer: LARGE_BUFFER,
22
21
  killSignal: "SIGTERM"
23
22
  });
24
- }, "run");
23
+ };
25
24
 
26
25
  // ../config-tools/src/config-file/get-config-file.ts
27
26
  import { loadConfig } from "c12";
@@ -149,23 +148,39 @@ var RegistryConfigSchema = z.object({
149
148
  cyclone: RegistryUrlConfigSchema,
150
149
  container: RegistryUrlConfigSchema
151
150
  }).default({}).describe("A list of remote registry URLs used by Storm Software");
152
- var ColorConfigSchema = SingleThemeColorConfigSchema.or(MultiThemeColorConfigSchema).describe("Colors used for various workspace elements");
151
+ var ColorConfigSchema = SingleThemeColorConfigSchema.or(
152
+ MultiThemeColorConfigSchema
153
+ ).describe("Colors used for various workspace elements");
153
154
  var ColorConfigMapSchema = z.union([
154
- z.object({
155
- base: ColorConfigSchema
156
- }),
155
+ z.object({ base: ColorConfigSchema }),
157
156
  z.record(z.string(), ColorConfigSchema)
158
157
  ]);
159
- 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.");
160
- 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.");
158
+ var ExtendsItemSchema = z.string().trim().describe(
159
+ "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."
160
+ );
161
+ var ExtendsSchema = ExtendsItemSchema.or(
162
+ z.array(ExtendsItemSchema)
163
+ ).describe(
164
+ "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."
165
+ );
161
166
  var WorkspaceBotConfigSchema = z.object({
162
- 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)"),
167
+ name: z.string().trim().default("stormie-bot").describe(
168
+ "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
169
+ ),
163
170
  email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
164
- }).describe("The workspace's bot user's config used to automated various operations tasks");
171
+ }).describe(
172
+ "The workspace's bot user's config used to automated various operations tasks"
173
+ );
165
174
  var WorkspaceReleaseConfigSchema = z.object({
166
- banner: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("A URL to a banner image used to display the workspace's release"),
167
- header: z.string().trim().optional().describe("A header message appended to the start of the workspace's release notes"),
168
- footer: z.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe("A footer message appended to the end of the workspace's release notes")
175
+ banner: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
176
+ "A URL to a banner image used to display the workspace's release"
177
+ ),
178
+ header: z.string().trim().optional().describe(
179
+ "A header message appended to the start of the workspace's release notes"
180
+ ),
181
+ footer: z.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe(
182
+ "A footer message appended to the end of the workspace's release notes"
183
+ )
169
184
  }).describe("The workspace's release config used during the release process");
170
185
  var WorkspaceAccountConfigSchema = z.object({
171
186
  twitter: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
@@ -174,23 +189,41 @@ var WorkspaceAccountConfigSchema = z.object({
174
189
  slack: z.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
175
190
  medium: z.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
176
191
  github: z.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
177
- }).describe("The workspace's account config used to store various social media links");
192
+ }).describe(
193
+ "The workspace's account config used to store various social media links"
194
+ );
178
195
  var WorkspaceDirectoryConfigSchema = z.object({
179
- cache: z.string().trim().optional().describe("The directory used to store the environment's cached file data"),
196
+ cache: z.string().trim().optional().describe(
197
+ "The directory used to store the environment's cached file data"
198
+ ),
180
199
  data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
181
- config: z.string().trim().optional().describe("The directory used to store the environment's configuration files"),
200
+ config: z.string().trim().optional().describe(
201
+ "The directory used to store the environment's configuration files"
202
+ ),
182
203
  temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
183
204
  log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
184
- 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)")
185
- }).describe("Various directories used by the workspace to store data, cache, and configuration files");
205
+ build: z.string().trim().default("dist").describe(
206
+ "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
207
+ )
208
+ }).describe(
209
+ "Various directories used by the workspace to store data, cache, and configuration files"
210
+ );
186
211
  var errorConfigSchema = z.object({
187
212
  codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
188
- 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")
213
+ url: z.string().trim().url().optional().describe(
214
+ "A URL to a page that looks up the workspace's error messages given a specific error code"
215
+ )
189
216
  }).describe("The workspace's error config used during the error process");
190
217
  var stormWorkspaceConfigSchema = z.object({
191
- $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"),
218
+ $schema: z.string().trim().default(
219
+ "https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
220
+ ).optional().nullish().describe(
221
+ "The URL to the JSON schema file that describes the Storm configuration file"
222
+ ),
192
223
  extends: ExtendsSchema.optional(),
193
- name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
224
+ name: z.string().trim().toLowerCase().optional().describe(
225
+ "The name of the service/package/scope using this configuration"
226
+ ),
194
227
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
195
228
  organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
196
229
  repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
@@ -206,21 +239,16 @@ var stormWorkspaceConfigSchema = z.object({
206
239
  release: WorkspaceReleaseConfigSchema,
207
240
  account: WorkspaceAccountConfigSchema,
208
241
  error: errorConfigSchema,
209
- mode: z.enum([
210
- "development",
211
- "staging",
212
- "production"
213
- ]).default("production").describe("The current runtime environment mode for the package"),
242
+ mode: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment mode for the package"),
214
243
  workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
215
- externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
244
+ externalPackagePatterns: z.array(z.string()).default([]).describe(
245
+ "The build will use these package patterns to determine if they should be external to the bundle"
246
+ ),
216
247
  skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
217
248
  directories: WorkspaceDirectoryConfigSchema,
218
- packageManager: z.enum([
219
- "npm",
220
- "yarn",
221
- "pnpm",
222
- "bun"
223
- ]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
249
+ packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
250
+ "The JavaScript/TypeScript package manager used by the repository"
251
+ ),
224
252
  timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
225
253
  locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
226
254
  logLevel: z.enum([
@@ -233,13 +261,23 @@ var stormWorkspaceConfigSchema = z.object({
233
261
  "debug",
234
262
  "trace",
235
263
  "all"
236
- ]).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`)."),
237
- skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
264
+ ]).default("info").describe(
265
+ "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`)."
266
+ ),
267
+ skipConfigLogging: z.boolean().optional().describe(
268
+ "Should the logging of the current Storm Workspace configuration be skipped?"
269
+ ),
238
270
  registry: RegistryConfigSchema,
239
- 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."),
240
- colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
271
+ configFile: z.string().trim().nullable().default(null).describe(
272
+ "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
273
+ ),
274
+ colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
275
+ "Storm theme config values used for styling various package elements"
276
+ ),
241
277
  extensions: z.record(z.any()).optional().default({}).describe("Configuration of each used extension")
242
- }).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.");
278
+ }).describe(
279
+ "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."
280
+ );
243
281
 
244
282
  // ../config/src/types.ts
245
283
  var COLOR_KEYS = [
@@ -273,11 +311,10 @@ function normalizeWindowsPath(input = "") {
273
311
  }
274
312
  return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
275
313
  }
276
- __name(normalizeWindowsPath, "normalizeWindowsPath");
277
314
  var _UNC_REGEX = /^[/\\]{2}/;
278
315
  var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
279
316
  var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
280
- var correctPaths = /* @__PURE__ */ __name(function(path5) {
317
+ var correctPaths = function(path5) {
281
318
  if (!path5 || path5.length === 0) {
282
319
  return ".";
283
320
  }
@@ -305,8 +342,8 @@ var correctPaths = /* @__PURE__ */ __name(function(path5) {
305
342
  return `//${path5}`;
306
343
  }
307
344
  return isPathAbsolute && !isAbsolute(path5) ? `/${path5}` : path5;
308
- }, "correctPaths");
309
- var joinPaths = /* @__PURE__ */ __name(function(...segments) {
345
+ };
346
+ var joinPaths = function(...segments) {
310
347
  let path5 = "";
311
348
  for (const seg of segments) {
312
349
  if (!seg) {
@@ -326,7 +363,7 @@ var joinPaths = /* @__PURE__ */ __name(function(...segments) {
326
363
  }
327
364
  }
328
365
  return correctPaths(path5);
329
- }, "joinPaths");
366
+ };
330
367
  function normalizeString(path5, allowAboveRoot) {
331
368
  let res = "";
332
369
  let lastSegmentLength = 0;
@@ -387,10 +424,9 @@ function normalizeString(path5, allowAboveRoot) {
387
424
  }
388
425
  return res;
389
426
  }
390
- __name(normalizeString, "normalizeString");
391
- var isAbsolute = /* @__PURE__ */ __name(function(p) {
427
+ var isAbsolute = function(p) {
392
428
  return _IS_ABSOLUTE_RE.test(p);
393
- }, "isAbsolute");
429
+ };
394
430
 
395
431
  // ../config-tools/src/utilities/find-up.ts
396
432
  import { existsSync } from "node:fs";
@@ -399,10 +435,14 @@ var MAX_PATH_SEARCH_DEPTH = 30;
399
435
  var depth = 0;
400
436
  function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
401
437
  const _startPath = startPath ?? process.cwd();
402
- if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
438
+ if (endDirectoryNames.some(
439
+ (endDirName) => existsSync(join(_startPath, endDirName))
440
+ )) {
403
441
  return _startPath;
404
442
  }
405
- if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
443
+ if (endFileNames.some(
444
+ (endFileName) => existsSync(join(_startPath, endFileName))
445
+ )) {
406
446
  return _startPath;
407
447
  }
408
448
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
@@ -411,7 +451,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
411
451
  }
412
452
  return void 0;
413
453
  }
414
- __name(findFolderUp, "findFolderUp");
415
454
 
416
455
  // ../config-tools/src/utilities/find-workspace-root.ts
417
456
  var rootFiles = [
@@ -458,21 +497,31 @@ var rootDirectories = [
458
497
  ];
459
498
  function findWorkspaceRootSafe(pathInsideMonorepo) {
460
499
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
461
- return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
462
- }
463
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
500
+ return correctPaths(
501
+ process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
502
+ );
503
+ }
504
+ return correctPaths(
505
+ findFolderUp(
506
+ pathInsideMonorepo ?? process.cwd(),
507
+ rootFiles,
508
+ rootDirectories
509
+ )
510
+ );
464
511
  }
465
- __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
466
512
  function findWorkspaceRoot(pathInsideMonorepo) {
467
513
  const result = findWorkspaceRootSafe(pathInsideMonorepo);
468
514
  if (!result) {
469
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
470
- ${rootFiles.join("\n")}
471
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
515
+ throw new Error(
516
+ `Cannot find workspace root upwards from known path. Files search list includes:
517
+ ${rootFiles.join(
518
+ "\n"
519
+ )}
520
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
521
+ );
472
522
  }
473
523
  return result;
474
524
  }
475
- __name(findWorkspaceRoot, "findWorkspaceRoot");
476
525
 
477
526
  // ../config-tools/src/utilities/get-default-config.ts
478
527
  var DEFAULT_COLOR_CONFIG = {
@@ -503,7 +552,7 @@ var DEFAULT_COLOR_CONFIG = {
503
552
  negative: "#dc2626"
504
553
  }
505
554
  };
506
- var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
555
+ var getDefaultConfig = async (root) => {
507
556
  let license = STORM_DEFAULT_LICENSE;
508
557
  let homepage = STORM_DEFAULT_HOMEPAGE;
509
558
  let name = void 0;
@@ -511,7 +560,10 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
511
560
  let repository = void 0;
512
561
  const workspaceRoot3 = findWorkspaceRoot(root);
513
562
  if (existsSync2(join2(workspaceRoot3, "package.json"))) {
514
- const file = await readFile(joinPaths(workspaceRoot3, "package.json"), "utf8");
563
+ const file = await readFile(
564
+ joinPaths(workspaceRoot3, "package.json"),
565
+ "utf8"
566
+ );
515
567
  if (file) {
516
568
  const packageJson = JSON.parse(file);
517
569
  if (packageJson.name) {
@@ -548,36 +600,36 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
548
600
  url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
549
601
  }
550
602
  };
551
- }, "getDefaultConfig");
603
+ };
552
604
 
553
605
  // ../config-tools/src/logger/chalk.ts
554
606
  import chalk from "chalk";
555
607
  var chalkDefault = {
556
- hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
557
- bgHex: /* @__PURE__ */ __name((_) => ({
558
- whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
559
- }), "bgHex"),
560
- whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright"),
561
- gray: /* @__PURE__ */ __name((message) => message, "gray"),
608
+ hex: (_) => (message) => message,
609
+ bgHex: (_) => ({
610
+ whiteBright: (message) => message
611
+ }),
612
+ whiteBright: (message) => message,
613
+ gray: (message) => message,
562
614
  bold: {
563
- hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
564
- bgHex: /* @__PURE__ */ __name((_) => ({
565
- whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
566
- }), "bgHex"),
567
- whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
615
+ hex: (_) => (message) => message,
616
+ bgHex: (_) => ({
617
+ whiteBright: (message) => message
618
+ }),
619
+ whiteBright: (message) => message
568
620
  },
569
621
  dim: {
570
- hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
571
- gray: /* @__PURE__ */ __name((message) => message, "gray")
622
+ hex: (_) => (message) => message,
623
+ gray: (message) => message
572
624
  }
573
625
  };
574
- var getChalk = /* @__PURE__ */ __name(() => {
626
+ var getChalk = () => {
575
627
  let _chalk = chalk;
576
628
  if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright) {
577
629
  _chalk = chalkDefault;
578
630
  }
579
631
  return _chalk;
580
- }, "getChalk");
632
+ };
581
633
 
582
634
  // ../config-tools/src/logger/is-unicode-supported.ts
583
635
  function isUnicodeSupported() {
@@ -589,10 +641,9 @@ function isUnicodeSupported() {
589
641
  process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
590
642
  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";
591
643
  }
592
- __name(isUnicodeSupported, "isUnicodeSupported");
593
644
 
594
645
  // ../config-tools/src/logger/console-icons.ts
595
- var useIcon = /* @__PURE__ */ __name((c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
646
+ var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
596
647
  var CONSOLE_ICONS = {
597
648
  [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
598
649
  [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
@@ -605,12 +656,12 @@ var CONSOLE_ICONS = {
605
656
  };
606
657
 
607
658
  // ../config-tools/src/logger/format-timestamp.ts
608
- var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
659
+ var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
609
660
  return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
610
- }, "formatTimestamp");
661
+ };
611
662
 
612
663
  // ../config-tools/src/logger/get-log-level.ts
613
- var getLogLevel = /* @__PURE__ */ __name((label) => {
664
+ var getLogLevel = (label) => {
614
665
  switch (label) {
615
666
  case "all":
616
667
  return LogLevel.ALL;
@@ -631,8 +682,8 @@ var getLogLevel = /* @__PURE__ */ __name((label) => {
631
682
  default:
632
683
  return LogLevel.INFO;
633
684
  }
634
- }, "getLogLevel");
635
- var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
685
+ };
686
+ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
636
687
  if (logLevel >= LogLevel.ALL) {
637
688
  return LogLevelLabel.ALL;
638
689
  }
@@ -658,10 +709,10 @@ var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
658
709
  return LogLevelLabel.SILENT;
659
710
  }
660
711
  return LogLevelLabel.INFO;
661
- }, "getLogLevelLabel");
712
+ };
662
713
 
663
714
  // ../config-tools/src/logger/console.ts
664
- var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
715
+ var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
665
716
  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;
666
717
  const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
667
718
  if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
@@ -670,102 +721,122 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _c
670
721
  }
671
722
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
672
723
  return (message) => {
673
- console.error(`
724
+ console.error(
725
+ `
674
726
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
675
- `);
727
+ `
728
+ );
676
729
  };
677
730
  }
678
731
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
679
732
  return (message) => {
680
- console.error(`
733
+ console.error(
734
+ `
681
735
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
682
- `);
736
+ `
737
+ );
683
738
  };
684
739
  }
685
740
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
686
741
  return (message) => {
687
- console.warn(`
742
+ console.warn(
743
+ `
688
744
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
689
- `);
745
+ `
746
+ );
690
747
  };
691
748
  }
692
749
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
693
750
  return (message) => {
694
- console.info(`
751
+ console.info(
752
+ `
695
753
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
696
- `);
754
+ `
755
+ );
697
756
  };
698
757
  }
699
758
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
700
759
  return (message) => {
701
- console.info(`
760
+ console.info(
761
+ `
702
762
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
703
- `);
763
+ `
764
+ );
704
765
  };
705
766
  }
706
767
  if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
707
768
  return (message) => {
708
- console.debug(`
769
+ console.debug(
770
+ `
709
771
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
710
- `);
772
+ `
773
+ );
711
774
  };
712
775
  }
713
776
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
714
777
  return (message) => {
715
- console.debug(`
778
+ console.debug(
779
+ `
716
780
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
717
- `);
781
+ `
782
+ );
718
783
  };
719
784
  }
720
785
  return (message) => {
721
- console.log(`
786
+ console.log(
787
+ `
722
788
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
723
- `);
789
+ `
790
+ );
724
791
  };
725
- }, "getLogFn");
726
- var writeFatal = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.FATAL, config)(message), "writeFatal");
727
- var writeError = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
728
- var writeWarning = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.WARN, config)(message), "writeWarning");
729
- var writeInfo = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
730
- var writeSuccess = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
731
- var writeDebug = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
732
- var writeTrace = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
733
- var getStopwatch = /* @__PURE__ */ __name((name) => {
792
+ };
793
+ var writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
794
+ var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
795
+ var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
796
+ var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
797
+ var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
798
+ var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
799
+ var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
800
+ var getStopwatch = (name) => {
734
801
  const start = process.hrtime();
735
802
  return () => {
736
803
  const end = process.hrtime(start);
737
- console.info(`
738
- > \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(end[0] * 1e3 + end[1] / 1e6)}ms to complete
739
- `);
804
+ console.info(
805
+ `
806
+ > \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
807
+ end[0] * 1e3 + end[1] / 1e6
808
+ )}ms to complete
809
+ `
810
+ );
740
811
  };
741
- }, "getStopwatch");
812
+ };
742
813
  var MAX_DEPTH = 4;
743
- var formatLogMessage = /* @__PURE__ */ __name((message, options = {}, depth2 = 0) => {
814
+ var formatLogMessage = (message, options = {}, depth2 = 0) => {
744
815
  if (depth2 > MAX_DEPTH) {
745
816
  return "<max depth>";
746
817
  }
747
818
  const prefix = options.prefix ?? "-";
748
819
  const skip = options.skip ?? [];
749
820
  return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
750
- ${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, {
751
- prefix: `${prefix}-`,
752
- skip
753
- }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
754
- ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], {
755
- prefix: `${prefix}-`,
756
- skip
757
- }, depth2 + 1) : message[key]}`).join("\n")}` : message;
758
- }, "formatLogMessage");
759
- var _isFunction = /* @__PURE__ */ __name((value) => {
821
+ ${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
822
+ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
823
+ (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
824
+ message[key],
825
+ { prefix: `${prefix}-`, skip },
826
+ depth2 + 1
827
+ ) : message[key]}`
828
+ ).join("\n")}` : message;
829
+ };
830
+ var _isFunction = (value) => {
760
831
  try {
761
832
  return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
762
833
  } catch (e) {
763
834
  return false;
764
835
  }
765
- }, "_isFunction");
836
+ };
766
837
 
767
838
  // ../config-tools/src/utilities/apply-workspace-tokens.ts
768
- var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams) => {
839
+ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
769
840
  let result = option;
770
841
  if (!result) {
771
842
  return result;
@@ -775,7 +846,10 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams
775
846
  if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
776
847
  for (const optionKey of optionKeys) {
777
848
  if (result.includes(`{${optionKey}}`)) {
778
- result = result.replaceAll(`{${optionKey}}`, tokenParams?.[optionKey] || "");
849
+ result = result.replaceAll(
850
+ `{${optionKey}}`,
851
+ tokenParams?.[optionKey] || ""
852
+ );
779
853
  }
780
854
  }
781
855
  }
@@ -785,40 +859,56 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams
785
859
  if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
786
860
  for (const configKey of configKeys) {
787
861
  if (result.includes(`{${configKey}}`)) {
788
- result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
862
+ result = result.replaceAll(
863
+ `{${configKey}}`,
864
+ tokenParams.config[configKey] || ""
865
+ );
789
866
  }
790
867
  }
791
868
  }
792
869
  }
793
870
  if (result.includes("{workspaceRoot}")) {
794
- result = result.replaceAll("{workspaceRoot}", tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot());
871
+ result = result.replaceAll(
872
+ "{workspaceRoot}",
873
+ tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot()
874
+ );
795
875
  }
796
876
  return result;
797
- }, "applyWorkspaceBaseTokens");
798
- var applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option, tokenParams) => {
877
+ };
878
+ var applyWorkspaceProjectTokens = (option, tokenParams) => {
799
879
  return applyWorkspaceBaseTokens(option, tokenParams);
800
- }, "applyWorkspaceProjectTokens");
801
- var applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, tokenParams, tokenizerFn) => {
880
+ };
881
+ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
802
882
  if (!options) {
803
883
  return {};
804
884
  }
805
885
  const result = {};
806
886
  for (const option of Object.keys(options)) {
807
887
  if (typeof options[option] === "string") {
808
- result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
888
+ result[option] = await Promise.resolve(
889
+ tokenizerFn(options[option], tokenParams)
890
+ );
809
891
  } else if (Array.isArray(options[option])) {
810
- result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
892
+ result[option] = await Promise.all(
893
+ options[option].map(
894
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item
895
+ )
896
+ );
811
897
  } else if (typeof options[option] === "object") {
812
- result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
898
+ result[option] = await applyWorkspaceTokens(
899
+ options[option],
900
+ tokenParams,
901
+ tokenizerFn
902
+ );
813
903
  } else {
814
904
  result[option] = options[option];
815
905
  }
816
906
  }
817
907
  return result;
818
- }, "applyWorkspaceTokens");
908
+ };
819
909
 
820
910
  // ../config-tools/src/config-file/get-config-file.ts
821
- var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
911
+ var getConfigFileByName = async (fileName, filePath, options = {}) => {
822
912
  const workspacePath = filePath || findWorkspaceRoot(filePath);
823
913
  const configs = await Promise.all([
824
914
  loadConfig({
@@ -828,7 +918,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
828
918
  envName: fileName?.toUpperCase(),
829
919
  jitiOptions: {
830
920
  debug: false,
831
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
921
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
922
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
923
+ "jiti"
924
+ )
832
925
  },
833
926
  ...options
834
927
  }),
@@ -839,32 +932,45 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
839
932
  envName: fileName?.toUpperCase(),
840
933
  jitiOptions: {
841
934
  debug: false,
842
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
935
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
936
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
937
+ "jiti"
938
+ )
843
939
  },
844
940
  configFile: fileName,
845
941
  ...options
846
942
  })
847
943
  ]);
848
944
  return defu(configs[0] ?? {}, configs[1] ?? {});
849
- }, "getConfigFileByName");
850
- var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
945
+ };
946
+ var getConfigFile = async (filePath, additionalFileNames = []) => {
851
947
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
852
948
  const result = await getConfigFileByName("storm-workspace", workspacePath);
853
949
  let config = result.config;
854
950
  const configFile = result.configFile;
855
951
  if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
856
- writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
857
- logLevel: "all"
858
- });
952
+ writeTrace(
953
+ `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
954
+ {
955
+ logLevel: "all"
956
+ }
957
+ );
859
958
  }
860
959
  if (additionalFileNames && additionalFileNames.length > 0) {
861
- const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
960
+ const results = await Promise.all(
961
+ additionalFileNames.map(
962
+ (fileName) => getConfigFileByName(fileName, workspacePath)
963
+ )
964
+ );
862
965
  for (const result2 of results) {
863
966
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
864
967
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
865
- writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
866
- logLevel: "all"
867
- });
968
+ writeTrace(
969
+ `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
970
+ {
971
+ logLevel: "all"
972
+ }
973
+ );
868
974
  }
869
975
  config = defu(result2.config ?? {}, config ?? {});
870
976
  }
@@ -875,23 +981,25 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
875
981
  }
876
982
  config.configFile = configFile;
877
983
  return config;
878
- }, "getConfigFile");
984
+ };
879
985
 
880
986
  // ../config-tools/src/create-storm-config.ts
881
987
  import defu2 from "defu";
882
988
 
883
989
  // ../config-tools/src/env/get-env.ts
884
- var getExtensionEnv = /* @__PURE__ */ __name((extensionName) => {
990
+ var getExtensionEnv = (extensionName) => {
885
991
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
886
992
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
887
- const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
993
+ const name = key.replace(prefix, "").split("_").map(
994
+ (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
995
+ ).join("");
888
996
  if (name) {
889
997
  ret[name] = process.env[key];
890
998
  }
891
999
  return ret;
892
1000
  }, {});
893
- }, "getExtensionEnv");
894
- var getConfigEnv = /* @__PURE__ */ __name(() => {
1001
+ };
1002
+ var getConfigEnv = () => {
895
1003
  const prefix = "STORM_";
896
1004
  let config = {
897
1005
  extends: process.env[`${prefix}EXTENDS`] || void 0,
@@ -959,14 +1067,25 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
959
1067
  cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
960
1068
  container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
961
1069
  },
962
- 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,
1070
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
1071
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
1072
+ ) ? getLogLevelLabel(
1073
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
1074
+ ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
963
1075
  skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
964
1076
  };
965
- 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}`)));
966
- config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
967
- ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
968
- return ret;
969
- }, {}) : getThemeColorConfigEnv(prefix);
1077
+ const themeNames = Object.keys(process.env).filter(
1078
+ (envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
1079
+ (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
1080
+ )
1081
+ );
1082
+ config.colors = themeNames.length > 0 ? themeNames.reduce(
1083
+ (ret, themeName) => {
1084
+ ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
1085
+ return ret;
1086
+ },
1087
+ {}
1088
+ ) : getThemeColorConfigEnv(prefix);
970
1089
  if (config.docs === STORM_DEFAULT_DOCS) {
971
1090
  if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
972
1091
  config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
@@ -987,23 +1106,17 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
987
1106
  config = {
988
1107
  ...config,
989
1108
  ...parsed,
990
- colors: {
991
- ...config.colors,
992
- ...parsed.colors
993
- },
994
- extensions: {
995
- ...config.extensions,
996
- ...parsed.extensions
997
- }
1109
+ colors: { ...config.colors, ...parsed.colors },
1110
+ extensions: { ...config.extensions, ...parsed.extensions }
998
1111
  };
999
1112
  }
1000
1113
  return config;
1001
- }, "getConfigEnv");
1002
- var getThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, theme) => {
1114
+ };
1115
+ var getThemeColorConfigEnv = (prefix, theme) => {
1003
1116
  const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
1004
1117
  return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
1005
- }, "getThemeColorConfigEnv");
1006
- var getSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
1118
+ };
1119
+ var getSingleThemeColorConfigEnv = (prefix) => {
1007
1120
  return {
1008
1121
  dark: process.env[`${prefix}DARK`],
1009
1122
  light: process.env[`${prefix}LIGHT`],
@@ -1020,14 +1133,16 @@ var getSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
1020
1133
  positive: process.env[`${prefix}POSITIVE`],
1021
1134
  negative: process.env[`${prefix}NEGATIVE`]
1022
1135
  };
1023
- }, "getSingleThemeColorConfigEnv");
1024
- var getMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
1136
+ };
1137
+ var getMultiThemeColorConfigEnv = (prefix) => {
1025
1138
  return {
1026
- light: getBaseThemeColorConfigEnv(`${prefix}_LIGHT_`),
1139
+ light: getBaseThemeColorConfigEnv(
1140
+ `${prefix}_LIGHT_`
1141
+ ),
1027
1142
  dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
1028
1143
  };
1029
- }, "getMultiThemeColorConfigEnv");
1030
- var getBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
1144
+ };
1145
+ var getBaseThemeColorConfigEnv = (prefix) => {
1031
1146
  return {
1032
1147
  foreground: process.env[`${prefix}FOREGROUND`],
1033
1148
  background: process.env[`${prefix}BACKGROUND`],
@@ -1044,13 +1159,16 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix) => {
1044
1159
  positive: process.env[`${prefix}POSITIVE`],
1045
1160
  negative: process.env[`${prefix}NEGATIVE`]
1046
1161
  };
1047
- }, "getBaseThemeColorConfigEnv");
1162
+ };
1048
1163
 
1049
1164
  // ../config-tools/src/env/set-env.ts
1050
- var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
1165
+ var setExtensionEnv = (extensionName, extension) => {
1051
1166
  for (const key of Object.keys(extension ?? {})) {
1052
1167
  if (extension[key]) {
1053
- const result = key?.replace(/([A-Z])+/g, (input) => input ? input[0]?.toUpperCase() + input.slice(1) : "").split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
1168
+ const result = key?.replace(
1169
+ /([A-Z])+/g,
1170
+ (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
1171
+ ).split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
1054
1172
  let extensionKey;
1055
1173
  if (result.length === 0) {
1056
1174
  return;
@@ -1065,8 +1183,8 @@ var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
1065
1183
  process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
1066
1184
  }
1067
1185
  }
1068
- }, "setExtensionEnv");
1069
- var setConfigEnv = /* @__PURE__ */ __name((config) => {
1186
+ };
1187
+ var setConfigEnv = (config) => {
1070
1188
  const prefix = "STORM_";
1071
1189
  if (config.extends) {
1072
1190
  process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
@@ -1155,7 +1273,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1155
1273
  }
1156
1274
  if (config.directories) {
1157
1275
  if (!config.skipCache && config.directories.cache) {
1158
- process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
1276
+ process.env[`${prefix}CACHE_DIR`] = correctPaths(
1277
+ config.directories.cache
1278
+ );
1159
1279
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
1160
1280
  }
1161
1281
  if (config.directories.data) {
@@ -1163,7 +1283,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1163
1283
  process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
1164
1284
  }
1165
1285
  if (config.directories.config) {
1166
- process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
1286
+ process.env[`${prefix}CONFIG_DIR`] = correctPaths(
1287
+ config.directories.config
1288
+ );
1167
1289
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
1168
1290
  }
1169
1291
  if (config.directories.temp) {
@@ -1175,7 +1297,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1175
1297
  process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
1176
1298
  }
1177
1299
  if (config.directories.build) {
1178
- process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
1300
+ process.env[`${prefix}BUILD_DIR`] = correctPaths(
1301
+ config.directories.build
1302
+ );
1179
1303
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
1180
1304
  }
1181
1305
  }
@@ -1196,7 +1320,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1196
1320
  setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1197
1321
  }
1198
1322
  } else {
1199
- setThemeColorConfigEnv(`${prefix}COLOR_`, config.colors);
1323
+ setThemeColorConfigEnv(
1324
+ `${prefix}COLOR_`,
1325
+ config.colors
1326
+ );
1200
1327
  }
1201
1328
  if (config.repository) {
1202
1329
  process.env[`${prefix}REPOSITORY`] = config.repository;
@@ -1208,7 +1335,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1208
1335
  process.env[`${prefix}PRE_ID`] = String(config.preid);
1209
1336
  }
1210
1337
  if (config.externalPackagePatterns) {
1211
- process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(config.externalPackagePatterns);
1338
+ process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(
1339
+ config.externalPackagePatterns
1340
+ );
1212
1341
  }
1213
1342
  if (config.registry) {
1214
1343
  if (config.registry.github) {
@@ -1221,20 +1350,28 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1221
1350
  process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
1222
1351
  }
1223
1352
  if (config.registry.cyclone) {
1224
- process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
1353
+ process.env[`${prefix}REGISTRY_CYCLONE`] = String(
1354
+ config.registry.cyclone
1355
+ );
1225
1356
  }
1226
1357
  if (config.registry.container) {
1227
- process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
1358
+ process.env[`${prefix}REGISTRY_CONTAINER`] = String(
1359
+ config.registry.container
1360
+ );
1228
1361
  }
1229
1362
  }
1230
1363
  if (config.logLevel) {
1231
1364
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
1232
1365
  process.env.LOG_LEVEL = String(config.logLevel);
1233
- process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
1366
+ process.env.NX_VERBOSE_LOGGING = String(
1367
+ getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
1368
+ );
1234
1369
  process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
1235
1370
  }
1236
1371
  if (config.skipConfigLogging !== void 0) {
1237
- process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
1372
+ process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
1373
+ config.skipConfigLogging
1374
+ );
1238
1375
  }
1239
1376
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
1240
1377
  for (const key of Object.keys(config.extensions ?? {})) {
@@ -1242,11 +1379,11 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
1242
1379
  setExtensionEnv(key, config.extensions[key]);
1243
1380
  }
1244
1381
  }
1245
- }, "setConfigEnv");
1246
- var setThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1382
+ };
1383
+ var setThemeColorConfigEnv = (prefix, config) => {
1247
1384
  return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
1248
- }, "setThemeColorConfigEnv");
1249
- var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1385
+ };
1386
+ var setSingleThemeColorConfigEnv = (prefix, config) => {
1250
1387
  if (config.dark) {
1251
1388
  process.env[`${prefix}DARK`] = config.dark;
1252
1389
  }
@@ -1289,14 +1426,14 @@ var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1289
1426
  if (config.negative) {
1290
1427
  process.env[`${prefix}NEGATIVE`] = config.negative;
1291
1428
  }
1292
- }, "setSingleThemeColorConfigEnv");
1293
- var setMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1429
+ };
1430
+ var setMultiThemeColorConfigEnv = (prefix, config) => {
1294
1431
  return {
1295
1432
  light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
1296
1433
  dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
1297
1434
  };
1298
- }, "setMultiThemeColorConfigEnv");
1299
- var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1435
+ };
1436
+ var setBaseThemeColorConfigEnv = (prefix, config) => {
1300
1437
  if (config.foreground) {
1301
1438
  process.env[`${prefix}FOREGROUND`] = config.foreground;
1302
1439
  }
@@ -1339,12 +1476,12 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1339
1476
  if (config.negative) {
1340
1477
  process.env[`${prefix}NEGATIVE`] = config.negative;
1341
1478
  }
1342
- }, "setBaseThemeColorConfigEnv");
1479
+ };
1343
1480
 
1344
1481
  // ../config-tools/src/create-storm-config.ts
1345
1482
  var _extension_cache = /* @__PURE__ */ new WeakMap();
1346
1483
  var _static_cache = void 0;
1347
- var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot3, skipLogs = false, useDefault = true) => {
1484
+ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot3, skipLogs = false, useDefault = true) => {
1348
1485
  let result;
1349
1486
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
1350
1487
  let _workspaceRoot = workspaceRoot3;
@@ -1355,16 +1492,19 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
1355
1492
  const configFile = await getConfigFile(_workspaceRoot);
1356
1493
  if (!configFile) {
1357
1494
  if (!skipLogs) {
1358
- 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", {
1359
- logLevel: "all"
1360
- });
1495
+ writeWarning(
1496
+ "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",
1497
+ { logLevel: "all" }
1498
+ );
1361
1499
  }
1362
1500
  if (useDefault === false) {
1363
1501
  return void 0;
1364
1502
  }
1365
1503
  }
1366
1504
  const defaultConfig = await getDefaultConfig(_workspaceRoot);
1367
- result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
1505
+ result = await stormWorkspaceConfigSchema.parseAsync(
1506
+ defu2(configEnv, configFile, defaultConfig)
1507
+ );
1368
1508
  result.workspaceRoot ??= _workspaceRoot;
1369
1509
  } else {
1370
1510
  result = _static_cache.data;
@@ -1380,11 +1520,9 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
1380
1520
  data: result
1381
1521
  };
1382
1522
  return result;
1383
- }, "createStormWorkspaceConfig");
1384
- var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1385
- const extension_cache_key = {
1386
- extensionName
1387
- };
1523
+ };
1524
+ var createConfigExtension = (extensionName, schema) => {
1525
+ const extension_cache_key = { extensionName };
1388
1526
  if (_extension_cache.has(extension_cache_key)) {
1389
1527
  return _extension_cache.get(extension_cache_key);
1390
1528
  }
@@ -1394,38 +1532,49 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1394
1532
  }
1395
1533
  _extension_cache.set(extension_cache_key, extension);
1396
1534
  return extension;
1397
- }, "createConfigExtension");
1398
- var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot3, skipLogs = false) => {
1399
- const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot3, skipLogs, true);
1535
+ };
1536
+ var loadStormWorkspaceConfig = async (workspaceRoot3, skipLogs = false) => {
1537
+ const config = await createStormWorkspaceConfig(
1538
+ void 0,
1539
+ void 0,
1540
+ workspaceRoot3,
1541
+ skipLogs,
1542
+ true
1543
+ );
1400
1544
  setConfigEnv(config);
1401
1545
  if (!skipLogs && !config.skipConfigLogging) {
1402
- writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
1403
- ${formatLogMessage(config)}`, config);
1546
+ writeTrace(
1547
+ `\u2699\uFE0F Using Storm Workspace configuration:
1548
+ ${formatLogMessage(config)}`,
1549
+ config
1550
+ );
1404
1551
  }
1405
1552
  return config;
1406
- }, "loadStormWorkspaceConfig");
1553
+ };
1407
1554
 
1408
1555
  // ../config-tools/src/get-config.ts
1409
- var getConfig = /* @__PURE__ */ __name((workspaceRoot3, skipLogs = false) => {
1556
+ var getConfig = (workspaceRoot3, skipLogs = false) => {
1410
1557
  return loadStormWorkspaceConfig(workspaceRoot3, skipLogs);
1411
- }, "getConfig");
1412
- var getWorkspaceConfig = /* @__PURE__ */ __name((skipLogs = false, options = {}) => {
1558
+ };
1559
+ var getWorkspaceConfig = (skipLogs = false, options = {}) => {
1413
1560
  let workspaceRoot3 = options.workspaceRoot;
1414
1561
  if (!workspaceRoot3) {
1415
1562
  workspaceRoot3 = findWorkspaceRoot(options.cwd);
1416
1563
  }
1417
1564
  return getConfig(workspaceRoot3, skipLogs);
1418
- }, "getWorkspaceConfig");
1565
+ };
1419
1566
 
1420
1567
  // ../workspace-tools/src/base/base-executor.ts
1421
1568
  import { defu as defu3 } from "defu";
1422
- var withRunExecutor = /* @__PURE__ */ __name((name, executorFn, executorOptions = {}) => async (_options, context) => {
1569
+ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
1423
1570
  const stopwatch = getStopwatch(name);
1424
1571
  let options = _options;
1425
1572
  let config = {};
1426
1573
  try {
1427
1574
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
1428
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
1575
+ throw new Error(
1576
+ "The Build process failed because the context is not valid. Please run this command from a workspace."
1577
+ );
1429
1578
  }
1430
1579
  const workspaceRoot3 = findWorkspaceRoot();
1431
1580
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot3;
@@ -1434,35 +1583,50 @@ var withRunExecutor = /* @__PURE__ */ __name((name, executorFn, executorOptions
1434
1583
  config.workspaceRoot = workspaceRoot3;
1435
1584
  writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
1436
1585
  if (!executorOptions.skipReadingConfig) {
1437
- writeTrace(`Loading the Storm Config from environment variables and storm.config.js file...
1586
+ writeTrace(
1587
+ `Loading the Storm Config from environment variables and storm.config.js file...
1438
1588
  - workspaceRoot: ${workspaceRoot3}
1439
1589
  - projectRoot: ${projectRoot}
1440
1590
  - sourceRoot: ${sourceRoot}
1441
1591
  - projectName: ${projectName}
1442
- `, config);
1592
+ `,
1593
+ config
1594
+ );
1443
1595
  config = await getConfig(workspaceRoot3);
1444
1596
  }
1445
1597
  if (executorOptions?.hooks?.applyDefaultOptions) {
1446
1598
  writeDebug("Running the applyDefaultOptions hook...", config);
1447
- options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
1599
+ options = await Promise.resolve(
1600
+ executorOptions.hooks.applyDefaultOptions(options, config)
1601
+ );
1448
1602
  writeDebug("Completed the applyDefaultOptions hook", config);
1449
1603
  }
1450
- writeTrace(`Executor schema options \u2699\uFE0F
1604
+ writeTrace(
1605
+ `Executor schema options \u2699\uFE0F
1451
1606
  ${formatLogMessage(options)}
1452
- `, config);
1453
- const tokenized = await applyWorkspaceTokens(options, defu3({
1454
- workspaceRoot: workspaceRoot3,
1455
- projectRoot,
1456
- sourceRoot,
1457
- projectName,
1607
+ `,
1458
1608
  config
1459
- }, config, context.projectsConfigurations.projects[context.projectName]), applyWorkspaceProjectTokens);
1460
- writeTrace(`Executor schema tokenized options \u2699\uFE0F
1609
+ );
1610
+ const tokenized = await applyWorkspaceTokens(
1611
+ options,
1612
+ defu3(
1613
+ { workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config },
1614
+ config,
1615
+ context.projectsConfigurations.projects[context.projectName]
1616
+ ),
1617
+ applyWorkspaceProjectTokens
1618
+ );
1619
+ writeTrace(
1620
+ `Executor schema tokenized options \u2699\uFE0F
1461
1621
  ${formatLogMessage(tokenized)}
1462
- `, config);
1622
+ `,
1623
+ config
1624
+ );
1463
1625
  if (executorOptions?.hooks?.preProcess) {
1464
1626
  writeDebug("Running the preProcess hook...", config);
1465
- await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
1627
+ await Promise.resolve(
1628
+ executorOptions.hooks.preProcess(tokenized, config)
1629
+ );
1466
1630
  writeDebug("Completed the preProcess hook", config);
1467
1631
  }
1468
1632
  const ret = executorFn(tokenized, context, config);
@@ -1472,10 +1636,15 @@ ${formatLogMessage(tokenized)}
1472
1636
  void iter;
1473
1637
  }
1474
1638
  }
1475
- const result = await Promise.resolve(ret);
1639
+ const result = await Promise.resolve(
1640
+ ret
1641
+ );
1476
1642
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
1477
- writeTrace(`Failure determined by the ${name} executor
1478
- ${formatLogMessage(result)}`, config);
1643
+ writeTrace(
1644
+ `Failure determined by the ${name} executor
1645
+ ${formatLogMessage(result)}`,
1646
+ config
1647
+ );
1479
1648
  console.error(result);
1480
1649
  throw new Error(`The ${name} executor failed to run`, {
1481
1650
  cause: result?.error
@@ -1492,27 +1661,33 @@ ${formatLogMessage(result)}`, config);
1492
1661
  success: true
1493
1662
  };
1494
1663
  } catch (error) {
1495
- writeFatal("A fatal error occurred while running the executor - the process was forced to terminate", config);
1496
- writeError(`An exception was thrown in the executor's process
1664
+ writeFatal(
1665
+ "A fatal error occurred while running the executor - the process was forced to terminate",
1666
+ config
1667
+ );
1668
+ writeError(
1669
+ `An exception was thrown in the executor's process
1497
1670
  - Details: ${error.message}
1498
- - Stacktrace: ${error.stack}`, config);
1671
+ - Stacktrace: ${error.stack}`,
1672
+ config
1673
+ );
1499
1674
  return {
1500
1675
  success: false
1501
1676
  };
1502
1677
  } finally {
1503
1678
  stopwatch();
1504
1679
  }
1505
- }, "withRunExecutor");
1506
- var _isFunction2 = /* @__PURE__ */ __name((value) => {
1680
+ };
1681
+ var _isFunction2 = (value) => {
1507
1682
  try {
1508
1683
  return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
1509
1684
  } catch (e) {
1510
1685
  return false;
1511
1686
  }
1512
- }, "_isFunction");
1687
+ };
1513
1688
 
1514
1689
  // ../workspace-tools/src/base/base-generator.ts
1515
- var withRunGenerator = /* @__PURE__ */ __name((name, generatorFn, generatorOptions = {
1690
+ var withRunGenerator = (name, generatorFn, generatorOptions = {
1516
1691
  skipReadingConfig: false
1517
1692
  }) => async (tree, _options) => {
1518
1693
  const stopwatch = getStopwatch(name);
@@ -1524,27 +1699,40 @@ var withRunGenerator = /* @__PURE__ */ __name((name, generatorFn, generatorOptio
1524
1699
  `, config);
1525
1700
  const workspaceRoot3 = findWorkspaceRoot();
1526
1701
  if (!generatorOptions.skipReadingConfig) {
1527
- writeDebug(`Loading the Storm Config from environment variables and storm.config.js file...
1528
- - workspaceRoot: ${workspaceRoot3}`, config);
1702
+ writeDebug(
1703
+ `Loading the Storm Config from environment variables and storm.config.js file...
1704
+ - workspaceRoot: ${workspaceRoot3}`,
1705
+ config
1706
+ );
1529
1707
  config = await getConfig(workspaceRoot3);
1530
1708
  }
1531
1709
  if (generatorOptions?.hooks?.applyDefaultOptions) {
1532
1710
  writeDebug("Running the applyDefaultOptions hook...", config);
1533
- options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
1711
+ options = await Promise.resolve(
1712
+ generatorOptions.hooks.applyDefaultOptions(options, config)
1713
+ );
1534
1714
  writeDebug("Completed the applyDefaultOptions hook", config);
1535
1715
  }
1536
- writeTrace(`Generator schema options \u2699\uFE0F
1537
- ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
1538
- const tokenized = await applyWorkspaceTokens(options, {
1539
- workspaceRoot: tree.root,
1716
+ writeTrace(
1717
+ `Generator schema options \u2699\uFE0F
1718
+ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
1540
1719
  config
1541
- }, applyWorkspaceBaseTokens);
1720
+ );
1721
+ const tokenized = await applyWorkspaceTokens(
1722
+ options,
1723
+ { workspaceRoot: tree.root, config },
1724
+ applyWorkspaceBaseTokens
1725
+ );
1542
1726
  if (generatorOptions?.hooks?.preProcess) {
1543
1727
  writeDebug("Running the preProcess hook...", config);
1544
- await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
1728
+ await Promise.resolve(
1729
+ generatorOptions.hooks.preProcess(tokenized, config)
1730
+ );
1545
1731
  writeDebug("Completed the preProcess hook", config);
1546
1732
  }
1547
- const result = await Promise.resolve(generatorFn(tree, tokenized, config));
1733
+ const result = await Promise.resolve(
1734
+ generatorFn(tree, tokenized, config)
1735
+ );
1548
1736
  if (result) {
1549
1737
  if (result.success === false || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string") {
1550
1738
  throw new Error(`The ${name} generator failed to run`, {
@@ -1565,40 +1753,55 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
1565
1753
  };
1566
1754
  } catch (error) {
1567
1755
  return () => {
1568
- writeFatal("A fatal error occurred while running the generator - the process was forced to terminate", config);
1569
- writeError(`An exception was thrown in the generator's process
1756
+ writeFatal(
1757
+ "A fatal error occurred while running the generator - the process was forced to terminate",
1758
+ config
1759
+ );
1760
+ writeError(
1761
+ `An exception was thrown in the generator's process
1570
1762
  - Details: ${error.message}
1571
- - Stacktrace: ${error.stack}`, config);
1763
+ - Stacktrace: ${error.stack}`,
1764
+ config
1765
+ );
1572
1766
  };
1573
1767
  } finally {
1574
1768
  stopwatch();
1575
1769
  }
1576
- }, "withRunGenerator");
1770
+ };
1577
1771
 
1578
1772
  // ../workspace-tools/src/generators/init/init.ts
1579
- import { addDependenciesToPackageJson, formatFiles } from "@nx/devkit";
1773
+ import {
1774
+ addDependenciesToPackageJson,
1775
+ formatFiles
1776
+ } from "@nx/devkit";
1580
1777
  async function initGenerator(tree, schema) {
1581
- const task = addDependenciesToPackageJson(tree, {
1582
- nx: "^19.6.2",
1583
- "@nx/workspace": "^19.6.2",
1584
- "@nx/js": "^19.6.2",
1585
- "@storm-software/eslint": "latest",
1586
- "@storm-software/prettier": "latest",
1587
- "@storm-software/config-tools": "latest",
1588
- "@storm-software/testing-tools": "latest",
1589
- "@storm-software/git-tools": "latest",
1590
- "@storm-software/linting-tools": "latest"
1591
- }, {});
1778
+ const task = addDependenciesToPackageJson(
1779
+ tree,
1780
+ {
1781
+ nx: "^19.6.2",
1782
+ "@nx/workspace": "^19.6.2",
1783
+ "@nx/js": "^19.6.2",
1784
+ "@storm-software/eslint": "latest",
1785
+ "@storm-software/prettier": "latest",
1786
+ "@storm-software/config-tools": "latest",
1787
+ "@storm-software/testing-tools": "latest",
1788
+ "@storm-software/git-tools": "latest",
1789
+ "@storm-software/linting-tools": "latest"
1790
+ },
1791
+ {}
1792
+ );
1592
1793
  if (!schema.skipFormat) {
1593
1794
  await formatFiles(tree);
1594
1795
  }
1595
1796
  return task;
1596
1797
  }
1597
- __name(initGenerator, "initGenerator");
1598
1798
 
1599
1799
  // ../workspace-tools/src/utils/cargo.ts
1600
1800
  import { joinPathFragments, workspaceRoot } from "@nx/devkit";
1601
- import { execSync as execSync2, spawn } from "node:child_process";
1801
+ import {
1802
+ execSync as execSync2,
1803
+ spawn
1804
+ } from "node:child_process";
1602
1805
  import { relative } from "node:path";
1603
1806
  var INVALID_CARGO_ARGS = [
1604
1807
  "allFeatures",
@@ -1608,7 +1811,7 @@ var INVALID_CARGO_ARGS = [
1608
1811
  "package",
1609
1812
  "tsConfig"
1610
1813
  ];
1611
- var buildCargoCommand = /* @__PURE__ */ __name((baseCommand, options, context) => {
1814
+ var buildCargoCommand = (baseCommand, options, context) => {
1612
1815
  const args = [];
1613
1816
  if (options.toolchain && options.toolchain !== "stable") {
1614
1817
  args.push(`+${options.toolchain}`);
@@ -1646,13 +1849,12 @@ var buildCargoCommand = /* @__PURE__ */ __name((baseCommand, options, context) =
1646
1849
  args.push("--target-dir", options.outputPath);
1647
1850
  }
1648
1851
  return args;
1649
- }, "buildCargoCommand");
1852
+ };
1650
1853
  async function cargoCommand(...args) {
1651
1854
  console.log(`> cargo ${args.join(" ")}`);
1652
1855
  args.push("--color", "always");
1653
1856
  return await Promise.resolve(runProcess("cargo", ...args));
1654
1857
  }
1655
- __name(cargoCommand, "cargoCommand");
1656
1858
  function cargoCommandSync(args = "", options) {
1657
1859
  const normalizedOptions = {
1658
1860
  stdio: options?.stdio ?? "inherit",
@@ -1679,7 +1881,6 @@ function cargoCommandSync(args = "", options) {
1679
1881
  };
1680
1882
  }
1681
1883
  }
1682
- __name(cargoCommandSync, "cargoCommandSync");
1683
1884
  function cargoMetadata() {
1684
1885
  const output3 = cargoCommandSync("metadata --format-version=1", {
1685
1886
  stdio: "pipe"
@@ -1690,15 +1891,12 @@ function cargoMetadata() {
1690
1891
  }
1691
1892
  return JSON.parse(output3.output);
1692
1893
  }
1693
- __name(cargoMetadata, "cargoMetadata");
1694
1894
  function runProcess(processCmd, ...args) {
1695
1895
  const metadata = cargoMetadata();
1696
1896
  const targetDir = metadata?.target_directory ?? joinPathFragments(workspaceRoot, "dist", "cargo");
1697
1897
  return new Promise((resolve) => {
1698
1898
  if (process.env.VERCEL) {
1699
- return resolve({
1700
- success: true
1701
- });
1899
+ return resolve({ success: true });
1702
1900
  }
1703
1901
  execSync2(`${processCmd} ${args.join(" ")}`, {
1704
1902
  cwd: process.cwd(),
@@ -1709,113 +1907,119 @@ function runProcess(processCmd, ...args) {
1709
1907
  CARGO_BUILD_TARGET_DIR: targetDir
1710
1908
  },
1711
1909
  windowsHide: true,
1712
- stdio: [
1713
- "inherit",
1714
- "inherit",
1715
- "inherit"
1716
- ]
1717
- });
1718
- resolve({
1719
- success: true
1910
+ stdio: ["inherit", "inherit", "inherit"]
1720
1911
  });
1912
+ resolve({ success: true });
1721
1913
  });
1722
1914
  }
1723
- __name(runProcess, "runProcess");
1724
1915
 
1725
1916
  // ../workspace-tools/src/executors/cargo-build/executor.ts
1726
1917
  async function cargoBuildExecutor(options, context) {
1727
1918
  const command = buildCargoCommand("build", options, context);
1728
1919
  return await cargoCommand(...command);
1729
1920
  }
1730
- __name(cargoBuildExecutor, "cargoBuildExecutor");
1731
- var executor_default = withRunExecutor("Cargo Build", cargoBuildExecutor, {
1732
- skipReadingConfig: false,
1733
- hooks: {
1734
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1735
- options.outputPath ??= "dist/target/{projectRoot}";
1736
- options.toolchain ??= "stable";
1737
- return options;
1738
- }, "applyDefaultOptions")
1921
+ var executor_default = withRunExecutor(
1922
+ "Cargo Build",
1923
+ cargoBuildExecutor,
1924
+ {
1925
+ skipReadingConfig: false,
1926
+ hooks: {
1927
+ applyDefaultOptions: (options) => {
1928
+ options.outputPath ??= "dist/target/{projectRoot}";
1929
+ options.toolchain ??= "stable";
1930
+ return options;
1931
+ }
1932
+ }
1739
1933
  }
1740
- });
1934
+ );
1741
1935
 
1742
1936
  // ../workspace-tools/src/executors/cargo-check/executor.ts
1743
1937
  async function cargoCheckExecutor(options, context) {
1744
1938
  const command = buildCargoCommand("check", options, context);
1745
1939
  return await cargoCommand(...command);
1746
1940
  }
1747
- __name(cargoCheckExecutor, "cargoCheckExecutor");
1748
- var executor_default2 = withRunExecutor("Cargo Check", cargoCheckExecutor, {
1749
- skipReadingConfig: false,
1750
- hooks: {
1751
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1752
- options.toolchain ??= "stable";
1753
- return options;
1754
- }, "applyDefaultOptions")
1941
+ var executor_default2 = withRunExecutor(
1942
+ "Cargo Check",
1943
+ cargoCheckExecutor,
1944
+ {
1945
+ skipReadingConfig: false,
1946
+ hooks: {
1947
+ applyDefaultOptions: (options) => {
1948
+ options.toolchain ??= "stable";
1949
+ return options;
1950
+ }
1951
+ }
1755
1952
  }
1756
- });
1953
+ );
1757
1954
 
1758
1955
  // ../workspace-tools/src/executors/cargo-clippy/executor.ts
1759
1956
  async function cargoClippyExecutor(options, context) {
1760
1957
  const command = buildCargoCommand("clippy", options, context);
1761
1958
  return await cargoCommand(...command);
1762
1959
  }
1763
- __name(cargoClippyExecutor, "cargoClippyExecutor");
1764
- var executor_default3 = withRunExecutor("Cargo Clippy", cargoClippyExecutor, {
1765
- skipReadingConfig: false,
1766
- hooks: {
1767
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1768
- options.toolchain ??= "stable";
1769
- options.fix ??= false;
1770
- return options;
1771
- }, "applyDefaultOptions")
1960
+ var executor_default3 = withRunExecutor(
1961
+ "Cargo Clippy",
1962
+ cargoClippyExecutor,
1963
+ {
1964
+ skipReadingConfig: false,
1965
+ hooks: {
1966
+ applyDefaultOptions: (options) => {
1967
+ options.toolchain ??= "stable";
1968
+ options.fix ??= false;
1969
+ return options;
1970
+ }
1971
+ }
1772
1972
  }
1773
- });
1973
+ );
1774
1974
 
1775
1975
  // ../workspace-tools/src/executors/cargo-doc/executor.ts
1776
1976
  async function cargoDocExecutor(options, context) {
1777
- const opts = {
1778
- ...options
1779
- };
1977
+ const opts = { ...options };
1780
1978
  opts["no-deps"] = opts.noDeps;
1781
1979
  delete opts.noDeps;
1782
1980
  const command = buildCargoCommand("doc", options, context);
1783
1981
  return await cargoCommand(...command);
1784
1982
  }
1785
- __name(cargoDocExecutor, "cargoDocExecutor");
1786
- var executor_default4 = withRunExecutor("Cargo Doc", cargoDocExecutor, {
1787
- skipReadingConfig: false,
1788
- hooks: {
1789
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1790
- options.outputPath ??= "dist/docs/{projectRoot}";
1791
- options.toolchain ??= "stable";
1792
- options.release ??= options.profile ? false : true;
1793
- options.allFeatures ??= true;
1794
- options.lib ??= true;
1795
- options.bins ??= true;
1796
- options.examples ??= true;
1797
- options.noDeps ??= false;
1798
- return options;
1799
- }, "applyDefaultOptions")
1983
+ var executor_default4 = withRunExecutor(
1984
+ "Cargo Doc",
1985
+ cargoDocExecutor,
1986
+ {
1987
+ skipReadingConfig: false,
1988
+ hooks: {
1989
+ applyDefaultOptions: (options) => {
1990
+ options.outputPath ??= "dist/docs/{projectRoot}";
1991
+ options.toolchain ??= "stable";
1992
+ options.release ??= options.profile ? false : true;
1993
+ options.allFeatures ??= true;
1994
+ options.lib ??= true;
1995
+ options.bins ??= true;
1996
+ options.examples ??= true;
1997
+ options.noDeps ??= false;
1998
+ return options;
1999
+ }
2000
+ }
1800
2001
  }
1801
- });
2002
+ );
1802
2003
 
1803
2004
  // ../workspace-tools/src/executors/cargo-format/executor.ts
1804
2005
  async function cargoFormatExecutor(options, context) {
1805
2006
  const command = buildCargoCommand("fmt", options, context);
1806
2007
  return await cargoCommand(...command);
1807
2008
  }
1808
- __name(cargoFormatExecutor, "cargoFormatExecutor");
1809
- var executor_default5 = withRunExecutor("Cargo Format", cargoFormatExecutor, {
1810
- skipReadingConfig: false,
1811
- hooks: {
1812
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
1813
- options.outputPath ??= "dist/target/{projectRoot}";
1814
- options.toolchain ??= "stable";
1815
- return options;
1816
- }, "applyDefaultOptions")
2009
+ var executor_default5 = withRunExecutor(
2010
+ "Cargo Format",
2011
+ cargoFormatExecutor,
2012
+ {
2013
+ skipReadingConfig: false,
2014
+ hooks: {
2015
+ applyDefaultOptions: (options) => {
2016
+ options.outputPath ??= "dist/target/{projectRoot}";
2017
+ options.toolchain ??= "stable";
2018
+ return options;
2019
+ }
2020
+ }
1817
2021
  }
1818
- });
2022
+ );
1819
2023
 
1820
2024
  // ../workspace-tools/src/executors/cargo-publish/executor.ts
1821
2025
  import { joinPathFragments as joinPathFragments2 } from "@nx/devkit";
@@ -1861,7 +2065,7 @@ import { relative as relative2 } from "path";
1861
2065
  import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
1862
2066
  import { glob } from "glob";
1863
2067
  import { readFile as readFile2, writeFile } from "node:fs/promises";
1864
- var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
2068
+ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
1865
2069
  const pendingAssets = Array.from(assets ?? []);
1866
2070
  pendingAssets.push({
1867
2071
  input: projectRoot,
@@ -1887,8 +2091,11 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
1887
2091
  output: "src/"
1888
2092
  });
1889
2093
  }
1890
- writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
1891
- ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`, config);
2094
+ writeTrace(
2095
+ `\u{1F4DD} Copying the following assets to the output directory:
2096
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
2097
+ config
2098
+ );
1892
2099
  const assetHandler = new CopyAssetsHandler({
1893
2100
  projectDir: projectRoot,
1894
2101
  rootDir: config.workspaceRoot,
@@ -1897,28 +2104,45 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
1897
2104
  });
1898
2105
  await assetHandler.processAllAssetsOnce();
1899
2106
  if (includeSrc === true) {
1900
- writeDebug(`\u{1F4DD} Adding banner and writing source files: ${joinPaths(outputPath, "src")}`, config);
2107
+ writeDebug(
2108
+ `\u{1F4DD} Adding banner and writing source files: ${joinPaths(
2109
+ outputPath,
2110
+ "src"
2111
+ )}`,
2112
+ config
2113
+ );
1901
2114
  const files = await glob([
1902
2115
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.ts"),
1903
2116
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.tsx"),
1904
2117
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
1905
2118
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
1906
2119
  ]);
1907
- await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
2120
+ await Promise.allSettled(
2121
+ files.map(
2122
+ async (file) => writeFile(
2123
+ file,
2124
+ `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
1908
2125
 
1909
2126
  ${await readFile2(file, "utf8")}
1910
2127
 
1911
- ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
2128
+ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
2129
+ )
2130
+ )
2131
+ );
1912
2132
  }
1913
- }, "copyAssets");
2133
+ };
1914
2134
 
1915
2135
  // ../build-tools/src/utilities/generate-package-json.ts
1916
2136
  import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
1917
2137
  import { Glob } from "glob";
1918
2138
  import { existsSync as existsSync3, readFileSync as readFileSync2 } from "node:fs";
1919
2139
  import { readFile as readFile3 } from "node:fs/promises";
1920
- import { createProjectGraphAsync, readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "nx/src/project-graph/project-graph";
1921
- var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, projectRoot, projectName, packageJson) => {
2140
+ import {
2141
+ createProjectGraphAsync,
2142
+ readCachedProjectGraph,
2143
+ readProjectsConfigurationFromProjectGraph
2144
+ } from "nx/src/project-graph/project-graph";
2145
+ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, packageJson) => {
1922
2146
  let projectGraph;
1923
2147
  try {
1924
2148
  projectGraph = readCachedProjectGraph();
@@ -1927,16 +2151,35 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
1927
2151
  projectGraph = readCachedProjectGraph();
1928
2152
  }
1929
2153
  if (!projectGraph) {
1930
- throw new Error("The Build process failed because the project graph is not available. Please run the build command again.");
2154
+ throw new Error(
2155
+ "The Build process failed because the project graph is not available. Please run the build command again."
2156
+ );
1931
2157
  }
1932
- const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
2158
+ const projectDependencies = calculateProjectBuildableDependencies(
2159
+ void 0,
2160
+ projectGraph,
2161
+ workspaceRoot3,
2162
+ projectName,
2163
+ process.env.NX_TASK_TARGET_TARGET || "build",
2164
+ process.env.NX_TASK_TARGET_CONFIGURATION || "production",
2165
+ true
2166
+ );
1933
2167
  const localPackages = [];
1934
- for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot3)) {
2168
+ for (const project of projectDependencies.dependencies.filter(
2169
+ (dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot3
2170
+ )) {
1935
2171
  const projectNode = project.node;
1936
2172
  if (projectNode.data.root) {
1937
- const projectPackageJsonPath = joinPaths(workspaceRoot3, projectNode.data.root, "package.json");
2173
+ const projectPackageJsonPath = joinPaths(
2174
+ workspaceRoot3,
2175
+ projectNode.data.root,
2176
+ "package.json"
2177
+ );
1938
2178
  if (existsSync3(projectPackageJsonPath)) {
1939
- const projectPackageJsonContent = await readFile3(projectPackageJsonPath, "utf8");
2179
+ const projectPackageJsonContent = await readFile3(
2180
+ projectPackageJsonPath,
2181
+ "utf8"
2182
+ );
1940
2183
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
1941
2184
  if (projectPackageJson.private !== true) {
1942
2185
  localPackages.push(projectPackageJson);
@@ -1945,19 +2188,33 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
1945
2188
  }
1946
2189
  }
1947
2190
  if (localPackages.length > 0) {
1948
- writeTrace(`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
1949
- const projectJsonFile = await readFile3(joinPaths(projectRoot, "project.json"), "utf8");
2191
+ writeTrace(
2192
+ `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
2193
+ );
2194
+ const projectJsonFile = await readFile3(
2195
+ joinPaths(projectRoot, "project.json"),
2196
+ "utf8"
2197
+ );
1950
2198
  const projectJson = JSON.parse(projectJsonFile);
1951
2199
  const projectName2 = projectJson.name;
1952
2200
  const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
1953
2201
  if (!projectConfigurations?.projects?.[projectName2]) {
1954
- 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.");
2202
+ throw new Error(
2203
+ "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."
2204
+ );
1955
2205
  }
1956
2206
  const implicitDependencies = projectConfigurations.projects?.[projectName2].implicitDependencies?.reduce((ret, dep) => {
1957
2207
  if (projectConfigurations.projects?.[dep]) {
1958
- const depPackageJsonPath = joinPaths(workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
2208
+ const depPackageJsonPath = joinPaths(
2209
+ workspaceRoot3,
2210
+ projectConfigurations.projects[dep].root,
2211
+ "package.json"
2212
+ );
1959
2213
  if (existsSync3(depPackageJsonPath)) {
1960
- const depPackageJsonContent = readFileSync2(depPackageJsonPath, "utf8");
2214
+ const depPackageJsonContent = readFileSync2(
2215
+ depPackageJsonPath,
2216
+ "utf8"
2217
+ );
1961
2218
  const depPackageJson = JSON.parse(depPackageJsonContent);
1962
2219
  if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
1963
2220
  ret.push(depPackageJson.name);
@@ -1982,10 +2239,13 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
1982
2239
  writeTrace("\u{1F4E6} No local packages dependencies to add to package.json");
1983
2240
  }
1984
2241
  return packageJson;
1985
- }, "addPackageDependencies");
1986
- var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
2242
+ };
2243
+ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
1987
2244
  const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
1988
- const workspacePackageJsonContent = await readFile3(joinPaths(workspaceRoot3, "package.json"), "utf8");
2245
+ const workspacePackageJsonContent = await readFile3(
2246
+ joinPaths(workspaceRoot3, "package.json"),
2247
+ "utf8"
2248
+ );
1989
2249
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
1990
2250
  packageJson.type ??= "module";
1991
2251
  packageJson.sideEffects ??= false;
@@ -1996,9 +2256,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfi
1996
2256
  }
1997
2257
  packageJson.source ??= `${joinPaths(distSrc, "index.ts").replaceAll("\\", "/")}`;
1998
2258
  }
1999
- packageJson.files ??= [
2000
- "dist/**/*"
2001
- ];
2259
+ packageJson.files ??= ["dist/**/*"];
2002
2260
  if (includeSrc === true && !packageJson.files.includes("src")) {
2003
2261
  packageJson.files.push("src/**/*");
2004
2262
  }
@@ -2014,26 +2272,22 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfi
2014
2272
  packageJson.author ??= workspacePackageJson.author;
2015
2273
  packageJson.maintainers ??= workspacePackageJson.maintainers;
2016
2274
  if (!packageJson.maintainers && packageJson.author) {
2017
- packageJson.maintainers = [
2018
- packageJson.author
2019
- ];
2275
+ packageJson.maintainers = [packageJson.author];
2020
2276
  }
2021
2277
  packageJson.contributors ??= workspacePackageJson.contributors;
2022
2278
  if (!packageJson.contributors && packageJson.author) {
2023
- packageJson.contributors = [
2024
- packageJson.author
2025
- ];
2279
+ packageJson.contributors = [packageJson.author];
2026
2280
  }
2027
2281
  packageJson.repository ??= workspacePackageJson.repository;
2028
2282
  packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
2029
2283
  return packageJson;
2030
- }, "addWorkspacePackageJsonFields");
2284
+ };
2031
2285
 
2032
2286
  // ../build-tools/src/utilities/get-entry-points.ts
2033
2287
  import { glob as glob2 } from "glob";
2034
2288
 
2035
2289
  // ../build-tools/src/utilities/get-env.ts
2036
- var getEnv = /* @__PURE__ */ __name((builder, options) => {
2290
+ var getEnv = (builder, options) => {
2037
2291
  return {
2038
2292
  STORM_BUILD: builder,
2039
2293
  STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
@@ -2044,39 +2298,51 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
2044
2298
  STORM_TARGET: JSON.stringify(options.target),
2045
2299
  ...options.env
2046
2300
  };
2047
- }, "getEnv");
2301
+ };
2048
2302
 
2049
2303
  // ../build-tools/src/utilities/read-nx-config.ts
2050
2304
  import { existsSync as existsSync4 } from "node:fs";
2051
2305
  import { readFile as readFile4 } from "node:fs/promises";
2052
2306
 
2053
2307
  // ../build-tools/src/utilities/task-graph.ts
2054
- import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-runner/create-task-graph";
2308
+ import {
2309
+ createTaskGraph,
2310
+ mapTargetDefaultsToDependencies
2311
+ } from "nx/src/tasks-runner/create-task-graph";
2055
2312
 
2056
2313
  // ../esbuild/src/assets.ts
2057
2314
  async function copyBuildAssets(context) {
2058
2315
  if (context.result?.errors.length === 0) {
2059
- writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
2316
+ writeDebug(
2317
+ ` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
2318
+ context.workspaceConfig
2319
+ );
2060
2320
  const stopwatch = getStopwatch(`${context.options.name} asset copy`);
2061
- await copyAssets(context.workspaceConfig, context.options.assets ?? [], context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
2321
+ await copyAssets(
2322
+ context.workspaceConfig,
2323
+ context.options.assets ?? [],
2324
+ context.outputPath,
2325
+ context.options.projectRoot,
2326
+ context.sourceRoot,
2327
+ true,
2328
+ false
2329
+ );
2062
2330
  stopwatch();
2063
2331
  }
2064
2332
  return context;
2065
2333
  }
2066
- __name(copyBuildAssets, "copyBuildAssets");
2067
2334
 
2068
2335
  // ../esbuild/src/clean.ts
2069
2336
  import { rm } from "node:fs/promises";
2070
2337
  async function cleanDirectories(directory) {
2071
- await rm(directory, {
2072
- recursive: true,
2073
- force: true
2074
- });
2338
+ await rm(directory, { recursive: true, force: true });
2075
2339
  }
2076
- __name(cleanDirectories, "cleanDirectories");
2077
2340
 
2078
2341
  // ../esbuild/src/context.ts
2079
- import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2 } from "@nx/devkit";
2342
+ import {
2343
+ createProjectGraphAsync as createProjectGraphAsync2,
2344
+ readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2
2345
+ } from "@nx/devkit";
2080
2346
  import defu4 from "defu";
2081
2347
  import { existsSync as existsSync5 } from "node:fs";
2082
2348
  import hf from "node:fs/promises";
@@ -2133,43 +2399,46 @@ function resolvePathsConfig(options, cwd, projectRoot) {
2133
2399
  if (options?.compilerOptions?.paths) {
2134
2400
  const paths = Object.entries(options.compilerOptions.paths);
2135
2401
  const resolvedPaths = paths.map(([key, paths2]) => {
2136
- return [
2137
- key,
2138
- paths2.map((v) => path2.resolve(cwd, v))
2139
- ];
2402
+ return [key, paths2.map((v) => path2.resolve(cwd, v))];
2140
2403
  });
2141
2404
  return Object.fromEntries(resolvedPaths);
2142
2405
  }
2143
2406
  if (options.extends) {
2144
- const extendsPath = path2.resolve(projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends));
2407
+ const extendsPath = path2.resolve(
2408
+ projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends)
2409
+ );
2145
2410
  const extendsDir = path2.dirname(extendsPath);
2146
2411
  const extendsConfig = __require(extendsPath);
2147
2412
  return resolvePathsConfig(extendsConfig, extendsDir);
2148
2413
  }
2149
2414
  return [];
2150
2415
  }
2151
- __name(resolvePathsConfig, "resolvePathsConfig");
2152
- var resolvePathsPlugin = /* @__PURE__ */ __name((context) => ({
2416
+ var resolvePathsPlugin = (context) => ({
2153
2417
  name: "storm:resolve-paths",
2154
2418
  setup(build3) {
2155
- const parentTsConfig = build3.initialOptions.tsconfig ? __require(joinPaths(context.workspaceConfig.workspaceRoot, build3.initialOptions.tsconfig.replace(context.workspaceConfig.workspaceRoot, ""))) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
2156
- const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot, context.options.projectRoot);
2157
- const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
2158
- build3.onResolve({
2159
- filter: packagesRegex
2160
- }, (args) => {
2419
+ const parentTsConfig = build3.initialOptions.tsconfig ? __require(joinPaths(
2420
+ context.workspaceConfig.workspaceRoot,
2421
+ build3.initialOptions.tsconfig.replace(
2422
+ context.workspaceConfig.workspaceRoot,
2423
+ ""
2424
+ )
2425
+ )) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
2426
+ const resolvedTsPaths = resolvePathsConfig(
2427
+ parentTsConfig,
2428
+ context.workspaceConfig.workspaceRoot,
2429
+ context.options.projectRoot
2430
+ );
2431
+ const packagesRegex = new RegExp(
2432
+ `^(${Object.keys(resolvedTsPaths).join("|")})$`
2433
+ );
2434
+ build3.onResolve({ filter: packagesRegex }, (args) => {
2161
2435
  if (build3.initialOptions.external?.includes(args.path)) {
2162
- return {
2163
- path: args.path,
2164
- external: true
2165
- };
2436
+ return { path: args.path, external: true };
2166
2437
  }
2167
- return {
2168
- path: `${resolvedTsPaths[args.path][0]}/index.ts`
2169
- };
2438
+ return { path: `${resolvedTsPaths[args.path][0]}/index.ts` };
2170
2439
  });
2171
2440
  }
2172
- }), "resolvePathsPlugin");
2441
+ });
2173
2442
 
2174
2443
  // ../esbuild/src/context.ts
2175
2444
  async function resolveContext(userOptions) {
@@ -2186,7 +2455,11 @@ async function resolveContext(userOptions) {
2186
2455
  const projectGraph = await createProjectGraphAsync2({
2187
2456
  exitOnError: true
2188
2457
  });
2189
- const projectJsonPath = joinPaths(workspaceRoot3.dir, projectRoot, "project.json");
2458
+ const projectJsonPath = joinPaths(
2459
+ workspaceRoot3.dir,
2460
+ projectRoot,
2461
+ "project.json"
2462
+ );
2190
2463
  if (!existsSync5(projectJsonPath)) {
2191
2464
  throw new Error("Cannot find project.json configuration");
2192
2465
  }
@@ -2195,11 +2468,17 @@ async function resolveContext(userOptions) {
2195
2468
  const projectName = projectJson.name || userOptions.name;
2196
2469
  const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
2197
2470
  if (!projectConfigurations?.projects?.[projectName]) {
2198
- 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.");
2471
+ throw new Error(
2472
+ "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."
2473
+ );
2199
2474
  }
2200
2475
  const options = defu4(userOptions, DEFAULT_BUILD_OPTIONS);
2201
2476
  options.name ??= projectName;
2202
- const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
2477
+ const packageJsonPath = joinPaths(
2478
+ workspaceRoot3.dir,
2479
+ options.projectRoot,
2480
+ "package.json"
2481
+ );
2203
2482
  if (!existsSync5(packageJsonPath)) {
2204
2483
  throw new Error("Cannot find package.json configuration");
2205
2484
  }
@@ -2233,7 +2512,11 @@ async function resolveContext(userOptions) {
2233
2512
  projectName,
2234
2513
  projectGraph,
2235
2514
  sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || joinPaths(resolvedOptions.projectRoot, "src"),
2236
- outputPath: resolvedOptions.outputPath || joinPaths(workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
2515
+ outputPath: resolvedOptions.outputPath || joinPaths(
2516
+ workspaceConfig.workspaceRoot,
2517
+ "dist",
2518
+ resolvedOptions.projectRoot
2519
+ ),
2237
2520
  minify: resolvedOptions.minify || resolvedOptions.mode === "production"
2238
2521
  };
2239
2522
  context.options.esbuildPlugins = [
@@ -2242,7 +2525,6 @@ async function resolveContext(userOptions) {
2242
2525
  ];
2243
2526
  return context;
2244
2527
  }
2245
- __name(resolveContext, "resolveContext");
2246
2528
 
2247
2529
  // ../esbuild/src/package-json.ts
2248
2530
  import { writeJsonFile } from "@nx/devkit";
@@ -2252,17 +2534,39 @@ async function generatePackageJson(context) {
2252
2534
  if (context.options.generatePackageJson !== false && existsSync6(joinPaths(context.options.projectRoot, "package.json"))) {
2253
2535
  writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
2254
2536
  const stopwatch = getStopwatch("Write package.json file");
2255
- const packageJsonPath = joinPaths(context.options.projectRoot, "project.json");
2537
+ const packageJsonPath = joinPaths(
2538
+ context.options.projectRoot,
2539
+ "project.json"
2540
+ );
2256
2541
  if (!existsSync6(packageJsonPath)) {
2257
2542
  throw new Error("Cannot find package.json configuration");
2258
2543
  }
2259
- const packageJsonFile = await hf2.readFile(joinPaths(context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
2544
+ const packageJsonFile = await hf2.readFile(
2545
+ joinPaths(
2546
+ context.workspaceConfig.workspaceRoot,
2547
+ context.options.projectRoot,
2548
+ "package.json"
2549
+ ),
2550
+ "utf8"
2551
+ );
2260
2552
  let packageJson = JSON.parse(packageJsonFile);
2261
2553
  if (!packageJson) {
2262
2554
  throw new Error("Cannot find package.json configuration file");
2263
2555
  }
2264
- packageJson = await addPackageDependencies(context.workspaceConfig.workspaceRoot, context.options.projectRoot, context.projectName, packageJson);
2265
- packageJson = await addWorkspacePackageJsonFields(context.workspaceConfig, context.options.projectRoot, context.sourceRoot, context.projectName, false, packageJson);
2556
+ packageJson = await addPackageDependencies(
2557
+ context.workspaceConfig.workspaceRoot,
2558
+ context.options.projectRoot,
2559
+ context.projectName,
2560
+ packageJson
2561
+ );
2562
+ packageJson = await addWorkspacePackageJsonFields(
2563
+ context.workspaceConfig,
2564
+ context.options.projectRoot,
2565
+ context.sourceRoot,
2566
+ context.projectName,
2567
+ false,
2568
+ packageJson
2569
+ );
2266
2570
  if (context.options.entry) {
2267
2571
  packageJson.exports ??= {};
2268
2572
  packageJson.exports["./package.json"] ??= "./package.json";
@@ -2332,20 +2636,25 @@ async function generatePackageJson(context) {
2332
2636
  if (isDts) {
2333
2637
  packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
2334
2638
  }
2335
- packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
2336
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
2337
- ret[key.replace("/index", "")] = packageJson.exports[key];
2338
- }
2339
- return ret;
2340
- }, packageJson.exports);
2639
+ packageJson.exports = Object.keys(packageJson.exports).reduce(
2640
+ (ret, key) => {
2641
+ if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
2642
+ ret[key.replace("/index", "")] = packageJson.exports[key];
2643
+ }
2644
+ return ret;
2645
+ },
2646
+ packageJson.exports
2647
+ );
2341
2648
  }
2342
2649
  }
2343
- await writeJsonFile(joinPaths(context.outputPath, "package.json"), packageJson);
2650
+ await writeJsonFile(
2651
+ joinPaths(context.outputPath, "package.json"),
2652
+ packageJson
2653
+ );
2344
2654
  stopwatch();
2345
2655
  }
2346
2656
  return context;
2347
2657
  }
2348
- __name(generatePackageJson, "generatePackageJson");
2349
2658
 
2350
2659
  // ../esbuild/src/plugins/deps-check.ts
2351
2660
  import { builtinModules as builtinModules2 } from "node:module";
@@ -2374,12 +2683,8 @@ var unusedIgnore = [
2374
2683
  // these are indirectly used by build
2375
2684
  "buffer"
2376
2685
  ];
2377
- var missingIgnore = [
2378
- ".prisma",
2379
- "@prisma/client",
2380
- "ts-toolbelt"
2381
- ];
2382
- var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
2686
+ var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
2687
+ var depsCheckPlugin = (bundle) => ({
2383
2688
  name: "storm:deps-check",
2384
2689
  setup(build3) {
2385
2690
  const pkgJsonPath = path3.join(process.cwd(), "package.json");
@@ -2393,9 +2698,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
2393
2698
  ];
2394
2699
  const collectedDependencies = /* @__PURE__ */ new Set();
2395
2700
  const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
2396
- build3.onResolve({
2397
- filter: onlyPackages
2398
- }, (args) => {
2701
+ build3.onResolve({ filter: onlyPackages }, (args) => {
2399
2702
  if (args.importer.includes(process.cwd())) {
2400
2703
  if (args.path[0] === "@") {
2401
2704
  const [org, pkg] = args.path.split("/");
@@ -2405,19 +2708,13 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
2405
2708
  collectedDependencies.add(pkg);
2406
2709
  }
2407
2710
  }
2408
- return {
2409
- external: true
2410
- };
2711
+ return { external: true };
2411
2712
  });
2412
2713
  build3.onEnd(() => {
2413
- const unusedDependencies = [
2414
- ...dependencies
2415
- ].filter((dep) => {
2714
+ const unusedDependencies = [...dependencies].filter((dep) => {
2416
2715
  return !collectedDependencies.has(dep) || builtinModules2.includes(dep);
2417
2716
  });
2418
- const missingDependencies = [
2419
- ...collectedDependencies
2420
- ].filter((dep) => {
2717
+ const missingDependencies = [...collectedDependencies].filter((dep) => {
2421
2718
  return !dependencies.includes(dep) && !builtinModules2.includes(dep);
2422
2719
  });
2423
2720
  const filteredUnusedDeps = unusedDependencies.filter((dep) => {
@@ -2426,8 +2723,12 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
2426
2723
  const filteredMissingDeps = missingDependencies.filter((dep) => {
2427
2724
  return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
2428
2725
  });
2429
- writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
2430
- writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
2726
+ writeWarning(
2727
+ `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
2728
+ );
2729
+ writeError(
2730
+ `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
2731
+ );
2431
2732
  if (filteredMissingDeps.length > 0) {
2432
2733
  throw new Error(`Missing dependencies detected - please install them:
2433
2734
  ${JSON.stringify(filteredMissingDeps)}
@@ -2435,12 +2736,15 @@ ${JSON.stringify(filteredMissingDeps)}
2435
2736
  }
2436
2737
  });
2437
2738
  }
2438
- }), "depsCheckPlugin");
2739
+ });
2439
2740
 
2440
2741
  // ../esbuild/src/tsup.ts
2441
2742
  import { build as tsup } from "tsup";
2442
2743
  async function executeTsup(context) {
2443
- writeDebug(` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
2744
+ writeDebug(
2745
+ ` \u{1F680} Running ${context.options.name} build`,
2746
+ context.workspaceConfig
2747
+ );
2444
2748
  const stopwatch = getStopwatch(`${context.options.name} build`);
2445
2749
  await tsup({
2446
2750
  ...context.options,
@@ -2450,21 +2754,30 @@ async function executeTsup(context) {
2450
2754
  stopwatch();
2451
2755
  return context;
2452
2756
  }
2453
- __name(executeTsup, "executeTsup");
2454
2757
 
2455
2758
  // ../esbuild/src/build.ts
2456
2759
  async function reportResults(context) {
2457
2760
  if (context.result?.errors.length === 0) {
2458
2761
  if (context.result.warnings.length > 0) {
2459
- writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`, context.workspaceConfig);
2762
+ writeWarning(
2763
+ ` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
2764
+ context.workspaceConfig
2765
+ );
2460
2766
  }
2461
- writeSuccess(` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
2767
+ writeSuccess(
2768
+ ` \u{1F4E6} The ${context.options.name} build completed successfully`,
2769
+ context.workspaceConfig
2770
+ );
2462
2771
  } else if (context.result?.errors && context.result?.errors.length > 0) {
2463
- writeError(` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`, context.workspaceConfig);
2464
- throw new Error(`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`);
2772
+ writeError(
2773
+ ` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
2774
+ context.workspaceConfig
2775
+ );
2776
+ throw new Error(
2777
+ `The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
2778
+ );
2465
2779
  }
2466
2780
  }
2467
- __name(reportResults, "reportResults");
2468
2781
  async function dependencyCheck(options) {
2469
2782
  if (process.env.DEV === "true") {
2470
2783
  return void 0;
@@ -2475,43 +2788,39 @@ async function dependencyCheck(options) {
2475
2788
  const buildPromise = esbuild.build({
2476
2789
  entryPoints: globbySync("**/*.{j,t}s", {
2477
2790
  // We don't check dependencies in ecosystem tests because tests are isolated from the build.
2478
- ignore: [
2479
- "./src/__tests__/**/*",
2480
- "./tests/e2e/**/*",
2481
- "./dist/**/*"
2482
- ],
2791
+ ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
2483
2792
  gitignore: true
2484
2793
  }),
2485
2794
  logLevel: "silent",
2795
+ // there will be errors
2486
2796
  bundle: true,
2797
+ // we bundle to get everything
2487
2798
  write: false,
2799
+ // no need to write for analysis
2488
2800
  outdir: "out",
2489
- plugins: [
2490
- depsCheckPlugin(options.bundle)
2491
- ]
2801
+ plugins: [depsCheckPlugin(options.bundle)]
2492
2802
  });
2493
2803
  await buildPromise.catch(() => {
2494
2804
  });
2495
2805
  return void 0;
2496
2806
  }
2497
- __name(dependencyCheck, "dependencyCheck");
2498
2807
  async function cleanOutputPath(context) {
2499
2808
  if (context.clean !== false && context.outputPath) {
2500
- writeDebug(` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`, context.workspaceConfig);
2809
+ writeDebug(
2810
+ ` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
2811
+ context.workspaceConfig
2812
+ );
2501
2813
  const stopwatch = getStopwatch(`${context.options.name} output clean`);
2502
2814
  await cleanDirectories(context.outputPath);
2503
2815
  stopwatch();
2504
2816
  }
2505
2817
  return context;
2506
2818
  }
2507
- __name(cleanOutputPath, "cleanOutputPath");
2508
2819
  async function build2(options) {
2509
2820
  writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
2510
2821
  const stopwatch = getStopwatch("ESBuild pipeline");
2511
2822
  try {
2512
- const opts = Array.isArray(options) ? options : [
2513
- options
2514
- ];
2823
+ const opts = Array.isArray(options) ? options : [options];
2515
2824
  if (opts.length === 0) {
2516
2825
  throw new Error("No build options were provided");
2517
2826
  }
@@ -2526,19 +2835,22 @@ async function build2(options) {
2526
2835
  await reportResults(context);
2527
2836
  writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
2528
2837
  } catch (error) {
2529
- writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
2838
+ writeFatal(
2839
+ "Fatal errors that the build process could not recover from have occured. The build process has been terminated."
2840
+ );
2530
2841
  throw error;
2531
2842
  } finally {
2532
2843
  stopwatch();
2533
2844
  }
2534
2845
  }
2535
- __name(build2, "build");
2536
2846
 
2537
2847
  // ../workspace-tools/src/executors/esbuild/executor.ts
2538
2848
  async function esbuildExecutorFn(options, context, config) {
2539
2849
  writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
2540
2850
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
2541
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
2851
+ throw new Error(
2852
+ "The Build process failed because the context is not valid. Please run this command from a workspace."
2853
+ );
2542
2854
  }
2543
2855
  await build2({
2544
2856
  ...options,
@@ -2552,20 +2864,21 @@ async function esbuildExecutorFn(options, context, config) {
2552
2864
  success: true
2553
2865
  };
2554
2866
  }
2555
- __name(esbuildExecutorFn, "esbuildExecutorFn");
2556
- var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn, {
2557
- skipReadingConfig: false,
2558
- hooks: {
2559
- applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
2560
- options.entry ??= [
2561
- "src/index.ts"
2562
- ];
2563
- options.outputPath ??= "dist/{projectRoot}";
2564
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
2565
- return options;
2566
- }, "applyDefaultOptions")
2867
+ var executor_default6 = withRunExecutor(
2868
+ "Storm ESBuild build",
2869
+ esbuildExecutorFn,
2870
+ {
2871
+ skipReadingConfig: false,
2872
+ hooks: {
2873
+ applyDefaultOptions: async (options, config) => {
2874
+ options.entry ??= ["src/index.ts"];
2875
+ options.outputPath ??= "dist/{projectRoot}";
2876
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
2877
+ return options;
2878
+ }
2879
+ }
2567
2880
  }
2568
- });
2881
+ );
2569
2882
 
2570
2883
  // ../workspace-tools/src/executors/npm-publish/executor.ts
2571
2884
  import { execSync as execSync4 } from "node:child_process";
@@ -2588,31 +2901,38 @@ import filePlugin from "@size-limit/file";
2588
2901
  import sizeLimit from "size-limit";
2589
2902
  async function sizeLimitExecutorFn(options, context, config) {
2590
2903
  if (!context?.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName]) {
2591
- throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
2904
+ throw new Error(
2905
+ "The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
2906
+ );
2592
2907
  }
2593
2908
  writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
2594
- sizeLimit([
2595
- filePlugin,
2596
- esBuildPlugin,
2597
- esBuildWhyPlugin
2598
- ], {
2599
- checks: options.entry ?? context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? joinPathFragments3(context.projectsConfigurations.projects[context.projectName]?.root ?? "./", "src")
2909
+ sizeLimit([filePlugin, esBuildPlugin, esBuildWhyPlugin], {
2910
+ checks: options.entry ?? context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? joinPathFragments3(
2911
+ context.projectsConfigurations.projects[context.projectName]?.root ?? "./",
2912
+ "src"
2913
+ )
2600
2914
  }).then((result) => {
2601
- writeInfo(`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
2915
+ writeInfo(
2916
+ `\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
2917
+ config
2918
+ );
2602
2919
  });
2603
2920
  return {
2604
2921
  success: true
2605
2922
  };
2606
2923
  }
2607
- __name(sizeLimitExecutorFn, "sizeLimitExecutorFn");
2608
- var executor_default7 = withRunExecutor("Size-Limit Performance Test Executor", sizeLimitExecutorFn, {
2609
- skipReadingConfig: false,
2610
- hooks: {
2611
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
2612
- return options;
2613
- }, "applyDefaultOptions")
2924
+ var executor_default7 = withRunExecutor(
2925
+ "Size-Limit Performance Test Executor",
2926
+ sizeLimitExecutorFn,
2927
+ {
2928
+ skipReadingConfig: false,
2929
+ hooks: {
2930
+ applyDefaultOptions: (options) => {
2931
+ return options;
2932
+ }
2933
+ }
2614
2934
  }
2615
- });
2935
+ );
2616
2936
 
2617
2937
  // ../workspace-tools/src/executors/typia/executor.ts
2618
2938
  import { removeSync } from "fs-extra";
@@ -2622,33 +2942,36 @@ async function typiaExecutorFn(options, _, config) {
2622
2942
  writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
2623
2943
  removeSync(options.outputPath);
2624
2944
  }
2625
- await Promise.all(options.entry.map((entry) => {
2626
- writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
2627
- return TypiaProgrammer.build({
2628
- input: entry,
2629
- output: options.outputPath,
2630
- project: options.tsconfig
2631
- });
2632
- }));
2945
+ await Promise.all(
2946
+ options.entry.map((entry) => {
2947
+ writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
2948
+ return TypiaProgrammer.build({
2949
+ input: entry,
2950
+ output: options.outputPath,
2951
+ project: options.tsconfig
2952
+ });
2953
+ })
2954
+ );
2633
2955
  return {
2634
2956
  success: true
2635
2957
  };
2636
2958
  }
2637
- __name(typiaExecutorFn, "typiaExecutorFn");
2638
- var executor_default8 = withRunExecutor("Typia runtime validation generator", typiaExecutorFn, {
2639
- skipReadingConfig: false,
2640
- hooks: {
2641
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
2642
- options.entry ??= [
2643
- "{sourceRoot}/index.ts"
2644
- ];
2645
- options.outputPath ??= "{sourceRoot}/__generated__/typia";
2646
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
2647
- options.clean ??= true;
2648
- return options;
2649
- }, "applyDefaultOptions")
2959
+ var executor_default8 = withRunExecutor(
2960
+ "Typia runtime validation generator",
2961
+ typiaExecutorFn,
2962
+ {
2963
+ skipReadingConfig: false,
2964
+ hooks: {
2965
+ applyDefaultOptions: (options) => {
2966
+ options.entry ??= ["{sourceRoot}/index.ts"];
2967
+ options.outputPath ??= "{sourceRoot}/__generated__/typia";
2968
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
2969
+ options.clean ??= true;
2970
+ return options;
2971
+ }
2972
+ }
2650
2973
  }
2651
- });
2974
+ );
2652
2975
 
2653
2976
  // ../workspace-tools/src/executors/unbuild/executor.ts
2654
2977
  import { defu as defu5 } from "defu";
@@ -2656,76 +2979,117 @@ import { createJiti } from "jiti";
2656
2979
  async function unbuildExecutorFn(options, context, config) {
2657
2980
  writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
2658
2981
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
2659
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
2982
+ throw new Error(
2983
+ "The Build process failed because the context is not valid. Please run this command from a workspace root directory."
2984
+ );
2660
2985
  }
2661
2986
  if (!context.projectsConfigurations.projects[context.projectName].root) {
2662
- throw new Error("The Build process failed because the project root is not valid. Please run this command from a workspace root directory.");
2987
+ throw new Error(
2988
+ "The Build process failed because the project root is not valid. Please run this command from a workspace root directory."
2989
+ );
2663
2990
  }
2664
2991
  if (!context.projectsConfigurations.projects[context.projectName].sourceRoot) {
2665
- 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.");
2992
+ throw new Error(
2993
+ "The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory."
2994
+ );
2666
2995
  }
2667
2996
  const jiti = createJiti(config.workspaceRoot, {
2668
- fsCache: config.skipCache ? false : joinPaths(config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
2997
+ fsCache: config.skipCache ? false : joinPaths(
2998
+ config.workspaceRoot,
2999
+ config.directories.cache || "node_modules/.cache/storm",
3000
+ "jiti"
3001
+ ),
2669
3002
  interopDefault: true
2670
3003
  });
2671
- const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
2672
- await stormUnbuild.build(defu5({
2673
- ...options,
2674
- projectRoot: context.projectsConfigurations.projects[context.projectName].root,
2675
- projectName: context.projectName,
2676
- sourceRoot: context.projectsConfigurations.projects[context.projectName].sourceRoot,
2677
- platform: options.platform
2678
- }, {
2679
- stubOptions: {
2680
- jiti: {
2681
- fsCache: config.skipCache ? false : joinPaths(config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
2682
- }
2683
- },
2684
- rollup: {
2685
- emitCJS: true,
2686
- watch: false,
2687
- dts: {
2688
- respectExternal: true
3004
+ const stormUnbuild = await jiti.import(
3005
+ jiti.esmResolve("@storm-software/unbuild/build")
3006
+ );
3007
+ await stormUnbuild.build(
3008
+ defu5(
3009
+ {
3010
+ ...options,
3011
+ projectRoot: context.projectsConfigurations.projects[context.projectName].root,
3012
+ projectName: context.projectName,
3013
+ sourceRoot: context.projectsConfigurations.projects[context.projectName].sourceRoot,
3014
+ platform: options.platform
2689
3015
  },
2690
- esbuild: {
2691
- target: options.target,
2692
- format: "esm",
2693
- platform: options.platform,
2694
- minify: options.minify ?? !options.debug,
2695
- sourcemap: options.sourcemap ?? options.debug,
2696
- treeShaking: options.treeShaking
3016
+ {
3017
+ stubOptions: {
3018
+ jiti: {
3019
+ fsCache: config.skipCache ? false : joinPaths(
3020
+ config.workspaceRoot,
3021
+ config.directories.cache || "node_modules/.cache/storm",
3022
+ "jiti"
3023
+ )
3024
+ }
3025
+ },
3026
+ rollup: {
3027
+ emitCJS: true,
3028
+ watch: false,
3029
+ dts: {
3030
+ respectExternal: true
3031
+ },
3032
+ esbuild: {
3033
+ target: options.target,
3034
+ format: "esm",
3035
+ platform: options.platform,
3036
+ minify: options.minify ?? !options.debug,
3037
+ sourcemap: options.sourcemap ?? options.debug,
3038
+ treeShaking: options.treeShaking
3039
+ }
3040
+ }
2697
3041
  }
2698
- }
2699
- }));
3042
+ )
3043
+ );
2700
3044
  return {
2701
3045
  success: true
2702
3046
  };
2703
3047
  }
2704
- __name(unbuildExecutorFn, "unbuildExecutorFn");
2705
- var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecutorFn, {
2706
- skipReadingConfig: false,
2707
- hooks: {
2708
- applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
2709
- options.debug ??= false;
2710
- options.treeShaking ??= true;
2711
- options.buildOnly ??= false;
2712
- options.platform ??= "neutral";
2713
- options.entry ??= [
2714
- "{sourceRoot}"
2715
- ];
2716
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
2717
- return options;
2718
- }, "applyDefaultOptions")
3048
+ var executor_default9 = withRunExecutor(
3049
+ "TypeScript Unbuild build",
3050
+ unbuildExecutorFn,
3051
+ {
3052
+ skipReadingConfig: false,
3053
+ hooks: {
3054
+ applyDefaultOptions: async (options, config) => {
3055
+ options.debug ??= false;
3056
+ options.treeShaking ??= true;
3057
+ options.buildOnly ??= false;
3058
+ options.platform ??= "neutral";
3059
+ options.entry ??= ["{sourceRoot}"];
3060
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
3061
+ return options;
3062
+ }
3063
+ }
2719
3064
  }
2720
- });
3065
+ );
2721
3066
 
2722
3067
  // ../workspace-tools/src/generators/browser-library/generator.ts
2723
- import { formatFiles as formatFiles3, generateFiles, names as names2, offsetFromRoot as offsetFromRoot2 } from "@nx/devkit";
3068
+ import {
3069
+ formatFiles as formatFiles3,
3070
+ generateFiles,
3071
+ names as names2,
3072
+ offsetFromRoot as offsetFromRoot2
3073
+ } from "@nx/devkit";
2724
3074
 
2725
3075
  // ../workspace-tools/src/base/typescript-library-generator.ts
2726
- import { addDependenciesToPackageJson as addDependenciesToPackageJson2, addProjectConfiguration, ensurePackage, formatFiles as formatFiles2, names, offsetFromRoot, readJson, updateJson, writeJson } from "@nx/devkit";
3076
+ import {
3077
+ addDependenciesToPackageJson as addDependenciesToPackageJson2,
3078
+ addProjectConfiguration,
3079
+ ensurePackage,
3080
+ formatFiles as formatFiles2,
3081
+ names,
3082
+ offsetFromRoot,
3083
+ readJson,
3084
+ updateJson,
3085
+ writeJson
3086
+ } from "@nx/devkit";
2727
3087
  import { determineProjectNameAndRootOptions } from "@nx/devkit/src/generators/project-name-and-root-utils";
2728
- import { addTsConfigPath, getRelativePathToRootTsConfig, tsConfigBaseOptions } from "@nx/js";
3088
+ import {
3089
+ addTsConfigPath,
3090
+ getRelativePathToRootTsConfig,
3091
+ tsConfigBaseOptions
3092
+ } from "@nx/js";
2729
3093
  import jsInitGenerator from "@nx/js/src/generators/init/init";
2730
3094
  import setupVerdaccio from "@nx/js/src/generators/setup-verdaccio/generator";
2731
3095
 
@@ -2767,23 +3131,27 @@ var ProjectTagConstants = {
2767
3131
  TAG_ID: "plugin"
2768
3132
  }
2769
3133
  };
2770
- var formatProjectTag = /* @__PURE__ */ __name((variant, value) => {
3134
+ var formatProjectTag = (variant, value) => {
2771
3135
  return `${variant}:${value}`;
2772
- }, "formatProjectTag");
2773
- var hasProjectTag = /* @__PURE__ */ __name((project, variant) => {
3136
+ };
3137
+ var hasProjectTag = (project, variant) => {
2774
3138
  project.tags = project.tags ?? [];
2775
3139
  const prefix = formatProjectTag(variant, "");
2776
- return project.tags.some((tag) => tag.startsWith(prefix) && tag.length > prefix.length);
2777
- }, "hasProjectTag");
2778
- var addProjectTag = /* @__PURE__ */ __name((project, variant, value, options = {
3140
+ return project.tags.some(
3141
+ (tag) => tag.startsWith(prefix) && tag.length > prefix.length
3142
+ );
3143
+ };
3144
+ var addProjectTag = (project, variant, value, options = {
2779
3145
  overwrite: false
2780
3146
  }) => {
2781
3147
  project.tags = project.tags ?? [];
2782
3148
  if (options.overwrite || !hasProjectTag(project, variant)) {
2783
- project.tags = project.tags.filter((tag) => !tag.startsWith(formatProjectTag(variant, "")));
3149
+ project.tags = project.tags.filter(
3150
+ (tag) => !tag.startsWith(formatProjectTag(variant, ""))
3151
+ );
2784
3152
  project.tags.push(formatProjectTag(variant, value));
2785
3153
  }
2786
- }, "addProjectTag");
3154
+ };
2787
3155
 
2788
3156
  // ../workspace-tools/src/utils/versions.ts
2789
3157
  var typesNodeVersion = "20.9.0";
@@ -2793,24 +3161,27 @@ var pnpmVersion = "8.10.2";
2793
3161
 
2794
3162
  // ../workspace-tools/src/base/typescript-library-generator.ts
2795
3163
  async function typeScriptLibraryGeneratorFn(tree, options, config) {
2796
- const normalized = await normalizeOptions(tree, {
2797
- ...options
2798
- });
3164
+ const normalized = await normalizeOptions(tree, { ...options });
2799
3165
  const tasks = [];
2800
- tasks.push(await jsInitGenerator(tree, {
2801
- ...normalized,
2802
- tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
2803
- }));
2804
- tasks.push(addDependenciesToPackageJson2(tree, {}, {
2805
- "@storm-software/workspace-tools": "latest",
2806
- "@storm-software/testing-tools": "latest",
2807
- ...options.devDependencies ?? {}
2808
- }));
2809
- if (normalized.publishable) {
2810
- tasks.push(await setupVerdaccio(tree, {
3166
+ tasks.push(
3167
+ await jsInitGenerator(tree, {
2811
3168
  ...normalized,
2812
- skipFormat: true
2813
- }));
3169
+ tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
3170
+ })
3171
+ );
3172
+ tasks.push(
3173
+ addDependenciesToPackageJson2(
3174
+ tree,
3175
+ {},
3176
+ {
3177
+ "@storm-software/workspace-tools": "latest",
3178
+ "@storm-software/testing-tools": "latest",
3179
+ ...options.devDependencies ?? {}
3180
+ }
3181
+ )
3182
+ );
3183
+ if (normalized.publishable) {
3184
+ tasks.push(await setupVerdaccio(tree, { ...normalized, skipFormat: true }));
2814
3185
  }
2815
3186
  const projectConfig = {
2816
3187
  root: normalized.directory,
@@ -2819,13 +3190,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2819
3190
  targets: {
2820
3191
  build: {
2821
3192
  executor: options.buildExecutor,
2822
- outputs: [
2823
- "{options.outputPath}"
2824
- ],
3193
+ outputs: ["{options.outputPath}"],
2825
3194
  options: {
2826
- entry: [
2827
- joinPaths(normalized.projectRoot, "src", "index.ts")
2828
- ],
3195
+ entry: [joinPaths(normalized.projectRoot, "src", "index.ts")],
2829
3196
  outputPath: getOutputPath(normalized),
2830
3197
  tsconfig: joinPaths(normalized.projectRoot, "tsconfig.json"),
2831
3198
  project: joinPaths(normalized.projectRoot, "package.json"),
@@ -2860,9 +3227,12 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2860
3227
  if (options.platform) {
2861
3228
  projectConfig.targets.build.options.platform = options.platform === "worker" ? "node" : options.platform;
2862
3229
  }
2863
- 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, {
2864
- overwrite: false
2865
- });
3230
+ addProjectTag(
3231
+ projectConfig,
3232
+ ProjectTagConstants.Platform.TAG_ID,
3233
+ options.platform === "node" ? ProjectTagConstants.Platform.NODE : options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL,
3234
+ { overwrite: false }
3235
+ );
2866
3236
  createProjectTsConfigJson(tree, normalized);
2867
3237
  addProjectConfiguration(tree, normalized.name, projectConfig);
2868
3238
  let repository = {
@@ -2939,7 +3309,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2939
3309
  }));
2940
3310
  }
2941
3311
  addTsConfigPath(tree, normalized.importPath, [
2942
- joinPaths(normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
3312
+ joinPaths(
3313
+ normalized.projectRoot,
3314
+ "./src",
3315
+ `index.${normalized.js ? "js" : "ts"}`
3316
+ )
2943
3317
  ]);
2944
3318
  addTsConfigPath(tree, joinPaths(normalized.importPath, "/*"), [
2945
3319
  joinPaths(normalized.projectRoot, "./src", "/*")
@@ -2967,25 +3341,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
2967
3341
  outDir: `${offsetFromRoot(normalized.projectRoot)}dist/out-tsc`
2968
3342
  },
2969
3343
  files: [],
2970
- include: [
2971
- "src/**/*.ts",
2972
- "src/**/*.js"
2973
- ],
2974
- exclude: [
2975
- "jest.config.ts",
2976
- "src/**/*.spec.ts",
2977
- "src/**/*.test.ts"
2978
- ]
3344
+ include: ["src/**/*.ts", "src/**/*.js"],
3345
+ exclude: ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
2979
3346
  });
2980
3347
  }
2981
3348
  await formatFiles2(tree);
2982
3349
  return null;
2983
3350
  }
2984
- __name(typeScriptLibraryGeneratorFn, "typeScriptLibraryGeneratorFn");
2985
3351
  function getOutputPath(options) {
2986
- const parts = [
2987
- "dist"
2988
- ];
3352
+ const parts = ["dist"];
2989
3353
  if (options.projectRoot === ".") {
2990
3354
  parts.push(options.name);
2991
3355
  } else {
@@ -2993,7 +3357,6 @@ function getOutputPath(options) {
2993
3357
  }
2994
3358
  return joinPaths(...parts);
2995
3359
  }
2996
- __name(getOutputPath, "getOutputPath");
2997
3360
  function createProjectTsConfigJson(tree, options) {
2998
3361
  const tsconfig = {
2999
3362
  extends: options.rootProject ? void 0 : getRelativePathToRootTsConfig(tree, options.projectRoot),
@@ -3004,9 +3367,7 @@ function createProjectTsConfigJson(tree, options) {
3004
3367
  noEmit: true,
3005
3368
  ...options?.tsconfigOptions?.compilerOptions ?? {}
3006
3369
  },
3007
- files: [
3008
- ...options?.tsconfigOptions?.files ?? []
3009
- ],
3370
+ files: [...options?.tsconfigOptions?.files ?? []],
3010
3371
  include: [
3011
3372
  ...options?.tsconfigOptions?.include ?? [],
3012
3373
  "src/**/*.ts",
@@ -3022,7 +3383,6 @@ function createProjectTsConfigJson(tree, options) {
3022
3383
  };
3023
3384
  writeJson(tree, joinPaths(options.projectRoot, "tsconfig.json"), tsconfig);
3024
3385
  }
3025
- __name(createProjectTsConfigJson, "createProjectTsConfigJson");
3026
3386
  async function normalizeOptions(tree, options, config) {
3027
3387
  let importPath = options.importPath;
3028
3388
  if (!importPath && config?.namespace) {
@@ -3030,7 +3390,9 @@ async function normalizeOptions(tree, options, config) {
3030
3390
  }
3031
3391
  if (options.publishable) {
3032
3392
  if (!importPath) {
3033
- 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)`);
3393
+ throw new Error(
3394
+ `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)`
3395
+ );
3034
3396
  }
3035
3397
  }
3036
3398
  let bundler = "tsc";
@@ -3039,7 +3401,12 @@ async function normalizeOptions(tree, options, config) {
3039
3401
  }
3040
3402
  const { Linter } = ensurePackage("@nx/eslint", nxVersion);
3041
3403
  const rootProject = false;
3042
- const { projectName, names: projectNames, projectRoot, importPath: normalizedImportPath } = await determineProjectNameAndRootOptions(tree, {
3404
+ const {
3405
+ projectName,
3406
+ names: projectNames,
3407
+ projectRoot,
3408
+ importPath: normalizedImportPath
3409
+ } = await determineProjectNameAndRootOptions(tree, {
3043
3410
  name: options.name,
3044
3411
  projectType: "library",
3045
3412
  directory: options.directory,
@@ -3076,11 +3443,16 @@ async function normalizeOptions(tree, options, config) {
3076
3443
  shouldUseSwcJest: false
3077
3444
  };
3078
3445
  }
3079
- __name(normalizeOptions, "normalizeOptions");
3080
3446
 
3081
3447
  // ../workspace-tools/src/generators/browser-library/generator.ts
3082
3448
  async function browserLibraryGeneratorFn(tree, schema, config) {
3083
- const filesDir = joinPaths(__dirname, "src", "generators", "browser-library", "files");
3449
+ const filesDir = joinPaths(
3450
+ __dirname,
3451
+ "src",
3452
+ "generators",
3453
+ "browser-library",
3454
+ "files"
3455
+ );
3084
3456
  const tsLibraryGeneratorOptions = {
3085
3457
  buildExecutor: "@storm-software/workspace-tools:unbuild",
3086
3458
  platform: "browser",
@@ -3106,7 +3478,9 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
3106
3478
  directory: schema.directory
3107
3479
  };
3108
3480
  const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
3109
- const { className, name, propertyName } = names2(options.projectNames.projectFileName);
3481
+ const { className, name, propertyName } = names2(
3482
+ options.projectNames.projectFileName
3483
+ );
3110
3484
  generateFiles(tree, filesDir, options.projectRoot, {
3111
3485
  ...schema,
3112
3486
  dot: ".",
@@ -3137,52 +3511,82 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
3137
3511
  await formatFiles3(tree);
3138
3512
  return null;
3139
3513
  }
3140
- __name(browserLibraryGeneratorFn, "browserLibraryGeneratorFn");
3141
- var generator_default = withRunGenerator("TypeScript Library Creator (Browser Platform)", browserLibraryGeneratorFn, {
3142
- hooks: {
3143
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
3144
- options.description ??= "A library used by Storm Software to support browser applications";
3145
- options.platform ??= "browser";
3146
- return options;
3147
- }, "applyDefaultOptions")
3514
+ var generator_default = withRunGenerator(
3515
+ "TypeScript Library Creator (Browser Platform)",
3516
+ browserLibraryGeneratorFn,
3517
+ {
3518
+ hooks: {
3519
+ applyDefaultOptions: (options) => {
3520
+ options.description ??= "A library used by Storm Software to support browser applications";
3521
+ options.platform ??= "browser";
3522
+ return options;
3523
+ }
3524
+ }
3148
3525
  }
3149
- });
3526
+ );
3150
3527
 
3151
3528
  // ../workspace-tools/src/generators/config-schema/generator.ts
3152
3529
  import { formatFiles as formatFiles4, writeJson as writeJson2 } from "@nx/devkit";
3153
3530
  import { zodToJsonSchema } from "zod-to-json-schema";
3154
3531
  async function configSchemaGeneratorFn(tree, options, config) {
3155
- writeInfo("\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
3156
- writeTrace(`Determining the Storm Workspace Configuration JSON Schema...`, config);
3532
+ writeInfo(
3533
+ "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
3534
+ config
3535
+ );
3536
+ writeTrace(
3537
+ `Determining the Storm Workspace Configuration JSON Schema...`,
3538
+ config
3539
+ );
3157
3540
  const jsonSchema = zodToJsonSchema(stormWorkspaceConfigSchema, {
3158
3541
  name: "StormWorkspaceConfiguration"
3159
3542
  });
3160
3543
  writeTrace(jsonSchema, config);
3161
- const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(config?.workspaceRoot ?? findWorkspaceRoot(), options.outputFile?.startsWith("./") ? "" : "./");
3162
- writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
3163
- writeJson2(tree, outputPath, jsonSchema, {
3164
- spaces: 2
3165
- });
3544
+ const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
3545
+ config?.workspaceRoot ?? findWorkspaceRoot(),
3546
+ options.outputFile?.startsWith("./") ? "" : "./"
3547
+ );
3548
+ writeTrace(
3549
+ `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
3550
+ config
3551
+ );
3552
+ writeJson2(tree, outputPath, jsonSchema, { spaces: 2 });
3166
3553
  await formatFiles4(tree);
3167
- writeSuccess("\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
3554
+ writeSuccess(
3555
+ "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
3556
+ config
3557
+ );
3168
3558
  return {
3169
3559
  success: true
3170
3560
  };
3171
3561
  }
3172
- __name(configSchemaGeneratorFn, "configSchemaGeneratorFn");
3173
- var generator_default2 = withRunGenerator("Configuration Schema Creator", configSchemaGeneratorFn, {
3174
- hooks: {
3175
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
3176
- options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
3177
- return options;
3178
- }, "applyDefaultOptions")
3562
+ var generator_default2 = withRunGenerator(
3563
+ "Configuration Schema Creator",
3564
+ configSchemaGeneratorFn,
3565
+ {
3566
+ hooks: {
3567
+ applyDefaultOptions: (options) => {
3568
+ options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
3569
+ return options;
3570
+ }
3571
+ }
3179
3572
  }
3180
- });
3573
+ );
3181
3574
 
3182
3575
  // ../workspace-tools/src/generators/neutral-library/generator.ts
3183
- import { formatFiles as formatFiles5, generateFiles as generateFiles2, names as names3, offsetFromRoot as offsetFromRoot3 } from "@nx/devkit";
3576
+ import {
3577
+ formatFiles as formatFiles5,
3578
+ generateFiles as generateFiles2,
3579
+ names as names3,
3580
+ offsetFromRoot as offsetFromRoot3
3581
+ } from "@nx/devkit";
3184
3582
  async function neutralLibraryGeneratorFn(tree, schema, config) {
3185
- const filesDir = joinPaths(__dirname, "src", "generators", "neutral-library", "files");
3583
+ const filesDir = joinPaths(
3584
+ __dirname,
3585
+ "src",
3586
+ "generators",
3587
+ "neutral-library",
3588
+ "files"
3589
+ );
3186
3590
  const tsLibraryGeneratorOptions = {
3187
3591
  ...schema,
3188
3592
  platform: "neutral",
@@ -3190,7 +3594,9 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
3190
3594
  buildExecutor: "@storm-software/workspace-tools:unbuild"
3191
3595
  };
3192
3596
  const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
3193
- const { className, name, propertyName } = names3(options.projectNames.projectFileName);
3597
+ const { className, name, propertyName } = names3(
3598
+ options.projectNames.projectFileName
3599
+ );
3194
3600
  generateFiles2(tree, filesDir, options.projectRoot, {
3195
3601
  ...schema,
3196
3602
  dot: ".",
@@ -3211,21 +3617,35 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
3211
3617
  await formatFiles5(tree);
3212
3618
  return null;
3213
3619
  }
3214
- __name(neutralLibraryGeneratorFn, "neutralLibraryGeneratorFn");
3215
- var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral Platform)", neutralLibraryGeneratorFn, {
3216
- hooks: {
3217
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
3218
- options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
3219
- options.platform = "neutral";
3220
- return options;
3221
- }, "applyDefaultOptions")
3620
+ var generator_default3 = withRunGenerator(
3621
+ "TypeScript Library Creator (Neutral Platform)",
3622
+ neutralLibraryGeneratorFn,
3623
+ {
3624
+ hooks: {
3625
+ applyDefaultOptions: (options) => {
3626
+ options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
3627
+ options.platform = "neutral";
3628
+ return options;
3629
+ }
3630
+ }
3222
3631
  }
3223
- });
3632
+ );
3224
3633
 
3225
3634
  // ../workspace-tools/src/generators/node-library/generator.ts
3226
- import { formatFiles as formatFiles6, generateFiles as generateFiles3, names as names4, offsetFromRoot as offsetFromRoot4 } from "@nx/devkit";
3635
+ import {
3636
+ formatFiles as formatFiles6,
3637
+ generateFiles as generateFiles3,
3638
+ names as names4,
3639
+ offsetFromRoot as offsetFromRoot4
3640
+ } from "@nx/devkit";
3227
3641
  async function nodeLibraryGeneratorFn(tree, schema, config) {
3228
- const filesDir = joinPaths(__dirname, "src", "generators", "node-library", "files");
3642
+ const filesDir = joinPaths(
3643
+ __dirname,
3644
+ "src",
3645
+ "generators",
3646
+ "node-library",
3647
+ "files"
3648
+ );
3229
3649
  const tsLibraryGeneratorOptions = {
3230
3650
  platform: "node",
3231
3651
  devDependencies: {
@@ -3258,19 +3678,29 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
3258
3678
  await formatFiles6(tree);
3259
3679
  return null;
3260
3680
  }
3261
- __name(nodeLibraryGeneratorFn, "nodeLibraryGeneratorFn");
3262
- var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Platform)", nodeLibraryGeneratorFn, {
3263
- hooks: {
3264
- applyDefaultOptions: /* @__PURE__ */ __name((options) => {
3265
- options.description ??= "A library used by Storm Software to support NodeJs applications";
3266
- options.platform ??= "node";
3267
- return options;
3268
- }, "applyDefaultOptions")
3681
+ var generator_default4 = withRunGenerator(
3682
+ "TypeScript Library Creator (NodeJs Platform)",
3683
+ nodeLibraryGeneratorFn,
3684
+ {
3685
+ hooks: {
3686
+ applyDefaultOptions: (options) => {
3687
+ options.description ??= "A library used by Storm Software to support NodeJs applications";
3688
+ options.platform ??= "node";
3689
+ return options;
3690
+ }
3691
+ }
3269
3692
  }
3270
- });
3693
+ );
3271
3694
 
3272
3695
  // ../workspace-tools/src/generators/preset/generator.ts
3273
- import { addDependenciesToPackageJson as addDependenciesToPackageJson3, addProjectConfiguration as addProjectConfiguration2, formatFiles as formatFiles7, generateFiles as generateFiles4, joinPathFragments as joinPathFragments4, updateJson as updateJson2 } from "@nx/devkit";
3696
+ import {
3697
+ addDependenciesToPackageJson as addDependenciesToPackageJson3,
3698
+ addProjectConfiguration as addProjectConfiguration2,
3699
+ formatFiles as formatFiles7,
3700
+ generateFiles as generateFiles4,
3701
+ joinPathFragments as joinPathFragments4,
3702
+ updateJson as updateJson2
3703
+ } from "@nx/devkit";
3274
3704
  import * as path4 from "node:path";
3275
3705
  async function presetGeneratorFn(tree, options) {
3276
3706
  const projectRoot = ".";
@@ -3485,14 +3915,30 @@ async function presetGeneratorFn(tree, options) {
3485
3915
  "nx-cloud": "latest"
3486
3916
  };
3487
3917
  }
3488
- await Promise.resolve(addDependenciesToPackageJson3(tree, dependencies, {}, joinPathFragments4(projectRoot, "package.json")));
3918
+ await Promise.resolve(
3919
+ addDependenciesToPackageJson3(
3920
+ tree,
3921
+ dependencies,
3922
+ {},
3923
+ joinPathFragments4(projectRoot, "package.json")
3924
+ )
3925
+ );
3489
3926
  return null;
3490
3927
  }
3491
- __name(presetGeneratorFn, "presetGeneratorFn");
3492
- var generator_default5 = withRunGenerator("Storm Workspace Preset Generator", presetGeneratorFn);
3928
+ var generator_default5 = withRunGenerator(
3929
+ "Storm Workspace Preset Generator",
3930
+ presetGeneratorFn
3931
+ );
3493
3932
 
3494
3933
  // ../workspace-tools/src/generators/release-version/generator.ts
3495
- import { formatFiles as formatFiles8, joinPathFragments as joinPathFragments5, output, readJson as readJson2, updateJson as updateJson3, writeJson as writeJson3 } from "@nx/devkit";
3934
+ import {
3935
+ formatFiles as formatFiles8,
3936
+ joinPathFragments as joinPathFragments5,
3937
+ output,
3938
+ readJson as readJson2,
3939
+ updateJson as updateJson3,
3940
+ writeJson as writeJson3
3941
+ } from "@nx/devkit";
3496
3942
  import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies } from "@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies";
3497
3943
  import { updateLockFile } from "@nx/js/src/release/utils/update-lock-file";
3498
3944
 
@@ -3631,7 +4077,9 @@ var DEFAULT_COMMIT_QUESTIONS = {
3631
4077
  type: "select",
3632
4078
  title: "Commit Type",
3633
4079
  description: "Select the commit type that best describes your changes",
3634
- enum: Object.keys(DEFAULT_COMMIT_TYPES).filter((type) => DEFAULT_COMMIT_TYPES[type].hidden !== true).reduce((ret, type) => {
4080
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
4081
+ (type) => DEFAULT_COMMIT_TYPES[type].hidden !== true
4082
+ ).reduce((ret, type) => {
3635
4083
  ret[type] = DEFAULT_COMMIT_TYPES[type];
3636
4084
  return ret;
3637
4085
  }, {}),
@@ -3671,7 +4119,7 @@ var DEFAULT_COMMIT_QUESTIONS = {
3671
4119
  type: "input",
3672
4120
  title: "Breaking Changes (Details)",
3673
4121
  description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
3674
- when: /* @__PURE__ */ __name((answers) => answers.isBreaking === true, "when"),
4122
+ when: (answers) => answers.isBreaking === true,
3675
4123
  maxLength: 600,
3676
4124
  minLength: 3
3677
4125
  },
@@ -3685,26 +4133,29 @@ var DEFAULT_COMMIT_QUESTIONS = {
3685
4133
  type: "input",
3686
4134
  title: "Open Issue Affected (Details)",
3687
4135
  description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
3688
- when: /* @__PURE__ */ __name((answers) => answers.isIssueAffected === true, "when"),
4136
+ when: (answers) => answers.isIssueAffected === true,
3689
4137
  maxLength: 600,
3690
4138
  minLength: 3
3691
4139
  }
3692
4140
  };
3693
- var RuleConfigSeverity;
3694
- (function(RuleConfigSeverity2) {
3695
- RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
3696
- RuleConfigSeverity2[RuleConfigSeverity2["Warning"] = 1] = "Warning";
3697
- RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
3698
- })(RuleConfigSeverity || (RuleConfigSeverity = {}));
3699
4141
 
3700
4142
  // ../workspace-tools/src/generators/release-version/generator.ts
3701
4143
  import { exec as exec2, execSync as execSync5 } from "node:child_process";
3702
4144
  import { relative as relative3 } from "node:path";
3703
4145
  import { IMPLICIT_DEFAULT_RELEASE_GROUP } from "nx/src/command-line/release/config/config";
3704
- import { getFirstGitCommit, getLatestGitTagForPattern } from "nx/src/command-line/release/utils/git";
3705
- import { resolveSemverSpecifierFromConventionalCommits, resolveSemverSpecifierFromPrompt } from "nx/src/command-line/release/utils/resolve-semver-specifier";
4146
+ import {
4147
+ getFirstGitCommit,
4148
+ getLatestGitTagForPattern
4149
+ } from "nx/src/command-line/release/utils/git";
4150
+ import {
4151
+ resolveSemverSpecifierFromConventionalCommits,
4152
+ resolveSemverSpecifierFromPrompt
4153
+ } from "nx/src/command-line/release/utils/resolve-semver-specifier";
3706
4154
  import { isValidSemverSpecifier } from "nx/src/command-line/release/utils/semver";
3707
- import { deriveNewSemverVersion, validReleaseVersionPrefixes } from "nx/src/command-line/release/version-legacy";
4155
+ import {
4156
+ deriveNewSemverVersion,
4157
+ validReleaseVersionPrefixes
4158
+ } from "nx/src/command-line/release/version-legacy";
3708
4159
  import { interpolate } from "nx/src/tasks-runner/utils";
3709
4160
  import { prerelease } from "semver";
3710
4161
 
@@ -3766,11 +4217,7 @@ var cargo_base_executor_untyped_default = defineUntypedSchema3({
3766
4217
  $schema: {
3767
4218
  title: "Toolchain",
3768
4219
  description: "The type of toolchain to use for the build",
3769
- enum: [
3770
- "stable",
3771
- "beta",
3772
- "nightly"
3773
- ],
4220
+ enum: ["stable", "beta", "nightly"],
3774
4221
  default: "stable"
3775
4222
  },
3776
4223
  $default: "stable"
@@ -3808,17 +4255,7 @@ var cargo_base_executor_untyped_default = defineUntypedSchema3({
3808
4255
  title: "Features",
3809
4256
  type: "string",
3810
4257
  description: "The features to build",
3811
- oneOf: [
3812
- {
3813
- type: "string"
3814
- },
3815
- {
3816
- type: "array",
3817
- items: {
3818
- type: "string"
3819
- }
3820
- }
3821
- ]
4258
+ oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }]
3822
4259
  }
3823
4260
  },
3824
4261
  allFeatures: {
@@ -3838,10 +4275,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3838
4275
  id: "TypeScriptBuildExecutorSchema",
3839
4276
  title: "TypeScript Build Executor",
3840
4277
  description: "A type definition for the base TypeScript build executor schema",
3841
- required: [
3842
- "entry",
3843
- "tsconfig"
3844
- ]
4278
+ required: ["entry", "tsconfig"]
3845
4279
  },
3846
4280
  entry: {
3847
4281
  $schema: {
@@ -3849,13 +4283,9 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3849
4283
  format: "path",
3850
4284
  type: "array",
3851
4285
  description: "The entry file or files to build",
3852
- items: {
3853
- type: "string"
3854
- }
4286
+ items: { type: "string" }
3855
4287
  },
3856
- $default: [
3857
- "{sourceRoot}/index.ts"
3858
- ]
4288
+ $default: ["{sourceRoot}/index.ts"]
3859
4289
  },
3860
4290
  tsconfig: {
3861
4291
  $schema: {
@@ -3935,7 +4365,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3935
4365
  ]
3936
4366
  },
3937
4367
  $default: "esnext",
3938
- $resolve: /* @__PURE__ */ __name((val = "esnext") => val.toLowerCase(), "$resolve")
4368
+ $resolve: (val = "esnext") => val.toLowerCase()
3939
4369
  },
3940
4370
  format: {
3941
4371
  $schema: {
@@ -3944,28 +4374,17 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3944
4374
  description: "The format to build",
3945
4375
  items: {
3946
4376
  type: "string",
3947
- enum: [
3948
- "cjs",
3949
- "esm",
3950
- "iife"
3951
- ]
4377
+ enum: ["cjs", "esm", "iife"]
3952
4378
  }
3953
4379
  },
3954
- $resolve: /* @__PURE__ */ __name((val = [
3955
- "cjs",
3956
- "esm"
3957
- ]) => [].concat(val), "$resolve")
4380
+ $resolve: (val = ["cjs", "esm"]) => [].concat(val)
3958
4381
  },
3959
4382
  platform: {
3960
4383
  $schema: {
3961
4384
  title: "Platform",
3962
4385
  type: "string",
3963
4386
  description: "The platform to build",
3964
- enum: [
3965
- "neutral",
3966
- "node",
3967
- "browser"
3968
- ]
4387
+ enum: ["neutral", "node", "browser"]
3969
4388
  },
3970
4389
  $default: "neutral"
3971
4390
  },
@@ -3975,7 +4394,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3975
4394
  type: "array",
3976
4395
  description: "The external dependencies"
3977
4396
  },
3978
- $resolve: /* @__PURE__ */ __name((val = []) => [].concat(val), "$resolve")
4397
+ $resolve: (val = []) => [].concat(val)
3979
4398
  },
3980
4399
  define: {
3981
4400
  $schema: {
@@ -3984,7 +4403,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3984
4403
  tsType: "Record<string, string>",
3985
4404
  description: "The define values"
3986
4405
  },
3987
- $resolve: /* @__PURE__ */ __name((val = {}) => val, "$resolve"),
4406
+ $resolve: (val = {}) => val,
3988
4407
  $default: {}
3989
4408
  },
3990
4409
  env: {
@@ -3994,7 +4413,7 @@ var typescript_build_executor_untyped_default = defineUntypedSchema4({
3994
4413
  tsType: "Record<string, string>",
3995
4414
  description: "The environment variable values"
3996
4415
  },
3997
- $resolve: /* @__PURE__ */ __name((val = {}) => val, "$resolve"),
4416
+ $resolve: (val = {}) => val,
3998
4417
  $default: {}
3999
4418
  }
4000
4419
  });
@@ -4007,10 +4426,7 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
4007
4426
  id: "TypeScriptLibraryGeneratorSchema",
4008
4427
  title: "TypeScript Library Generator",
4009
4428
  description: "A type definition for the base TypeScript Library Generator schema",
4010
- required: [
4011
- "directory",
4012
- "name"
4013
- ]
4429
+ required: ["directory", "name"]
4014
4430
  },
4015
4431
  name: {
4016
4432
  $schema: {
@@ -4039,12 +4455,7 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
4039
4455
  title: "Platform",
4040
4456
  type: "string",
4041
4457
  description: "The platform to target with the library",
4042
- enum: [
4043
- "neutral",
4044
- "node",
4045
- "worker",
4046
- "browser"
4047
- ]
4458
+ enum: ["neutral", "node", "worker", "browser"]
4048
4459
  },
4049
4460
  $default: "neutral"
4050
4461
  },
@@ -4066,11 +4477,7 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
4066
4477
  $schema: {
4067
4478
  title: "Unit Test Runner",
4068
4479
  type: "string",
4069
- enum: [
4070
- "jest",
4071
- "vitest",
4072
- "none"
4073
- ],
4480
+ enum: ["jest", "vitest", "none"],
4074
4481
  description: "The unit test runner to use"
4075
4482
  }
4076
4483
  },
@@ -4078,10 +4485,7 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
4078
4485
  $schema: {
4079
4486
  title: "Test Environment",
4080
4487
  type: "string",
4081
- enum: [
4082
- "jsdom",
4083
- "node"
4084
- ],
4488
+ enum: ["jsdom", "node"],
4085
4489
  description: "The test environment to use"
4086
4490
  }
4087
4491
  },
@@ -4126,12 +4530,25 @@ import { names as names5 } from "@nx/devkit";
4126
4530
  import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/project-graph/utils/retrieve-workspace-files";
4127
4531
 
4128
4532
  // ../workspace-tools/src/utils/lock-file.ts
4129
- import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "@nx/devkit";
4533
+ import {
4534
+ output as output2,
4535
+ readJsonFile,
4536
+ workspaceRoot as workspaceRoot2
4537
+ } from "@nx/devkit";
4130
4538
  import { existsSync as existsSync8 } from "node:fs";
4131
4539
  import { join as join4 } from "node:path";
4132
- import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
4133
- import { getPnpmLockfileDependencies, getPnpmLockfileNodes } from "nx/src/plugins/js/lock-file/pnpm-parser";
4134
- import { getYarnLockfileDependencies, getYarnLockfileNodes } from "nx/src/plugins/js/lock-file/yarn-parser";
4540
+ import {
4541
+ getNpmLockfileDependencies,
4542
+ getNpmLockfileNodes
4543
+ } from "nx/src/plugins/js/lock-file/npm-parser";
4544
+ import {
4545
+ getPnpmLockfileDependencies,
4546
+ getPnpmLockfileNodes
4547
+ } from "nx/src/plugins/js/lock-file/pnpm-parser";
4548
+ import {
4549
+ getYarnLockfileDependencies,
4550
+ getYarnLockfileNodes
4551
+ } from "nx/src/plugins/js/lock-file/yarn-parser";
4135
4552
  var YARN_LOCK_FILE = "yarn.lock";
4136
4553
  var NPM_LOCK_FILE = "package-lock.json";
4137
4554
  var PNPM_LOCK_FILE = "pnpm-lock.yaml";
@@ -4140,7 +4557,10 @@ var NPM_LOCK_PATH = join4(workspaceRoot2, NPM_LOCK_FILE);
4140
4557
  var PNPM_LOCK_PATH = join4(workspaceRoot2, PNPM_LOCK_FILE);
4141
4558
 
4142
4559
  // ../workspace-tools/src/utils/package-helpers.ts
4143
- import { joinPathFragments as joinPathFragments6, readJsonFile as readJsonFile2 } from "@nx/devkit";
4560
+ import {
4561
+ joinPathFragments as joinPathFragments6,
4562
+ readJsonFile as readJsonFile2
4563
+ } from "@nx/devkit";
4144
4564
  import { existsSync as existsSync9 } from "node:fs";
4145
4565
 
4146
4566
  // ../workspace-tools/src/utils/plugin-helpers.ts