@storm-software/tsup 0.1.0 → 0.2.0

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.
@@ -0,0 +1,2389 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/options.ts
31
+ var options_exports = {};
32
+ __export(options_exports, {
33
+ resolveOptions: () => resolveOptions
34
+ });
35
+ module.exports = __toCommonJS(options_exports);
36
+ var import_devkit2 = require("@nx/devkit");
37
+
38
+ // ../build-tools/dist/chunk-RPSH5IFV.mjs
39
+ var import_node_fs = require("fs");
40
+ var import_node_path = require("path");
41
+
42
+ // ../build-tools/dist/chunk-R2HS3O2S.mjs
43
+ var import_chalk = __toESM(require("chalk"), 1);
44
+ var LogLevelLabel = {
45
+ SILENT: "silent",
46
+ FATAL: "fatal",
47
+ ERROR: "error",
48
+ WARN: "warn",
49
+ SUCCESS: "success",
50
+ INFO: "info",
51
+ DEBUG: "debug",
52
+ TRACE: "trace",
53
+ ALL: "all"
54
+ };
55
+ function isUnicodeSupported() {
56
+ if (process.platform !== "win32") {
57
+ return process.env.TERM !== "linux";
58
+ }
59
+ return Boolean(process.env.WT_SESSION) || // Windows Terminal
60
+ Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
61
+ process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
62
+ 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";
63
+ }
64
+ var useIcon = (c3, fallback) => isUnicodeSupported() ? c3 : fallback;
65
+ var CONSOLE_ICONS = {
66
+ [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
67
+ [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
68
+ [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
69
+ [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
70
+ [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
71
+ [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
72
+ [LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
73
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
74
+ };
75
+
76
+ // ../build-tools/dist/chunk-7ZALXK5F.mjs
77
+ var import_c12 = require("c12");
78
+ var import_defu = __toESM(require("defu"), 1);
79
+ var z = __toESM(require("zod/mini"), 1);
80
+ var import_node_fs2 = require("fs");
81
+ var import_promises = require("fs/promises");
82
+ var import_node_path2 = require("path");
83
+ var import_defu2 = __toESM(require("defu"), 1);
84
+ var import_node_fs3 = require("fs");
85
+ var import_node_fs4 = require("fs");
86
+ var import_promises2 = require("fs/promises");
87
+ var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
88
+ var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
89
+ var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
90
+ var STORM_DEFAULT_RELEASE_FOOTER = `
91
+ Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
92
+
93
+ Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
94
+
95
+ If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${STORM_DEFAULT_CONTACT}) or join our [Slack](${STORM_DEFAULT_SOCIAL_SLACK}) channel!
96
+ `;
97
+ var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
98
+ var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
99
+ var schemaRegistry = z.registry();
100
+ var colorSchema = z.string().check(
101
+ z.length(7),
102
+ z.toLowerCase(),
103
+ z.regex(/^#([0-9a-f]{3}){1,2}$/i),
104
+ z.trim()
105
+ );
106
+ schemaRegistry.add(colorSchema, {
107
+ description: "A base schema for describing the format of colors"
108
+ });
109
+ var darkColorSchema = z._default(colorSchema, "#151718");
110
+ schemaRegistry.add(darkColorSchema, {
111
+ description: "The dark background color of the workspace"
112
+ });
113
+ var lightColorSchema = z._default(colorSchema, "#cbd5e1");
114
+ schemaRegistry.add(lightColorSchema, {
115
+ description: "The light background color of the workspace"
116
+ });
117
+ var brandColorSchema = z._default(colorSchema, "#1fb2a6");
118
+ schemaRegistry.add(brandColorSchema, {
119
+ description: "The primary brand specific color of the workspace"
120
+ });
121
+ var alternateColorSchema = z.optional(colorSchema);
122
+ schemaRegistry.add(alternateColorSchema, {
123
+ description: "The alternate brand specific color of the workspace"
124
+ });
125
+ var accentColorSchema = z.optional(colorSchema);
126
+ schemaRegistry.add(accentColorSchema, {
127
+ description: "The secondary brand specific color of the workspace"
128
+ });
129
+ var linkColorSchema = z._default(colorSchema, "#3fa6ff");
130
+ schemaRegistry.add(linkColorSchema, {
131
+ description: "The color used to display hyperlink text"
132
+ });
133
+ var helpColorSchema = z._default(colorSchema, "#818cf8");
134
+ schemaRegistry.add(helpColorSchema, {
135
+ description: "The second brand specific color of the workspace"
136
+ });
137
+ var successColorSchema = z._default(colorSchema, "#45b27e");
138
+ schemaRegistry.add(successColorSchema, {
139
+ description: "The success color of the workspace"
140
+ });
141
+ var infoColorSchema = z._default(colorSchema, "#38bdf8");
142
+ schemaRegistry.add(infoColorSchema, {
143
+ description: "The informational color of the workspace"
144
+ });
145
+ var warningColorSchema = z._default(colorSchema, "#f3d371");
146
+ schemaRegistry.add(warningColorSchema, {
147
+ description: "The warning color of the workspace"
148
+ });
149
+ var dangerColorSchema = z._default(colorSchema, "#d8314a");
150
+ schemaRegistry.add(dangerColorSchema, {
151
+ description: "The danger color of the workspace"
152
+ });
153
+ var fatalColorSchema = z.optional(colorSchema);
154
+ schemaRegistry.add(fatalColorSchema, {
155
+ description: "The fatal color of the workspace"
156
+ });
157
+ var positiveColorSchema = z._default(colorSchema, "#4ade80");
158
+ schemaRegistry.add(positiveColorSchema, {
159
+ description: "The positive number color of the workspace"
160
+ });
161
+ var negativeColorSchema = z._default(colorSchema, "#ef4444");
162
+ schemaRegistry.add(negativeColorSchema, {
163
+ description: "The negative number color of the workspace"
164
+ });
165
+ var gradientStopsSchema = z.optional(z.array(colorSchema));
166
+ schemaRegistry.add(gradientStopsSchema, {
167
+ description: "The color stops for the base gradient color pattern used in the workspace"
168
+ });
169
+ var darkColorsSchema = z.object({
170
+ foreground: lightColorSchema,
171
+ background: darkColorSchema,
172
+ brand: brandColorSchema,
173
+ alternate: alternateColorSchema,
174
+ accent: accentColorSchema,
175
+ link: linkColorSchema,
176
+ help: helpColorSchema,
177
+ success: successColorSchema,
178
+ info: infoColorSchema,
179
+ warning: warningColorSchema,
180
+ danger: dangerColorSchema,
181
+ fatal: fatalColorSchema,
182
+ positive: positiveColorSchema,
183
+ negative: negativeColorSchema,
184
+ gradient: gradientStopsSchema
185
+ });
186
+ var lightColorsSchema = z.object({
187
+ foreground: darkColorSchema,
188
+ background: lightColorSchema,
189
+ brand: brandColorSchema,
190
+ alternate: alternateColorSchema,
191
+ accent: accentColorSchema,
192
+ link: linkColorSchema,
193
+ help: helpColorSchema,
194
+ success: successColorSchema,
195
+ info: infoColorSchema,
196
+ warning: warningColorSchema,
197
+ danger: dangerColorSchema,
198
+ fatal: fatalColorSchema,
199
+ positive: positiveColorSchema,
200
+ negative: negativeColorSchema,
201
+ gradient: gradientStopsSchema
202
+ });
203
+ var multiColorsSchema = z.object({
204
+ dark: darkColorsSchema,
205
+ light: lightColorsSchema
206
+ });
207
+ var singleColorsSchema = z.object({
208
+ dark: darkColorSchema,
209
+ light: lightColorSchema,
210
+ brand: brandColorSchema,
211
+ alternate: alternateColorSchema,
212
+ accent: accentColorSchema,
213
+ link: linkColorSchema,
214
+ help: helpColorSchema,
215
+ success: successColorSchema,
216
+ info: infoColorSchema,
217
+ warning: warningColorSchema,
218
+ danger: dangerColorSchema,
219
+ fatal: fatalColorSchema,
220
+ positive: positiveColorSchema,
221
+ negative: negativeColorSchema,
222
+ gradient: gradientStopsSchema
223
+ });
224
+ var registryUrlConfigSchema = z.optional(z.url());
225
+ schemaRegistry.add(registryUrlConfigSchema, {
226
+ description: "A remote registry URL used to publish distributable packages"
227
+ });
228
+ var registrySchema = z._default(
229
+ z.object({
230
+ github: registryUrlConfigSchema,
231
+ npm: registryUrlConfigSchema,
232
+ cargo: registryUrlConfigSchema,
233
+ cyclone: registryUrlConfigSchema,
234
+ container: registryUrlConfigSchema
235
+ }),
236
+ {}
237
+ );
238
+ schemaRegistry.add(registrySchema, {
239
+ description: "A list of remote registry URLs used by Storm Software"
240
+ });
241
+ var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
242
+ schemaRegistry.add(colorsSchema, {
243
+ description: "Colors used for various workspace elements"
244
+ });
245
+ var themeColorsSchema = z.record(
246
+ z.union([z.union([z.literal("base"), z.string()]), z.string()]),
247
+ colorsSchema
248
+ );
249
+ schemaRegistry.add(themeColorsSchema, {
250
+ description: "Storm theme config values used for styling various package elements"
251
+ });
252
+ var extendsSchema = z.optional(
253
+ z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
254
+ );
255
+ schemaRegistry.add(extendsSchema, {
256
+ description: "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."
257
+ });
258
+ var workspaceBotNameSchema = z.string().check(z.trim());
259
+ schemaRegistry.add(workspaceBotNameSchema, {
260
+ description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
261
+ });
262
+ var workspaceBotEmailSchema = z.string().check(z.trim());
263
+ schemaRegistry.add(workspaceBotEmailSchema, {
264
+ description: "The email of the workspace bot"
265
+ });
266
+ var workspaceBotSchema = z.object({
267
+ name: workspaceBotNameSchema,
268
+ email: workspaceBotEmailSchema
269
+ });
270
+ schemaRegistry.add(workspaceBotSchema, {
271
+ description: "The workspace's bot user's config used to automated various operations tasks"
272
+ });
273
+ var workspaceReleaseBannerUrlSchema = z.optional(
274
+ z.string().check(z.trim(), z.url())
275
+ );
276
+ schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
277
+ description: "A URL to a banner image used to display the workspace's release"
278
+ });
279
+ var workspaceReleaseBannerAltSchema = z._default(
280
+ z.string().check(z.trim()),
281
+ STORM_DEFAULT_BANNER_ALT
282
+ );
283
+ schemaRegistry.add(workspaceReleaseBannerAltSchema, {
284
+ description: "The alt text for the workspace's release banner image"
285
+ });
286
+ var workspaceReleaseBannerSchema = z.object({
287
+ url: workspaceReleaseBannerUrlSchema,
288
+ alt: workspaceReleaseBannerAltSchema
289
+ });
290
+ schemaRegistry.add(workspaceReleaseBannerSchema, {
291
+ description: "The workspace's banner image used during the release process"
292
+ });
293
+ var workspaceReleaseHeaderSchema = z.optional(
294
+ z.string().check(z.trim())
295
+ );
296
+ schemaRegistry.add(workspaceReleaseHeaderSchema, {
297
+ description: "A header message appended to the start of the workspace's release notes"
298
+ });
299
+ var workspaceReleaseFooterSchema = z.optional(
300
+ z.string().check(z.trim())
301
+ );
302
+ schemaRegistry.add(workspaceReleaseFooterSchema, {
303
+ description: "A footer message appended to the end of the workspace's release notes"
304
+ });
305
+ var workspaceReleaseSchema = z.object({
306
+ banner: z.union([
307
+ workspaceReleaseBannerSchema,
308
+ z.string().check(z.trim(), z.url())
309
+ ]),
310
+ header: workspaceReleaseHeaderSchema,
311
+ footer: workspaceReleaseFooterSchema
312
+ });
313
+ schemaRegistry.add(workspaceReleaseSchema, {
314
+ description: "The workspace's release config used during the release process"
315
+ });
316
+ var workspaceSocialsTwitterSchema = z.optional(
317
+ z.string().check(z.trim())
318
+ );
319
+ schemaRegistry.add(workspaceSocialsTwitterSchema, {
320
+ description: "A Twitter/X account associated with the organization/project"
321
+ });
322
+ var workspaceSocialsDiscordSchema = z.optional(
323
+ z.string().check(z.trim())
324
+ );
325
+ schemaRegistry.add(workspaceSocialsDiscordSchema, {
326
+ description: "A Discord account associated with the organization/project"
327
+ });
328
+ var workspaceSocialsTelegramSchema = z.optional(
329
+ z.string().check(z.trim())
330
+ );
331
+ schemaRegistry.add(workspaceSocialsTelegramSchema, {
332
+ description: "A Telegram account associated with the organization/project"
333
+ });
334
+ var workspaceSocialsSlackSchema = z.optional(
335
+ z.string().check(z.trim())
336
+ );
337
+ schemaRegistry.add(workspaceSocialsSlackSchema, {
338
+ description: "A Slack account associated with the organization/project"
339
+ });
340
+ var workspaceSocialsMediumSchema = z.optional(
341
+ z.string().check(z.trim())
342
+ );
343
+ schemaRegistry.add(workspaceSocialsMediumSchema, {
344
+ description: "A Medium account associated with the organization/project"
345
+ });
346
+ var workspaceSocialsGithubSchema = z.optional(
347
+ z.string().check(z.trim())
348
+ );
349
+ schemaRegistry.add(workspaceSocialsGithubSchema, {
350
+ description: "A GitHub account associated with the organization/project"
351
+ });
352
+ var workspaceSocialsSchema = z.object({
353
+ twitter: workspaceSocialsTwitterSchema,
354
+ discord: workspaceSocialsDiscordSchema,
355
+ telegram: workspaceSocialsTelegramSchema,
356
+ slack: workspaceSocialsSlackSchema,
357
+ medium: workspaceSocialsMediumSchema,
358
+ github: workspaceSocialsGithubSchema
359
+ });
360
+ schemaRegistry.add(workspaceSocialsSchema, {
361
+ description: "The workspace's account config used to store various social media links"
362
+ });
363
+ var workspaceDirectoryCacheSchema = z.optional(
364
+ z.string().check(z.trim())
365
+ );
366
+ schemaRegistry.add(workspaceDirectoryCacheSchema, {
367
+ description: "The directory used to store the environment's cached file data"
368
+ });
369
+ var workspaceDirectoryDataSchema = z.optional(
370
+ z.string().check(z.trim())
371
+ );
372
+ schemaRegistry.add(workspaceDirectoryDataSchema, {
373
+ description: "The directory used to store the environment's data files"
374
+ });
375
+ var workspaceDirectoryConfigSchema = z.optional(
376
+ z.string().check(z.trim())
377
+ );
378
+ schemaRegistry.add(workspaceDirectoryConfigSchema, {
379
+ description: "The directory used to store the environment's configuration files"
380
+ });
381
+ var workspaceDirectoryTempSchema = z.optional(
382
+ z.string().check(z.trim())
383
+ );
384
+ schemaRegistry.add(workspaceDirectoryTempSchema, {
385
+ description: "The directory used to store the environment's temp files"
386
+ });
387
+ var workspaceDirectoryLogSchema = z.optional(
388
+ z.string().check(z.trim())
389
+ );
390
+ schemaRegistry.add(workspaceDirectoryLogSchema, {
391
+ description: "The directory used to store the environment's log files"
392
+ });
393
+ var workspaceDirectoryBuildSchema = z._default(
394
+ z.string().check(z.trim()),
395
+ "dist"
396
+ );
397
+ schemaRegistry.add(workspaceDirectoryBuildSchema, {
398
+ description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
399
+ });
400
+ var workspaceDirectorySchema = z.object({
401
+ cache: workspaceDirectoryCacheSchema,
402
+ data: workspaceDirectoryDataSchema,
403
+ config: workspaceDirectoryConfigSchema,
404
+ temp: workspaceDirectoryTempSchema,
405
+ log: workspaceDirectoryLogSchema,
406
+ build: workspaceDirectoryBuildSchema
407
+ });
408
+ schemaRegistry.add(workspaceDirectorySchema, {
409
+ description: "Various directories used by the workspace to store data, cache, and configuration files"
410
+ });
411
+ var variantSchema = z._default(
412
+ z.enum(["minimal", "monorepo"]),
413
+ "monorepo"
414
+ );
415
+ schemaRegistry.add(variantSchema, {
416
+ description: "The variant of the workspace. This can be used to enable or disable certain features or configurations."
417
+ });
418
+ var errorCodesFileSchema = z._default(
419
+ z.string().check(z.trim()),
420
+ STORM_DEFAULT_ERROR_CODES_FILE
421
+ );
422
+ schemaRegistry.add(errorCodesFileSchema, {
423
+ description: "The path to the workspace's error codes JSON file"
424
+ });
425
+ var errorUrlSchema = z.optional(z.url());
426
+ schemaRegistry.add(errorUrlSchema, {
427
+ description: "A URL to a page that looks up the workspace's error messages given a specific error code"
428
+ });
429
+ var errorSchema = z.object({
430
+ codesFile: errorCodesFileSchema,
431
+ url: errorUrlSchema
432
+ });
433
+ schemaRegistry.add(errorSchema, {
434
+ description: "The workspace's error config used when creating error details during a system error"
435
+ });
436
+ var organizationNameSchema = z.optional(
437
+ z.string().check(z.trim(), z.toLowerCase())
438
+ );
439
+ schemaRegistry.add(organizationNameSchema, {
440
+ description: "The name of the organization"
441
+ });
442
+ var organizationDescriptionSchema = z.optional(
443
+ z.string().check(z.trim())
444
+ );
445
+ schemaRegistry.add(organizationDescriptionSchema, {
446
+ description: "A description of the organization"
447
+ });
448
+ var organizationLogoSchema = z.optional(z.url());
449
+ schemaRegistry.add(organizationLogoSchema, {
450
+ description: "A URL to the organization's logo image"
451
+ });
452
+ var organizationIconSchema = z.optional(z.url());
453
+ schemaRegistry.add(organizationIconSchema, {
454
+ description: "A URL to the organization's icon image"
455
+ });
456
+ var organizationUrlSchema = z.optional(z.url());
457
+ schemaRegistry.add(organizationUrlSchema, {
458
+ description: "A URL to a page that provides more information about the organization"
459
+ });
460
+ var organizationSchema = z.object({
461
+ name: organizationNameSchema,
462
+ description: organizationDescriptionSchema,
463
+ logo: organizationLogoSchema,
464
+ icon: organizationIconSchema,
465
+ url: organizationUrlSchema
466
+ });
467
+ schemaRegistry.add(organizationSchema, {
468
+ description: "The workspace's organization details"
469
+ });
470
+ var schemaNameSchema = z._default(
471
+ z.string().check(z.trim(), z.toLowerCase()),
472
+ "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
473
+ );
474
+ schemaRegistry.add(schemaNameSchema, {
475
+ description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
476
+ });
477
+ var nameSchema = z.string().check(z.trim(), z.toLowerCase());
478
+ schemaRegistry.add(nameSchema, {
479
+ description: "The name of the workspace/project/service/package/scope using this configuration"
480
+ });
481
+ var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
482
+ schemaRegistry.add(namespaceSchema, {
483
+ description: "The namespace of the workspace/project/service/package/scope using this configuration"
484
+ });
485
+ var orgSchema = z.union([
486
+ organizationSchema,
487
+ z.string().check(z.trim(), z.toLowerCase())
488
+ ]);
489
+ schemaRegistry.add(orgSchema, {
490
+ description: "The organization of the workspace. This can be a string or an object containing the organization's details"
491
+ });
492
+ var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
493
+ schemaRegistry.add(repositorySchema, {
494
+ description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
495
+ });
496
+ var licenseSchema = z._default(
497
+ z.string().check(z.trim()),
498
+ "Apache-2.0"
499
+ );
500
+ schemaRegistry.add(licenseSchema, {
501
+ description: "The license type of the package"
502
+ });
503
+ var homepageSchema = z.optional(z.url());
504
+ schemaRegistry.add(homepageSchema, {
505
+ description: "The homepage of the workspace"
506
+ });
507
+ var docsSchema = z.optional(z.url());
508
+ schemaRegistry.add(docsSchema, {
509
+ description: "The documentation site for the workspace"
510
+ });
511
+ var portalSchema = z.optional(z.url());
512
+ schemaRegistry.add(portalSchema, {
513
+ description: "The development portal site for the workspace"
514
+ });
515
+ var licensingSchema = z.optional(z.url());
516
+ schemaRegistry.add(licensingSchema, {
517
+ description: "The licensing site for the workspace"
518
+ });
519
+ var contactSchema = z.optional(z.url());
520
+ schemaRegistry.add(contactSchema, {
521
+ description: "The contact site for the workspace"
522
+ });
523
+ var supportSchema = z.optional(z.url());
524
+ schemaRegistry.add(supportSchema, {
525
+ description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
526
+ });
527
+ var branchSchema = z._default(
528
+ z.string().check(z.trim(), z.toLowerCase()),
529
+ "main"
530
+ );
531
+ schemaRegistry.add(branchSchema, {
532
+ description: "The branch of the workspace"
533
+ });
534
+ var preidSchema = z.optional(
535
+ z.string().check(z.trim(), z.toLowerCase())
536
+ );
537
+ schemaRegistry.add(preidSchema, {
538
+ description: "A tag specifying the version pre-release identifier"
539
+ });
540
+ var ownerSchema = z.optional(
541
+ z.string().check(z.trim(), z.toLowerCase())
542
+ );
543
+ schemaRegistry.add(ownerSchema, {
544
+ description: "The owner of the package"
545
+ });
546
+ var modeSchema = z._default(
547
+ z.enum(["development", "test", "production"]).check(z.trim(), z.toLowerCase()),
548
+ "production"
549
+ );
550
+ schemaRegistry.add(modeSchema, {
551
+ description: "The current runtime environment mode for the package"
552
+ });
553
+ var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
554
+ schemaRegistry.add(workspaceRootSchema, {
555
+ description: "The root directory of the workspace"
556
+ });
557
+ var skipCacheSchema = z._default(z.boolean(), false);
558
+ schemaRegistry.add(skipCacheSchema, {
559
+ description: "Should all known types of workspace caching be skipped?"
560
+ });
561
+ var packageManagerSchema = z._default(
562
+ z.enum(["npm", "yarn", "pnpm", "bun"]),
563
+ "npm"
564
+ );
565
+ schemaRegistry.add(packageManagerSchema, {
566
+ description: "The JavaScript/TypeScript package manager used by the repository"
567
+ });
568
+ var timezoneSchema = z._default(
569
+ z.string().check(z.trim()),
570
+ "America/New_York"
571
+ );
572
+ schemaRegistry.add(timezoneSchema, {
573
+ description: "The default timezone of the workspace"
574
+ });
575
+ var localeSchema = z._default(z.string().check(z.trim()), "en-US");
576
+ schemaRegistry.add(localeSchema, {
577
+ description: "The default locale of the workspace"
578
+ });
579
+ var logLevelSchema = z._default(
580
+ z.enum([
581
+ "silent",
582
+ "fatal",
583
+ "error",
584
+ "warn",
585
+ "success",
586
+ "info",
587
+ "debug",
588
+ "trace",
589
+ "all"
590
+ ]),
591
+ "info"
592
+ );
593
+ schemaRegistry.add(logLevelSchema, {
594
+ description: "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`)."
595
+ });
596
+ var skipConfigLoggingSchema = z._default(z.boolean(), true);
597
+ schemaRegistry.add(skipConfigLoggingSchema, {
598
+ description: "Should the logging of the current Storm Workspace configuration be skipped?"
599
+ });
600
+ var configFileSchema = z._default(
601
+ z.nullable(z.string().check(z.trim())),
602
+ null
603
+ );
604
+ schemaRegistry.add(configFileSchema, {
605
+ description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
606
+ });
607
+ var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
608
+ schemaRegistry.add(extensionsSchema, {
609
+ description: "Configuration of each used extension"
610
+ });
611
+ var workspaceConfigSchema = z.object({
612
+ $schema: schemaNameSchema,
613
+ extends: extendsSchema,
614
+ name: nameSchema,
615
+ variant: variantSchema,
616
+ namespace: namespaceSchema,
617
+ organization: orgSchema,
618
+ repository: repositorySchema,
619
+ license: licenseSchema,
620
+ homepage: homepageSchema,
621
+ docs: docsSchema,
622
+ portal: portalSchema,
623
+ licensing: licensingSchema,
624
+ contact: contactSchema,
625
+ support: supportSchema,
626
+ branch: branchSchema,
627
+ preid: preidSchema,
628
+ owner: ownerSchema,
629
+ bot: workspaceBotSchema,
630
+ release: workspaceReleaseSchema,
631
+ socials: workspaceSocialsSchema,
632
+ error: errorSchema,
633
+ mode: modeSchema,
634
+ workspaceRoot: workspaceRootSchema,
635
+ skipCache: skipCacheSchema,
636
+ directories: workspaceDirectorySchema,
637
+ packageManager: packageManagerSchema,
638
+ timezone: timezoneSchema,
639
+ locale: localeSchema,
640
+ logLevel: logLevelSchema,
641
+ skipConfigLogging: skipConfigLoggingSchema,
642
+ registry: registrySchema,
643
+ configFile: configFileSchema,
644
+ colors: z.union([colorsSchema, themeColorsSchema]),
645
+ extensions: extensionsSchema
646
+ });
647
+ schemaRegistry.add(extensionsSchema, {
648
+ description: "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."
649
+ });
650
+
651
+ // ../build-tools/dist/chunk-JCFRYUYP.mjs
652
+ var import_create_task_graph = require("nx/src/tasks-runner/create-task-graph");
653
+
654
+ // ../build-tools/dist/chunk-7QY5Q44S.mjs
655
+ var import_copy_assets_handler = require("@nx/js/src/utils/assets/copy-assets-handler");
656
+ var import_glob = require("glob");
657
+ var import_promises3 = require("fs/promises");
658
+
659
+ // ../build-tools/dist/chunk-3UHONU2J.mjs
660
+ var import_buildable_libs_utils = require("@nx/js/src/utils/buildable-libs-utils");
661
+ var import_glob2 = require("glob");
662
+ var import_node_fs5 = require("fs");
663
+ var import_promises4 = require("fs/promises");
664
+ var import_project_graph = require("nx/src/project-graph/project-graph");
665
+
666
+ // ../build-tools/dist/chunk-UQSQD3UC.mjs
667
+ var import_glob3 = require("glob");
668
+
669
+ // ../build-tools/dist/chunk-BEMVEXMQ.mjs
670
+ var DEFAULT_COMPILED_BANNER = `/*****************************************
671
+ *
672
+ * \u26A1 Built by Storm Software
673
+ *
674
+ *****************************************/
675
+ `;
676
+ var DEFAULT_ENVIRONMENT = "production";
677
+ var DEFAULT_ORGANIZATION = "storm-software";
678
+
679
+ // ../build-tools/dist/chunk-HGTDDXA5.mjs
680
+ var getEnv = (builder, options) => {
681
+ return {
682
+ STORM_BUILD: builder,
683
+ STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
684
+ STORM_NAME: options.name,
685
+ STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
686
+ STORM_PLATFORM: options.platform,
687
+ STORM_FORMAT: JSON.stringify(options.format),
688
+ STORM_TARGET: JSON.stringify(options.target),
689
+ ...options.env
690
+ };
691
+ };
692
+
693
+ // ../build-tools/dist/chunk-7YKXR5JJ.mjs
694
+ var import_core = require("@swc/core");
695
+
696
+ // ../build-tools/dist/chunk-LKETNGJ2.mjs
697
+ var import_node_fs6 = __toESM(require("fs"), 1);
698
+ var import_node_module = require("module");
699
+ var import_node_path3 = __toESM(require("path"), 1);
700
+ var import_resolve = __toESM(require("resolve"), 1);
701
+
702
+ // ../build-tools/dist/chunk-VGLIZ2H3.mjs
703
+ var import_devkit = require("@nx/devkit");
704
+ var import_path = require("path");
705
+
706
+ // ../config-tools/dist/chunk-6JBGUE4A.js
707
+ var import_node_fs7 = require("fs");
708
+ var import_node_path4 = require("path");
709
+ var MAX_PATH_SEARCH_DEPTH = 30;
710
+ var depth = 0;
711
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
712
+ const _startPath = startPath ?? process.cwd();
713
+ if (endDirectoryNames.some(
714
+ (endDirName) => (0, import_node_fs7.existsSync)((0, import_node_path4.join)(_startPath, endDirName))
715
+ )) {
716
+ return _startPath;
717
+ }
718
+ if (endFileNames.some(
719
+ (endFileName) => (0, import_node_fs7.existsSync)((0, import_node_path4.join)(_startPath, endFileName))
720
+ )) {
721
+ return _startPath;
722
+ }
723
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
724
+ const parent = (0, import_node_path4.join)(_startPath, "..");
725
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
726
+ }
727
+ return void 0;
728
+ }
729
+
730
+ // ../config-tools/dist/chunk-V3GMJ4TX.js
731
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
732
+ function normalizeWindowsPath(input = "") {
733
+ if (!input) {
734
+ return input;
735
+ }
736
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r3) => r3.toUpperCase());
737
+ }
738
+ var _UNC_REGEX = /^[/\\]{2}/;
739
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
740
+ var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
741
+ var correctPaths2 = function(path2) {
742
+ if (!path2 || path2.length === 0) {
743
+ return ".";
744
+ }
745
+ path2 = normalizeWindowsPath(path2);
746
+ const isUNCPath = path2?.match(_UNC_REGEX);
747
+ const isPathAbsolute = isAbsolute(path2);
748
+ const trailingSeparator = path2[path2.length - 1] === "/";
749
+ path2 = normalizeString(path2, !isPathAbsolute);
750
+ if (path2.length === 0) {
751
+ if (isPathAbsolute) {
752
+ return "/";
753
+ }
754
+ return trailingSeparator ? "./" : ".";
755
+ }
756
+ if (trailingSeparator) {
757
+ path2 += "/";
758
+ }
759
+ if (_DRIVE_LETTER_RE.test(path2)) {
760
+ path2 += "/";
761
+ }
762
+ if (isUNCPath) {
763
+ if (!isPathAbsolute) {
764
+ return `//./${path2}`;
765
+ }
766
+ return `//${path2}`;
767
+ }
768
+ return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
769
+ };
770
+ var joinPaths2 = function(...segments) {
771
+ let path2 = "";
772
+ for (const seg of segments) {
773
+ if (!seg) {
774
+ continue;
775
+ }
776
+ if (path2.length > 0) {
777
+ const pathTrailing = path2[path2.length - 1] === "/";
778
+ const segLeading = seg[0] === "/";
779
+ const both = pathTrailing && segLeading;
780
+ if (both) {
781
+ path2 += seg.slice(1);
782
+ } else {
783
+ path2 += pathTrailing || segLeading ? seg : `/${seg}`;
784
+ }
785
+ } else {
786
+ path2 += seg;
787
+ }
788
+ }
789
+ return correctPaths2(path2);
790
+ };
791
+ function normalizeString(path2, allowAboveRoot) {
792
+ let res = "";
793
+ let lastSegmentLength = 0;
794
+ let lastSlash = -1;
795
+ let dots = 0;
796
+ let char = null;
797
+ for (let index = 0; index <= path2.length; ++index) {
798
+ if (index < path2.length) {
799
+ char = path2[index];
800
+ } else if (char === "/") {
801
+ break;
802
+ } else {
803
+ char = "/";
804
+ }
805
+ if (char === "/") {
806
+ if (lastSlash === index - 1 || dots === 1) {
807
+ } else if (dots === 2) {
808
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
809
+ if (res.length > 2) {
810
+ const lastSlashIndex = res.lastIndexOf("/");
811
+ if (lastSlashIndex === -1) {
812
+ res = "";
813
+ lastSegmentLength = 0;
814
+ } else {
815
+ res = res.slice(0, lastSlashIndex);
816
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
817
+ }
818
+ lastSlash = index;
819
+ dots = 0;
820
+ continue;
821
+ } else if (res.length > 0) {
822
+ res = "";
823
+ lastSegmentLength = 0;
824
+ lastSlash = index;
825
+ dots = 0;
826
+ continue;
827
+ }
828
+ }
829
+ if (allowAboveRoot) {
830
+ res += res.length > 0 ? "/.." : "..";
831
+ lastSegmentLength = 2;
832
+ }
833
+ } else {
834
+ if (res.length > 0) {
835
+ res += `/${path2.slice(lastSlash + 1, index)}`;
836
+ } else {
837
+ res = path2.slice(lastSlash + 1, index);
838
+ }
839
+ lastSegmentLength = index - lastSlash - 1;
840
+ }
841
+ lastSlash = index;
842
+ dots = 0;
843
+ } else if (char === "." && dots !== -1) {
844
+ ++dots;
845
+ } else {
846
+ dots = -1;
847
+ }
848
+ }
849
+ return res;
850
+ }
851
+ var isAbsolute = function(p3) {
852
+ return _IS_ABSOLUTE_RE.test(p3);
853
+ };
854
+
855
+ // ../config-tools/dist/chunk-4A2P7H63.js
856
+ var rootFiles = [
857
+ "storm-workspace.json",
858
+ "storm-workspace.yaml",
859
+ "storm-workspace.yml",
860
+ "storm-workspace.js",
861
+ "storm-workspace.ts",
862
+ ".storm-workspace.json",
863
+ ".storm-workspace.yaml",
864
+ ".storm-workspace.yml",
865
+ ".storm-workspace.js",
866
+ ".storm-workspace.ts",
867
+ "lerna.json",
868
+ "nx.json",
869
+ "turbo.json",
870
+ "npm-workspace.json",
871
+ "yarn-workspace.json",
872
+ "pnpm-workspace.json",
873
+ "npm-workspace.yaml",
874
+ "yarn-workspace.yaml",
875
+ "pnpm-workspace.yaml",
876
+ "npm-workspace.yml",
877
+ "yarn-workspace.yml",
878
+ "pnpm-workspace.yml",
879
+ "npm-lock.json",
880
+ "yarn-lock.json",
881
+ "pnpm-lock.json",
882
+ "npm-lock.yaml",
883
+ "yarn-lock.yaml",
884
+ "pnpm-lock.yaml",
885
+ "npm-lock.yml",
886
+ "yarn-lock.yml",
887
+ "pnpm-lock.yml",
888
+ "bun.lockb"
889
+ ];
890
+ var rootDirectories = [
891
+ ".storm-workspace",
892
+ ".nx",
893
+ ".git",
894
+ ".github",
895
+ ".vscode",
896
+ ".verdaccio"
897
+ ];
898
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
899
+ if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
900
+ return correctPaths2(
901
+ process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
902
+ );
903
+ }
904
+ return correctPaths2(
905
+ findFolderUp(
906
+ pathInsideMonorepo ?? process.cwd(),
907
+ rootFiles,
908
+ rootDirectories
909
+ )
910
+ );
911
+ }
912
+ function findWorkspaceRoot2(pathInsideMonorepo) {
913
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
914
+ if (!result) {
915
+ throw new Error(
916
+ `Cannot find workspace root upwards from known path. Files search list includes:
917
+ ${rootFiles.join(
918
+ "\n"
919
+ )}
920
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
921
+ );
922
+ }
923
+ return result;
924
+ }
925
+
926
+ // ../config-tools/dist/chunk-LA3S35UI.js
927
+ var DEFAULT_COLOR_CONFIG = {
928
+ light: {
929
+ background: "#fafafa",
930
+ foreground: "#1d1e22",
931
+ brand: "#1fb2a6",
932
+ alternate: "#db2777",
933
+ help: "#5C4EE5",
934
+ success: "#087f5b",
935
+ info: "#0550ae",
936
+ warning: "#e3b341",
937
+ danger: "#D8314A",
938
+ fatal: "#51070f",
939
+ link: "#3fa6ff",
940
+ positive: "#22c55e",
941
+ negative: "#dc2626",
942
+ gradient: ["#1fb2a6", "#db2777", "#5C4EE5"]
943
+ },
944
+ dark: {
945
+ background: "#1d1e22",
946
+ foreground: "#cbd5e1",
947
+ brand: "#2dd4bf",
948
+ alternate: "#db2777",
949
+ help: "#818cf8",
950
+ success: "#10b981",
951
+ info: "#58a6ff",
952
+ warning: "#f3d371",
953
+ danger: "#D8314A",
954
+ fatal: "#a40e26",
955
+ link: "#3fa6ff",
956
+ positive: "#22c55e",
957
+ negative: "#dc2626",
958
+ gradient: ["#1fb2a6", "#db2777", "#818cf8"]
959
+ }
960
+ };
961
+
962
+ // ../config-tools/dist/chunk-HVVJHTFS.js
963
+ var import_chalk2 = __toESM(require("chalk"), 1);
964
+ var chalkDefault = {
965
+ hex: (_3) => (message) => message,
966
+ bgHex: (_3) => ({
967
+ whiteBright: (message) => message,
968
+ white: (message) => message
969
+ }),
970
+ white: (message) => message,
971
+ whiteBright: (message) => message,
972
+ gray: (message) => message,
973
+ bold: {
974
+ hex: (_3) => (message) => message,
975
+ bgHex: (_3) => ({
976
+ whiteBright: (message) => message,
977
+ white: (message) => message
978
+ }),
979
+ whiteBright: (message) => message,
980
+ white: (message) => message
981
+ },
982
+ dim: {
983
+ hex: (_3) => (message) => message,
984
+ gray: (message) => message
985
+ }
986
+ };
987
+ var getChalk = () => {
988
+ let _chalk = import_chalk2.default;
989
+ if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
990
+ _chalk = chalkDefault;
991
+ }
992
+ return _chalk;
993
+ };
994
+
995
+ // ../config-tools/dist/chunk-G2MK47WL.js
996
+ function isUnicodeSupported2() {
997
+ if (process.platform !== "win32") {
998
+ return process.env.TERM !== "linux";
999
+ }
1000
+ return Boolean(process.env.WT_SESSION) || // Windows Terminal
1001
+ Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
1002
+ process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
1003
+ 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";
1004
+ }
1005
+
1006
+ // ../config-tools/dist/chunk-POXTJ6GF.js
1007
+ var LogLevel2 = {
1008
+ SILENT: 0,
1009
+ FATAL: 10,
1010
+ ERROR: 20,
1011
+ WARN: 30,
1012
+ SUCCESS: 35,
1013
+ INFO: 40,
1014
+ DEBUG: 60,
1015
+ TRACE: 70,
1016
+ ALL: 100
1017
+ };
1018
+ var LogLevelLabel2 = {
1019
+ SILENT: "silent",
1020
+ FATAL: "fatal",
1021
+ ERROR: "error",
1022
+ WARN: "warn",
1023
+ SUCCESS: "success",
1024
+ INFO: "info",
1025
+ DEBUG: "debug",
1026
+ TRACE: "trace",
1027
+ ALL: "all"
1028
+ };
1029
+
1030
+ // ../config-tools/dist/chunk-LM2UMGYA.js
1031
+ var useIcon2 = (c3, fallback) => isUnicodeSupported2() ? c3 : fallback;
1032
+ var CONSOLE_ICONS2 = {
1033
+ [LogLevelLabel2.ERROR]: useIcon2("\u2718", "\xD7"),
1034
+ [LogLevelLabel2.FATAL]: useIcon2("\u{1F480}", "\xD7"),
1035
+ [LogLevelLabel2.WARN]: useIcon2("\u26A0", "\u203C"),
1036
+ [LogLevelLabel2.INFO]: useIcon2("\u2139", "i"),
1037
+ [LogLevelLabel2.SUCCESS]: useIcon2("\u2714", "\u221A"),
1038
+ [LogLevelLabel2.DEBUG]: useIcon2("\u{1F6E0}", "D"),
1039
+ [LogLevelLabel2.TRACE]: useIcon2("\u{1F6E0}", "T"),
1040
+ [LogLevelLabel2.ALL]: useIcon2("\u2709", "\u2192")
1041
+ };
1042
+
1043
+ // ../config-tools/dist/chunk-CZ4IE2QN.js
1044
+ var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
1045
+ return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
1046
+ };
1047
+
1048
+ // ../config-tools/dist/chunk-K4CDYUQR.js
1049
+ var getLogLevel2 = (label) => {
1050
+ switch (label) {
1051
+ case "all":
1052
+ return LogLevel2.ALL;
1053
+ case "trace":
1054
+ return LogLevel2.TRACE;
1055
+ case "debug":
1056
+ return LogLevel2.DEBUG;
1057
+ case "info":
1058
+ return LogLevel2.INFO;
1059
+ case "warn":
1060
+ return LogLevel2.WARN;
1061
+ case "error":
1062
+ return LogLevel2.ERROR;
1063
+ case "fatal":
1064
+ return LogLevel2.FATAL;
1065
+ case "silent":
1066
+ return LogLevel2.SILENT;
1067
+ default:
1068
+ return LogLevel2.INFO;
1069
+ }
1070
+ };
1071
+ var getLogLevelLabel2 = (logLevel = LogLevel2.INFO) => {
1072
+ if (logLevel >= LogLevel2.ALL) {
1073
+ return LogLevelLabel2.ALL;
1074
+ }
1075
+ if (logLevel >= LogLevel2.TRACE) {
1076
+ return LogLevelLabel2.TRACE;
1077
+ }
1078
+ if (logLevel >= LogLevel2.DEBUG) {
1079
+ return LogLevelLabel2.DEBUG;
1080
+ }
1081
+ if (logLevel >= LogLevel2.INFO) {
1082
+ return LogLevelLabel2.INFO;
1083
+ }
1084
+ if (logLevel >= LogLevel2.WARN) {
1085
+ return LogLevelLabel2.WARN;
1086
+ }
1087
+ if (logLevel >= LogLevel2.ERROR) {
1088
+ return LogLevelLabel2.ERROR;
1089
+ }
1090
+ if (logLevel >= LogLevel2.FATAL) {
1091
+ return LogLevelLabel2.FATAL;
1092
+ }
1093
+ if (logLevel <= LogLevel2.SILENT) {
1094
+ return LogLevelLabel2.SILENT;
1095
+ }
1096
+ return LogLevelLabel2.INFO;
1097
+ };
1098
+
1099
+ // ../config-tools/dist/chunk-7L77OWOV.js
1100
+ var getLogFn = (logLevel = LogLevel2.INFO, config = {}, _chalk = getChalk()) => {
1101
+ 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;
1102
+ const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel2.INFO;
1103
+ if (logLevel > getLogLevel2(configLogLevel) || logLevel <= LogLevel2.SILENT || getLogLevel2(configLogLevel) <= LogLevel2.SILENT) {
1104
+ return (_3) => {
1105
+ };
1106
+ }
1107
+ if (typeof logLevel === "number" && LogLevel2.FATAL >= logLevel) {
1108
+ return (message) => {
1109
+ console.error(
1110
+ `
1111
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(`[${CONSOLE_ICONS2[LogLevelLabel2.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1112
+ `
1113
+ );
1114
+ };
1115
+ }
1116
+ if (typeof logLevel === "number" && LogLevel2.ERROR >= logLevel) {
1117
+ return (message) => {
1118
+ console.error(
1119
+ `
1120
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(`[${CONSOLE_ICONS2[LogLevelLabel2.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1121
+ `
1122
+ );
1123
+ };
1124
+ }
1125
+ if (typeof logLevel === "number" && LogLevel2.WARN >= logLevel) {
1126
+ return (message) => {
1127
+ console.warn(
1128
+ `
1129
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(`[${CONSOLE_ICONS2[LogLevelLabel2.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1130
+ `
1131
+ );
1132
+ };
1133
+ }
1134
+ if (typeof logLevel === "number" && LogLevel2.SUCCESS >= logLevel) {
1135
+ return (message) => {
1136
+ console.info(
1137
+ `
1138
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(`[${CONSOLE_ICONS2[LogLevelLabel2.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1139
+ `
1140
+ );
1141
+ };
1142
+ }
1143
+ if (typeof logLevel === "number" && LogLevel2.INFO >= logLevel) {
1144
+ return (message) => {
1145
+ console.info(
1146
+ `
1147
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS2[LogLevelLabel2.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1148
+ `
1149
+ );
1150
+ };
1151
+ }
1152
+ if (typeof logLevel === "number" && LogLevel2.DEBUG >= logLevel) {
1153
+ return (message) => {
1154
+ console.debug(
1155
+ `
1156
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS2[LogLevelLabel2.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1157
+ `
1158
+ );
1159
+ };
1160
+ }
1161
+ if (typeof logLevel === "number" && LogLevel2.TRACE >= logLevel) {
1162
+ return (message) => {
1163
+ console.debug(
1164
+ `
1165
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS2[LogLevelLabel2.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1166
+ `
1167
+ );
1168
+ };
1169
+ }
1170
+ return (message) => {
1171
+ console.log(
1172
+ `
1173
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(`[${CONSOLE_ICONS2[LogLevelLabel2.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1174
+ `
1175
+ );
1176
+ };
1177
+ };
1178
+ var writeWarning2 = (message, config) => getLogFn(LogLevel2.WARN, config)(message);
1179
+ var writeDebug2 = (message, config) => getLogFn(LogLevel2.DEBUG, config)(message);
1180
+ var writeTrace2 = (message, config) => getLogFn(LogLevel2.TRACE, config)(message);
1181
+ var getStopwatch = (name) => {
1182
+ const start = process.hrtime();
1183
+ return () => {
1184
+ const end = process.hrtime(start);
1185
+ console.info(
1186
+ `
1187
+ > \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
1188
+ end[0] * 1e3 + end[1] / 1e6
1189
+ )}ms to complete
1190
+ `
1191
+ );
1192
+ };
1193
+ };
1194
+ var MAX_DEPTH = 4;
1195
+ var formatLogMessage2 = (message, options = {}, depth2 = 0) => {
1196
+ if (depth2 > MAX_DEPTH) {
1197
+ return "<max depth>";
1198
+ }
1199
+ const prefix = options.prefix ?? "-";
1200
+ const skip = options.skip ?? [];
1201
+ return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
1202
+ ${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage2(item, { prefix: `${prefix}-`, skip }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
1203
+ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
1204
+ (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage2(
1205
+ message[key],
1206
+ { prefix: `${prefix}-`, skip },
1207
+ depth2 + 1
1208
+ ) : message[key]}`
1209
+ ).join("\n")}` : message;
1210
+ };
1211
+ var _isFunction = (value) => {
1212
+ try {
1213
+ return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
1214
+ } catch {
1215
+ return false;
1216
+ }
1217
+ };
1218
+
1219
+ // ../config-tools/dist/chunk-RZM3NYPM.js
1220
+ var import_c122 = require("c12");
1221
+ var import_defu3 = __toESM(require("defu"), 1);
1222
+ var getConfigFileByName = async (fileName, filePath, options = {}) => {
1223
+ const workspacePath = filePath || findWorkspaceRoot2(filePath);
1224
+ const configs = await Promise.all([
1225
+ (0, import_c122.loadConfig)({
1226
+ cwd: workspacePath,
1227
+ packageJson: true,
1228
+ name: fileName,
1229
+ envName: fileName?.toUpperCase(),
1230
+ jitiOptions: {
1231
+ debug: false,
1232
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
1233
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
1234
+ "jiti"
1235
+ )
1236
+ },
1237
+ ...options
1238
+ }),
1239
+ (0, import_c122.loadConfig)({
1240
+ cwd: workspacePath,
1241
+ packageJson: true,
1242
+ name: fileName,
1243
+ envName: fileName?.toUpperCase(),
1244
+ jitiOptions: {
1245
+ debug: false,
1246
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
1247
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
1248
+ "jiti"
1249
+ )
1250
+ },
1251
+ configFile: fileName,
1252
+ ...options
1253
+ })
1254
+ ]);
1255
+ return (0, import_defu3.default)(configs[0] ?? {}, configs[1] ?? {});
1256
+ };
1257
+ var getConfigFile = async (filePath, additionalFileNames = []) => {
1258
+ const workspacePath = filePath ? filePath : findWorkspaceRoot2(filePath);
1259
+ const result = await getConfigFileByName("storm-workspace", workspacePath);
1260
+ let config = result.config;
1261
+ const configFile = result.configFile;
1262
+ if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
1263
+ writeTrace2(
1264
+ `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
1265
+ {
1266
+ logLevel: "all"
1267
+ }
1268
+ );
1269
+ }
1270
+ if (additionalFileNames && additionalFileNames.length > 0) {
1271
+ const results = await Promise.all(
1272
+ additionalFileNames.map(
1273
+ (fileName) => getConfigFileByName(fileName, workspacePath)
1274
+ )
1275
+ );
1276
+ for (const result2 of results) {
1277
+ if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
1278
+ if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
1279
+ writeTrace2(
1280
+ `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
1281
+ {
1282
+ logLevel: "all"
1283
+ }
1284
+ );
1285
+ }
1286
+ config = (0, import_defu3.default)(result2.config ?? {}, config ?? {});
1287
+ }
1288
+ }
1289
+ }
1290
+ if (!config || Object.keys(config).length === 0) {
1291
+ return void 0;
1292
+ }
1293
+ config.configFile = configFile;
1294
+ return config;
1295
+ };
1296
+
1297
+ // ../config/dist/chunk-TYDRIJER.js
1298
+ var s = "https://docs.stormsoftware.com";
1299
+ var r = "https://stormsoftware.com";
1300
+ var t = "https://stormsoftware.com/contact";
1301
+ var a = "https://stormsoftware.com/license";
1302
+ var i = "Apache-2.0";
1303
+ var o = "https://discord.gg/MQ6YVzakM5";
1304
+ var e = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
1305
+ var E = `
1306
+ Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
1307
+
1308
+ Join us on [Discord](${o}) to chat with the team, receive release notifications, ask questions, and get involved.
1309
+
1310
+ If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${t}) or join our [Slack](${e}) channel!
1311
+ `;
1312
+ var S = "tools/errors/codes.json";
1313
+ var A = "The workspace's banner image";
1314
+
1315
+ // ../config/dist/chunk-ZXJP5Q3G.js
1316
+ var e2 = __toESM(require("zod/mini"), 1);
1317
+ var o2 = e2.registry();
1318
+ var t2 = e2.string().check(e2.length(7), e2.toLowerCase(), e2.regex(/^#([0-9a-f]{3}){1,2}$/i), e2.trim());
1319
+ o2.add(t2, { description: "A base schema for describing the format of colors" });
1320
+ var a2 = e2._default(t2, "#151718");
1321
+ o2.add(a2, { description: "The dark background color of the workspace" });
1322
+ var i2 = e2._default(t2, "#cbd5e1");
1323
+ o2.add(i2, { description: "The light background color of the workspace" });
1324
+ var c = e2._default(t2, "#1fb2a6");
1325
+ o2.add(c, { description: "The primary brand specific color of the workspace" });
1326
+ var s2 = e2.optional(t2);
1327
+ o2.add(s2, { description: "The alternate brand specific color of the workspace" });
1328
+ var n = e2.optional(t2);
1329
+ o2.add(n, { description: "The secondary brand specific color of the workspace" });
1330
+ var d = e2._default(t2, "#3fa6ff");
1331
+ o2.add(d, { description: "The color used to display hyperlink text" });
1332
+ var p = e2._default(t2, "#818cf8");
1333
+ o2.add(p, { description: "The second brand specific color of the workspace" });
1334
+ var h = e2._default(t2, "#45b27e");
1335
+ o2.add(h, { description: "The success color of the workspace" });
1336
+ var l = e2._default(t2, "#38bdf8");
1337
+ o2.add(l, { description: "The informational color of the workspace" });
1338
+ var m = e2._default(t2, "#f3d371");
1339
+ o2.add(m, { description: "The warning color of the workspace" });
1340
+ var z2 = e2._default(t2, "#d8314a");
1341
+ o2.add(z2, { description: "The danger color of the workspace" });
1342
+ var g = e2.optional(t2);
1343
+ o2.add(g, { description: "The fatal color of the workspace" });
1344
+ var u = e2._default(t2, "#4ade80");
1345
+ o2.add(u, { description: "The positive number color of the workspace" });
1346
+ var f = e2._default(t2, "#ef4444");
1347
+ o2.add(f, { description: "The negative number color of the workspace" });
1348
+ var k = e2.optional(e2.array(t2));
1349
+ o2.add(k, { description: "The color stops for the base gradient color pattern used in the workspace" });
1350
+ var je = e2.object({ foreground: i2, background: a2, brand: c, alternate: s2, accent: n, link: d, help: p, success: h, info: l, warning: m, danger: z2, fatal: g, positive: u, negative: f, gradient: k });
1351
+ var Ae = e2.object({ foreground: a2, background: i2, brand: c, alternate: s2, accent: n, link: d, help: p, success: h, info: l, warning: m, danger: z2, fatal: g, positive: u, negative: f, gradient: k });
1352
+ var Re = e2.object({ dark: je, light: Ae });
1353
+ var Ue = e2.object({ dark: a2, light: i2, brand: c, alternate: s2, accent: n, link: d, help: p, success: h, info: l, warning: m, danger: z2, fatal: g, positive: u, negative: f, gradient: k });
1354
+ var r2 = e2.optional(e2.url());
1355
+ o2.add(r2, { description: "A remote registry URL used to publish distributable packages" });
1356
+ var T = e2._default(e2.object({ github: r2, npm: r2, cargo: r2, cyclone: r2, container: r2 }), {});
1357
+ o2.add(T, { description: "A list of remote registry URLs used by Storm Software" });
1358
+ var w = e2.union([Ue, Re]);
1359
+ o2.add(w, { description: "Colors used for various workspace elements" });
1360
+ var v = e2.record(e2.union([e2.union([e2.literal("base"), e2.string()]), e2.string()]), w);
1361
+ o2.add(v, { description: "Storm theme config values used for styling various package elements" });
1362
+ var y = e2.optional(e2.union([e2.string().check(e2.trim()), e2.array(e2.string().check(e2.trim()))]));
1363
+ o2.add(y, { description: "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." });
1364
+ var C = e2.string().check(e2.trim());
1365
+ o2.add(C, { description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)" });
1366
+ var _ = e2.string().check(e2.trim());
1367
+ o2.add(_, { description: "The email of the workspace bot" });
1368
+ var L = e2.object({ name: C, email: _ });
1369
+ o2.add(L, { description: "The workspace's bot user's config used to automated various operations tasks" });
1370
+ var j = e2.optional(e2.string().check(e2.trim(), e2.url()));
1371
+ o2.add(j, { description: "A URL to a banner image used to display the workspace's release" });
1372
+ var A2 = e2._default(e2.string().check(e2.trim()), A);
1373
+ o2.add(A2, { description: "The alt text for the workspace's release banner image" });
1374
+ var R = e2.object({ url: j, alt: A2 });
1375
+ o2.add(R, { description: "The workspace's banner image used during the release process" });
1376
+ var U = e2.optional(e2.string().check(e2.trim()));
1377
+ o2.add(U, { description: "A header message appended to the start of the workspace's release notes" });
1378
+ var D = e2.optional(e2.string().check(e2.trim()));
1379
+ o2.add(D, { description: "A footer message appended to the end of the workspace's release notes" });
1380
+ var B = e2.object({ banner: e2.union([R, e2.string().check(e2.trim(), e2.url())]), header: U, footer: D });
1381
+ o2.add(B, { description: "The workspace's release config used during the release process" });
1382
+ var F = e2.optional(e2.string().check(e2.trim()));
1383
+ o2.add(F, { description: "A Twitter/X account associated with the organization/project" });
1384
+ var N = e2.optional(e2.string().check(e2.trim()));
1385
+ o2.add(N, { description: "A Discord account associated with the organization/project" });
1386
+ var E2 = e2.optional(e2.string().check(e2.trim()));
1387
+ o2.add(E2, { description: "A Telegram account associated with the organization/project" });
1388
+ var M = e2.optional(e2.string().check(e2.trim()));
1389
+ o2.add(M, { description: "A Slack account associated with the organization/project" });
1390
+ var O = e2.optional(e2.string().check(e2.trim()));
1391
+ o2.add(O, { description: "A Medium account associated with the organization/project" });
1392
+ var I = e2.optional(e2.string().check(e2.trim()));
1393
+ o2.add(I, { description: "A GitHub account associated with the organization/project" });
1394
+ var G = e2.object({ twitter: F, discord: N, telegram: E2, slack: M, medium: O, github: I });
1395
+ o2.add(G, { description: "The workspace's account config used to store various social media links" });
1396
+ var H = e2.optional(e2.string().check(e2.trim()));
1397
+ o2.add(H, { description: "The directory used to store the environment's cached file data" });
1398
+ var J = e2.optional(e2.string().check(e2.trim()));
1399
+ o2.add(J, { description: "The directory used to store the environment's data files" });
1400
+ var W = e2.optional(e2.string().check(e2.trim()));
1401
+ o2.add(W, { description: "The directory used to store the environment's configuration files" });
1402
+ var P = e2.optional(e2.string().check(e2.trim()));
1403
+ o2.add(P, { description: "The directory used to store the environment's temp files" });
1404
+ var $ = e2.optional(e2.string().check(e2.trim()));
1405
+ o2.add($, { description: "The directory used to store the environment's log files" });
1406
+ var V = e2._default(e2.string().check(e2.trim()), "dist");
1407
+ o2.add(V, { description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)" });
1408
+ var X = e2.object({ cache: H, data: J, config: W, temp: P, log: $, build: V });
1409
+ o2.add(X, { description: "Various directories used by the workspace to store data, cache, and configuration files" });
1410
+ var Y = e2._default(e2.enum(["minimal", "monorepo"]), "monorepo");
1411
+ o2.add(Y, { description: "The variant of the workspace. This can be used to enable or disable certain features or configurations." });
1412
+ var q = e2._default(e2.string().check(e2.trim()), S);
1413
+ o2.add(q, { description: "The path to the workspace's error codes JSON file" });
1414
+ var K = e2.optional(e2.url());
1415
+ o2.add(K, { description: "A URL to a page that looks up the workspace's error messages given a specific error code" });
1416
+ var Q = e2.object({ codesFile: q, url: K });
1417
+ o2.add(Q, { description: "The workspace's error config used when creating error details during a system error" });
1418
+ var Z = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
1419
+ o2.add(Z, { description: "The name of the organization" });
1420
+ var ee = e2.optional(e2.string().check(e2.trim()));
1421
+ o2.add(ee, { description: "A description of the organization" });
1422
+ var oe = e2.optional(e2.url());
1423
+ o2.add(oe, { description: "A URL to the organization's logo image" });
1424
+ var te = e2.optional(e2.url());
1425
+ o2.add(te, { description: "A URL to the organization's icon image" });
1426
+ var re = e2.optional(e2.url());
1427
+ o2.add(re, { description: "A URL to a page that provides more information about the organization" });
1428
+ var ae = e2.object({ name: Z, description: ee, logo: oe, icon: te, url: re });
1429
+ o2.add(ae, { description: "The workspace's organization details" });
1430
+ var ie = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "https://public.storm-cdn.com/schemas/storm-workspace.schema.json");
1431
+ o2.add(ie, { description: "The URL or file path to the JSON schema file that describes the Storm configuration file" });
1432
+ var ce = e2.string().check(e2.trim(), e2.toLowerCase());
1433
+ o2.add(ce, { description: "The name of the workspace/project/service/package/scope using this configuration" });
1434
+ var se = e2.string().check(e2.trim(), e2.toLowerCase());
1435
+ o2.add(se, { description: "The namespace of the workspace/project/service/package/scope using this configuration" });
1436
+ var ne = e2.union([ae, e2.string().check(e2.trim(), e2.toLowerCase())]);
1437
+ o2.add(ne, { description: "The organization of the workspace. This can be a string or an object containing the organization's details" });
1438
+ var de = e2.string().check(e2.trim(), e2.toLowerCase());
1439
+ o2.add(de, { description: "The repo URL of the workspace (i.e. the GitHub repository URL)" });
1440
+ var pe = e2._default(e2.string().check(e2.trim()), "Apache-2.0");
1441
+ o2.add(pe, { description: "The license type of the package" });
1442
+ var he = e2.optional(e2.url());
1443
+ o2.add(he, { description: "The homepage of the workspace" });
1444
+ var le = e2.optional(e2.url());
1445
+ o2.add(le, { description: "The documentation site for the workspace" });
1446
+ var me = e2.optional(e2.url());
1447
+ o2.add(me, { description: "The development portal site for the workspace" });
1448
+ var ze = e2.optional(e2.url());
1449
+ o2.add(ze, { description: "The licensing site for the workspace" });
1450
+ var ge = e2.optional(e2.url());
1451
+ o2.add(ge, { description: "The contact site for the workspace" });
1452
+ var ue = e2.optional(e2.url());
1453
+ o2.add(ue, { description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value" });
1454
+ var fe = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "main");
1455
+ o2.add(fe, { description: "The branch of the workspace" });
1456
+ var ke = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
1457
+ o2.add(ke, { description: "A tag specifying the version pre-release identifier" });
1458
+ var we = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
1459
+ o2.add(we, { description: "The owner of the package" });
1460
+ var Se = e2._default(e2.enum(["development", "test", "production"]).check(e2.trim(), e2.toLowerCase()), "production");
1461
+ o2.add(Se, { description: "The current runtime environment mode for the package" });
1462
+ var xe = e2.string().check(e2.trim(), e2.toLowerCase());
1463
+ o2.add(xe, { description: "The root directory of the workspace" });
1464
+ var be = e2._default(e2.boolean(), false);
1465
+ o2.add(be, { description: "Should all known types of workspace caching be skipped?" });
1466
+ var Te = e2._default(e2.enum(["npm", "yarn", "pnpm", "bun"]), "npm");
1467
+ o2.add(Te, { description: "The JavaScript/TypeScript package manager used by the repository" });
1468
+ var ve = e2._default(e2.string().check(e2.trim()), "America/New_York");
1469
+ o2.add(ve, { description: "The default timezone of the workspace" });
1470
+ var ye = e2._default(e2.string().check(e2.trim()), "en-US");
1471
+ o2.add(ye, { description: "The default locale of the workspace" });
1472
+ var Ce = e2._default(e2.enum(["silent", "fatal", "error", "warn", "success", "info", "debug", "trace", "all"]), "info");
1473
+ o2.add(Ce, { description: "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`)." });
1474
+ var _e = e2._default(e2.boolean(), true);
1475
+ o2.add(_e, { description: "Should the logging of the current Storm Workspace configuration be skipped?" });
1476
+ var Le = e2._default(e2.nullable(e2.string().check(e2.trim())), null);
1477
+ o2.add(Le, { description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace." });
1478
+ var S2 = e2._default(e2.record(e2.string(), e2.any()), {});
1479
+ o2.add(S2, { description: "Configuration of each used extension" });
1480
+ var Be = e2.object({ $schema: ie, extends: y, name: ce, variant: Y, namespace: se, organization: ne, repository: de, license: pe, homepage: he, docs: le, portal: me, licensing: ze, contact: ge, support: ue, branch: fe, preid: ke, owner: we, bot: L, release: B, socials: G, error: Q, mode: Se, workspaceRoot: xe, skipCache: be, directories: X, packageManager: Te, timezone: ve, locale: ye, logLevel: Ce, skipConfigLogging: _e, registry: T, configFile: Le, colors: e2.union([w, v]), extensions: S2 });
1481
+ o2.add(S2, { description: "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." });
1482
+
1483
+ // ../config/dist/chunk-WIOU3CJS.js
1484
+ var e3 = ["dark", "light", "base", "brand", "alternate", "accent", "link", "success", "help", "info", "warning", "danger", "fatal", "positive", "negative"];
1485
+
1486
+ // ../config-tools/dist/chunk-OEBHWAYK.js
1487
+ var import_node_fs8 = require("fs");
1488
+ var import_promises5 = require("fs/promises");
1489
+ var import_node_path5 = require("path");
1490
+ async function getPackageJsonConfig(root) {
1491
+ let license = i;
1492
+ let homepage = void 0;
1493
+ let support = void 0;
1494
+ let name = void 0;
1495
+ let namespace = void 0;
1496
+ let repository = void 0;
1497
+ const workspaceRoot = findWorkspaceRoot2(root);
1498
+ if ((0, import_node_fs8.existsSync)((0, import_node_path5.join)(workspaceRoot, "package.json"))) {
1499
+ const file = await (0, import_promises5.readFile)(
1500
+ joinPaths2(workspaceRoot, "package.json"),
1501
+ "utf8"
1502
+ );
1503
+ if (file) {
1504
+ const packageJson = JSON.parse(file);
1505
+ if (packageJson.name) {
1506
+ name = packageJson.name;
1507
+ }
1508
+ if (packageJson.namespace) {
1509
+ namespace = packageJson.namespace;
1510
+ }
1511
+ if (packageJson.repository) {
1512
+ if (typeof packageJson.repository === "string") {
1513
+ repository = packageJson.repository;
1514
+ } else if (packageJson.repository.url) {
1515
+ repository = packageJson.repository.url;
1516
+ }
1517
+ }
1518
+ if (packageJson.license) {
1519
+ license = packageJson.license;
1520
+ }
1521
+ if (packageJson.homepage) {
1522
+ homepage = packageJson.homepage;
1523
+ }
1524
+ if (packageJson.bugs) {
1525
+ if (typeof packageJson.bugs === "string") {
1526
+ support = packageJson.bugs;
1527
+ } else if (packageJson.bugs.url) {
1528
+ support = packageJson.bugs.url;
1529
+ }
1530
+ }
1531
+ }
1532
+ }
1533
+ return {
1534
+ workspaceRoot,
1535
+ name,
1536
+ namespace,
1537
+ repository,
1538
+ license,
1539
+ homepage,
1540
+ support
1541
+ };
1542
+ }
1543
+ function applyDefaultConfig(config) {
1544
+ if (!config.support && config.contact) {
1545
+ config.support = config.contact;
1546
+ }
1547
+ if (!config.contact && config.support) {
1548
+ config.contact = config.support;
1549
+ }
1550
+ if (config.homepage) {
1551
+ if (!config.docs) {
1552
+ config.docs = `${config.homepage}/docs`;
1553
+ }
1554
+ if (!config.license) {
1555
+ config.license = `${config.homepage}/license`;
1556
+ }
1557
+ if (!config.support) {
1558
+ config.support = `${config.homepage}/support`;
1559
+ }
1560
+ if (!config.contact) {
1561
+ config.contact = `${config.homepage}/contact`;
1562
+ }
1563
+ if (!config.error?.codesFile || !config?.error?.url) {
1564
+ config.error ??= { codesFile: S };
1565
+ if (config.homepage) {
1566
+ config.error.url ??= `${config.homepage}/errors`;
1567
+ }
1568
+ }
1569
+ }
1570
+ return config;
1571
+ }
1572
+
1573
+ // ../config-tools/dist/chunk-KJ7E5BJ3.js
1574
+ var setExtensionEnv = (extensionName, extension) => {
1575
+ for (const key of Object.keys(extension ?? {})) {
1576
+ if (extension[key]) {
1577
+ const result = key?.replace(
1578
+ /([A-Z])+/g,
1579
+ (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
1580
+ ).split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
1581
+ let extensionKey;
1582
+ if (result.length === 0) {
1583
+ return;
1584
+ }
1585
+ if (result.length === 1) {
1586
+ extensionKey = result[0]?.toUpperCase() ?? "";
1587
+ } else {
1588
+ extensionKey = result.reduce((ret, part) => {
1589
+ return `${ret}_${part.toLowerCase()}`;
1590
+ });
1591
+ }
1592
+ process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
1593
+ }
1594
+ }
1595
+ };
1596
+ var setConfigEnv = (config) => {
1597
+ const prefix = "STORM_";
1598
+ if (config.extends) {
1599
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
1600
+ }
1601
+ if (config.name) {
1602
+ process.env[`${prefix}NAME`] = config.name;
1603
+ }
1604
+ if (config.variant) {
1605
+ process.env[`${prefix}VARIANT`] = config.variant;
1606
+ }
1607
+ if (config.namespace) {
1608
+ process.env[`${prefix}NAMESPACE`] = config.namespace;
1609
+ }
1610
+ if (config.owner) {
1611
+ process.env[`${prefix}OWNER`] = config.owner;
1612
+ }
1613
+ if (config.bot) {
1614
+ process.env[`${prefix}BOT_NAME`] = config.bot.name;
1615
+ process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
1616
+ }
1617
+ if (config.error) {
1618
+ process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
1619
+ process.env[`${prefix}ERROR_URL`] = config.error.url;
1620
+ }
1621
+ if (config.release) {
1622
+ if (config.release.banner) {
1623
+ if (typeof config.release.banner === "string") {
1624
+ process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
1625
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
1626
+ } else {
1627
+ process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
1628
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
1629
+ process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
1630
+ }
1631
+ }
1632
+ process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
1633
+ process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
1634
+ }
1635
+ if (config.socials) {
1636
+ if (config.socials.twitter) {
1637
+ process.env[`${prefix}SOCIAL_TWITTER`] = config.socials.twitter;
1638
+ }
1639
+ if (config.socials.discord) {
1640
+ process.env[`${prefix}SOCIAL_DISCORD`] = config.socials.discord;
1641
+ }
1642
+ if (config.socials.telegram) {
1643
+ process.env[`${prefix}SOCIAL_TELEGRAM`] = config.socials.telegram;
1644
+ }
1645
+ if (config.socials.slack) {
1646
+ process.env[`${prefix}SOCIAL_SLACK`] = config.socials.slack;
1647
+ }
1648
+ if (config.socials.medium) {
1649
+ process.env[`${prefix}SOCIAL_MEDIUM`] = config.socials.medium;
1650
+ }
1651
+ if (config.socials.github) {
1652
+ process.env[`${prefix}SOCIAL_GITHUB`] = config.socials.github;
1653
+ }
1654
+ }
1655
+ if (config.organization) {
1656
+ if (typeof config.organization === "string") {
1657
+ process.env[`${prefix}ORG`] = config.organization;
1658
+ process.env[`${prefix}ORG_NAME`] = config.organization;
1659
+ process.env[`${prefix}ORGANIZATION`] = config.organization;
1660
+ process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
1661
+ } else {
1662
+ process.env[`${prefix}ORG`] = config.organization.name;
1663
+ process.env[`${prefix}ORG_NAME`] = config.organization.name;
1664
+ process.env[`${prefix}ORGANIZATION`] = config.organization.name;
1665
+ process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
1666
+ if (config.organization.url) {
1667
+ process.env[`${prefix}ORG_URL`] = config.organization.url;
1668
+ process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
1669
+ }
1670
+ if (config.organization.description) {
1671
+ process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
1672
+ process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
1673
+ }
1674
+ if (config.organization.logo) {
1675
+ process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
1676
+ process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
1677
+ }
1678
+ if (config.organization.icon) {
1679
+ process.env[`${prefix}ORG_ICON`] = config.organization.icon;
1680
+ process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
1681
+ }
1682
+ }
1683
+ }
1684
+ if (config.packageManager) {
1685
+ process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
1686
+ }
1687
+ if (config.license) {
1688
+ process.env[`${prefix}LICENSE`] = config.license;
1689
+ }
1690
+ if (config.homepage) {
1691
+ process.env[`${prefix}HOMEPAGE`] = config.homepage;
1692
+ }
1693
+ if (config.docs) {
1694
+ process.env[`${prefix}DOCS`] = config.docs;
1695
+ }
1696
+ if (config.portal) {
1697
+ process.env[`${prefix}PORTAL`] = config.portal;
1698
+ }
1699
+ if (config.licensing) {
1700
+ process.env[`${prefix}LICENSING`] = config.licensing;
1701
+ }
1702
+ if (config.contact) {
1703
+ process.env[`${prefix}CONTACT`] = config.contact;
1704
+ }
1705
+ if (config.support) {
1706
+ process.env[`${prefix}SUPPORT`] = config.support;
1707
+ }
1708
+ if (config.timezone) {
1709
+ process.env[`${prefix}TIMEZONE`] = config.timezone;
1710
+ process.env.TZ = config.timezone;
1711
+ process.env.DEFAULT_TIMEZONE = config.timezone;
1712
+ process.env.TIMEZONE = config.timezone;
1713
+ }
1714
+ if (config.locale) {
1715
+ process.env[`${prefix}LOCALE`] = config.locale;
1716
+ process.env.DEFAULT_LOCALE = config.locale;
1717
+ process.env.LOCALE = config.locale;
1718
+ process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
1719
+ }
1720
+ if (config.configFile) {
1721
+ process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths2(
1722
+ config.configFile
1723
+ );
1724
+ }
1725
+ if (config.workspaceRoot) {
1726
+ process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths2(config.workspaceRoot);
1727
+ process.env.NX_WORKSPACE_ROOT = correctPaths2(config.workspaceRoot);
1728
+ process.env.NX_WORKSPACE_ROOT_PATH = correctPaths2(config.workspaceRoot);
1729
+ }
1730
+ if (config.directories) {
1731
+ if (!config.skipCache && config.directories.cache) {
1732
+ process.env[`${prefix}CACHE_DIR`] = correctPaths2(
1733
+ config.directories.cache
1734
+ );
1735
+ process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
1736
+ }
1737
+ if (config.directories.data) {
1738
+ process.env[`${prefix}DATA_DIR`] = correctPaths2(config.directories.data);
1739
+ process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
1740
+ }
1741
+ if (config.directories.config) {
1742
+ process.env[`${prefix}CONFIG_DIR`] = correctPaths2(
1743
+ config.directories.config
1744
+ );
1745
+ process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
1746
+ }
1747
+ if (config.directories.temp) {
1748
+ process.env[`${prefix}TEMP_DIR`] = correctPaths2(config.directories.temp);
1749
+ process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
1750
+ }
1751
+ if (config.directories.log) {
1752
+ process.env[`${prefix}LOG_DIR`] = correctPaths2(config.directories.log);
1753
+ process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
1754
+ }
1755
+ if (config.directories.build) {
1756
+ process.env[`${prefix}BUILD_DIR`] = correctPaths2(
1757
+ config.directories.build
1758
+ );
1759
+ process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
1760
+ }
1761
+ }
1762
+ if (config.skipCache !== void 0) {
1763
+ process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
1764
+ if (config.skipCache) {
1765
+ process.env.NX_SKIP_NX_CACHE ??= String(config.skipCache);
1766
+ process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
1767
+ }
1768
+ }
1769
+ if (config.mode) {
1770
+ process.env[`${prefix}MODE`] = config.mode;
1771
+ process.env.NODE_ENV = config.mode;
1772
+ process.env.ENVIRONMENT = config.mode;
1773
+ }
1774
+ if (config.colors?.base?.light || config.colors?.base?.dark) {
1775
+ for (const key of Object.keys(config.colors)) {
1776
+ setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1777
+ }
1778
+ } else {
1779
+ setThemeColorsEnv(
1780
+ `${prefix}COLOR_`,
1781
+ config.colors
1782
+ );
1783
+ }
1784
+ if (config.repository) {
1785
+ process.env[`${prefix}REPOSITORY`] = config.repository;
1786
+ }
1787
+ if (config.branch) {
1788
+ process.env[`${prefix}BRANCH`] = config.branch;
1789
+ }
1790
+ if (config.preid) {
1791
+ process.env[`${prefix}PRE_ID`] = String(config.preid);
1792
+ }
1793
+ if (config.registry) {
1794
+ if (config.registry.github) {
1795
+ process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
1796
+ }
1797
+ if (config.registry.npm) {
1798
+ process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
1799
+ }
1800
+ if (config.registry.cargo) {
1801
+ process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
1802
+ }
1803
+ if (config.registry.cyclone) {
1804
+ process.env[`${prefix}REGISTRY_CYCLONE`] = String(
1805
+ config.registry.cyclone
1806
+ );
1807
+ }
1808
+ if (config.registry.container) {
1809
+ process.env[`${prefix}REGISTRY_CONTAINER`] = String(
1810
+ config.registry.container
1811
+ );
1812
+ }
1813
+ }
1814
+ if (config.logLevel) {
1815
+ process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
1816
+ process.env.LOG_LEVEL = String(config.logLevel);
1817
+ process.env.NX_VERBOSE_LOGGING = String(
1818
+ getLogLevel2(config.logLevel) >= LogLevel2.DEBUG ? true : false
1819
+ );
1820
+ process.env.RUST_BACKTRACE = getLogLevel2(config.logLevel) >= LogLevel2.DEBUG ? "full" : "none";
1821
+ }
1822
+ if (config.skipConfigLogging !== void 0) {
1823
+ process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
1824
+ config.skipConfigLogging
1825
+ );
1826
+ }
1827
+ process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config);
1828
+ for (const key of Object.keys(config.extensions ?? {})) {
1829
+ if (config.extensions[key] && Object.keys(config.extensions[key])) {
1830
+ setExtensionEnv(key, config.extensions[key]);
1831
+ }
1832
+ }
1833
+ };
1834
+ var setThemeColorsEnv = (prefix, config) => {
1835
+ return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
1836
+ };
1837
+ var setSingleThemeColorsEnv = (prefix, config) => {
1838
+ if (config.dark) {
1839
+ process.env[`${prefix}DARK`] = config.dark;
1840
+ }
1841
+ if (config.light) {
1842
+ process.env[`${prefix}LIGHT`] = config.light;
1843
+ }
1844
+ if (config.brand) {
1845
+ process.env[`${prefix}BRAND`] = config.brand;
1846
+ }
1847
+ if (config.alternate) {
1848
+ process.env[`${prefix}ALTERNATE`] = config.alternate;
1849
+ }
1850
+ if (config.accent) {
1851
+ process.env[`${prefix}ACCENT`] = config.accent;
1852
+ }
1853
+ if (config.link) {
1854
+ process.env[`${prefix}LINK`] = config.link;
1855
+ }
1856
+ if (config.help) {
1857
+ process.env[`${prefix}HELP`] = config.help;
1858
+ }
1859
+ if (config.success) {
1860
+ process.env[`${prefix}SUCCESS`] = config.success;
1861
+ }
1862
+ if (config.info) {
1863
+ process.env[`${prefix}INFO`] = config.info;
1864
+ }
1865
+ if (config.warning) {
1866
+ process.env[`${prefix}WARNING`] = config.warning;
1867
+ }
1868
+ if (config.danger) {
1869
+ process.env[`${prefix}DANGER`] = config.danger;
1870
+ }
1871
+ if (config.fatal) {
1872
+ process.env[`${prefix}FATAL`] = config.fatal;
1873
+ }
1874
+ if (config.positive) {
1875
+ process.env[`${prefix}POSITIVE`] = config.positive;
1876
+ }
1877
+ if (config.negative) {
1878
+ process.env[`${prefix}NEGATIVE`] = config.negative;
1879
+ }
1880
+ if (config.gradient) {
1881
+ for (let i3 = 0; i3 < config.gradient.length; i3++) {
1882
+ process.env[`${prefix}GRADIENT_${i3}`] = config.gradient[i3];
1883
+ }
1884
+ }
1885
+ };
1886
+ var setMultiThemeColorsEnv = (prefix, config) => {
1887
+ return {
1888
+ light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
1889
+ dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
1890
+ };
1891
+ };
1892
+ var setBaseThemeColorsEnv = (prefix, config) => {
1893
+ if (config.foreground) {
1894
+ process.env[`${prefix}FOREGROUND`] = config.foreground;
1895
+ }
1896
+ if (config.background) {
1897
+ process.env[`${prefix}BACKGROUND`] = config.background;
1898
+ }
1899
+ if (config.brand) {
1900
+ process.env[`${prefix}BRAND`] = config.brand;
1901
+ }
1902
+ if (config.alternate) {
1903
+ process.env[`${prefix}ALTERNATE`] = config.alternate;
1904
+ }
1905
+ if (config.accent) {
1906
+ process.env[`${prefix}ACCENT`] = config.accent;
1907
+ }
1908
+ if (config.link) {
1909
+ process.env[`${prefix}LINK`] = config.link;
1910
+ }
1911
+ if (config.help) {
1912
+ process.env[`${prefix}HELP`] = config.help;
1913
+ }
1914
+ if (config.success) {
1915
+ process.env[`${prefix}SUCCESS`] = config.success;
1916
+ }
1917
+ if (config.info) {
1918
+ process.env[`${prefix}INFO`] = config.info;
1919
+ }
1920
+ if (config.warning) {
1921
+ process.env[`${prefix}WARNING`] = config.warning;
1922
+ }
1923
+ if (config.danger) {
1924
+ process.env[`${prefix}DANGER`] = config.danger;
1925
+ }
1926
+ if (config.fatal) {
1927
+ process.env[`${prefix}FATAL`] = config.fatal;
1928
+ }
1929
+ if (config.positive) {
1930
+ process.env[`${prefix}POSITIVE`] = config.positive;
1931
+ }
1932
+ if (config.negative) {
1933
+ process.env[`${prefix}NEGATIVE`] = config.negative;
1934
+ }
1935
+ if (config.gradient) {
1936
+ for (let i3 = 0; i3 < config.gradient.length; i3++) {
1937
+ process.env[`${prefix}GRADIENT_${i3}`] = config.gradient[i3];
1938
+ }
1939
+ }
1940
+ };
1941
+
1942
+ // ../config-tools/dist/chunk-ZWZLRNXP.js
1943
+ var getExtensionEnv = (extensionName) => {
1944
+ const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
1945
+ return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
1946
+ const name = key.replace(prefix, "").split("_").map(
1947
+ (i3) => i3.length > 0 ? i3.trim().charAt(0).toUpperCase() + i3.trim().slice(1) : ""
1948
+ ).join("");
1949
+ if (name) {
1950
+ ret[name] = process.env[key];
1951
+ }
1952
+ return ret;
1953
+ }, {});
1954
+ };
1955
+ var getConfigEnv = () => {
1956
+ const prefix = "STORM_";
1957
+ let config = {
1958
+ extends: process.env[`${prefix}EXTENDS`] || void 0,
1959
+ name: process.env[`${prefix}NAME`] || void 0,
1960
+ variant: process.env[`${prefix}VARIANT`] || void 0,
1961
+ namespace: process.env[`${prefix}NAMESPACE`] || void 0,
1962
+ owner: process.env[`${prefix}OWNER`] || void 0,
1963
+ bot: {
1964
+ name: process.env[`${prefix}BOT_NAME`] || void 0,
1965
+ email: process.env[`${prefix}BOT_EMAIL`] || void 0
1966
+ },
1967
+ release: {
1968
+ banner: {
1969
+ url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
1970
+ alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
1971
+ },
1972
+ header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
1973
+ footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
1974
+ },
1975
+ error: {
1976
+ codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
1977
+ url: process.env[`${prefix}ERROR_URL`] || void 0
1978
+ },
1979
+ socials: {
1980
+ twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
1981
+ discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
1982
+ telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
1983
+ slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
1984
+ medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
1985
+ github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
1986
+ },
1987
+ organization: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] ? process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] ? {
1988
+ name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
1989
+ description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
1990
+ url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
1991
+ logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
1992
+ icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
1993
+ } : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
1994
+ packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
1995
+ license: process.env[`${prefix}LICENSE`] || void 0,
1996
+ homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
1997
+ docs: process.env[`${prefix}DOCS`] || void 0,
1998
+ portal: process.env[`${prefix}PORTAL`] || void 0,
1999
+ licensing: process.env[`${prefix}LICENSING`] || void 0,
2000
+ contact: process.env[`${prefix}CONTACT`] || void 0,
2001
+ support: process.env[`${prefix}SUPPORT`] || void 0,
2002
+ timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
2003
+ locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
2004
+ configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? correctPaths2(process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
2005
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths2(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
2006
+ directories: {
2007
+ cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths2(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths2(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
2008
+ data: process.env[`${prefix}DATA_DIR`] ? correctPaths2(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths2(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
2009
+ config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths2(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths2(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
2010
+ temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths2(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths2(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
2011
+ log: process.env[`${prefix}LOG_DIR`] ? correctPaths2(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths2(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
2012
+ build: process.env[`${prefix}BUILD_DIR`] ? correctPaths2(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths2(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
2013
+ },
2014
+ skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
2015
+ mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
2016
+ // ci:
2017
+ // process.env[`${prefix}CI`] !== undefined
2018
+ // ? Boolean(
2019
+ // process.env[`${prefix}CI`] ??
2020
+ // process.env.CI ??
2021
+ // process.env.CONTINUOUS_INTEGRATION
2022
+ // )
2023
+ // : undefined,
2024
+ repository: process.env[`${prefix}REPOSITORY`] || void 0,
2025
+ branch: process.env[`${prefix}BRANCH`] || void 0,
2026
+ preid: process.env[`${prefix}PRE_ID`] || void 0,
2027
+ registry: {
2028
+ github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
2029
+ npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
2030
+ cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
2031
+ cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
2032
+ container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
2033
+ },
2034
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
2035
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
2036
+ ) ? getLogLevelLabel2(
2037
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
2038
+ ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
2039
+ skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
2040
+ };
2041
+ const themeNames = Object.keys(process.env).filter(
2042
+ (envKey) => envKey.startsWith(`${prefix}COLOR_`) && e3.every(
2043
+ (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
2044
+ )
2045
+ );
2046
+ config.colors = themeNames.length > 0 ? themeNames.reduce(
2047
+ (ret, themeName) => {
2048
+ ret[themeName] = getThemeColorsEnv(prefix, themeName);
2049
+ return ret;
2050
+ },
2051
+ {}
2052
+ ) : getThemeColorsEnv(prefix);
2053
+ if (config.docs === s) {
2054
+ if (config.homepage === r) {
2055
+ config.docs = `${r}/projects/${config.name}/docs`;
2056
+ } else {
2057
+ config.docs = `${config.homepage}/docs`;
2058
+ }
2059
+ }
2060
+ if (config.licensing === a) {
2061
+ if (config.homepage === r) {
2062
+ config.licensing = `${r}/projects/${config.name}/licensing`;
2063
+ } else {
2064
+ config.licensing = `${config.homepage}/docs`;
2065
+ }
2066
+ }
2067
+ const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
2068
+ if (serializedConfig) {
2069
+ const parsed = JSON.parse(serializedConfig);
2070
+ config = {
2071
+ ...config,
2072
+ ...parsed,
2073
+ colors: { ...config.colors, ...parsed.colors },
2074
+ extensions: { ...config.extensions, ...parsed.extensions }
2075
+ };
2076
+ }
2077
+ return config;
2078
+ };
2079
+ var getThemeColorsEnv = (prefix, theme) => {
2080
+ const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
2081
+ return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
2082
+ };
2083
+ var getSingleThemeColorsEnv = (prefix) => {
2084
+ const gradient = [];
2085
+ if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
2086
+ gradient.push(
2087
+ process.env[`${prefix}GRADIENT_START`],
2088
+ process.env[`${prefix}GRADIENT_END`]
2089
+ );
2090
+ } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
2091
+ let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
2092
+ while (process.env[`${prefix}GRADIENT_${index}`]) {
2093
+ gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
2094
+ index++;
2095
+ }
2096
+ }
2097
+ return {
2098
+ dark: process.env[`${prefix}DARK`],
2099
+ light: process.env[`${prefix}LIGHT`],
2100
+ brand: process.env[`${prefix}BRAND`],
2101
+ alternate: process.env[`${prefix}ALTERNATE`],
2102
+ accent: process.env[`${prefix}ACCENT`],
2103
+ link: process.env[`${prefix}LINK`],
2104
+ help: process.env[`${prefix}HELP`],
2105
+ success: process.env[`${prefix}SUCCESS`],
2106
+ info: process.env[`${prefix}INFO`],
2107
+ warning: process.env[`${prefix}WARNING`],
2108
+ danger: process.env[`${prefix}DANGER`],
2109
+ fatal: process.env[`${prefix}FATAL`],
2110
+ positive: process.env[`${prefix}POSITIVE`],
2111
+ negative: process.env[`${prefix}NEGATIVE`],
2112
+ gradient
2113
+ };
2114
+ };
2115
+ var getMultiThemeColorsEnv = (prefix) => {
2116
+ return {
2117
+ light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
2118
+ dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
2119
+ };
2120
+ };
2121
+ var getBaseThemeColorsEnv = (prefix) => {
2122
+ const gradient = [];
2123
+ if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
2124
+ gradient.push(
2125
+ process.env[`${prefix}GRADIENT_START`],
2126
+ process.env[`${prefix}GRADIENT_END`]
2127
+ );
2128
+ } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
2129
+ let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
2130
+ while (process.env[`${prefix}GRADIENT_${index}`]) {
2131
+ gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
2132
+ index++;
2133
+ }
2134
+ }
2135
+ return {
2136
+ foreground: process.env[`${prefix}FOREGROUND`],
2137
+ background: process.env[`${prefix}BACKGROUND`],
2138
+ brand: process.env[`${prefix}BRAND`],
2139
+ alternate: process.env[`${prefix}ALTERNATE`],
2140
+ accent: process.env[`${prefix}ACCENT`],
2141
+ link: process.env[`${prefix}LINK`],
2142
+ help: process.env[`${prefix}HELP`],
2143
+ success: process.env[`${prefix}SUCCESS`],
2144
+ info: process.env[`${prefix}INFO`],
2145
+ warning: process.env[`${prefix}WARNING`],
2146
+ danger: process.env[`${prefix}DANGER`],
2147
+ fatal: process.env[`${prefix}FATAL`],
2148
+ positive: process.env[`${prefix}POSITIVE`],
2149
+ negative: process.env[`${prefix}NEGATIVE`],
2150
+ gradient
2151
+ };
2152
+ };
2153
+
2154
+ // ../config-tools/dist/chunk-R7MTORRG.js
2155
+ var import_defu4 = __toESM(require("defu"), 1);
2156
+ var import_node_fs9 = require("fs");
2157
+ var _extension_cache = /* @__PURE__ */ new WeakMap();
2158
+ var _static_cache = void 0;
2159
+ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
2160
+ let result;
2161
+ if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
2162
+ let _workspaceRoot = workspaceRoot;
2163
+ if (!_workspaceRoot) {
2164
+ _workspaceRoot = findWorkspaceRoot2();
2165
+ }
2166
+ const configEnv = getConfigEnv();
2167
+ const configFile = await getConfigFile(_workspaceRoot);
2168
+ if (!configFile) {
2169
+ if (!skipLogs) {
2170
+ writeWarning2(
2171
+ "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",
2172
+ { logLevel: "all" }
2173
+ );
2174
+ }
2175
+ if (useDefault === false) {
2176
+ return void 0;
2177
+ }
2178
+ }
2179
+ const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
2180
+ const configInput = (0, import_defu4.default)(
2181
+ configEnv,
2182
+ configFile,
2183
+ defaultConfig
2184
+ );
2185
+ if (!configInput.variant) {
2186
+ configInput.variant = (0, import_node_fs9.existsSync)(joinPaths2(_workspaceRoot, "nx.json")) || (0, import_node_fs9.existsSync)(joinPaths2(_workspaceRoot, ".nx")) || (0, import_node_fs9.existsSync)(joinPaths2(_workspaceRoot, "lerna.json")) || (0, import_node_fs9.existsSync)(joinPaths2(_workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
2187
+ }
2188
+ try {
2189
+ result = applyDefaultConfig(
2190
+ await Be.parseAsync(configInput)
2191
+ );
2192
+ result.workspaceRoot ??= _workspaceRoot;
2193
+ } catch (error) {
2194
+ throw new Error(
2195
+ `Failed to parse Storm Workspace configuration${error?.message ? `: ${error.message}` : ""}
2196
+
2197
+ Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage2(
2198
+ configInput
2199
+ )}`,
2200
+ {
2201
+ cause: error
2202
+ }
2203
+ );
2204
+ }
2205
+ } else {
2206
+ result = _static_cache.data;
2207
+ }
2208
+ if (schema && extensionName) {
2209
+ result.extensions = {
2210
+ ...result.extensions,
2211
+ [extensionName]: createConfigExtension(extensionName, schema)
2212
+ };
2213
+ }
2214
+ _static_cache = {
2215
+ timestamp: Date.now(),
2216
+ data: result
2217
+ };
2218
+ return result;
2219
+ };
2220
+ var createConfigExtension = (extensionName, schema) => {
2221
+ const extension_cache_key = { extensionName };
2222
+ if (_extension_cache.has(extension_cache_key)) {
2223
+ return _extension_cache.get(extension_cache_key);
2224
+ }
2225
+ let extension = getExtensionEnv(extensionName);
2226
+ if (schema) {
2227
+ extension = schema.parse(extension);
2228
+ }
2229
+ _extension_cache.set(extension_cache_key, extension);
2230
+ return extension;
2231
+ };
2232
+ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
2233
+ const config = await createStormWorkspaceConfig(
2234
+ void 0,
2235
+ void 0,
2236
+ workspaceRoot,
2237
+ skipLogs,
2238
+ true
2239
+ );
2240
+ setConfigEnv(config);
2241
+ if (!skipLogs && !config.skipConfigLogging) {
2242
+ writeTrace2(
2243
+ `\u2699\uFE0F Using Storm Workspace configuration:
2244
+ ${formatLogMessage2(config)}`,
2245
+ config
2246
+ );
2247
+ }
2248
+ return config;
2249
+ };
2250
+
2251
+ // ../config-tools/dist/chunk-WOLTMI7X.js
2252
+ function getConfig(workspaceRoot, skipLogs = false) {
2253
+ return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
2254
+ }
2255
+ function getWorkspaceConfig(skipLogs = true, options = {}) {
2256
+ let workspaceRoot = options.workspaceRoot;
2257
+ if (!workspaceRoot) {
2258
+ workspaceRoot = findWorkspaceRoot2(options.cwd);
2259
+ }
2260
+ return getConfig(workspaceRoot, skipLogs);
2261
+ }
2262
+
2263
+ // src/options.ts
2264
+ var import_defu5 = __toESM(require("defu"), 1);
2265
+ var import_node_fs10 = require("fs");
2266
+ var import_promises6 = __toESM(require("fs/promises"), 1);
2267
+ var import_find_workspace_root = require("nx/src/utils/find-workspace-root");
2268
+
2269
+ // src/constants.ts
2270
+ var DEFAULT_BUILD_OPTIONS = {
2271
+ platform: "node",
2272
+ target: "node22",
2273
+ format: "esm",
2274
+ dts: true,
2275
+ keepNames: true,
2276
+ metafile: false,
2277
+ treeshake: true,
2278
+ splitting: true,
2279
+ shims: false,
2280
+ watch: false,
2281
+ bundle: true,
2282
+ clean: true,
2283
+ loader: {
2284
+ ".aac": "file",
2285
+ ".css": "file",
2286
+ ".eot": "file",
2287
+ ".flac": "file",
2288
+ ".gif": "file",
2289
+ ".jpeg": "file",
2290
+ ".jpg": "file",
2291
+ ".mp3": "file",
2292
+ ".mp4": "file",
2293
+ ".ogg": "file",
2294
+ ".otf": "file",
2295
+ ".png": "file",
2296
+ ".svg": "file",
2297
+ ".ttf": "file",
2298
+ ".wav": "file",
2299
+ ".webm": "file",
2300
+ ".webp": "file",
2301
+ ".woff": "file",
2302
+ ".woff2": "file"
2303
+ },
2304
+ banner: {
2305
+ js: DEFAULT_COMPILED_BANNER,
2306
+ css: DEFAULT_COMPILED_BANNER
2307
+ }
2308
+ };
2309
+
2310
+ // src/options.ts
2311
+ async function resolveOptions(userOptions) {
2312
+ const projectRoot = userOptions.projectRoot;
2313
+ const workspaceRoot = (0, import_find_workspace_root.findWorkspaceRoot)(projectRoot);
2314
+ if (!workspaceRoot) {
2315
+ throw new Error("Cannot find Nx workspace root");
2316
+ }
2317
+ const workspaceConfig = await getWorkspaceConfig(true, {
2318
+ workspaceRoot: workspaceRoot.dir
2319
+ });
2320
+ writeDebug2(" \u2699\uFE0F Resolving build options", workspaceConfig);
2321
+ const stopwatch = getStopwatch("Build options resolution");
2322
+ const projectGraph = await (0, import_devkit2.createProjectGraphAsync)({
2323
+ exitOnError: true
2324
+ });
2325
+ const projectJsonPath = joinPaths2(
2326
+ workspaceRoot.dir,
2327
+ projectRoot,
2328
+ "project.json"
2329
+ );
2330
+ if (!(0, import_node_fs10.existsSync)(projectJsonPath)) {
2331
+ throw new Error("Cannot find project.json configuration");
2332
+ }
2333
+ const projectJsonFile = await import_promises6.default.readFile(projectJsonPath, "utf8");
2334
+ const projectJson = JSON.parse(projectJsonFile);
2335
+ const projectName = projectJson.name || userOptions.name;
2336
+ const projectConfigurations = (0, import_devkit2.readProjectsConfigurationFromProjectGraph)(projectGraph);
2337
+ if (!projectConfigurations?.projects?.[projectName]) {
2338
+ throw new Error(
2339
+ "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."
2340
+ );
2341
+ }
2342
+ const options = (0, import_defu5.default)(userOptions, DEFAULT_BUILD_OPTIONS);
2343
+ options.name ??= projectName;
2344
+ const packageJsonPath = joinPaths2(
2345
+ workspaceRoot.dir,
2346
+ options.projectRoot,
2347
+ "package.json"
2348
+ );
2349
+ if (!(0, import_node_fs10.existsSync)(packageJsonPath)) {
2350
+ throw new Error("Cannot find package.json configuration");
2351
+ }
2352
+ const env = getEnv("esbuild", options);
2353
+ const define = (0, import_defu5.default)(options.define ?? {}, env ?? {});
2354
+ const resolvedOptions = {
2355
+ name: projectName,
2356
+ entry: [joinPaths2(workspaceRoot.dir, projectRoot, "src/index.ts")],
2357
+ clean: true,
2358
+ ...options,
2359
+ outDir: options.outputPath || joinPaths2(workspaceConfig.workspaceRoot, "dist", options.projectRoot),
2360
+ tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : joinPaths2(workspaceRoot.dir, projectRoot, "tsconfig.json"),
2361
+ env,
2362
+ define: {
2363
+ STORM_FORMAT: JSON.stringify(options.format),
2364
+ ...Object.keys(define).filter((key) => define[key] !== void 0).reduce((res, key) => {
2365
+ const value = JSON.stringify(define[key]);
2366
+ const safeKey = key.replaceAll("(", "").replaceAll(")", "");
2367
+ return {
2368
+ ...res,
2369
+ [`process.env.${safeKey}`]: value,
2370
+ [`import.meta.env.${safeKey}`]: value
2371
+ };
2372
+ }, {})
2373
+ }
2374
+ };
2375
+ stopwatch();
2376
+ if (options.verbose) {
2377
+ writeDebug2(
2378
+ ` \u2699\uFE0F Build options resolved:
2379
+
2380
+ ${formatLogMessage2(resolvedOptions)}`,
2381
+ workspaceConfig
2382
+ );
2383
+ }
2384
+ return resolvedOptions;
2385
+ }
2386
+ // Annotate the CommonJS export names for ESM import in node:
2387
+ 0 && (module.exports = {
2388
+ resolveOptions
2389
+ });