@storm-software/tsup 0.2.243 → 0.2.247

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.
@@ -2,37 +2,41 @@ import {
2
2
  DEFAULT_BUILD_OPTIONS,
3
3
  DEFAULT_ENVIRONMENT,
4
4
  DEFAULT_ORGANIZATION
5
- } from "./chunk-GBANGFK6.js";
5
+ } from "./chunk-65OUHNDV.js";
6
6
  import {
7
7
  init_esm_shims
8
- } from "./chunk-47XYLSL2.js";
8
+ } from "./chunk-MMAU3VJM.js";
9
9
 
10
10
  // src/options.ts
11
11
  init_esm_shims();
12
12
 
13
- // ../build-tools/dist/index.mjs
13
+ // ../build-tools/src/index.ts
14
14
  init_esm_shims();
15
15
 
16
- // ../build-tools/dist/chunk-KVP3YMX6.mjs
16
+ // ../build-tools/src/plugins/index.ts
17
17
  init_esm_shims();
18
18
 
19
- // ../build-tools/dist/chunk-CXCEJKL3.mjs
19
+ // ../build-tools/src/plugins/analyze.ts
20
20
  init_esm_shims();
21
21
 
22
- // ../build-tools/dist/chunk-B4H42WDA.mjs
22
+ // ../config-tools/src/logger/console.ts
23
23
  init_esm_shims();
24
+ import { formatDistanceToNow } from "date-fns/formatDistanceToNow";
24
25
 
25
- // ../build-tools/dist/chunk-VXUVNB76.mjs
26
- init_esm_shims();
27
-
28
- // ../build-tools/dist/chunk-B4H42WDA.mjs
29
- import { existsSync } from "node:fs";
30
- import { join } from "node:path";
31
-
32
- // ../build-tools/dist/chunk-NHOEBJLZ.mjs
26
+ // ../config-tools/src/types.ts
33
27
  init_esm_shims();
34
- import { formatDistanceToNow } from "date-fns/formatDistanceToNow";
35
- import chalk from "chalk";
28
+ var LogLevel = {
29
+ SILENT: 0,
30
+ FATAL: 10,
31
+ ERROR: 20,
32
+ WARN: 30,
33
+ SUCCESS: 35,
34
+ INFO: 40,
35
+ PERFORMANCE: 50,
36
+ DEBUG: 60,
37
+ TRACE: 70,
38
+ ALL: 100
39
+ };
36
40
  var LogLevelLabel = {
37
41
  SILENT: "silent",
38
42
  FATAL: "fatal",
@@ -45,6 +49,87 @@ var LogLevelLabel = {
45
49
  TRACE: "trace",
46
50
  ALL: "all"
47
51
  };
52
+
53
+ // ../config-tools/src/utilities/colors.ts
54
+ init_esm_shims();
55
+ var DEFAULT_COLOR_CONFIG = {
56
+ light: {
57
+ background: "#fafafa",
58
+ foreground: "#1d1e22",
59
+ brand: "#1fb2a6",
60
+ alternate: "#db2777",
61
+ discovery: "#5C4EE5",
62
+ success: "#087f5b",
63
+ info: "#0550ae",
64
+ debug: "#8afafc",
65
+ warning: "#e3b341",
66
+ danger: "#D8314A",
67
+ fatal: "#51070f",
68
+ performance: "#13c302",
69
+ link: "#3fa6ff",
70
+ positive: "#22c55e",
71
+ negative: "#dc2626",
72
+ gradient: ["#1fb2a6", "#db2777", "#5C4EE5"]
73
+ },
74
+ dark: {
75
+ background: "#1e2124",
76
+ foreground: "#cbd5e1",
77
+ brand: "#2dd4bf",
78
+ alternate: "#db2777",
79
+ discovery: "#818cf8",
80
+ success: "#10b981",
81
+ info: "#58a6ff",
82
+ debug: "#8afafc",
83
+ warning: "#f3d371",
84
+ danger: "#D8314A",
85
+ fatal: "#a40e26",
86
+ performance: "#80fd74",
87
+ link: "#3fa6ff",
88
+ positive: "#22c55e",
89
+ negative: "#dc2626",
90
+ gradient: ["#1fb2a6", "#db2777", "#818cf8"]
91
+ }
92
+ };
93
+
94
+ // ../config-tools/src/logger/chalk.ts
95
+ init_esm_shims();
96
+ import chalk from "chalk";
97
+ var chalkDefault = {
98
+ hex: (_) => (message) => message,
99
+ bgHex: (_) => ({
100
+ whiteBright: (message) => message,
101
+ white: (message) => message
102
+ }),
103
+ white: (message) => message,
104
+ whiteBright: (message) => message,
105
+ gray: (message) => message,
106
+ bold: {
107
+ hex: (_) => (message) => message,
108
+ bgHex: (_) => ({
109
+ whiteBright: (message) => message,
110
+ white: (message) => message
111
+ }),
112
+ whiteBright: (message) => message,
113
+ white: (message) => message
114
+ },
115
+ dim: {
116
+ hex: (_) => (message) => message,
117
+ gray: (message) => message
118
+ }
119
+ };
120
+ var getChalk = () => {
121
+ let _chalk = chalk;
122
+ if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
123
+ _chalk = chalkDefault;
124
+ }
125
+ return _chalk;
126
+ };
127
+
128
+ // ../config-tools/src/logger/console-icons.ts
129
+ init_esm_shims();
130
+
131
+ // ../config-tools/src/logger/is-unicode-supported.ts
132
+ init_esm_shims();
48
133
  function isUnicodeSupported() {
49
134
  if (process.platform !== "win32") {
50
135
  return process.env.TERM !== "linux";
@@ -54,7 +139,9 @@ function isUnicodeSupported() {
54
139
  process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
55
140
  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";
56
141
  }
57
- var useIcon = (c3, fallback) => isUnicodeSupported() ? c3 : fallback;
142
+
143
+ // ../config-tools/src/logger/console-icons.ts
144
+ var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
58
145
  var CONSOLE_ICONS = {
59
146
  [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
60
147
  [LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
@@ -67,725 +154,273 @@ var CONSOLE_ICONS = {
67
154
  [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
68
155
  };
69
156
 
70
- // ../build-tools/dist/chunk-CXCEJKL3.mjs
71
- import { loadConfig } from "c12";
72
- import defu from "defu";
73
- import * as z from "zod/v4/mini";
74
- import { existsSync as existsSync2 } from "node:fs";
75
- import { readFile } from "node:fs/promises";
76
- import { join as join2 } from "node:path";
77
- import defu2 from "defu";
78
- import { existsSync as existsSync22 } from "node:fs";
79
- import { existsSync as existsSync3 } from "node:fs";
80
- import { readFile as readFile2 } from "node:fs/promises";
81
- var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
82
- var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
83
- var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
84
- var STORM_DEFAULT_RELEASE_FOOTER = `
85
- 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.
157
+ // ../config-tools/src/logger/format-timestamp.ts
158
+ init_esm_shims();
159
+ var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
160
+ return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
161
+ };
86
162
 
87
- Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
163
+ // ../config-tools/src/logger/get-log-level.ts
164
+ init_esm_shims();
165
+ var getLogLevel = (label) => {
166
+ switch (label) {
167
+ case "all":
168
+ return LogLevel.ALL;
169
+ case "trace":
170
+ return LogLevel.TRACE;
171
+ case "debug":
172
+ return LogLevel.DEBUG;
173
+ case "performance":
174
+ return LogLevel.PERFORMANCE;
175
+ case "info":
176
+ return LogLevel.INFO;
177
+ case "warn":
178
+ return LogLevel.WARN;
179
+ case "error":
180
+ return LogLevel.ERROR;
181
+ case "fatal":
182
+ return LogLevel.FATAL;
183
+ case "silent":
184
+ return LogLevel.SILENT;
185
+ default:
186
+ return LogLevel.INFO;
187
+ }
188
+ };
189
+ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
190
+ if (logLevel >= LogLevel.ALL) {
191
+ return LogLevelLabel.ALL;
192
+ }
193
+ if (logLevel >= LogLevel.TRACE) {
194
+ return LogLevelLabel.TRACE;
195
+ }
196
+ if (logLevel >= LogLevel.DEBUG) {
197
+ return LogLevelLabel.DEBUG;
198
+ }
199
+ if (logLevel >= LogLevel.PERFORMANCE) {
200
+ return LogLevelLabel.PERFORMANCE;
201
+ }
202
+ if (logLevel >= LogLevel.INFO) {
203
+ return LogLevelLabel.INFO;
204
+ }
205
+ if (logLevel >= LogLevel.WARN) {
206
+ return LogLevelLabel.WARN;
207
+ }
208
+ if (logLevel >= LogLevel.ERROR) {
209
+ return LogLevelLabel.ERROR;
210
+ }
211
+ if (logLevel >= LogLevel.FATAL) {
212
+ return LogLevelLabel.FATAL;
213
+ }
214
+ if (logLevel <= LogLevel.SILENT) {
215
+ return LogLevelLabel.SILENT;
216
+ }
217
+ return LogLevelLabel.INFO;
218
+ };
88
219
 
89
- 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!
90
- `;
91
- var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
92
- var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
93
- var schemaRegistry = z.registry();
94
- var colorSchema = z.string().check(
95
- z.length(7),
96
- z.toLowerCase(),
97
- z.regex(/^#([0-9a-f]{3}){1,2}$/i),
98
- z.trim()
99
- );
100
- schemaRegistry.add(colorSchema, {
101
- description: "A base schema for describing the format of colors"
102
- });
103
- var darkColorSchema = z._default(colorSchema, "#1e2124");
104
- schemaRegistry.add(darkColorSchema, {
105
- description: "The dark background color of the workspace"
106
- });
107
- var lightColorSchema = z._default(colorSchema, "#cbd5e1");
108
- schemaRegistry.add(lightColorSchema, {
109
- description: "The light background color of the workspace"
110
- });
111
- var brandColorSchema = z._default(colorSchema, "#1fb2a6");
112
- schemaRegistry.add(brandColorSchema, {
113
- description: "The primary brand specific color of the workspace"
114
- });
115
- var alternateColorSchema = z.optional(colorSchema);
116
- schemaRegistry.add(alternateColorSchema, {
117
- description: "The alternate brand specific color of the workspace"
118
- });
119
- var accentColorSchema = z.optional(colorSchema);
120
- schemaRegistry.add(accentColorSchema, {
121
- description: "The secondary brand specific color of the workspace"
122
- });
123
- var linkColorSchema = z._default(colorSchema, "#3fa6ff");
124
- schemaRegistry.add(linkColorSchema, {
125
- description: "The color used to display hyperlink text"
126
- });
127
- var discoveryColorSchema = z._default(colorSchema, "#818cf8");
128
- schemaRegistry.add(discoveryColorSchema, {
129
- description: "The second brand specific color of the workspace"
130
- });
131
- var successColorSchema = z._default(colorSchema, "#45b27e");
132
- schemaRegistry.add(successColorSchema, {
133
- description: "The success color of the workspace"
134
- });
135
- var infoColorSchema = z._default(colorSchema, "#38bdf8");
136
- schemaRegistry.add(infoColorSchema, {
137
- description: "The informational color of the workspace"
138
- });
139
- var debugColorSchema = z._default(colorSchema, "#8afafc");
140
- schemaRegistry.add(debugColorSchema, {
141
- description: "The debug color of the workspace"
142
- });
143
- var warningColorSchema = z._default(colorSchema, "#f3d371");
144
- schemaRegistry.add(warningColorSchema, {
145
- description: "The warning color of the workspace"
146
- });
147
- var dangerColorSchema = z._default(colorSchema, "#d8314a");
148
- schemaRegistry.add(dangerColorSchema, {
149
- description: "The danger color of the workspace"
150
- });
151
- var fatalColorSchema = z.optional(colorSchema);
152
- schemaRegistry.add(fatalColorSchema, {
153
- description: "The fatal color of the workspace"
154
- });
155
- var performanceColorSchema = z._default(colorSchema, "#80fd74");
156
- schemaRegistry.add(performanceColorSchema, {
157
- description: "The performance color of the workspace"
158
- });
159
- var positiveColorSchema = z._default(colorSchema, "#4ade80");
160
- schemaRegistry.add(positiveColorSchema, {
161
- description: "The positive number color of the workspace"
162
- });
163
- var negativeColorSchema = z._default(colorSchema, "#ef4444");
164
- schemaRegistry.add(negativeColorSchema, {
165
- description: "The negative number color of the workspace"
166
- });
167
- var gradientStopsSchema = z.optional(z.array(colorSchema));
168
- schemaRegistry.add(gradientStopsSchema, {
169
- description: "The color stops for the base gradient color pattern used in the workspace"
170
- });
171
- var darkColorsSchema = z.object({
172
- foreground: lightColorSchema,
173
- background: darkColorSchema,
174
- brand: brandColorSchema,
175
- alternate: alternateColorSchema,
176
- accent: accentColorSchema,
177
- link: linkColorSchema,
178
- discovery: discoveryColorSchema,
179
- success: successColorSchema,
180
- info: infoColorSchema,
181
- debug: debugColorSchema,
182
- warning: warningColorSchema,
183
- danger: dangerColorSchema,
184
- fatal: fatalColorSchema,
185
- performance: performanceColorSchema,
186
- positive: positiveColorSchema,
187
- negative: negativeColorSchema,
188
- gradient: gradientStopsSchema
189
- });
190
- var lightColorsSchema = z.object({
191
- foreground: darkColorSchema,
192
- background: lightColorSchema,
193
- brand: brandColorSchema,
194
- alternate: alternateColorSchema,
195
- accent: accentColorSchema,
196
- link: linkColorSchema,
197
- discovery: discoveryColorSchema,
198
- success: successColorSchema,
199
- info: infoColorSchema,
200
- debug: debugColorSchema,
201
- warning: warningColorSchema,
202
- danger: dangerColorSchema,
203
- fatal: fatalColorSchema,
204
- performance: performanceColorSchema,
205
- positive: positiveColorSchema,
206
- negative: negativeColorSchema,
207
- gradient: gradientStopsSchema
208
- });
209
- var multiColorsSchema = z.object({
210
- dark: darkColorsSchema,
211
- light: lightColorsSchema
212
- });
213
- var singleColorsSchema = z.object({
214
- dark: darkColorSchema,
215
- light: lightColorSchema,
216
- brand: brandColorSchema,
217
- alternate: alternateColorSchema,
218
- accent: accentColorSchema,
219
- link: linkColorSchema,
220
- discovery: discoveryColorSchema,
221
- success: successColorSchema,
222
- info: infoColorSchema,
223
- debug: debugColorSchema,
224
- warning: warningColorSchema,
225
- danger: dangerColorSchema,
226
- fatal: fatalColorSchema,
227
- performance: performanceColorSchema,
228
- positive: positiveColorSchema,
229
- negative: negativeColorSchema,
230
- gradient: gradientStopsSchema
231
- });
232
- var registryUrlConfigSchema = z.optional(z.url());
233
- schemaRegistry.add(registryUrlConfigSchema, {
234
- description: "A remote registry URL used to publish distributable packages"
235
- });
236
- var registrySchema = z._default(
237
- z.object({
238
- github: registryUrlConfigSchema,
239
- npm: registryUrlConfigSchema,
240
- cargo: registryUrlConfigSchema,
241
- cyclone: registryUrlConfigSchema,
242
- container: registryUrlConfigSchema
243
- }),
244
- {}
245
- );
246
- schemaRegistry.add(registrySchema, {
247
- description: "A list of remote registry URLs used by Storm Software"
248
- });
249
- var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
250
- schemaRegistry.add(colorsSchema, {
251
- description: "Colors used for various workspace elements"
252
- });
253
- var themeColorsSchema = z.record(
254
- z.union([z.union([z.literal("base"), z.string()]), z.string()]),
255
- colorsSchema
256
- );
257
- schemaRegistry.add(themeColorsSchema, {
258
- description: "Storm theme config values used for styling various package elements"
259
- });
260
- var extendsSchema = z.optional(
261
- z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
262
- );
263
- schemaRegistry.add(extendsSchema, {
264
- 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."
265
- });
266
- var workspaceBotNameSchema = z.string().check(z.trim());
267
- schemaRegistry.add(workspaceBotNameSchema, {
268
- description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
269
- });
270
- var workspaceBotEmailSchema = z.string().check(z.trim());
271
- schemaRegistry.add(workspaceBotEmailSchema, {
272
- description: "The email of the workspace bot"
273
- });
274
- var workspaceBotSchema = z.object({
275
- name: workspaceBotNameSchema,
276
- email: workspaceBotEmailSchema
277
- });
278
- schemaRegistry.add(workspaceBotSchema, {
279
- description: "The workspace's bot user's config used to automated various operations tasks"
280
- });
281
- var workspaceReleaseBannerUrlSchema = z.optional(
282
- z.string().check(z.trim(), z.url())
283
- );
284
- schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
285
- description: "A URL to a banner image used to display the workspace's release"
286
- });
287
- var workspaceReleaseBannerAltSchema = z._default(
288
- z.string().check(z.trim()),
289
- STORM_DEFAULT_BANNER_ALT
290
- );
291
- schemaRegistry.add(workspaceReleaseBannerAltSchema, {
292
- description: "The alt text for the workspace's release banner image"
293
- });
294
- var workspaceReleaseBannerSchema = z.object({
295
- url: workspaceReleaseBannerUrlSchema,
296
- alt: workspaceReleaseBannerAltSchema
297
- });
298
- schemaRegistry.add(workspaceReleaseBannerSchema, {
299
- description: "The workspace's banner image used during the release process"
300
- });
301
- var workspaceReleaseHeaderSchema = z.optional(
302
- z.string().check(z.trim())
303
- );
304
- schemaRegistry.add(workspaceReleaseHeaderSchema, {
305
- description: "A header message appended to the start of the workspace's release notes"
306
- });
307
- var workspaceReleaseFooterSchema = z.optional(
308
- z.string().check(z.trim())
309
- );
310
- schemaRegistry.add(workspaceReleaseFooterSchema, {
311
- description: "A footer message appended to the end of the workspace's release notes"
312
- });
313
- var workspaceReleaseSchema = z.object({
314
- banner: z.union([
315
- workspaceReleaseBannerSchema,
316
- z.string().check(z.trim(), z.url())
317
- ]),
318
- header: workspaceReleaseHeaderSchema,
319
- footer: workspaceReleaseFooterSchema
320
- });
321
- schemaRegistry.add(workspaceReleaseSchema, {
322
- description: "The workspace's release config used during the release process"
323
- });
324
- var workspaceSocialsTwitterSchema = z.optional(
325
- z.string().check(z.trim())
326
- );
327
- schemaRegistry.add(workspaceSocialsTwitterSchema, {
328
- description: "A Twitter/X account associated with the organization/project"
329
- });
330
- var workspaceSocialsDiscordSchema = z.optional(
331
- z.string().check(z.trim())
332
- );
333
- schemaRegistry.add(workspaceSocialsDiscordSchema, {
334
- description: "A Discord account associated with the organization/project"
335
- });
336
- var workspaceSocialsTelegramSchema = z.optional(
337
- z.string().check(z.trim())
338
- );
339
- schemaRegistry.add(workspaceSocialsTelegramSchema, {
340
- description: "A Telegram account associated with the organization/project"
341
- });
342
- var workspaceSocialsSlackSchema = z.optional(
343
- z.string().check(z.trim())
344
- );
345
- schemaRegistry.add(workspaceSocialsSlackSchema, {
346
- description: "A Slack account associated with the organization/project"
347
- });
348
- var workspaceSocialsMediumSchema = z.optional(
349
- z.string().check(z.trim())
350
- );
351
- schemaRegistry.add(workspaceSocialsMediumSchema, {
352
- description: "A Medium account associated with the organization/project"
353
- });
354
- var workspaceSocialsGithubSchema = z.optional(
355
- z.string().check(z.trim())
356
- );
357
- schemaRegistry.add(workspaceSocialsGithubSchema, {
358
- description: "A GitHub account associated with the organization/project"
359
- });
360
- var workspaceSocialsSchema = z.object({
361
- twitter: workspaceSocialsTwitterSchema,
362
- discord: workspaceSocialsDiscordSchema,
363
- telegram: workspaceSocialsTelegramSchema,
364
- slack: workspaceSocialsSlackSchema,
365
- medium: workspaceSocialsMediumSchema,
366
- github: workspaceSocialsGithubSchema
367
- });
368
- schemaRegistry.add(workspaceSocialsSchema, {
369
- description: "The workspace's account config used to store various social media links"
370
- });
371
- var workspaceDirectoryCacheSchema = z.optional(
372
- z.string().check(z.trim())
373
- );
374
- schemaRegistry.add(workspaceDirectoryCacheSchema, {
375
- description: "The directory used to store the environment's cached file data"
376
- });
377
- var workspaceDirectoryDataSchema = z.optional(
378
- z.string().check(z.trim())
379
- );
380
- schemaRegistry.add(workspaceDirectoryDataSchema, {
381
- description: "The directory used to store the environment's data files"
382
- });
383
- var workspaceDirectoryConfigSchema = z.optional(
384
- z.string().check(z.trim())
385
- );
386
- schemaRegistry.add(workspaceDirectoryConfigSchema, {
387
- description: "The directory used to store the environment's configuration files"
388
- });
389
- var workspaceDirectoryTempSchema = z.optional(
390
- z.string().check(z.trim())
391
- );
392
- schemaRegistry.add(workspaceDirectoryTempSchema, {
393
- description: "The directory used to store the environment's temp files"
394
- });
395
- var workspaceDirectoryLogSchema = z.optional(
396
- z.string().check(z.trim())
397
- );
398
- schemaRegistry.add(workspaceDirectoryLogSchema, {
399
- description: "The directory used to store the environment's log files"
400
- });
401
- var workspaceDirectoryBuildSchema = z._default(
402
- z.string().check(z.trim()),
403
- "dist"
404
- );
405
- schemaRegistry.add(workspaceDirectoryBuildSchema, {
406
- description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
407
- });
408
- var workspaceDirectorySchema = z.object({
409
- cache: workspaceDirectoryCacheSchema,
410
- data: workspaceDirectoryDataSchema,
411
- config: workspaceDirectoryConfigSchema,
412
- temp: workspaceDirectoryTempSchema,
413
- log: workspaceDirectoryLogSchema,
414
- build: workspaceDirectoryBuildSchema
415
- });
416
- schemaRegistry.add(workspaceDirectorySchema, {
417
- description: "Various directories used by the workspace to store data, cache, and configuration files"
418
- });
419
- var variantSchema = z._default(
420
- z.enum(["minimal", "monorepo"]),
421
- "monorepo"
422
- );
423
- schemaRegistry.add(variantSchema, {
424
- description: "The variant of the workspace. This can be used to enable or disable certain features or configurations."
425
- });
426
- var errorCodesFileSchema = z._default(
427
- z.string().check(z.trim()),
428
- STORM_DEFAULT_ERROR_CODES_FILE
429
- );
430
- schemaRegistry.add(errorCodesFileSchema, {
431
- description: "The path to the workspace's error codes JSON file"
432
- });
433
- var errorUrlSchema = z.optional(z.url());
434
- schemaRegistry.add(errorUrlSchema, {
435
- description: "A URL to a page that looks up the workspace's error messages given a specific error code"
436
- });
437
- var errorSchema = z.object({
438
- codesFile: errorCodesFileSchema,
439
- url: errorUrlSchema
440
- });
441
- schemaRegistry.add(errorSchema, {
442
- description: "The workspace's error config used when creating error details during a system error"
443
- });
444
- var organizationNameSchema = z.optional(
445
- z.string().check(z.trim(), z.toLowerCase())
446
- );
447
- schemaRegistry.add(organizationNameSchema, {
448
- description: "The name of the organization"
449
- });
450
- var organizationDescriptionSchema = z.optional(
451
- z.string().check(z.trim())
452
- );
453
- schemaRegistry.add(organizationDescriptionSchema, {
454
- description: "A description of the organization"
455
- });
456
- var organizationLogoSchema = z.optional(z.url());
457
- schemaRegistry.add(organizationLogoSchema, {
458
- description: "A URL to the organization's logo image"
459
- });
460
- var organizationIconSchema = z.optional(z.url());
461
- schemaRegistry.add(organizationIconSchema, {
462
- description: "A URL to the organization's icon image"
463
- });
464
- var organizationUrlSchema = z.optional(z.url());
465
- schemaRegistry.add(organizationUrlSchema, {
466
- description: "A URL to a page that provides more information about the organization"
467
- });
468
- var organizationSchema = z.object({
469
- name: organizationNameSchema,
470
- description: organizationDescriptionSchema,
471
- logo: organizationLogoSchema,
472
- icon: organizationIconSchema,
473
- url: organizationUrlSchema
474
- });
475
- schemaRegistry.add(organizationSchema, {
476
- description: "The workspace's organization details"
477
- });
478
- var schemaNameSchema = z._default(
479
- z.string().check(z.trim(), z.toLowerCase()),
480
- "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
481
- );
482
- schemaRegistry.add(schemaNameSchema, {
483
- description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
484
- });
485
- var nameSchema = z.string().check(z.trim(), z.toLowerCase());
486
- schemaRegistry.add(nameSchema, {
487
- description: "The name of the workspace/project/service/package/scope using this configuration"
488
- });
489
- var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
490
- schemaRegistry.add(namespaceSchema, {
491
- description: "The namespace of the workspace/project/service/package/scope using this configuration"
492
- });
493
- var orgSchema = z.union([
494
- organizationSchema,
495
- z.string().check(z.trim(), z.toLowerCase())
496
- ]);
497
- schemaRegistry.add(orgSchema, {
498
- description: "The organization of the workspace. This can be a string or an object containing the organization's details"
499
- });
500
- var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
501
- schemaRegistry.add(repositorySchema, {
502
- description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
503
- });
504
- var licenseSchema = z._default(
505
- z.string().check(z.trim()),
506
- "Apache-2.0"
507
- );
508
- schemaRegistry.add(licenseSchema, {
509
- description: "The license type of the package"
510
- });
511
- var homepageSchema = z.optional(z.url());
512
- schemaRegistry.add(homepageSchema, {
513
- description: "The homepage of the workspace"
514
- });
515
- var docsSchema = z.optional(z.url());
516
- schemaRegistry.add(docsSchema, {
517
- description: "The documentation site for the workspace"
518
- });
519
- var portalSchema = z.optional(z.url());
520
- schemaRegistry.add(portalSchema, {
521
- description: "The development portal site for the workspace"
522
- });
523
- var licensingSchema = z.optional(z.url());
524
- schemaRegistry.add(licensingSchema, {
525
- description: "The licensing site for the workspace"
526
- });
527
- var contactSchema = z.optional(z.url());
528
- schemaRegistry.add(contactSchema, {
529
- description: "The contact site for the workspace"
530
- });
531
- var supportSchema = z.optional(z.url());
532
- schemaRegistry.add(supportSchema, {
533
- description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
534
- });
535
- var branchSchema = z._default(
536
- z.string().check(z.trim(), z.toLowerCase()),
537
- "main"
538
- );
539
- schemaRegistry.add(branchSchema, {
540
- description: "The branch of the workspace"
541
- });
542
- var preidSchema = z.optional(
543
- z.string().check(z.trim(), z.toLowerCase())
544
- );
545
- schemaRegistry.add(preidSchema, {
546
- description: "A tag specifying the version pre-release identifier"
547
- });
548
- var ownerSchema = z.optional(
549
- z.string().check(z.trim(), z.toLowerCase())
550
- );
551
- schemaRegistry.add(ownerSchema, {
552
- description: "The owner of the package"
553
- });
554
- var modeSchema = z._default(
555
- z.enum(["development", "test", "production"]).check(z.trim(), z.toLowerCase()),
556
- "production"
557
- );
558
- schemaRegistry.add(modeSchema, {
559
- description: "The current runtime environment mode for the package"
560
- });
561
- var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
562
- schemaRegistry.add(workspaceRootSchema, {
563
- description: "The root directory of the workspace"
564
- });
565
- var skipCacheSchema = z._default(z.boolean(), false);
566
- schemaRegistry.add(skipCacheSchema, {
567
- description: "Should all known types of workspace caching be skipped?"
568
- });
569
- var packageManagerSchema = z._default(
570
- z.enum(["npm", "yarn", "pnpm", "bun"]),
571
- "npm"
572
- );
573
- schemaRegistry.add(packageManagerSchema, {
574
- description: "The JavaScript/TypeScript package manager used by the repository"
575
- });
576
- var timezoneSchema = z._default(
577
- z.string().check(z.trim()),
578
- "America/New_York"
579
- );
580
- schemaRegistry.add(timezoneSchema, {
581
- description: "The default timezone of the workspace"
582
- });
583
- var localeSchema = z._default(z.string().check(z.trim()), "en-US");
584
- schemaRegistry.add(localeSchema, {
585
- description: "The default locale of the workspace"
586
- });
587
- var logLevelSchema = z._default(
588
- z.enum([
589
- "silent",
590
- "fatal",
591
- "error",
592
- "warn",
593
- "success",
594
- "info",
595
- "performance",
596
- "debug",
597
- "trace",
598
- "all"
599
- ]),
600
- "info"
601
- );
602
- schemaRegistry.add(logLevelSchema, {
603
- 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`)."
604
- });
605
- var skipConfigLoggingSchema = z._default(z.boolean(), true);
606
- schemaRegistry.add(skipConfigLoggingSchema, {
607
- description: "Should the logging of the current Storm Workspace configuration be skipped?"
608
- });
609
- var configFileSchema = z._default(
610
- z.nullable(z.string().check(z.trim())),
611
- null
612
- );
613
- schemaRegistry.add(configFileSchema, {
614
- description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
615
- });
616
- var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
617
- schemaRegistry.add(extensionsSchema, {
618
- description: "Configuration of each used extension"
619
- });
620
- var workspaceConfigSchema = z.object({
621
- $schema: schemaNameSchema,
622
- extends: extendsSchema,
623
- name: nameSchema,
624
- variant: variantSchema,
625
- namespace: namespaceSchema,
626
- organization: orgSchema,
627
- repository: repositorySchema,
628
- license: licenseSchema,
629
- homepage: homepageSchema,
630
- docs: docsSchema,
631
- portal: portalSchema,
632
- licensing: licensingSchema,
633
- contact: contactSchema,
634
- support: supportSchema,
635
- branch: branchSchema,
636
- preid: preidSchema,
637
- owner: ownerSchema,
638
- bot: workspaceBotSchema,
639
- release: workspaceReleaseSchema,
640
- socials: workspaceSocialsSchema,
641
- error: errorSchema,
642
- mode: modeSchema,
643
- workspaceRoot: workspaceRootSchema,
644
- skipCache: skipCacheSchema,
645
- directories: workspaceDirectorySchema,
646
- packageManager: packageManagerSchema,
647
- timezone: timezoneSchema,
648
- locale: localeSchema,
649
- logLevel: logLevelSchema,
650
- skipConfigLogging: skipConfigLoggingSchema,
651
- registry: registrySchema,
652
- configFile: configFileSchema,
653
- colors: z.union([colorsSchema, themeColorsSchema]),
654
- extensions: extensionsSchema
655
- });
656
- schemaRegistry.add(extensionsSchema, {
657
- 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."
658
- });
659
-
660
- // ../build-tools/dist/chunk-JCFRYUYP.mjs
661
- init_esm_shims();
662
- import {
663
- createTaskGraph,
664
- mapTargetDefaultsToDependencies
665
- } from "nx/src/tasks-runner/create-task-graph";
666
-
667
- // ../build-tools/dist/chunk-44MPIE3V.mjs
668
- init_esm_shims();
669
- import { CopyAssetsHandler } from "@nx/js/internal";
670
- import { glob } from "glob";
671
- import { readFile as readFile3, writeFile } from "node:fs/promises";
672
-
673
- // ../build-tools/dist/chunk-V3HXNKBB.mjs
674
- init_esm_shims();
675
- import { calculateProjectBuildableDependencies } from "@nx/js/internal";
676
- import { Glob } from "glob";
677
- import { existsSync as existsSync4, readFileSync } from "node:fs";
678
- import { readFile as readFile4 } from "node:fs/promises";
679
- import {
680
- createProjectGraphAsync,
681
- readCachedProjectGraph,
682
- readProjectsConfigurationFromProjectGraph
683
- } from "nx/src/project-graph/project-graph";
684
-
685
- // ../build-tools/dist/chunk-UFGXOQSU.mjs
686
- init_esm_shims();
687
- import { glob as glob2 } from "glob";
688
-
689
- // ../build-tools/dist/chunk-FEQZSI32.mjs
690
- init_esm_shims();
691
- var getEnv = (builder, options) => {
692
- return {
693
- STORM_BUILD: builder,
694
- STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
695
- STORM_NAME: options.name,
696
- STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
697
- STORM_PLATFORM: options.platform,
698
- STORM_FORMAT: JSON.stringify(options.format),
699
- STORM_TARGET: JSON.stringify(options.target),
700
- ...options.env
220
+ // ../config-tools/src/logger/console.ts
221
+ var getLogFn = (logLevel = LogLevel.INFO, config = {}, options = {}) => {
222
+ const {
223
+ chalk: _chalk = getChalk(),
224
+ fullDateTime = false,
225
+ hideDateTime = false
226
+ } = options;
227
+ 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;
228
+ const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
229
+ if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
230
+ return (_) => {
231
+ };
232
+ }
233
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
234
+ return (message) => {
235
+ console.error(
236
+ `
237
+ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(
238
+ `[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `
239
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
240
+ `
241
+ );
242
+ };
243
+ }
244
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
245
+ return (message) => {
246
+ console.error(
247
+ `
248
+ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(
249
+ `[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `
250
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
251
+ `
252
+ );
253
+ };
254
+ }
255
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
256
+ return (message) => {
257
+ console.warn(
258
+ `
259
+ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(
260
+ `[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `
261
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
262
+ `
263
+ );
264
+ };
265
+ }
266
+ if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
267
+ return (message) => {
268
+ console.info(
269
+ `
270
+ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(
271
+ `[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `
272
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
273
+ `
274
+ );
275
+ };
276
+ }
277
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
278
+ return (message) => {
279
+ console.info(
280
+ `
281
+ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(
282
+ `[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `
283
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
284
+ `
285
+ );
286
+ };
287
+ }
288
+ if (typeof logLevel === "number" && LogLevel.PERFORMANCE >= logLevel) {
289
+ return (message) => {
290
+ console.debug(
291
+ `
292
+ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(
293
+ `[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `
294
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
295
+ `
296
+ );
297
+ };
298
+ }
299
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
300
+ return (message) => {
301
+ console.debug(
302
+ `
303
+ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(
304
+ `[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `
305
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
306
+ `
307
+ );
308
+ };
309
+ }
310
+ if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
311
+ return (message) => {
312
+ console.debug(
313
+ `
314
+ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex("#bbbbbb")(
315
+ `[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `
316
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
317
+ `
318
+ );
319
+ };
320
+ }
321
+ return (message) => {
322
+ console.log(
323
+ `
324
+ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(
325
+ `[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `
326
+ )}${_chalk.bold.whiteBright(formatLogMessage(message))}
327
+ `
328
+ );
701
329
  };
702
330
  };
331
+ var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
332
+ var writePerformance = (message, config) => getLogFn(LogLevel.PERFORMANCE, config)(message);
333
+ var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
334
+ var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
335
+ var getStopwatch = (name) => {
336
+ const start = /* @__PURE__ */ new Date();
337
+ return () => {
338
+ writePerformance(
339
+ `The${name ? ` ${name}` : ""} process took ${formatDistanceToNow(start, {
340
+ includeSeconds: true
341
+ })} to complete`
342
+ );
343
+ };
344
+ };
345
+ var MAX_DEPTH = 10;
346
+ var formatLogMessage = (message, options = {}, depth2 = 0) => {
347
+ if (depth2 > MAX_DEPTH) {
348
+ return "<max depth>";
349
+ }
350
+ const prefix = options.prefix ?? "";
351
+ const skip = options.skip ?? [];
352
+ const sort = options.sort ?? true;
353
+ return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
354
+ ${message.sort(
355
+ sort ? (a, b) => !a && !b ? 0 : !a ? 1 : !b ? -1 : String(a).localeCompare(String(b)) : void 0
356
+ ).map(
357
+ (item, index) => ` ${prefix}> #${index} = ${formatLogMessage(
358
+ item,
359
+ { prefix: `${prefix}--`, skip, sort },
360
+ depth2 + 1
361
+ )}`
362
+ ).join("\n")}` : typeof message === "object" && message ? `
363
+ ${Object.keys(message).filter(
364
+ (key) => typeof key !== "string" || !skip.map((k) => k.toLowerCase().trim()).includes(key.toLowerCase().trim())
365
+ ).sort(
366
+ sort ? (a, b) => !a && !b ? 0 : !a ? 1 : !b ? -1 : String(a).localeCompare(String(b)) : void 0
367
+ ).map(
368
+ (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" && message[key] ? Object.keys(message[key]).filter(
369
+ (key2) => typeof key2 !== "string" || !skip.map((k) => k.toLowerCase().trim()).includes(key2.toLowerCase().trim())
370
+ ).length === 0 ? "{}" : formatLogMessage(
371
+ message[key],
372
+ { prefix: `${prefix}--`, skip, sort },
373
+ depth2 + 1
374
+ ) : message[key]}`
375
+ ).join("\n")}` : String(message);
376
+ };
377
+ var _isFunction = (value) => {
378
+ try {
379
+ return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
380
+ } catch {
381
+ return false;
382
+ }
383
+ };
703
384
 
704
- // ../build-tools/dist/chunk-KUEYIH7W.mjs
705
- init_esm_shims();
706
-
707
- // ../build-tools/dist/chunk-3VZVP5XV.mjs
708
- init_esm_shims();
709
-
710
- // ../build-tools/dist/chunk-ODQKLK6L.mjs
711
- init_esm_shims();
712
-
713
- // ../build-tools/dist/chunk-WBQAMGXK.mjs
714
- init_esm_shims();
715
-
716
- // ../build-tools/dist/chunk-UN3B7LBV.mjs
717
- init_esm_shims();
718
-
719
- // ../build-tools/dist/chunk-NXOOAAV5.mjs
720
- init_esm_shims();
721
-
722
- // ../build-tools/dist/chunk-7YKXR5JJ.mjs
385
+ // ../build-tools/src/plugins/swc.ts
723
386
  init_esm_shims();
724
387
  import { transform } from "@swc/core";
725
388
 
726
- // ../build-tools/dist/chunk-W7UFCEAQ.mjs
389
+ // ../build-tools/src/plugins/ts-resolve.ts
727
390
  init_esm_shims();
728
391
  import fs from "node:fs";
729
392
  import { builtinModules } from "node:module";
730
393
  import path from "node:path";
731
394
  import _resolve from "resolve";
732
395
 
733
- // ../build-tools/dist/chunk-VGLIZ2H3.mjs
396
+ // ../build-tools/src/plugins/type-definitions.ts
734
397
  init_esm_shims();
735
398
  import { stripIndents } from "@nx/devkit";
736
399
  import { relative } from "path";
737
400
 
738
- // ../config-tools/dist/get-config.js
739
- init_esm_shims();
740
-
741
- // ../config-tools/dist/chunk-ZXR7SS2X.js
742
- init_esm_shims();
743
-
744
- // ../config-tools/dist/chunk-J777WNCU.js
401
+ // ../build-tools/src/types.ts
745
402
  init_esm_shims();
746
403
 
747
- // ../config-tools/dist/chunk-IUVY5TOB.js
404
+ // ../build-tools/src/utilities/index.ts
748
405
  init_esm_shims();
749
406
 
750
- // ../config-tools/dist/chunk-LF3SAK2O.js
407
+ // ../build-tools/src/utilities/copy-assets.ts
751
408
  init_esm_shims();
409
+ import { CopyAssetsHandler } from "@nx/js/internal";
752
410
 
753
- // ../config-tools/dist/chunk-RUKM6FCF.js
754
- init_esm_shims();
755
- import { existsSync as existsSync5 } from "node:fs";
756
- import { join as join3 } from "node:path";
757
- var MAX_PATH_SEARCH_DEPTH = 30;
758
- var depth = 0;
759
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
760
- const _startPath = startPath ?? process.cwd();
761
- if (endDirectoryNames.some(
762
- (endDirName) => existsSync5(join3(_startPath, endDirName))
763
- )) {
764
- return _startPath;
765
- }
766
- if (endFileNames.some((endFileName) => existsSync5(join3(_startPath, endFileName)))) {
767
- return _startPath;
768
- }
769
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
770
- const parent = join3(_startPath, "..");
771
- return findFolderUp(parent, endFileNames, endDirectoryNames);
772
- }
773
- return void 0;
774
- }
775
-
776
- // ../config-tools/dist/chunk-V3GMJ4TX.js
411
+ // ../config-tools/src/utilities/correct-paths.ts
777
412
  init_esm_shims();
778
413
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
779
414
  function normalizeWindowsPath(input = "") {
780
415
  if (!input) {
781
416
  return input;
782
417
  }
783
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r3) => r3.toUpperCase());
418
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
784
419
  }
785
420
  var _UNC_REGEX = /^[/\\]{2}/;
786
421
  var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
787
422
  var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
788
- var correctPaths2 = function(path2) {
423
+ var correctPaths = function(path2) {
789
424
  if (!path2 || path2.length === 0) {
790
425
  return ".";
791
426
  }
@@ -814,7 +449,7 @@ var correctPaths2 = function(path2) {
814
449
  }
815
450
  return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
816
451
  };
817
- var joinPaths2 = function(...segments) {
452
+ var joinPaths = function(...segments) {
818
453
  let path2 = "";
819
454
  for (const seg of segments) {
820
455
  if (!seg) {
@@ -833,7 +468,7 @@ var joinPaths2 = function(...segments) {
833
468
  path2 += seg;
834
469
  }
835
470
  }
836
- return correctPaths2(path2);
471
+ return correctPaths(path2);
837
472
  };
838
473
  function normalizeString(path2, allowAboveRoot) {
839
474
  let res = "";
@@ -893,13 +528,47 @@ function normalizeString(path2, allowAboveRoot) {
893
528
  dots = -1;
894
529
  }
895
530
  }
896
- return res;
531
+ return res;
532
+ }
533
+ var isAbsolute = function(p) {
534
+ return _IS_ABSOLUTE_RE.test(p);
535
+ };
536
+
537
+ // ../build-tools/src/utilities/copy-assets.ts
538
+ import { glob } from "glob";
539
+ import { readFile, writeFile } from "node:fs/promises";
540
+
541
+ // ../build-tools/src/utilities/generate-package-json.ts
542
+ init_esm_shims();
543
+ import { calculateProjectBuildableDependencies } from "@nx/js/internal";
544
+
545
+ // ../config-tools/src/utilities/find-workspace-root.ts
546
+ init_esm_shims();
547
+
548
+ // ../config-tools/src/utilities/find-up.ts
549
+ init_esm_shims();
550
+ import { existsSync } from "node:fs";
551
+ import { join } from "node:path";
552
+ var MAX_PATH_SEARCH_DEPTH = 30;
553
+ var depth = 0;
554
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
555
+ const _startPath = startPath ?? process.cwd();
556
+ if (endDirectoryNames.some(
557
+ (endDirName) => existsSync(join(_startPath, endDirName))
558
+ )) {
559
+ return _startPath;
560
+ }
561
+ if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
562
+ return _startPath;
563
+ }
564
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
565
+ const parent = join(_startPath, "..");
566
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
567
+ }
568
+ return void 0;
897
569
  }
898
- var isAbsolute = function(p3) {
899
- return _IS_ABSOLUTE_RE.test(p3);
900
- };
901
570
 
902
- // ../config-tools/dist/chunk-LF3SAK2O.js
571
+ // ../config-tools/src/utilities/find-workspace-root.ts
903
572
  var rootFiles = [
904
573
  "storm-workspace.json",
905
574
  "storm-workspace.yaml",
@@ -944,11 +613,11 @@ var rootDirectories = [
944
613
  ];
945
614
  function findWorkspaceRootSafe(pathInsideMonorepo) {
946
615
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
947
- return correctPaths2(
616
+ return correctPaths(
948
617
  process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
949
618
  );
950
619
  }
951
- return correctPaths2(
620
+ return correctPaths(
952
621
  findFolderUp(
953
622
  pathInsideMonorepo ?? process.cwd(),
954
623
  rootFiles,
@@ -956,7 +625,7 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
956
625
  )
957
626
  );
958
627
  }
959
- function findWorkspaceRoot2(pathInsideMonorepo) {
628
+ function findWorkspaceRoot(pathInsideMonorepo) {
960
629
  const result = findWorkspaceRootSafe(pathInsideMonorepo);
961
630
  if (!result) {
962
631
  throw new Error(
@@ -970,1080 +639,756 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
970
639
  return result;
971
640
  }
972
641
 
973
- // ../config-tools/dist/chunk-D3FRXXDE.js
974
- init_esm_shims();
642
+ // ../build-tools/src/utilities/generate-package-json.ts
643
+ import { Glob } from "glob";
644
+ import { existsSync as existsSync2, readFileSync } from "node:fs";
645
+ import { readFile as readFile2 } from "node:fs/promises";
646
+ import {
647
+ createProjectGraphAsync,
648
+ readCachedProjectGraph,
649
+ readProjectsConfigurationFromProjectGraph
650
+ } from "nx/src/project-graph/project-graph";
975
651
 
976
- // ../config-tools/dist/chunk-5J2SS4QU.js
652
+ // ../build-tools/src/utilities/get-entry-points.ts
977
653
  init_esm_shims();
978
- var DEFAULT_COLOR_CONFIG = {
979
- light: {
980
- background: "#fafafa",
981
- foreground: "#1d1e22",
982
- brand: "#1fb2a6",
983
- alternate: "#db2777",
984
- discovery: "#5C4EE5",
985
- success: "#087f5b",
986
- info: "#0550ae",
987
- debug: "#8afafc",
988
- warning: "#e3b341",
989
- danger: "#D8314A",
990
- fatal: "#51070f",
991
- performance: "#13c302",
992
- link: "#3fa6ff",
993
- positive: "#22c55e",
994
- negative: "#dc2626",
995
- gradient: ["#1fb2a6", "#db2777", "#5C4EE5"]
996
- },
997
- dark: {
998
- background: "#1e2124",
999
- foreground: "#cbd5e1",
1000
- brand: "#2dd4bf",
1001
- alternate: "#db2777",
1002
- discovery: "#818cf8",
1003
- success: "#10b981",
1004
- info: "#58a6ff",
1005
- debug: "#8afafc",
1006
- warning: "#f3d371",
1007
- danger: "#D8314A",
1008
- fatal: "#a40e26",
1009
- performance: "#80fd74",
1010
- link: "#3fa6ff",
1011
- positive: "#22c55e",
1012
- negative: "#dc2626",
1013
- gradient: ["#1fb2a6", "#db2777", "#818cf8"]
1014
- }
1015
- };
1016
654
 
1017
- // ../config-tools/dist/chunk-HVVJHTFS.js
655
+ // ../config-tools/src/config-file/get-config-file.ts
1018
656
  init_esm_shims();
1019
- import chalk2 from "chalk";
1020
- var chalkDefault = {
1021
- hex: (_3) => (message) => message,
1022
- bgHex: (_3) => ({
1023
- whiteBright: (message) => message,
1024
- white: (message) => message
1025
- }),
1026
- white: (message) => message,
1027
- whiteBright: (message) => message,
1028
- gray: (message) => message,
1029
- bold: {
1030
- hex: (_3) => (message) => message,
1031
- bgHex: (_3) => ({
1032
- whiteBright: (message) => message,
1033
- white: (message) => message
1034
- }),
1035
- whiteBright: (message) => message,
1036
- white: (message) => message
1037
- },
1038
- dim: {
1039
- hex: (_3) => (message) => message,
1040
- gray: (message) => message
1041
- }
1042
- };
1043
- var getChalk = () => {
1044
- let _chalk = chalk2;
1045
- if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
1046
- _chalk = chalkDefault;
1047
- }
1048
- return _chalk;
1049
- };
657
+ import { loadConfig } from "c12";
658
+ import defu from "defu";
1050
659
 
1051
- // ../config-tools/dist/chunk-ZFNAUMQS.js
660
+ // ../config-tools/src/utilities/get-default-config.ts
1052
661
  init_esm_shims();
1053
662
 
1054
- // ../config-tools/dist/chunk-G2MK47WL.js
663
+ // ../config/src/index.ts
1055
664
  init_esm_shims();
1056
- function isUnicodeSupported2() {
1057
- if (process.platform !== "win32") {
1058
- return process.env.TERM !== "linux";
1059
- }
1060
- return Boolean(process.env.WT_SESSION) || // Windows Terminal
1061
- Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
1062
- process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
1063
- 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";
1064
- }
1065
665
 
1066
- // ../config-tools/dist/chunk-RALMUN5C.js
666
+ // ../config/src/constants.ts
1067
667
  init_esm_shims();
1068
- var LogLevel2 = {
1069
- SILENT: 0,
1070
- FATAL: 10,
1071
- ERROR: 20,
1072
- WARN: 30,
1073
- SUCCESS: 35,
1074
- INFO: 40,
1075
- PERFORMANCE: 50,
1076
- DEBUG: 60,
1077
- TRACE: 70,
1078
- ALL: 100
1079
- };
1080
- var LogLevelLabel2 = {
1081
- SILENT: "silent",
1082
- FATAL: "fatal",
1083
- ERROR: "error",
1084
- WARN: "warn",
1085
- SUCCESS: "success",
1086
- INFO: "info",
1087
- PERFORMANCE: "performance",
1088
- DEBUG: "debug",
1089
- TRACE: "trace",
1090
- ALL: "all"
1091
- };
668
+ var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
669
+ var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
670
+ var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
671
+ var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
672
+ var STORM_DEFAULT_LICENSE = "Apache-2.0";
673
+ var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
674
+ var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
675
+ var STORM_DEFAULT_RELEASE_FOOTER = `
676
+ 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.
1092
677
 
1093
- // ../config-tools/dist/chunk-ZFNAUMQS.js
1094
- var useIcon2 = (c3, fallback) => isUnicodeSupported2() ? c3 : fallback;
1095
- var CONSOLE_ICONS2 = {
1096
- [LogLevelLabel2.ERROR]: useIcon2("\u2718", "\xD7"),
1097
- [LogLevelLabel2.FATAL]: useIcon2("\u{1F571}", "\xD7"),
1098
- [LogLevelLabel2.WARN]: useIcon2("\u26A0", "\u203C"),
1099
- [LogLevelLabel2.INFO]: useIcon2("\u2139", "i"),
1100
- [LogLevelLabel2.PERFORMANCE]: useIcon2("\u23F1", "\u23F1"),
1101
- [LogLevelLabel2.SUCCESS]: useIcon2("\u2714", "\u221A"),
1102
- [LogLevelLabel2.DEBUG]: useIcon2("\u{1F6E0}", "D"),
1103
- [LogLevelLabel2.TRACE]: useIcon2("\u2699", "T"),
1104
- [LogLevelLabel2.ALL]: useIcon2("\u2709", "\u2192")
1105
- };
678
+ Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
679
+
680
+ 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!
681
+ `;
682
+ var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
683
+ var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
1106
684
 
1107
- // ../config-tools/dist/chunk-JZAYHDV3.js
685
+ // ../config/src/define-config.ts
1108
686
  init_esm_shims();
1109
- var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
1110
- return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
1111
- };
1112
687
 
1113
- // ../config-tools/dist/chunk-SXPH7ILL.js
688
+ // ../config/src/schema.ts
689
+ init_esm_shims();
690
+ import * as z from "zod/v4/mini";
691
+ var schemaRegistry = z.registry();
692
+ var colorSchema = z.string().check(
693
+ z.length(7),
694
+ z.toLowerCase(),
695
+ z.regex(/^#([0-9a-f]{3}){1,2}$/i),
696
+ z.trim()
697
+ );
698
+ schemaRegistry.add(colorSchema, {
699
+ description: "A base schema for describing the format of colors"
700
+ });
701
+ var darkColorSchema = z._default(colorSchema, "#1e2124");
702
+ schemaRegistry.add(darkColorSchema, {
703
+ description: "The dark background color of the workspace"
704
+ });
705
+ var lightColorSchema = z._default(colorSchema, "#cbd5e1");
706
+ schemaRegistry.add(lightColorSchema, {
707
+ description: "The light background color of the workspace"
708
+ });
709
+ var brandColorSchema = z._default(colorSchema, "#1fb2a6");
710
+ schemaRegistry.add(brandColorSchema, {
711
+ description: "The primary brand specific color of the workspace"
712
+ });
713
+ var alternateColorSchema = z.optional(colorSchema);
714
+ schemaRegistry.add(alternateColorSchema, {
715
+ description: "The alternate brand specific color of the workspace"
716
+ });
717
+ var accentColorSchema = z.optional(colorSchema);
718
+ schemaRegistry.add(accentColorSchema, {
719
+ description: "The secondary brand specific color of the workspace"
720
+ });
721
+ var linkColorSchema = z._default(colorSchema, "#3fa6ff");
722
+ schemaRegistry.add(linkColorSchema, {
723
+ description: "The color used to display hyperlink text"
724
+ });
725
+ var discoveryColorSchema = z._default(colorSchema, "#818cf8");
726
+ schemaRegistry.add(discoveryColorSchema, {
727
+ description: "The second brand specific color of the workspace"
728
+ });
729
+ var successColorSchema = z._default(colorSchema, "#45b27e");
730
+ schemaRegistry.add(successColorSchema, {
731
+ description: "The success color of the workspace"
732
+ });
733
+ var infoColorSchema = z._default(colorSchema, "#38bdf8");
734
+ schemaRegistry.add(infoColorSchema, {
735
+ description: "The informational color of the workspace"
736
+ });
737
+ var debugColorSchema = z._default(colorSchema, "#8afafc");
738
+ schemaRegistry.add(debugColorSchema, {
739
+ description: "The debug color of the workspace"
740
+ });
741
+ var warningColorSchema = z._default(colorSchema, "#f3d371");
742
+ schemaRegistry.add(warningColorSchema, {
743
+ description: "The warning color of the workspace"
744
+ });
745
+ var dangerColorSchema = z._default(colorSchema, "#d8314a");
746
+ schemaRegistry.add(dangerColorSchema, {
747
+ description: "The danger color of the workspace"
748
+ });
749
+ var fatalColorSchema = z.optional(colorSchema);
750
+ schemaRegistry.add(fatalColorSchema, {
751
+ description: "The fatal color of the workspace"
752
+ });
753
+ var performanceColorSchema = z._default(colorSchema, "#80fd74");
754
+ schemaRegistry.add(performanceColorSchema, {
755
+ description: "The performance color of the workspace"
756
+ });
757
+ var positiveColorSchema = z._default(colorSchema, "#4ade80");
758
+ schemaRegistry.add(positiveColorSchema, {
759
+ description: "The positive number color of the workspace"
760
+ });
761
+ var negativeColorSchema = z._default(colorSchema, "#ef4444");
762
+ schemaRegistry.add(negativeColorSchema, {
763
+ description: "The negative number color of the workspace"
764
+ });
765
+ var gradientStopsSchema = z.optional(z.array(colorSchema));
766
+ schemaRegistry.add(gradientStopsSchema, {
767
+ description: "The color stops for the base gradient color pattern used in the workspace"
768
+ });
769
+ var darkColorsSchema = z.object({
770
+ foreground: lightColorSchema,
771
+ background: darkColorSchema,
772
+ brand: brandColorSchema,
773
+ alternate: alternateColorSchema,
774
+ accent: accentColorSchema,
775
+ link: linkColorSchema,
776
+ discovery: discoveryColorSchema,
777
+ success: successColorSchema,
778
+ info: infoColorSchema,
779
+ debug: debugColorSchema,
780
+ warning: warningColorSchema,
781
+ danger: dangerColorSchema,
782
+ fatal: fatalColorSchema,
783
+ performance: performanceColorSchema,
784
+ positive: positiveColorSchema,
785
+ negative: negativeColorSchema,
786
+ gradient: gradientStopsSchema
787
+ });
788
+ var lightColorsSchema = z.object({
789
+ foreground: darkColorSchema,
790
+ background: lightColorSchema,
791
+ brand: brandColorSchema,
792
+ alternate: alternateColorSchema,
793
+ accent: accentColorSchema,
794
+ link: linkColorSchema,
795
+ discovery: discoveryColorSchema,
796
+ success: successColorSchema,
797
+ info: infoColorSchema,
798
+ debug: debugColorSchema,
799
+ warning: warningColorSchema,
800
+ danger: dangerColorSchema,
801
+ fatal: fatalColorSchema,
802
+ performance: performanceColorSchema,
803
+ positive: positiveColorSchema,
804
+ negative: negativeColorSchema,
805
+ gradient: gradientStopsSchema
806
+ });
807
+ var multiColorsSchema = z.object({
808
+ dark: darkColorsSchema,
809
+ light: lightColorsSchema
810
+ });
811
+ var singleColorsSchema = z.object({
812
+ dark: darkColorSchema,
813
+ light: lightColorSchema,
814
+ brand: brandColorSchema,
815
+ alternate: alternateColorSchema,
816
+ accent: accentColorSchema,
817
+ link: linkColorSchema,
818
+ discovery: discoveryColorSchema,
819
+ success: successColorSchema,
820
+ info: infoColorSchema,
821
+ debug: debugColorSchema,
822
+ warning: warningColorSchema,
823
+ danger: dangerColorSchema,
824
+ fatal: fatalColorSchema,
825
+ performance: performanceColorSchema,
826
+ positive: positiveColorSchema,
827
+ negative: negativeColorSchema,
828
+ gradient: gradientStopsSchema
829
+ });
830
+ var registryUrlConfigSchema = z.optional(z.url());
831
+ schemaRegistry.add(registryUrlConfigSchema, {
832
+ description: "A remote registry URL used to publish distributable packages"
833
+ });
834
+ var registrySchema = z._default(
835
+ z.object({
836
+ github: registryUrlConfigSchema,
837
+ npm: registryUrlConfigSchema,
838
+ cargo: registryUrlConfigSchema,
839
+ cyclone: registryUrlConfigSchema,
840
+ container: registryUrlConfigSchema
841
+ }),
842
+ {}
843
+ );
844
+ schemaRegistry.add(registrySchema, {
845
+ description: "A list of remote registry URLs used by Storm Software"
846
+ });
847
+ var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
848
+ schemaRegistry.add(colorsSchema, {
849
+ description: "Colors used for various workspace elements"
850
+ });
851
+ var themeColorsSchema = z.record(
852
+ z.union([z.union([z.literal("base"), z.string()]), z.string()]),
853
+ colorsSchema
854
+ );
855
+ schemaRegistry.add(themeColorsSchema, {
856
+ description: "Storm theme config values used for styling various package elements"
857
+ });
858
+ var extendsSchema = z.optional(
859
+ z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
860
+ );
861
+ schemaRegistry.add(extendsSchema, {
862
+ 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."
863
+ });
864
+ var workspaceBotNameSchema = z.string().check(z.trim());
865
+ schemaRegistry.add(workspaceBotNameSchema, {
866
+ description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
867
+ });
868
+ var workspaceBotEmailSchema = z.string().check(z.trim());
869
+ schemaRegistry.add(workspaceBotEmailSchema, {
870
+ description: "The email of the workspace bot"
871
+ });
872
+ var workspaceBotSchema = z.object({
873
+ name: workspaceBotNameSchema,
874
+ email: workspaceBotEmailSchema
875
+ });
876
+ schemaRegistry.add(workspaceBotSchema, {
877
+ description: "The workspace's bot user's config used to automated various operations tasks"
878
+ });
879
+ var workspaceReleaseBannerUrlSchema = z.optional(
880
+ z.string().check(z.trim(), z.url())
881
+ );
882
+ schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
883
+ description: "A URL to a banner image used to display the workspace's release"
884
+ });
885
+ var workspaceReleaseBannerAltSchema = z._default(
886
+ z.string().check(z.trim()),
887
+ STORM_DEFAULT_BANNER_ALT
888
+ );
889
+ schemaRegistry.add(workspaceReleaseBannerAltSchema, {
890
+ description: "The alt text for the workspace's release banner image"
891
+ });
892
+ var workspaceReleaseBannerSchema = z.object({
893
+ url: workspaceReleaseBannerUrlSchema,
894
+ alt: workspaceReleaseBannerAltSchema
895
+ });
896
+ schemaRegistry.add(workspaceReleaseBannerSchema, {
897
+ description: "The workspace's banner image used during the release process"
898
+ });
899
+ var workspaceReleaseHeaderSchema = z.optional(
900
+ z.string().check(z.trim())
901
+ );
902
+ schemaRegistry.add(workspaceReleaseHeaderSchema, {
903
+ description: "A header message appended to the start of the workspace's release notes"
904
+ });
905
+ var workspaceReleaseFooterSchema = z.optional(
906
+ z.string().check(z.trim())
907
+ );
908
+ schemaRegistry.add(workspaceReleaseFooterSchema, {
909
+ description: "A footer message appended to the end of the workspace's release notes"
910
+ });
911
+ var workspaceReleaseSchema = z.object({
912
+ banner: z.union([
913
+ workspaceReleaseBannerSchema,
914
+ z.string().check(z.trim(), z.url())
915
+ ]),
916
+ header: workspaceReleaseHeaderSchema,
917
+ footer: workspaceReleaseFooterSchema
918
+ });
919
+ schemaRegistry.add(workspaceReleaseSchema, {
920
+ description: "The workspace's release config used during the release process"
921
+ });
922
+ var workspaceSocialsTwitterSchema = z.optional(
923
+ z.string().check(z.trim())
924
+ );
925
+ schemaRegistry.add(workspaceSocialsTwitterSchema, {
926
+ description: "A Twitter/X account associated with the organization/project"
927
+ });
928
+ var workspaceSocialsDiscordSchema = z.optional(
929
+ z.string().check(z.trim())
930
+ );
931
+ schemaRegistry.add(workspaceSocialsDiscordSchema, {
932
+ description: "A Discord account associated with the organization/project"
933
+ });
934
+ var workspaceSocialsTelegramSchema = z.optional(
935
+ z.string().check(z.trim())
936
+ );
937
+ schemaRegistry.add(workspaceSocialsTelegramSchema, {
938
+ description: "A Telegram account associated with the organization/project"
939
+ });
940
+ var workspaceSocialsSlackSchema = z.optional(
941
+ z.string().check(z.trim())
942
+ );
943
+ schemaRegistry.add(workspaceSocialsSlackSchema, {
944
+ description: "A Slack account associated with the organization/project"
945
+ });
946
+ var workspaceSocialsMediumSchema = z.optional(
947
+ z.string().check(z.trim())
948
+ );
949
+ schemaRegistry.add(workspaceSocialsMediumSchema, {
950
+ description: "A Medium account associated with the organization/project"
951
+ });
952
+ var workspaceSocialsGithubSchema = z.optional(
953
+ z.string().check(z.trim())
954
+ );
955
+ schemaRegistry.add(workspaceSocialsGithubSchema, {
956
+ description: "A GitHub account associated with the organization/project"
957
+ });
958
+ var workspaceSocialsSchema = z.object({
959
+ twitter: workspaceSocialsTwitterSchema,
960
+ discord: workspaceSocialsDiscordSchema,
961
+ telegram: workspaceSocialsTelegramSchema,
962
+ slack: workspaceSocialsSlackSchema,
963
+ medium: workspaceSocialsMediumSchema,
964
+ github: workspaceSocialsGithubSchema
965
+ });
966
+ schemaRegistry.add(workspaceSocialsSchema, {
967
+ description: "The workspace's account config used to store various social media links"
968
+ });
969
+ var workspaceDirectoryCacheSchema = z.optional(
970
+ z.string().check(z.trim())
971
+ );
972
+ schemaRegistry.add(workspaceDirectoryCacheSchema, {
973
+ description: "The directory used to store the environment's cached file data"
974
+ });
975
+ var workspaceDirectoryDataSchema = z.optional(
976
+ z.string().check(z.trim())
977
+ );
978
+ schemaRegistry.add(workspaceDirectoryDataSchema, {
979
+ description: "The directory used to store the environment's data files"
980
+ });
981
+ var workspaceDirectoryConfigSchema = z.optional(
982
+ z.string().check(z.trim())
983
+ );
984
+ schemaRegistry.add(workspaceDirectoryConfigSchema, {
985
+ description: "The directory used to store the environment's configuration files"
986
+ });
987
+ var workspaceDirectoryTempSchema = z.optional(
988
+ z.string().check(z.trim())
989
+ );
990
+ schemaRegistry.add(workspaceDirectoryTempSchema, {
991
+ description: "The directory used to store the environment's temp files"
992
+ });
993
+ var workspaceDirectoryLogSchema = z.optional(
994
+ z.string().check(z.trim())
995
+ );
996
+ schemaRegistry.add(workspaceDirectoryLogSchema, {
997
+ description: "The directory used to store the environment's log files"
998
+ });
999
+ var workspaceDirectoryBuildSchema = z._default(
1000
+ z.string().check(z.trim()),
1001
+ "dist"
1002
+ );
1003
+ schemaRegistry.add(workspaceDirectoryBuildSchema, {
1004
+ description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
1005
+ });
1006
+ var workspaceDirectorySchema = z.object({
1007
+ cache: workspaceDirectoryCacheSchema,
1008
+ data: workspaceDirectoryDataSchema,
1009
+ config: workspaceDirectoryConfigSchema,
1010
+ temp: workspaceDirectoryTempSchema,
1011
+ log: workspaceDirectoryLogSchema,
1012
+ build: workspaceDirectoryBuildSchema
1013
+ });
1014
+ schemaRegistry.add(workspaceDirectorySchema, {
1015
+ description: "Various directories used by the workspace to store data, cache, and configuration files"
1016
+ });
1017
+ var variantSchema = z._default(
1018
+ z.enum(["minimal", "monorepo"]),
1019
+ "monorepo"
1020
+ );
1021
+ schemaRegistry.add(variantSchema, {
1022
+ description: "The variant of the workspace. This can be used to enable or disable certain features or configurations."
1023
+ });
1024
+ var errorCodesFileSchema = z._default(
1025
+ z.string().check(z.trim()),
1026
+ STORM_DEFAULT_ERROR_CODES_FILE
1027
+ );
1028
+ schemaRegistry.add(errorCodesFileSchema, {
1029
+ description: "The path to the workspace's error codes JSON file"
1030
+ });
1031
+ var errorUrlSchema = z.optional(z.url());
1032
+ schemaRegistry.add(errorUrlSchema, {
1033
+ description: "A URL to a page that looks up the workspace's error messages given a specific error code"
1034
+ });
1035
+ var errorSchema = z.object({
1036
+ codesFile: errorCodesFileSchema,
1037
+ url: errorUrlSchema
1038
+ });
1039
+ schemaRegistry.add(errorSchema, {
1040
+ description: "The workspace's error config used when creating error details during a system error"
1041
+ });
1042
+ var organizationNameSchema = z.optional(
1043
+ z.string().check(z.trim(), z.toLowerCase())
1044
+ );
1045
+ schemaRegistry.add(organizationNameSchema, {
1046
+ description: "The name of the organization"
1047
+ });
1048
+ var organizationDescriptionSchema = z.optional(
1049
+ z.string().check(z.trim())
1050
+ );
1051
+ schemaRegistry.add(organizationDescriptionSchema, {
1052
+ description: "A description of the organization"
1053
+ });
1054
+ var organizationLogoSchema = z.optional(z.url());
1055
+ schemaRegistry.add(organizationLogoSchema, {
1056
+ description: "A URL to the organization's logo image"
1057
+ });
1058
+ var organizationIconSchema = z.optional(z.url());
1059
+ schemaRegistry.add(organizationIconSchema, {
1060
+ description: "A URL to the organization's icon image"
1061
+ });
1062
+ var organizationUrlSchema = z.optional(z.url());
1063
+ schemaRegistry.add(organizationUrlSchema, {
1064
+ description: "A URL to a page that provides more information about the organization"
1065
+ });
1066
+ var organizationSchema = z.object({
1067
+ name: organizationNameSchema,
1068
+ description: organizationDescriptionSchema,
1069
+ logo: organizationLogoSchema,
1070
+ icon: organizationIconSchema,
1071
+ url: organizationUrlSchema
1072
+ });
1073
+ schemaRegistry.add(organizationSchema, {
1074
+ description: "The workspace's organization details"
1075
+ });
1076
+ var schemaNameSchema = z._default(
1077
+ z.string().check(z.trim(), z.toLowerCase()),
1078
+ "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
1079
+ );
1080
+ schemaRegistry.add(schemaNameSchema, {
1081
+ description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
1082
+ });
1083
+ var nameSchema = z.string().check(z.trim(), z.toLowerCase());
1084
+ schemaRegistry.add(nameSchema, {
1085
+ description: "The name of the workspace/project/service/package/scope using this configuration"
1086
+ });
1087
+ var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
1088
+ schemaRegistry.add(namespaceSchema, {
1089
+ description: "The namespace of the workspace/project/service/package/scope using this configuration"
1090
+ });
1091
+ var orgSchema = z.union([
1092
+ organizationSchema,
1093
+ z.string().check(z.trim(), z.toLowerCase())
1094
+ ]);
1095
+ schemaRegistry.add(orgSchema, {
1096
+ description: "The organization of the workspace. This can be a string or an object containing the organization's details"
1097
+ });
1098
+ var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
1099
+ schemaRegistry.add(repositorySchema, {
1100
+ description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
1101
+ });
1102
+ var licenseSchema = z._default(
1103
+ z.string().check(z.trim()),
1104
+ "Apache-2.0"
1105
+ );
1106
+ schemaRegistry.add(licenseSchema, {
1107
+ description: "The license type of the package"
1108
+ });
1109
+ var homepageSchema = z.optional(z.url());
1110
+ schemaRegistry.add(homepageSchema, {
1111
+ description: "The homepage of the workspace"
1112
+ });
1113
+ var docsSchema = z.optional(z.url());
1114
+ schemaRegistry.add(docsSchema, {
1115
+ description: "The documentation site for the workspace"
1116
+ });
1117
+ var portalSchema = z.optional(z.url());
1118
+ schemaRegistry.add(portalSchema, {
1119
+ description: "The development portal site for the workspace"
1120
+ });
1121
+ var licensingSchema = z.optional(z.url());
1122
+ schemaRegistry.add(licensingSchema, {
1123
+ description: "The licensing site for the workspace"
1124
+ });
1125
+ var contactSchema = z.optional(z.url());
1126
+ schemaRegistry.add(contactSchema, {
1127
+ description: "The contact site for the workspace"
1128
+ });
1129
+ var supportSchema = z.optional(z.url());
1130
+ schemaRegistry.add(supportSchema, {
1131
+ description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
1132
+ });
1133
+ var branchSchema = z._default(
1134
+ z.string().check(z.trim(), z.toLowerCase()),
1135
+ "main"
1136
+ );
1137
+ schemaRegistry.add(branchSchema, {
1138
+ description: "The branch of the workspace"
1139
+ });
1140
+ var preidSchema = z.optional(
1141
+ z.string().check(z.trim(), z.toLowerCase())
1142
+ );
1143
+ schemaRegistry.add(preidSchema, {
1144
+ description: "A tag specifying the version pre-release identifier"
1145
+ });
1146
+ var ownerSchema = z.optional(
1147
+ z.string().check(z.trim(), z.toLowerCase())
1148
+ );
1149
+ schemaRegistry.add(ownerSchema, {
1150
+ description: "The owner of the package"
1151
+ });
1152
+ var modeSchema = z._default(
1153
+ z.enum(["development", "test", "production"]).check(z.trim(), z.toLowerCase()),
1154
+ "production"
1155
+ );
1156
+ schemaRegistry.add(modeSchema, {
1157
+ description: "The current runtime environment mode for the package"
1158
+ });
1159
+ var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
1160
+ schemaRegistry.add(workspaceRootSchema, {
1161
+ description: "The root directory of the workspace"
1162
+ });
1163
+ var skipCacheSchema = z._default(z.boolean(), false);
1164
+ schemaRegistry.add(skipCacheSchema, {
1165
+ description: "Should all known types of workspace caching be skipped?"
1166
+ });
1167
+ var packageManagerSchema = z._default(
1168
+ z.enum(["npm", "yarn", "pnpm", "bun"]),
1169
+ "npm"
1170
+ );
1171
+ schemaRegistry.add(packageManagerSchema, {
1172
+ description: "The JavaScript/TypeScript package manager used by the repository"
1173
+ });
1174
+ var timezoneSchema = z._default(
1175
+ z.string().check(z.trim()),
1176
+ "America/New_York"
1177
+ );
1178
+ schemaRegistry.add(timezoneSchema, {
1179
+ description: "The default timezone of the workspace"
1180
+ });
1181
+ var localeSchema = z._default(z.string().check(z.trim()), "en-US");
1182
+ schemaRegistry.add(localeSchema, {
1183
+ description: "The default locale of the workspace"
1184
+ });
1185
+ var logLevelSchema = z._default(
1186
+ z.enum([
1187
+ "silent",
1188
+ "fatal",
1189
+ "error",
1190
+ "warn",
1191
+ "success",
1192
+ "info",
1193
+ "performance",
1194
+ "debug",
1195
+ "trace",
1196
+ "all"
1197
+ ]),
1198
+ "info"
1199
+ );
1200
+ schemaRegistry.add(logLevelSchema, {
1201
+ 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`)."
1202
+ });
1203
+ var skipConfigLoggingSchema = z._default(z.boolean(), true);
1204
+ schemaRegistry.add(skipConfigLoggingSchema, {
1205
+ description: "Should the logging of the current Storm Workspace configuration be skipped?"
1206
+ });
1207
+ var configFileSchema = z._default(
1208
+ z.nullable(z.string().check(z.trim())),
1209
+ null
1210
+ );
1211
+ schemaRegistry.add(configFileSchema, {
1212
+ description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
1213
+ });
1214
+ var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
1215
+ schemaRegistry.add(extensionsSchema, {
1216
+ description: "Configuration of each used extension"
1217
+ });
1218
+ var workspaceConfigSchema = z.object({
1219
+ $schema: schemaNameSchema,
1220
+ extends: extendsSchema,
1221
+ name: nameSchema,
1222
+ variant: variantSchema,
1223
+ namespace: namespaceSchema,
1224
+ organization: orgSchema,
1225
+ repository: repositorySchema,
1226
+ license: licenseSchema,
1227
+ homepage: homepageSchema,
1228
+ docs: docsSchema,
1229
+ portal: portalSchema,
1230
+ licensing: licensingSchema,
1231
+ contact: contactSchema,
1232
+ support: supportSchema,
1233
+ branch: branchSchema,
1234
+ preid: preidSchema,
1235
+ owner: ownerSchema,
1236
+ bot: workspaceBotSchema,
1237
+ release: workspaceReleaseSchema,
1238
+ socials: workspaceSocialsSchema,
1239
+ error: errorSchema,
1240
+ mode: modeSchema,
1241
+ workspaceRoot: workspaceRootSchema,
1242
+ skipCache: skipCacheSchema,
1243
+ directories: workspaceDirectorySchema,
1244
+ packageManager: packageManagerSchema,
1245
+ timezone: timezoneSchema,
1246
+ locale: localeSchema,
1247
+ logLevel: logLevelSchema,
1248
+ skipConfigLogging: skipConfigLoggingSchema,
1249
+ registry: registrySchema,
1250
+ configFile: configFileSchema,
1251
+ colors: z.union([colorsSchema, themeColorsSchema]),
1252
+ extensions: extensionsSchema
1253
+ });
1254
+ schemaRegistry.add(extensionsSchema, {
1255
+ 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."
1256
+ });
1257
+
1258
+ // ../config/src/types.ts
1114
1259
  init_esm_shims();
1115
- var getLogLevel2 = (label) => {
1116
- switch (label) {
1117
- case "all":
1118
- return LogLevel2.ALL;
1119
- case "trace":
1120
- return LogLevel2.TRACE;
1121
- case "debug":
1122
- return LogLevel2.DEBUG;
1123
- case "performance":
1124
- return LogLevel2.PERFORMANCE;
1125
- case "info":
1126
- return LogLevel2.INFO;
1127
- case "warn":
1128
- return LogLevel2.WARN;
1129
- case "error":
1130
- return LogLevel2.ERROR;
1131
- case "fatal":
1132
- return LogLevel2.FATAL;
1133
- case "silent":
1134
- return LogLevel2.SILENT;
1135
- default:
1136
- return LogLevel2.INFO;
1137
- }
1138
- };
1139
- var getLogLevelLabel2 = (logLevel = LogLevel2.INFO) => {
1140
- if (logLevel >= LogLevel2.ALL) {
1141
- return LogLevelLabel2.ALL;
1142
- }
1143
- if (logLevel >= LogLevel2.TRACE) {
1144
- return LogLevelLabel2.TRACE;
1145
- }
1146
- if (logLevel >= LogLevel2.DEBUG) {
1147
- return LogLevelLabel2.DEBUG;
1148
- }
1149
- if (logLevel >= LogLevel2.PERFORMANCE) {
1150
- return LogLevelLabel2.PERFORMANCE;
1151
- }
1152
- if (logLevel >= LogLevel2.INFO) {
1153
- return LogLevelLabel2.INFO;
1154
- }
1155
- if (logLevel >= LogLevel2.WARN) {
1156
- return LogLevelLabel2.WARN;
1157
- }
1158
- if (logLevel >= LogLevel2.ERROR) {
1159
- return LogLevelLabel2.ERROR;
1160
- }
1161
- if (logLevel >= LogLevel2.FATAL) {
1162
- return LogLevelLabel2.FATAL;
1163
- }
1164
- if (logLevel <= LogLevel2.SILENT) {
1165
- return LogLevelLabel2.SILENT;
1166
- }
1167
- return LogLevelLabel2.INFO;
1168
- };
1260
+ var COLOR_KEYS = [
1261
+ "dark",
1262
+ "light",
1263
+ "base",
1264
+ "brand",
1265
+ "alternate",
1266
+ "accent",
1267
+ "link",
1268
+ "success",
1269
+ "discovery",
1270
+ "info",
1271
+ "warning",
1272
+ "danger",
1273
+ "fatal",
1274
+ "performance",
1275
+ "positive",
1276
+ "negative"
1277
+ ];
1169
1278
 
1170
- // ../config-tools/dist/chunk-D3FRXXDE.js
1171
- var daysInYear = 365.2425;
1172
- var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
1173
- var minTime = -maxTime;
1174
- var minutesInMonth = 43200;
1175
- var minutesInDay = 1440;
1176
- var secondsInHour = 3600;
1177
- var secondsInDay = secondsInHour * 24;
1178
- var secondsInWeek = secondsInDay * 7;
1179
- var secondsInYear = secondsInDay * daysInYear;
1180
- var secondsInMonth = secondsInYear / 12;
1181
- var secondsInQuarter = secondsInMonth * 3;
1182
- var constructFromSymbol = Symbol.for("constructDateFrom");
1183
- function constructFrom(date, value) {
1184
- if (typeof date === "function") return date(value);
1185
- if (date && typeof date === "object" && constructFromSymbol in date)
1186
- return date[constructFromSymbol](value);
1187
- if (date instanceof Date) return new date.constructor(value);
1188
- return new Date(value);
1189
- }
1190
- function constructNow(date) {
1191
- return constructFrom(date, Date.now());
1192
- }
1193
- var formatDistanceLocale = {
1194
- lessThanXSeconds: {
1195
- one: "less than a second",
1196
- other: "less than {{count}} seconds"
1197
- },
1198
- xSeconds: {
1199
- one: "1 second",
1200
- other: "{{count}} seconds"
1201
- },
1202
- halfAMinute: "half a minute",
1203
- lessThanXMinutes: {
1204
- one: "less than a minute",
1205
- other: "less than {{count}} minutes"
1206
- },
1207
- xMinutes: {
1208
- one: "1 minute",
1209
- other: "{{count}} minutes"
1210
- },
1211
- aboutXHours: {
1212
- one: "about 1 hour",
1213
- other: "about {{count}} hours"
1214
- },
1215
- xHours: {
1216
- one: "1 hour",
1217
- other: "{{count}} hours"
1218
- },
1219
- xDays: {
1220
- one: "1 day",
1221
- other: "{{count}} days"
1222
- },
1223
- aboutXWeeks: {
1224
- one: "about 1 week",
1225
- other: "about {{count}} weeks"
1226
- },
1227
- xWeeks: {
1228
- one: "1 week",
1229
- other: "{{count}} weeks"
1230
- },
1231
- aboutXMonths: {
1232
- one: "about 1 month",
1233
- other: "about {{count}} months"
1234
- },
1235
- xMonths: {
1236
- one: "1 month",
1237
- other: "{{count}} months"
1238
- },
1239
- aboutXYears: {
1240
- one: "about 1 year",
1241
- other: "about {{count}} years"
1242
- },
1243
- xYears: {
1244
- one: "1 year",
1245
- other: "{{count}} years"
1246
- },
1247
- overXYears: {
1248
- one: "over 1 year",
1249
- other: "over {{count}} years"
1250
- },
1251
- almostXYears: {
1252
- one: "almost 1 year",
1253
- other: "almost {{count}} years"
1254
- }
1255
- };
1256
- var formatDistance = (token, count, options) => {
1257
- let result;
1258
- const tokenValue = formatDistanceLocale[token];
1259
- if (typeof tokenValue === "string") {
1260
- result = tokenValue;
1261
- } else if (count === 1) {
1262
- result = tokenValue.one;
1263
- } else {
1264
- result = tokenValue.other.replace("{{count}}", count.toString());
1265
- }
1266
- if (options?.addSuffix) {
1267
- if (options.comparison && options.comparison > 0) {
1268
- return "in " + result;
1269
- } else {
1270
- return result + " ago";
1279
+ // ../config-tools/src/utilities/get-default-config.ts
1280
+ import { existsSync as existsSync3 } from "node:fs";
1281
+ import { readFile as readFile3 } from "node:fs/promises";
1282
+ import { join as join2 } from "node:path";
1283
+ async function getPackageJsonConfig(root) {
1284
+ let license = STORM_DEFAULT_LICENSE;
1285
+ let homepage = void 0;
1286
+ let support = void 0;
1287
+ let name = void 0;
1288
+ let namespace = void 0;
1289
+ let repository = void 0;
1290
+ const workspaceRoot = findWorkspaceRoot(root);
1291
+ if (existsSync3(join2(workspaceRoot, "package.json"))) {
1292
+ const file = await readFile3(
1293
+ joinPaths(workspaceRoot, "package.json"),
1294
+ "utf8"
1295
+ );
1296
+ if (file) {
1297
+ const packageJson = JSON.parse(file);
1298
+ if (packageJson.name) {
1299
+ name = packageJson.name;
1300
+ }
1301
+ if (packageJson.namespace) {
1302
+ namespace = packageJson.namespace;
1303
+ }
1304
+ if (packageJson.repository) {
1305
+ if (typeof packageJson.repository === "string") {
1306
+ repository = packageJson.repository;
1307
+ } else if (packageJson.repository.url) {
1308
+ repository = packageJson.repository.url;
1309
+ }
1310
+ }
1311
+ if (packageJson.license) {
1312
+ license = packageJson.license;
1313
+ }
1314
+ if (packageJson.homepage) {
1315
+ homepage = packageJson.homepage;
1316
+ }
1317
+ if (packageJson.bugs) {
1318
+ if (typeof packageJson.bugs === "string") {
1319
+ support = packageJson.bugs;
1320
+ } else if (packageJson.bugs.url) {
1321
+ support = packageJson.bugs.url;
1322
+ }
1323
+ }
1271
1324
  }
1272
1325
  }
1273
- return result;
1274
- };
1275
- function buildFormatLongFn(args) {
1276
- return (options = {}) => {
1277
- const width = options.width ? String(options.width) : args.defaultWidth;
1278
- const format2 = args.formats[width] || args.formats[args.defaultWidth];
1279
- return format2;
1280
- };
1281
- }
1282
- var dateFormats = {
1283
- full: "EEEE, MMMM do, y",
1284
- long: "MMMM do, y",
1285
- medium: "MMM d, y",
1286
- short: "MM/dd/yyyy"
1287
- };
1288
- var timeFormats = {
1289
- full: "h:mm:ss a zzzz",
1290
- long: "h:mm:ss a z",
1291
- medium: "h:mm:ss a",
1292
- short: "h:mm a"
1293
- };
1294
- var dateTimeFormats = {
1295
- full: "{{date}} 'at' {{time}}",
1296
- long: "{{date}} 'at' {{time}}",
1297
- medium: "{{date}}, {{time}}",
1298
- short: "{{date}}, {{time}}"
1299
- };
1300
- var formatLong = {
1301
- date: buildFormatLongFn({
1302
- formats: dateFormats,
1303
- defaultWidth: "full"
1304
- }),
1305
- time: buildFormatLongFn({
1306
- formats: timeFormats,
1307
- defaultWidth: "full"
1308
- }),
1309
- dateTime: buildFormatLongFn({
1310
- formats: dateTimeFormats,
1311
- defaultWidth: "full"
1312
- })
1313
- };
1314
- var formatRelativeLocale = {
1315
- lastWeek: "'last' eeee 'at' p",
1316
- yesterday: "'yesterday at' p",
1317
- today: "'today at' p",
1318
- tomorrow: "'tomorrow at' p",
1319
- nextWeek: "eeee 'at' p",
1320
- other: "P"
1321
- };
1322
- var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
1323
- function buildLocalizeFn(args) {
1324
- return (value, options) => {
1325
- const context = options?.context ? String(options.context) : "standalone";
1326
- let valuesArray;
1327
- if (context === "formatting" && args.formattingValues) {
1328
- const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1329
- const width = options?.width ? String(options.width) : defaultWidth;
1330
- valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
1331
- } else {
1332
- const defaultWidth = args.defaultWidth;
1333
- const width = options?.width ? String(options.width) : args.defaultWidth;
1334
- valuesArray = args.values[width] || args.values[defaultWidth];
1335
- }
1336
- const index = args.argumentCallback ? args.argumentCallback(value) : value;
1337
- return valuesArray[index];
1326
+ return {
1327
+ workspaceRoot,
1328
+ name,
1329
+ namespace,
1330
+ repository,
1331
+ license,
1332
+ homepage,
1333
+ support
1338
1334
  };
1339
1335
  }
1340
- var eraValues = {
1341
- narrow: ["B", "A"],
1342
- abbreviated: ["BC", "AD"],
1343
- wide: ["Before Christ", "Anno Domini"]
1344
- };
1345
- var quarterValues = {
1346
- narrow: ["1", "2", "3", "4"],
1347
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1348
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
1349
- };
1350
- var monthValues = {
1351
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1352
- abbreviated: [
1353
- "Jan",
1354
- "Feb",
1355
- "Mar",
1356
- "Apr",
1357
- "May",
1358
- "Jun",
1359
- "Jul",
1360
- "Aug",
1361
- "Sep",
1362
- "Oct",
1363
- "Nov",
1364
- "Dec"
1365
- ],
1366
- wide: [
1367
- "January",
1368
- "February",
1369
- "March",
1370
- "April",
1371
- "May",
1372
- "June",
1373
- "July",
1374
- "August",
1375
- "September",
1376
- "October",
1377
- "November",
1378
- "December"
1379
- ]
1380
- };
1381
- var dayValues = {
1382
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
1383
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1384
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1385
- wide: [
1386
- "Sunday",
1387
- "Monday",
1388
- "Tuesday",
1389
- "Wednesday",
1390
- "Thursday",
1391
- "Friday",
1392
- "Saturday"
1393
- ]
1394
- };
1395
- var dayPeriodValues = {
1396
- narrow: {
1397
- am: "a",
1398
- pm: "p",
1399
- midnight: "mi",
1400
- noon: "n",
1401
- morning: "morning",
1402
- afternoon: "afternoon",
1403
- evening: "evening",
1404
- night: "night"
1405
- },
1406
- abbreviated: {
1407
- am: "AM",
1408
- pm: "PM",
1409
- midnight: "midnight",
1410
- noon: "noon",
1411
- morning: "morning",
1412
- afternoon: "afternoon",
1413
- evening: "evening",
1414
- night: "night"
1415
- },
1416
- wide: {
1417
- am: "a.m.",
1418
- pm: "p.m.",
1419
- midnight: "midnight",
1420
- noon: "noon",
1421
- morning: "morning",
1422
- afternoon: "afternoon",
1423
- evening: "evening",
1424
- night: "night"
1425
- }
1426
- };
1427
- var formattingDayPeriodValues = {
1428
- narrow: {
1429
- am: "a",
1430
- pm: "p",
1431
- midnight: "mi",
1432
- noon: "n",
1433
- morning: "in the morning",
1434
- afternoon: "in the afternoon",
1435
- evening: "in the evening",
1436
- night: "at night"
1437
- },
1438
- abbreviated: {
1439
- am: "AM",
1440
- pm: "PM",
1441
- midnight: "midnight",
1442
- noon: "noon",
1443
- morning: "in the morning",
1444
- afternoon: "in the afternoon",
1445
- evening: "in the evening",
1446
- night: "at night"
1447
- },
1448
- wide: {
1449
- am: "a.m.",
1450
- pm: "p.m.",
1451
- midnight: "midnight",
1452
- noon: "noon",
1453
- morning: "in the morning",
1454
- afternoon: "in the afternoon",
1455
- evening: "in the evening",
1456
- night: "at night"
1336
+ function applyDefaultConfig(config) {
1337
+ if (!config.support && config.contact) {
1338
+ config.support = config.contact;
1457
1339
  }
1458
- };
1459
- var ordinalNumber = (dirtyNumber, _options) => {
1460
- const number = Number(dirtyNumber);
1461
- const rem100 = number % 100;
1462
- if (rem100 > 20 || rem100 < 10) {
1463
- switch (rem100 % 10) {
1464
- case 1:
1465
- return number + "st";
1466
- case 2:
1467
- return number + "nd";
1468
- case 3:
1469
- return number + "rd";
1470
- }
1340
+ if (!config.contact && config.support) {
1341
+ config.contact = config.support;
1471
1342
  }
1472
- return number + "th";
1473
- };
1474
- var localize = {
1475
- ordinalNumber,
1476
- era: buildLocalizeFn({
1477
- values: eraValues,
1478
- defaultWidth: "wide"
1479
- }),
1480
- quarter: buildLocalizeFn({
1481
- values: quarterValues,
1482
- defaultWidth: "wide",
1483
- argumentCallback: (quarter) => quarter - 1
1484
- }),
1485
- month: buildLocalizeFn({
1486
- values: monthValues,
1487
- defaultWidth: "wide"
1488
- }),
1489
- day: buildLocalizeFn({
1490
- values: dayValues,
1491
- defaultWidth: "wide"
1492
- }),
1493
- dayPeriod: buildLocalizeFn({
1494
- values: dayPeriodValues,
1495
- defaultWidth: "wide",
1496
- formattingValues: formattingDayPeriodValues,
1497
- defaultFormattingWidth: "wide"
1498
- })
1499
- };
1500
- function buildMatchFn(args) {
1501
- return (string3, options = {}) => {
1502
- const width = options.width;
1503
- const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
1504
- const matchResult = string3.match(matchPattern);
1505
- if (!matchResult) {
1506
- return null;
1507
- }
1508
- const matchedString = matchResult[0];
1509
- const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
1510
- const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
1511
- // [TODO] -- I challenge you to fix the type
1512
- findKey(parsePatterns, (pattern) => pattern.test(matchedString))
1513
- );
1514
- let value;
1515
- value = args.valueCallback ? args.valueCallback(key) : key;
1516
- value = options.valueCallback ? (
1517
- // [TODO] -- I challenge you to fix the type
1518
- options.valueCallback(value)
1519
- ) : value;
1520
- const rest = string3.slice(matchedString.length);
1521
- return { value, rest };
1522
- };
1523
- }
1524
- function findKey(object3, predicate) {
1525
- for (const key in object3) {
1526
- if (Object.prototype.hasOwnProperty.call(object3, key) && predicate(object3[key])) {
1527
- return key;
1343
+ if (config.homepage) {
1344
+ if (!config.docs) {
1345
+ config.docs = `${config.homepage}/docs`;
1528
1346
  }
1529
- }
1530
- return void 0;
1531
- }
1532
- function findIndex(array3, predicate) {
1533
- for (let key = 0; key < array3.length; key++) {
1534
- if (predicate(array3[key])) {
1535
- return key;
1347
+ if (!config.license) {
1348
+ config.license = `${config.homepage}/license`;
1536
1349
  }
1537
- }
1538
- return void 0;
1539
- }
1540
- function buildMatchPatternFn(args) {
1541
- return (string3, options = {}) => {
1542
- const matchResult = string3.match(args.matchPattern);
1543
- if (!matchResult) return null;
1544
- const matchedString = matchResult[0];
1545
- const parseResult = string3.match(args.parsePattern);
1546
- if (!parseResult) return null;
1547
- let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
1548
- value = options.valueCallback ? options.valueCallback(value) : value;
1549
- const rest = string3.slice(matchedString.length);
1550
- return { value, rest };
1551
- };
1552
- }
1553
- var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
1554
- var parseOrdinalNumberPattern = /\d+/i;
1555
- var matchEraPatterns = {
1556
- narrow: /^(b|a)/i,
1557
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1558
- wide: /^(before christ|before common era|anno domini|common era)/i
1559
- };
1560
- var parseEraPatterns = {
1561
- any: [/^b/i, /^(a|c)/i]
1562
- };
1563
- var matchQuarterPatterns = {
1564
- narrow: /^[1234]/i,
1565
- abbreviated: /^q[1234]/i,
1566
- wide: /^[1234](th|st|nd|rd)? quarter/i
1567
- };
1568
- var parseQuarterPatterns = {
1569
- any: [/1/i, /2/i, /3/i, /4/i]
1570
- };
1571
- var matchMonthPatterns = {
1572
- narrow: /^[jfmasond]/i,
1573
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1574
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1575
- };
1576
- var parseMonthPatterns = {
1577
- narrow: [
1578
- /^j/i,
1579
- /^f/i,
1580
- /^m/i,
1581
- /^a/i,
1582
- /^m/i,
1583
- /^j/i,
1584
- /^j/i,
1585
- /^a/i,
1586
- /^s/i,
1587
- /^o/i,
1588
- /^n/i,
1589
- /^d/i
1590
- ],
1591
- any: [
1592
- /^ja/i,
1593
- /^f/i,
1594
- /^mar/i,
1595
- /^ap/i,
1596
- /^may/i,
1597
- /^jun/i,
1598
- /^jul/i,
1599
- /^au/i,
1600
- /^s/i,
1601
- /^o/i,
1602
- /^n/i,
1603
- /^d/i
1604
- ]
1605
- };
1606
- var matchDayPatterns = {
1607
- narrow: /^[smtwf]/i,
1608
- short: /^(su|mo|tu|we|th|fr|sa)/i,
1609
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1610
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1611
- };
1612
- var parseDayPatterns = {
1613
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1614
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1615
- };
1616
- var matchDayPeriodPatterns = {
1617
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1618
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1619
- };
1620
- var parseDayPeriodPatterns = {
1621
- any: {
1622
- am: /^a/i,
1623
- pm: /^p/i,
1624
- midnight: /^mi/i,
1625
- noon: /^no/i,
1626
- morning: /morning/i,
1627
- afternoon: /afternoon/i,
1628
- evening: /evening/i,
1629
- night: /night/i
1630
- }
1631
- };
1632
- var match = {
1633
- ordinalNumber: buildMatchPatternFn({
1634
- matchPattern: matchOrdinalNumberPattern,
1635
- parsePattern: parseOrdinalNumberPattern,
1636
- valueCallback: (value) => parseInt(value, 10)
1637
- }),
1638
- era: buildMatchFn({
1639
- matchPatterns: matchEraPatterns,
1640
- defaultMatchWidth: "wide",
1641
- parsePatterns: parseEraPatterns,
1642
- defaultParseWidth: "any"
1643
- }),
1644
- quarter: buildMatchFn({
1645
- matchPatterns: matchQuarterPatterns,
1646
- defaultMatchWidth: "wide",
1647
- parsePatterns: parseQuarterPatterns,
1648
- defaultParseWidth: "any",
1649
- valueCallback: (index) => index + 1
1650
- }),
1651
- month: buildMatchFn({
1652
- matchPatterns: matchMonthPatterns,
1653
- defaultMatchWidth: "wide",
1654
- parsePatterns: parseMonthPatterns,
1655
- defaultParseWidth: "any"
1656
- }),
1657
- day: buildMatchFn({
1658
- matchPatterns: matchDayPatterns,
1659
- defaultMatchWidth: "wide",
1660
- parsePatterns: parseDayPatterns,
1661
- defaultParseWidth: "any"
1662
- }),
1663
- dayPeriod: buildMatchFn({
1664
- matchPatterns: matchDayPeriodPatterns,
1665
- defaultMatchWidth: "any",
1666
- parsePatterns: parseDayPeriodPatterns,
1667
- defaultParseWidth: "any"
1668
- })
1669
- };
1670
- var enUS = {
1671
- code: "en-US",
1672
- formatDistance,
1673
- formatLong,
1674
- formatRelative,
1675
- localize,
1676
- match,
1677
- options: {
1678
- weekStartsOn: 0,
1679
- firstWeekContainsDate: 1
1680
- }
1681
- };
1682
- var defaultOptions = {};
1683
- function getDefaultOptions() {
1684
- return defaultOptions;
1685
- }
1686
- function toDate(argument, context) {
1687
- return constructFrom(context || argument, argument);
1688
- }
1689
- function getTimezoneOffsetInMilliseconds(date) {
1690
- const _date = toDate(date);
1691
- const utcDate = new Date(
1692
- Date.UTC(
1693
- _date.getFullYear(),
1694
- _date.getMonth(),
1695
- _date.getDate(),
1696
- _date.getHours(),
1697
- _date.getMinutes(),
1698
- _date.getSeconds(),
1699
- _date.getMilliseconds()
1700
- )
1701
- );
1702
- utcDate.setUTCFullYear(_date.getFullYear());
1703
- return +date - +utcDate;
1704
- }
1705
- function normalizeDates(context, ...dates) {
1706
- const normalize = constructFrom.bind(
1707
- null,
1708
- context || dates.find((date) => typeof date === "object")
1709
- );
1710
- return dates.map(normalize);
1711
- }
1712
- function compareAsc(dateLeft, dateRight) {
1713
- const diff = +toDate(dateLeft) - +toDate(dateRight);
1714
- if (diff < 0) return -1;
1715
- else if (diff > 0) return 1;
1716
- return diff;
1717
- }
1718
- function differenceInCalendarMonths(laterDate, earlierDate, options) {
1719
- const [laterDate_, earlierDate_] = normalizeDates(
1720
- options?.in,
1721
- laterDate,
1722
- earlierDate
1723
- );
1724
- const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
1725
- const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
1726
- return yearsDiff * 12 + monthsDiff;
1727
- }
1728
- function endOfDay(date, options) {
1729
- const _date = toDate(date, options?.in);
1730
- _date.setHours(23, 59, 59, 999);
1731
- return _date;
1732
- }
1733
- function endOfMonth(date, options) {
1734
- const _date = toDate(date, options?.in);
1735
- const month = _date.getMonth();
1736
- _date.setFullYear(_date.getFullYear(), month + 1, 0);
1737
- _date.setHours(23, 59, 59, 999);
1738
- return _date;
1739
- }
1740
- function isLastDayOfMonth(date, options) {
1741
- const _date = toDate(date, options?.in);
1742
- return +endOfDay(_date, options) === +endOfMonth(_date, options);
1743
- }
1744
- function differenceInMonths(laterDate, earlierDate, options) {
1745
- const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(
1746
- options?.in,
1747
- laterDate,
1748
- laterDate,
1749
- earlierDate
1750
- );
1751
- const sign = compareAsc(workingLaterDate, earlierDate_);
1752
- const difference = Math.abs(
1753
- differenceInCalendarMonths(workingLaterDate, earlierDate_)
1754
- );
1755
- if (difference < 1) return 0;
1756
- if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)
1757
- workingLaterDate.setDate(30);
1758
- workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);
1759
- let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;
1760
- if (isLastDayOfMonth(laterDate_) && difference === 1 && compareAsc(laterDate_, earlierDate_) === 1) {
1761
- isLastMonthNotFull = false;
1762
- }
1763
- const result = sign * (difference - +isLastMonthNotFull);
1764
- return result === 0 ? 0 : result;
1765
- }
1766
- function getRoundingMethod(method) {
1767
- return (number) => {
1768
- const round = method ? Math[method] : Math.trunc;
1769
- const result = round(number);
1770
- return result === 0 ? 0 : result;
1771
- };
1772
- }
1773
- function differenceInMilliseconds(laterDate, earlierDate) {
1774
- return +toDate(laterDate) - +toDate(earlierDate);
1775
- }
1776
- function differenceInSeconds(laterDate, earlierDate, options) {
1777
- const diff = differenceInMilliseconds(laterDate, earlierDate) / 1e3;
1778
- return getRoundingMethod(options?.roundingMethod)(diff);
1779
- }
1780
- function formatDistance2(laterDate, earlierDate, options) {
1781
- const defaultOptions2 = getDefaultOptions();
1782
- const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
1783
- const minutesInAlmostTwoDays = 2520;
1784
- const comparison = compareAsc(laterDate, earlierDate);
1785
- if (isNaN(comparison)) throw new RangeError("Invalid time value");
1786
- const localizeOptions = Object.assign({}, options, {
1787
- addSuffix: options?.addSuffix,
1788
- comparison
1789
- });
1790
- const [laterDate_, earlierDate_] = normalizeDates(
1791
- options?.in,
1792
- ...comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]
1793
- );
1794
- const seconds = differenceInSeconds(earlierDate_, laterDate_);
1795
- const offsetInSeconds = (getTimezoneOffsetInMilliseconds(earlierDate_) - getTimezoneOffsetInMilliseconds(laterDate_)) / 1e3;
1796
- const minutes = Math.round((seconds - offsetInSeconds) / 60);
1797
- let months;
1798
- if (minutes < 2) {
1799
- if (options?.includeSeconds) {
1800
- if (seconds < 5) {
1801
- return locale.formatDistance("lessThanXSeconds", 5, localizeOptions);
1802
- } else if (seconds < 10) {
1803
- return locale.formatDistance("lessThanXSeconds", 10, localizeOptions);
1804
- } else if (seconds < 20) {
1805
- return locale.formatDistance("lessThanXSeconds", 20, localizeOptions);
1806
- } else if (seconds < 40) {
1807
- return locale.formatDistance("halfAMinute", 0, localizeOptions);
1808
- } else if (seconds < 60) {
1809
- return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
1810
- } else {
1811
- return locale.formatDistance("xMinutes", 1, localizeOptions);
1812
- }
1813
- } else {
1814
- if (minutes === 0) {
1815
- return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
1816
- } else {
1817
- return locale.formatDistance("xMinutes", minutes, localizeOptions);
1818
- }
1350
+ if (!config.support) {
1351
+ config.support = `${config.homepage}/support`;
1819
1352
  }
1820
- } else if (minutes < 45) {
1821
- return locale.formatDistance("xMinutes", minutes, localizeOptions);
1822
- } else if (minutes < 90) {
1823
- return locale.formatDistance("aboutXHours", 1, localizeOptions);
1824
- } else if (minutes < minutesInDay) {
1825
- const hours = Math.round(minutes / 60);
1826
- return locale.formatDistance("aboutXHours", hours, localizeOptions);
1827
- } else if (minutes < minutesInAlmostTwoDays) {
1828
- return locale.formatDistance("xDays", 1, localizeOptions);
1829
- } else if (minutes < minutesInMonth) {
1830
- const days = Math.round(minutes / minutesInDay);
1831
- return locale.formatDistance("xDays", days, localizeOptions);
1832
- } else if (minutes < minutesInMonth * 2) {
1833
- months = Math.round(minutes / minutesInMonth);
1834
- return locale.formatDistance("aboutXMonths", months, localizeOptions);
1835
- }
1836
- months = differenceInMonths(earlierDate_, laterDate_);
1837
- if (months < 12) {
1838
- const nearestMonth = Math.round(minutes / minutesInMonth);
1839
- return locale.formatDistance("xMonths", nearestMonth, localizeOptions);
1840
- } else {
1841
- const monthsSinceStartOfYear = months % 12;
1842
- const years = Math.trunc(months / 12);
1843
- if (monthsSinceStartOfYear < 3) {
1844
- return locale.formatDistance("aboutXYears", years, localizeOptions);
1845
- } else if (monthsSinceStartOfYear < 9) {
1846
- return locale.formatDistance("overXYears", years, localizeOptions);
1847
- } else {
1848
- return locale.formatDistance("almostXYears", years + 1, localizeOptions);
1353
+ if (!config.contact) {
1354
+ config.contact = `${config.homepage}/contact`;
1355
+ }
1356
+ if (!config.error?.codesFile || !config?.error?.url) {
1357
+ config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
1358
+ if (config.homepage) {
1359
+ config.error.url ??= `${config.homepage}/errors`;
1360
+ }
1849
1361
  }
1850
1362
  }
1851
- }
1852
- function formatDistanceToNow2(date, options) {
1853
- return formatDistance2(date, constructNow(date), options);
1854
- }
1855
- var getLogFn = (logLevel = LogLevel2.INFO, config = {}, options = {}) => {
1856
- const {
1857
- chalk: _chalk = getChalk(),
1858
- fullDateTime = false,
1859
- hideDateTime = false
1860
- } = options;
1861
- 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;
1862
- const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel2.INFO;
1863
- if (logLevel > getLogLevel2(configLogLevel) || logLevel <= LogLevel2.SILENT || getLogLevel2(configLogLevel) <= LogLevel2.SILENT) {
1864
- return (_3) => {
1865
- };
1866
- }
1867
- if (typeof logLevel === "number" && LogLevel2.FATAL >= logLevel) {
1868
- return (message) => {
1869
- console.error(
1870
- `
1871
- ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(
1872
- `[${CONSOLE_ICONS2[LogLevelLabel2.FATAL]} Fatal] `
1873
- )}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1874
- `
1875
- );
1876
- };
1877
- }
1878
- if (typeof logLevel === "number" && LogLevel2.ERROR >= logLevel) {
1879
- return (message) => {
1880
- console.error(
1881
- `
1882
- ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(
1883
- `[${CONSOLE_ICONS2[LogLevelLabel2.ERROR]} Error] `
1884
- )}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1885
- `
1886
- );
1887
- };
1888
- }
1889
- if (typeof logLevel === "number" && LogLevel2.WARN >= logLevel) {
1890
- return (message) => {
1891
- console.warn(
1892
- `
1893
- ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(
1894
- `[${CONSOLE_ICONS2[LogLevelLabel2.WARN]} Warn] `
1895
- )}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1896
- `
1897
- );
1898
- };
1899
- }
1900
- if (typeof logLevel === "number" && LogLevel2.SUCCESS >= logLevel) {
1901
- return (message) => {
1902
- console.info(
1903
- `
1904
- ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(
1905
- `[${CONSOLE_ICONS2[LogLevelLabel2.SUCCESS]} Success] `
1906
- )}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1907
- `
1908
- );
1909
- };
1910
- }
1911
- if (typeof logLevel === "number" && LogLevel2.INFO >= logLevel) {
1912
- return (message) => {
1913
- console.info(
1914
- `
1915
- ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(
1916
- `[${CONSOLE_ICONS2[LogLevelLabel2.INFO]} Info] `
1917
- )}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1918
- `
1919
- );
1920
- };
1921
- }
1922
- if (typeof logLevel === "number" && LogLevel2.PERFORMANCE >= logLevel) {
1923
- return (message) => {
1924
- console.debug(
1925
- `
1926
- ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(
1927
- `[${CONSOLE_ICONS2[LogLevelLabel2.PERFORMANCE]} Performance] `
1928
- )}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1929
- `
1930
- );
1931
- };
1932
- }
1933
- if (typeof logLevel === "number" && LogLevel2.DEBUG >= logLevel) {
1934
- return (message) => {
1935
- console.debug(
1936
- `
1937
- ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(
1938
- `[${CONSOLE_ICONS2[LogLevelLabel2.DEBUG]} Debug] `
1939
- )}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1940
- `
1941
- );
1942
- };
1943
- }
1944
- if (typeof logLevel === "number" && LogLevel2.TRACE >= logLevel) {
1945
- return (message) => {
1946
- console.debug(
1947
- `
1948
- ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex("#bbbbbb")(
1949
- `[${CONSOLE_ICONS2[LogLevelLabel2.TRACE]} Trace] `
1950
- )}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1951
- `
1952
- );
1953
- };
1954
- }
1955
- return (message) => {
1956
- console.log(
1957
- `
1958
- ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(
1959
- `[${CONSOLE_ICONS2[LogLevelLabel2.ALL]} System] `
1960
- )}${_chalk.bold.whiteBright(formatLogMessage2(message))}
1961
- `
1962
- );
1963
- };
1964
- };
1965
- var writeWarning2 = (message, config) => getLogFn(LogLevel2.WARN, config)(message);
1966
- var writePerformance = (message, config) => getLogFn(LogLevel2.PERFORMANCE, config)(message);
1967
- var writeDebug2 = (message, config) => getLogFn(LogLevel2.DEBUG, config)(message);
1968
- var writeTrace2 = (message, config) => getLogFn(LogLevel2.TRACE, config)(message);
1969
- var getStopwatch = (name) => {
1970
- const start = /* @__PURE__ */ new Date();
1971
- return () => {
1972
- writePerformance(
1973
- `The${name ? ` ${name}` : ""} process took ${formatDistanceToNow2(start, {
1974
- includeSeconds: true
1975
- })} to complete`
1976
- );
1977
- };
1978
- };
1979
- var MAX_DEPTH = 10;
1980
- var formatLogMessage2 = (message, options = {}, depth2 = 0) => {
1981
- if (depth2 > MAX_DEPTH) {
1982
- return "<max depth>";
1983
- }
1984
- const prefix = options.prefix ?? "";
1985
- const skip = options.skip ?? [];
1986
- const sort = options.sort ?? true;
1987
- return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
1988
- ${message.sort(
1989
- sort ? (a3, b2) => !a3 && !b2 ? 0 : !a3 ? 1 : !b2 ? -1 : String(a3).localeCompare(String(b2)) : void 0
1990
- ).map(
1991
- (item, index) => ` ${prefix}> #${index} = ${formatLogMessage2(
1992
- item,
1993
- { prefix: `${prefix}--`, skip, sort },
1994
- depth2 + 1
1995
- )}`
1996
- ).join("\n")}` : typeof message === "object" && message ? `
1997
- ${Object.keys(message).filter(
1998
- (key) => typeof key !== "string" || !skip.map((k2) => k2.toLowerCase().trim()).includes(key.toLowerCase().trim())
1999
- ).sort(
2000
- sort ? (a3, b2) => !a3 && !b2 ? 0 : !a3 ? 1 : !b2 ? -1 : String(a3).localeCompare(String(b2)) : void 0
2001
- ).map(
2002
- (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" && message[key] ? Object.keys(message[key]).filter(
2003
- (key2) => typeof key2 !== "string" || !skip.map((k2) => k2.toLowerCase().trim()).includes(key2.toLowerCase().trim())
2004
- ).length === 0 ? "{}" : formatLogMessage2(
2005
- message[key],
2006
- { prefix: `${prefix}--`, skip, sort },
2007
- depth2 + 1
2008
- ) : message[key]}`
2009
- ).join("\n")}` : String(message);
2010
- };
2011
- var _isFunction = (value) => {
2012
- try {
2013
- return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
2014
- } catch {
2015
- return false;
2016
- }
2017
- };
1363
+ return config;
1364
+ }
2018
1365
 
2019
- // ../config-tools/dist/chunk-IUVY5TOB.js
2020
- import { loadConfig as loadConfig2 } from "c12";
2021
- import defu3 from "defu";
1366
+ // ../config-tools/src/config-file/get-config-file.ts
2022
1367
  var getConfigFileByName = async (fileName, filePath, options = {}) => {
2023
- const workspacePath = filePath || findWorkspaceRoot2(filePath);
1368
+ const workspacePath = filePath || findWorkspaceRoot(filePath);
2024
1369
  const configs = await Promise.all([
2025
- loadConfig2({
1370
+ loadConfig({
2026
1371
  cwd: workspacePath,
2027
1372
  packageJson: true,
2028
1373
  name: fileName,
2029
1374
  envName: fileName?.toUpperCase(),
2030
1375
  jitiOptions: {
2031
1376
  debug: false,
2032
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
1377
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
2033
1378
  process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
2034
1379
  "jiti"
2035
1380
  )
2036
1381
  },
2037
1382
  ...options
2038
1383
  }),
2039
- loadConfig2({
1384
+ loadConfig({
2040
1385
  cwd: workspacePath,
2041
1386
  packageJson: true,
2042
1387
  name: fileName,
2043
1388
  envName: fileName?.toUpperCase(),
2044
1389
  jitiOptions: {
2045
1390
  debug: false,
2046
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
1391
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
2047
1392
  process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
2048
1393
  "jiti"
2049
1394
  )
@@ -2052,15 +1397,15 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
2052
1397
  ...options
2053
1398
  })
2054
1399
  ]);
2055
- return defu3(configs[0] ?? {}, configs[1] ?? {});
1400
+ return defu(configs[0] ?? {}, configs[1] ?? {});
2056
1401
  };
2057
1402
  var getConfigFile = async (filePath, additionalFileNames = []) => {
2058
- const workspacePath = filePath ? filePath : findWorkspaceRoot2(filePath);
1403
+ const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
2059
1404
  const result = await getConfigFileByName("storm-workspace", workspacePath);
2060
1405
  let config = result.config;
2061
1406
  const configFile = result.configFile;
2062
1407
  if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
2063
- writeTrace2(
1408
+ writeTrace(
2064
1409
  `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
2065
1410
  {
2066
1411
  logLevel: "all"
@@ -2076,14 +1421,14 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
2076
1421
  for (const result2 of results) {
2077
1422
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
2078
1423
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
2079
- writeTrace2(
1424
+ writeTrace(
2080
1425
  `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
2081
1426
  {
2082
1427
  logLevel: "all"
2083
1428
  }
2084
1429
  );
2085
1430
  }
2086
- config = defu3(result2.config ?? {}, config ?? {});
1431
+ config = defu(result2.config ?? {}, config ?? {});
2087
1432
  }
2088
1433
  }
2089
1434
  }
@@ -2094,301 +1439,229 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
2094
1439
  return config;
2095
1440
  };
2096
1441
 
2097
- // ../config-tools/dist/chunk-RGET2UQV.js
2098
- init_esm_shims();
2099
-
2100
- // ../config/dist/index.js
2101
- init_esm_shims();
2102
-
2103
- // ../config/dist/chunk-5QIMO5EY.js
2104
- init_esm_shims();
2105
-
2106
- // ../config/dist/chunk-7LCFBY4J.js
2107
- init_esm_shims();
2108
-
2109
- // ../config/dist/chunk-FYHIR57S.js
1442
+ // ../config-tools/src/create-storm-config.ts
2110
1443
  init_esm_shims();
2111
- var s = "https://docs.stormsoftware.com";
2112
- var r = "https://stormsoftware.com";
2113
- var t = "https://stormsoftware.com/contact";
2114
- var a = "https://stormsoftware.com/license";
2115
- var i = "Apache-2.0";
2116
- var o = "https://discord.gg/MQ6YVzakM5";
2117
- var e = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
2118
- var E = `
2119
- 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.
2120
-
2121
- Join us on [Discord](${o}) to chat with the team, receive release notifications, ask questions, and get involved.
2122
-
2123
- 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!
2124
- `;
2125
- var S = "tools/errors/codes.json";
2126
- var A = "The workspace's banner image";
2127
-
2128
- // ../config/dist/chunk-7LCFBY4J.js
2129
- import * as e2 from "zod/v4/mini";
2130
- var o2 = e2.registry();
2131
- var t2 = e2.string().check(e2.length(7), e2.toLowerCase(), e2.regex(/^#([0-9a-f]{3}){1,2}$/i), e2.trim());
2132
- o2.add(t2, { description: "A base schema for describing the format of colors" });
2133
- var a2 = e2._default(t2, "#1e2124");
2134
- o2.add(a2, { description: "The dark background color of the workspace" });
2135
- var c = e2._default(t2, "#cbd5e1");
2136
- o2.add(c, { description: "The light background color of the workspace" });
2137
- var i2 = e2._default(t2, "#1fb2a6");
2138
- o2.add(i2, { description: "The primary brand specific color of the workspace" });
2139
- var s2 = e2.optional(t2);
2140
- o2.add(s2, { description: "The alternate brand specific color of the workspace" });
2141
- var n = e2.optional(t2);
2142
- o2.add(n, { description: "The secondary brand specific color of the workspace" });
2143
- var d = e2._default(t2, "#3fa6ff");
2144
- o2.add(d, { description: "The color used to display hyperlink text" });
2145
- var p = e2._default(t2, "#818cf8");
2146
- o2.add(p, { description: "The second brand specific color of the workspace" });
2147
- var h = e2._default(t2, "#45b27e");
2148
- o2.add(h, { description: "The success color of the workspace" });
2149
- var l = e2._default(t2, "#38bdf8");
2150
- o2.add(l, { description: "The informational color of the workspace" });
2151
- var m = e2._default(t2, "#8afafc");
2152
- o2.add(m, { description: "The debug color of the workspace" });
2153
- var z2 = e2._default(t2, "#f3d371");
2154
- o2.add(z2, { description: "The warning color of the workspace" });
2155
- var g = e2._default(t2, "#d8314a");
2156
- o2.add(g, { description: "The danger color of the workspace" });
2157
- var f = e2.optional(t2);
2158
- o2.add(f, { description: "The fatal color of the workspace" });
2159
- var u = e2._default(t2, "#80fd74");
2160
- o2.add(u, { description: "The performance color of the workspace" });
2161
- var k = e2._default(t2, "#4ade80");
2162
- o2.add(k, { description: "The positive number color of the workspace" });
2163
- var w = e2._default(t2, "#ef4444");
2164
- o2.add(w, { description: "The negative number color of the workspace" });
2165
- var S2 = e2.optional(e2.array(t2));
2166
- o2.add(S2, { description: "The color stops for the base gradient color pattern used in the workspace" });
2167
- var Re = e2.object({ foreground: c, background: a2, brand: i2, alternate: s2, accent: n, link: d, discovery: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
2168
- var Ue = e2.object({ foreground: a2, background: c, brand: i2, alternate: s2, accent: n, link: d, discovery: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
2169
- var De = e2.object({ dark: Re, light: Ue });
2170
- var Be = e2.object({ dark: a2, light: c, brand: i2, alternate: s2, accent: n, link: d, discovery: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
2171
- var r2 = e2.optional(e2.url());
2172
- o2.add(r2, { description: "A remote registry URL used to publish distributable packages" });
2173
- var y = e2._default(e2.object({ github: r2, npm: r2, cargo: r2, cyclone: r2, container: r2 }), {});
2174
- o2.add(y, { description: "A list of remote registry URLs used by Storm Software" });
2175
- var b = e2.union([Be, De]);
2176
- o2.add(b, { description: "Colors used for various workspace elements" });
2177
- var C = e2.record(e2.union([e2.union([e2.literal("base"), e2.string()]), e2.string()]), b);
2178
- o2.add(C, { description: "Storm theme config values used for styling various package elements" });
2179
- var _ = e2.optional(e2.union([e2.string().check(e2.trim()), e2.array(e2.string().check(e2.trim()))]));
2180
- o2.add(_, { 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." });
2181
- var L = e2.string().check(e2.trim());
2182
- o2.add(L, { description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)" });
2183
- var j = e2.string().check(e2.trim());
2184
- o2.add(j, { description: "The email of the workspace bot" });
2185
- var A2 = e2.object({ name: L, email: j });
2186
- o2.add(A2, { description: "The workspace's bot user's config used to automated various operations tasks" });
2187
- var R = e2.optional(e2.string().check(e2.trim(), e2.url()));
2188
- o2.add(R, { description: "A URL to a banner image used to display the workspace's release" });
2189
- var U = e2._default(e2.string().check(e2.trim()), A);
2190
- o2.add(U, { description: "The alt text for the workspace's release banner image" });
2191
- var D = e2.object({ url: R, alt: U });
2192
- o2.add(D, { description: "The workspace's banner image used during the release process" });
2193
- var B = e2.optional(e2.string().check(e2.trim()));
2194
- o2.add(B, { description: "A header message appended to the start of the workspace's release notes" });
2195
- var F = e2.optional(e2.string().check(e2.trim()));
2196
- o2.add(F, { description: "A footer message appended to the end of the workspace's release notes" });
2197
- var N = e2.object({ banner: e2.union([D, e2.string().check(e2.trim(), e2.url())]), header: B, footer: F });
2198
- o2.add(N, { description: "The workspace's release config used during the release process" });
2199
- var E2 = e2.optional(e2.string().check(e2.trim()));
2200
- o2.add(E2, { description: "A Twitter/X account associated with the organization/project" });
2201
- var M = e2.optional(e2.string().check(e2.trim()));
2202
- o2.add(M, { description: "A Discord account associated with the organization/project" });
2203
- var O = e2.optional(e2.string().check(e2.trim()));
2204
- o2.add(O, { description: "A Telegram account associated with the organization/project" });
2205
- var I = e2.optional(e2.string().check(e2.trim()));
2206
- o2.add(I, { description: "A Slack account associated with the organization/project" });
2207
- var G = e2.optional(e2.string().check(e2.trim()));
2208
- o2.add(G, { description: "A Medium account associated with the organization/project" });
2209
- var H = e2.optional(e2.string().check(e2.trim()));
2210
- o2.add(H, { description: "A GitHub account associated with the organization/project" });
2211
- var J = e2.object({ twitter: E2, discord: M, telegram: O, slack: I, medium: G, github: H });
2212
- o2.add(J, { description: "The workspace's account config used to store various social media links" });
2213
- var W = e2.optional(e2.string().check(e2.trim()));
2214
- o2.add(W, { description: "The directory used to store the environment's cached file data" });
2215
- var P = e2.optional(e2.string().check(e2.trim()));
2216
- o2.add(P, { description: "The directory used to store the environment's data files" });
2217
- var $ = e2.optional(e2.string().check(e2.trim()));
2218
- o2.add($, { description: "The directory used to store the environment's configuration files" });
2219
- var V = e2.optional(e2.string().check(e2.trim()));
2220
- o2.add(V, { description: "The directory used to store the environment's temp files" });
2221
- var X = e2.optional(e2.string().check(e2.trim()));
2222
- o2.add(X, { description: "The directory used to store the environment's log files" });
2223
- var Y = e2._default(e2.string().check(e2.trim()), "dist");
2224
- o2.add(Y, { description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)" });
2225
- var q = e2.object({ cache: W, data: P, config: $, temp: V, log: X, build: Y });
2226
- o2.add(q, { description: "Various directories used by the workspace to store data, cache, and configuration files" });
2227
- var K = e2._default(e2.enum(["minimal", "monorepo"]), "monorepo");
2228
- o2.add(K, { description: "The variant of the workspace. This can be used to enable or disable certain features or configurations." });
2229
- var Q = e2._default(e2.string().check(e2.trim()), S);
2230
- o2.add(Q, { description: "The path to the workspace's error codes JSON file" });
2231
- var Z = e2.optional(e2.url());
2232
- o2.add(Z, { description: "A URL to a page that looks up the workspace's error messages given a specific error code" });
2233
- var ee = e2.object({ codesFile: Q, url: Z });
2234
- o2.add(ee, { description: "The workspace's error config used when creating error details during a system error" });
2235
- var oe = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
2236
- o2.add(oe, { description: "The name of the organization" });
2237
- var te = e2.optional(e2.string().check(e2.trim()));
2238
- o2.add(te, { description: "A description of the organization" });
2239
- var re = e2.optional(e2.url());
2240
- o2.add(re, { description: "A URL to the organization's logo image" });
2241
- var ae = e2.optional(e2.url());
2242
- o2.add(ae, { description: "A URL to the organization's icon image" });
2243
- var ce = e2.optional(e2.url());
2244
- o2.add(ce, { description: "A URL to a page that provides more information about the organization" });
2245
- var ie = e2.object({ name: oe, description: te, logo: re, icon: ae, url: ce });
2246
- o2.add(ie, { description: "The workspace's organization details" });
2247
- var se = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "https://public.storm-cdn.com/schemas/storm-workspace.schema.json");
2248
- o2.add(se, { description: "The URL or file path to the JSON schema file that describes the Storm configuration file" });
2249
- var ne = e2.string().check(e2.trim(), e2.toLowerCase());
2250
- o2.add(ne, { description: "The name of the workspace/project/service/package/scope using this configuration" });
2251
- var de = e2.string().check(e2.trim(), e2.toLowerCase());
2252
- o2.add(de, { description: "The namespace of the workspace/project/service/package/scope using this configuration" });
2253
- var pe = e2.union([ie, e2.string().check(e2.trim(), e2.toLowerCase())]);
2254
- o2.add(pe, { description: "The organization of the workspace. This can be a string or an object containing the organization's details" });
2255
- var he = e2.string().check(e2.trim(), e2.toLowerCase());
2256
- o2.add(he, { description: "The repo URL of the workspace (i.e. the GitHub repository URL)" });
2257
- var le = e2._default(e2.string().check(e2.trim()), "Apache-2.0");
2258
- o2.add(le, { description: "The license type of the package" });
2259
- var me = e2.optional(e2.url());
2260
- o2.add(me, { description: "The homepage of the workspace" });
2261
- var ze = e2.optional(e2.url());
2262
- o2.add(ze, { description: "The documentation site for the workspace" });
2263
- var ge = e2.optional(e2.url());
2264
- o2.add(ge, { description: "The development portal site for the workspace" });
2265
- var fe = e2.optional(e2.url());
2266
- o2.add(fe, { description: "The licensing site for the workspace" });
2267
- var ue = e2.optional(e2.url());
2268
- o2.add(ue, { description: "The contact site for the workspace" });
2269
- var ke = e2.optional(e2.url());
2270
- o2.add(ke, { description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value" });
2271
- var we = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "main");
2272
- o2.add(we, { description: "The branch of the workspace" });
2273
- var Se = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
2274
- o2.add(Se, { description: "A tag specifying the version pre-release identifier" });
2275
- var be = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
2276
- o2.add(be, { description: "The owner of the package" });
2277
- var xe = e2._default(e2.enum(["development", "test", "production"]).check(e2.trim(), e2.toLowerCase()), "production");
2278
- o2.add(xe, { description: "The current runtime environment mode for the package" });
2279
- var Te = e2.string().check(e2.trim(), e2.toLowerCase());
2280
- o2.add(Te, { description: "The root directory of the workspace" });
2281
- var ve = e2._default(e2.boolean(), false);
2282
- o2.add(ve, { description: "Should all known types of workspace caching be skipped?" });
2283
- var ye = e2._default(e2.enum(["npm", "yarn", "pnpm", "bun"]), "npm");
2284
- o2.add(ye, { description: "The JavaScript/TypeScript package manager used by the repository" });
2285
- var Ce = e2._default(e2.string().check(e2.trim()), "America/New_York");
2286
- o2.add(Ce, { description: "The default timezone of the workspace" });
2287
- var _e = e2._default(e2.string().check(e2.trim()), "en-US");
2288
- o2.add(_e, { description: "The default locale of the workspace" });
2289
- var Le = e2._default(e2.enum(["silent", "fatal", "error", "warn", "success", "info", "performance", "debug", "trace", "all"]), "info");
2290
- o2.add(Le, { 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`)." });
2291
- var je = e2._default(e2.boolean(), true);
2292
- o2.add(je, { description: "Should the logging of the current Storm Workspace configuration be skipped?" });
2293
- var Ae = e2._default(e2.nullable(e2.string().check(e2.trim())), null);
2294
- o2.add(Ae, { description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace." });
2295
- var x = e2._default(e2.record(e2.string(), e2.any()), {});
2296
- o2.add(x, { description: "Configuration of each used extension" });
2297
- var Ne = e2.object({ $schema: se, extends: _, name: ne, variant: K, namespace: de, organization: pe, repository: he, license: le, homepage: me, docs: ze, portal: ge, licensing: fe, contact: ue, support: ke, branch: we, preid: Se, owner: be, bot: A2, release: N, socials: J, error: ee, mode: xe, workspaceRoot: Te, skipCache: ve, directories: q, packageManager: ye, timezone: Ce, locale: _e, logLevel: Le, skipConfigLogging: je, registry: y, configFile: Ae, colors: e2.union([b, C]), extensions: x });
2298
- o2.add(x, { 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." });
1444
+ import defu2 from "defu";
1445
+ import { existsSync as existsSync4 } from "node:fs";
2299
1446
 
2300
- // ../config/dist/chunk-ZYGI4SYP.js
1447
+ // ../config-tools/src/env/get-env.ts
2301
1448
  init_esm_shims();
2302
- var e3 = ["dark", "light", "base", "brand", "alternate", "accent", "link", "success", "discovery", "info", "warning", "danger", "fatal", "performance", "positive", "negative"];
2303
-
2304
- // ../config-tools/dist/chunk-RGET2UQV.js
2305
- import { existsSync as existsSync6 } from "node:fs";
2306
- import { readFile as readFile5 } from "node:fs/promises";
2307
- import { join as join4 } from "node:path";
2308
- async function getPackageJsonConfig(root) {
2309
- let license = i;
2310
- let homepage = void 0;
2311
- let support = void 0;
2312
- let name = void 0;
2313
- let namespace = void 0;
2314
- let repository = void 0;
2315
- const workspaceRoot = findWorkspaceRoot2(root);
2316
- if (existsSync6(join4(workspaceRoot, "package.json"))) {
2317
- const file = await readFile5(
2318
- joinPaths2(workspaceRoot, "package.json"),
2319
- "utf8"
2320
- );
2321
- if (file) {
2322
- const packageJson = JSON.parse(file);
2323
- if (packageJson.name) {
2324
- name = packageJson.name;
2325
- }
2326
- if (packageJson.namespace) {
2327
- namespace = packageJson.namespace;
2328
- }
2329
- if (packageJson.repository) {
2330
- if (typeof packageJson.repository === "string") {
2331
- repository = packageJson.repository;
2332
- } else if (packageJson.repository.url) {
2333
- repository = packageJson.repository.url;
2334
- }
2335
- }
2336
- if (packageJson.license) {
2337
- license = packageJson.license;
2338
- }
2339
- if (packageJson.homepage) {
2340
- homepage = packageJson.homepage;
2341
- }
2342
- if (packageJson.bugs) {
2343
- if (typeof packageJson.bugs === "string") {
2344
- support = packageJson.bugs;
2345
- } else if (packageJson.bugs.url) {
2346
- support = packageJson.bugs.url;
2347
- }
2348
- }
1449
+ var getExtensionEnv = (extensionName) => {
1450
+ const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
1451
+ return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
1452
+ const name = key.replace(prefix, "").split("_").map(
1453
+ (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
1454
+ ).join("");
1455
+ if (name) {
1456
+ ret[name] = process.env[key];
2349
1457
  }
2350
- }
2351
- return {
2352
- workspaceRoot,
2353
- name,
2354
- namespace,
2355
- repository,
2356
- license,
2357
- homepage,
2358
- support
1458
+ return ret;
1459
+ }, {});
1460
+ };
1461
+ var getConfigEnv = () => {
1462
+ const prefix = "STORM_";
1463
+ let config = {
1464
+ extends: process.env[`${prefix}EXTENDS`] || void 0,
1465
+ name: process.env[`${prefix}NAME`] || void 0,
1466
+ variant: process.env[`${prefix}VARIANT`] || void 0,
1467
+ namespace: process.env[`${prefix}NAMESPACE`] || void 0,
1468
+ owner: process.env[`${prefix}OWNER`] || void 0,
1469
+ bot: {
1470
+ name: process.env[`${prefix}BOT_NAME`] || void 0,
1471
+ email: process.env[`${prefix}BOT_EMAIL`] || void 0
1472
+ },
1473
+ release: {
1474
+ banner: {
1475
+ url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
1476
+ alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
1477
+ },
1478
+ header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
1479
+ footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
1480
+ },
1481
+ error: {
1482
+ codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
1483
+ url: process.env[`${prefix}ERROR_URL`] || void 0
1484
+ },
1485
+ socials: {
1486
+ twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
1487
+ discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
1488
+ telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
1489
+ slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
1490
+ medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
1491
+ github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
1492
+ },
1493
+ 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`] ? {
1494
+ name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
1495
+ description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
1496
+ url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
1497
+ logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
1498
+ icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
1499
+ } : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
1500
+ packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
1501
+ license: process.env[`${prefix}LICENSE`] || void 0,
1502
+ homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
1503
+ docs: process.env[`${prefix}DOCS`] || void 0,
1504
+ portal: process.env[`${prefix}PORTAL`] || void 0,
1505
+ licensing: process.env[`${prefix}LICENSING`] || void 0,
1506
+ contact: process.env[`${prefix}CONTACT`] || void 0,
1507
+ support: process.env[`${prefix}SUPPORT`] || void 0,
1508
+ timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
1509
+ locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
1510
+ configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? correctPaths(process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
1511
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
1512
+ directories: {
1513
+ cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
1514
+ data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
1515
+ config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
1516
+ temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
1517
+ log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
1518
+ build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
1519
+ },
1520
+ skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
1521
+ mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
1522
+ // ci:
1523
+ // process.env[`${prefix}CI`] !== undefined
1524
+ // ? Boolean(
1525
+ // process.env[`${prefix}CI`] ??
1526
+ // process.env.CI ??
1527
+ // process.env.CONTINUOUS_INTEGRATION
1528
+ // )
1529
+ // : undefined,
1530
+ repository: process.env[`${prefix}REPOSITORY`] || void 0,
1531
+ branch: process.env[`${prefix}BRANCH`] || void 0,
1532
+ preid: process.env[`${prefix}PRE_ID`] || void 0,
1533
+ registry: {
1534
+ github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
1535
+ npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
1536
+ cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
1537
+ cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
1538
+ container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
1539
+ },
1540
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
1541
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
1542
+ ) ? getLogLevelLabel(
1543
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
1544
+ ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
1545
+ skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
2359
1546
  };
2360
- }
2361
- function applyDefaultConfig(config) {
2362
- if (!config.support && config.contact) {
2363
- config.support = config.contact;
2364
- }
2365
- if (!config.contact && config.support) {
2366
- config.contact = config.support;
2367
- }
2368
- if (config.homepage) {
2369
- if (!config.docs) {
1547
+ const themeNames = Object.keys(process.env).filter(
1548
+ (envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
1549
+ (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
1550
+ )
1551
+ );
1552
+ config.colors = themeNames.length > 0 ? themeNames.reduce(
1553
+ (ret, themeName) => {
1554
+ ret[themeName] = getThemeColorsEnv(prefix, themeName);
1555
+ return ret;
1556
+ },
1557
+ {}
1558
+ ) : getThemeColorsEnv(prefix);
1559
+ if (config.docs === STORM_DEFAULT_DOCS) {
1560
+ if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
1561
+ config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
1562
+ } else {
2370
1563
  config.docs = `${config.homepage}/docs`;
2371
1564
  }
2372
- if (!config.license) {
2373
- config.license = `${config.homepage}/license`;
2374
- }
2375
- if (!config.support) {
2376
- config.support = `${config.homepage}/support`;
1565
+ }
1566
+ if (config.licensing === STORM_DEFAULT_LICENSING) {
1567
+ if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
1568
+ config.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
1569
+ } else {
1570
+ config.licensing = `${config.homepage}/docs`;
2377
1571
  }
2378
- if (!config.contact) {
2379
- config.contact = `${config.homepage}/contact`;
1572
+ }
1573
+ const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
1574
+ if (serializedConfig) {
1575
+ const parsed = JSON.parse(serializedConfig);
1576
+ config = {
1577
+ ...config,
1578
+ ...parsed,
1579
+ colors: { ...config.colors, ...parsed.colors },
1580
+ extensions: { ...config.extensions, ...parsed.extensions }
1581
+ };
1582
+ }
1583
+ return config;
1584
+ };
1585
+ var getThemeColorsEnv = (prefix, theme) => {
1586
+ const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
1587
+ return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
1588
+ };
1589
+ var getSingleThemeColorsEnv = (prefix) => {
1590
+ const gradient = [];
1591
+ if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
1592
+ gradient.push(
1593
+ process.env[`${prefix}GRADIENT_START`],
1594
+ process.env[`${prefix}GRADIENT_END`]
1595
+ );
1596
+ } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
1597
+ let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
1598
+ while (process.env[`${prefix}GRADIENT_${index}`]) {
1599
+ gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
1600
+ index++;
2380
1601
  }
2381
- if (!config.error?.codesFile || !config?.error?.url) {
2382
- config.error ??= { codesFile: S };
2383
- if (config.homepage) {
2384
- config.error.url ??= `${config.homepage}/errors`;
2385
- }
1602
+ }
1603
+ return {
1604
+ dark: process.env[`${prefix}DARK`],
1605
+ light: process.env[`${prefix}LIGHT`],
1606
+ brand: process.env[`${prefix}BRAND`],
1607
+ alternate: process.env[`${prefix}ALTERNATE`],
1608
+ accent: process.env[`${prefix}ACCENT`],
1609
+ link: process.env[`${prefix}LINK`],
1610
+ discovery: process.env[`${prefix}DISCOVERY`],
1611
+ success: process.env[`${prefix}SUCCESS`],
1612
+ info: process.env[`${prefix}INFO`],
1613
+ debug: process.env[`${prefix}DEBUG`],
1614
+ warning: process.env[`${prefix}WARNING`],
1615
+ danger: process.env[`${prefix}DANGER`],
1616
+ fatal: process.env[`${prefix}FATAL`],
1617
+ performance: process.env[`${prefix}PERFORMANCE`],
1618
+ positive: process.env[`${prefix}POSITIVE`],
1619
+ negative: process.env[`${prefix}NEGATIVE`],
1620
+ gradient
1621
+ };
1622
+ };
1623
+ var getMultiThemeColorsEnv = (prefix) => {
1624
+ return {
1625
+ light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
1626
+ dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
1627
+ };
1628
+ };
1629
+ var getBaseThemeColorsEnv = (prefix) => {
1630
+ const gradient = [];
1631
+ if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
1632
+ gradient.push(
1633
+ process.env[`${prefix}GRADIENT_START`],
1634
+ process.env[`${prefix}GRADIENT_END`]
1635
+ );
1636
+ } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
1637
+ let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
1638
+ while (process.env[`${prefix}GRADIENT_${index}`]) {
1639
+ gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
1640
+ index++;
2386
1641
  }
2387
1642
  }
2388
- return config;
2389
- }
1643
+ return {
1644
+ foreground: process.env[`${prefix}FOREGROUND`],
1645
+ background: process.env[`${prefix}BACKGROUND`],
1646
+ brand: process.env[`${prefix}BRAND`],
1647
+ alternate: process.env[`${prefix}ALTERNATE`],
1648
+ accent: process.env[`${prefix}ACCENT`],
1649
+ link: process.env[`${prefix}LINK`],
1650
+ discovery: process.env[`${prefix}DISCOVERY`],
1651
+ success: process.env[`${prefix}SUCCESS`],
1652
+ info: process.env[`${prefix}INFO`],
1653
+ debug: process.env[`${prefix}DEBUG`],
1654
+ warning: process.env[`${prefix}WARNING`],
1655
+ danger: process.env[`${prefix}DANGER`],
1656
+ fatal: process.env[`${prefix}FATAL`],
1657
+ performance: process.env[`${prefix}PERFORMANCE`],
1658
+ positive: process.env[`${prefix}POSITIVE`],
1659
+ negative: process.env[`${prefix}NEGATIVE`],
1660
+ gradient
1661
+ };
1662
+ };
2390
1663
 
2391
- // ../config-tools/dist/chunk-FJNXECWU.js
1664
+ // ../config-tools/src/env/set-env.ts
2392
1665
  init_esm_shims();
2393
1666
  var setExtensionEnv = (extensionName, extension) => {
2394
1667
  for (const key of Object.keys(extension ?? {})) {
@@ -2396,7 +1669,7 @@ var setExtensionEnv = (extensionName, extension) => {
2396
1669
  const result = key?.replace(
2397
1670
  /([A-Z])+/g,
2398
1671
  (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
2399
- ).split(/(?=[A-Z])|[.\-\s_]/).map((x2) => x2.toLowerCase()) ?? [];
1672
+ ).split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
2400
1673
  let extensionKey;
2401
1674
  if (result.length === 0) {
2402
1675
  return;
@@ -2537,42 +1810,42 @@ var setConfigEnv = (config) => {
2537
1810
  process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
2538
1811
  }
2539
1812
  if (config.configFile) {
2540
- process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths2(
1813
+ process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths(
2541
1814
  config.configFile
2542
1815
  );
2543
1816
  }
2544
1817
  if (config.workspaceRoot) {
2545
- process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths2(config.workspaceRoot);
2546
- process.env.NX_WORKSPACE_ROOT = correctPaths2(config.workspaceRoot);
2547
- process.env.NX_WORKSPACE_ROOT_PATH = correctPaths2(config.workspaceRoot);
1818
+ process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config.workspaceRoot);
1819
+ process.env.NX_WORKSPACE_ROOT = correctPaths(config.workspaceRoot);
1820
+ process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
2548
1821
  }
2549
1822
  if (config.directories) {
2550
1823
  if (!config.skipCache && config.directories.cache) {
2551
- process.env[`${prefix}CACHE_DIR`] = correctPaths2(
1824
+ process.env[`${prefix}CACHE_DIR`] = correctPaths(
2552
1825
  config.directories.cache
2553
1826
  );
2554
1827
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
2555
1828
  }
2556
1829
  if (config.directories.data) {
2557
- process.env[`${prefix}DATA_DIR`] = correctPaths2(config.directories.data);
1830
+ process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
2558
1831
  process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
2559
1832
  }
2560
1833
  if (config.directories.config) {
2561
- process.env[`${prefix}CONFIG_DIR`] = correctPaths2(
1834
+ process.env[`${prefix}CONFIG_DIR`] = correctPaths(
2562
1835
  config.directories.config
2563
1836
  );
2564
1837
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
2565
1838
  }
2566
1839
  if (config.directories.temp) {
2567
- process.env[`${prefix}TEMP_DIR`] = correctPaths2(config.directories.temp);
1840
+ process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
2568
1841
  process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
2569
1842
  }
2570
1843
  if (config.directories.log) {
2571
- process.env[`${prefix}LOG_DIR`] = correctPaths2(config.directories.log);
1844
+ process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
2572
1845
  process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
2573
1846
  }
2574
1847
  if (config.directories.build) {
2575
- process.env[`${prefix}BUILD_DIR`] = correctPaths2(
1848
+ process.env[`${prefix}BUILD_DIR`] = correctPaths(
2576
1849
  config.directories.build
2577
1850
  );
2578
1851
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
@@ -2634,9 +1907,9 @@ var setConfigEnv = (config) => {
2634
1907
  process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
2635
1908
  process.env.LOG_LEVEL = String(config.logLevel);
2636
1909
  process.env.NX_VERBOSE_LOGGING = String(
2637
- getLogLevel2(config.logLevel) >= LogLevel2.DEBUG ? true : false
1910
+ getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
2638
1911
  );
2639
- process.env.RUST_BACKTRACE = getLogLevel2(config.logLevel) >= LogLevel2.DEBUG ? "full" : "none";
1912
+ process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
2640
1913
  }
2641
1914
  if (config.skipConfigLogging !== void 0) {
2642
1915
  process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
@@ -2703,8 +1976,8 @@ var setSingleThemeColorsEnv = (prefix, config) => {
2703
1976
  process.env[`${prefix}NEGATIVE`] = config.negative;
2704
1977
  }
2705
1978
  if (config.gradient) {
2706
- for (let i3 = 0; i3 < config.gradient.length; i3++) {
2707
- process.env[`${prefix}GRADIENT_${i3}`] = config.gradient[i3];
1979
+ for (let i = 0; i < config.gradient.length; i++) {
1980
+ process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
2708
1981
  }
2709
1982
  }
2710
1983
  };
@@ -2764,235 +2037,13 @@ var setBaseThemeColorsEnv = (prefix, config) => {
2764
2037
  process.env[`${prefix}NEGATIVE`] = config.negative;
2765
2038
  }
2766
2039
  if (config.gradient) {
2767
- for (let i3 = 0; i3 < config.gradient.length; i3++) {
2768
- process.env[`${prefix}GRADIENT_${i3}`] = config.gradient[i3];
2769
- }
2770
- }
2771
- };
2772
-
2773
- // ../config-tools/dist/chunk-2RLMTBVZ.js
2774
- init_esm_shims();
2775
- var getExtensionEnv = (extensionName) => {
2776
- const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
2777
- return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
2778
- const name = key.replace(prefix, "").split("_").map(
2779
- (i3) => i3.length > 0 ? i3.trim().charAt(0).toUpperCase() + i3.trim().slice(1) : ""
2780
- ).join("");
2781
- if (name) {
2782
- ret[name] = process.env[key];
2783
- }
2784
- return ret;
2785
- }, {});
2786
- };
2787
- var getConfigEnv = () => {
2788
- const prefix = "STORM_";
2789
- let config = {
2790
- extends: process.env[`${prefix}EXTENDS`] || void 0,
2791
- name: process.env[`${prefix}NAME`] || void 0,
2792
- variant: process.env[`${prefix}VARIANT`] || void 0,
2793
- namespace: process.env[`${prefix}NAMESPACE`] || void 0,
2794
- owner: process.env[`${prefix}OWNER`] || void 0,
2795
- bot: {
2796
- name: process.env[`${prefix}BOT_NAME`] || void 0,
2797
- email: process.env[`${prefix}BOT_EMAIL`] || void 0
2798
- },
2799
- release: {
2800
- banner: {
2801
- url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
2802
- alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
2803
- },
2804
- header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
2805
- footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
2806
- },
2807
- error: {
2808
- codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
2809
- url: process.env[`${prefix}ERROR_URL`] || void 0
2810
- },
2811
- socials: {
2812
- twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
2813
- discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
2814
- telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
2815
- slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
2816
- medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
2817
- github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
2818
- },
2819
- 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`] ? {
2820
- name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
2821
- description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
2822
- url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
2823
- logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
2824
- icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
2825
- } : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
2826
- packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
2827
- license: process.env[`${prefix}LICENSE`] || void 0,
2828
- homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
2829
- docs: process.env[`${prefix}DOCS`] || void 0,
2830
- portal: process.env[`${prefix}PORTAL`] || void 0,
2831
- licensing: process.env[`${prefix}LICENSING`] || void 0,
2832
- contact: process.env[`${prefix}CONTACT`] || void 0,
2833
- support: process.env[`${prefix}SUPPORT`] || void 0,
2834
- timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
2835
- locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
2836
- configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? correctPaths2(process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
2837
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths2(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
2838
- directories: {
2839
- 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,
2840
- 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,
2841
- 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,
2842
- 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,
2843
- 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,
2844
- 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
2845
- },
2846
- skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
2847
- mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
2848
- // ci:
2849
- // process.env[`${prefix}CI`] !== undefined
2850
- // ? Boolean(
2851
- // process.env[`${prefix}CI`] ??
2852
- // process.env.CI ??
2853
- // process.env.CONTINUOUS_INTEGRATION
2854
- // )
2855
- // : undefined,
2856
- repository: process.env[`${prefix}REPOSITORY`] || void 0,
2857
- branch: process.env[`${prefix}BRANCH`] || void 0,
2858
- preid: process.env[`${prefix}PRE_ID`] || void 0,
2859
- registry: {
2860
- github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
2861
- npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
2862
- cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
2863
- cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
2864
- container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
2865
- },
2866
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
2867
- Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
2868
- ) ? getLogLevelLabel2(
2869
- Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
2870
- ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
2871
- skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
2872
- };
2873
- const themeNames = Object.keys(process.env).filter(
2874
- (envKey) => envKey.startsWith(`${prefix}COLOR_`) && e3.every(
2875
- (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
2876
- )
2877
- );
2878
- config.colors = themeNames.length > 0 ? themeNames.reduce(
2879
- (ret, themeName) => {
2880
- ret[themeName] = getThemeColorsEnv(prefix, themeName);
2881
- return ret;
2882
- },
2883
- {}
2884
- ) : getThemeColorsEnv(prefix);
2885
- if (config.docs === s) {
2886
- if (config.homepage === r) {
2887
- config.docs = `${r}/projects/${config.name}/docs`;
2888
- } else {
2889
- config.docs = `${config.homepage}/docs`;
2890
- }
2891
- }
2892
- if (config.licensing === a) {
2893
- if (config.homepage === r) {
2894
- config.licensing = `${r}/projects/${config.name}/licensing`;
2895
- } else {
2896
- config.licensing = `${config.homepage}/docs`;
2897
- }
2898
- }
2899
- const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
2900
- if (serializedConfig) {
2901
- const parsed = JSON.parse(serializedConfig);
2902
- config = {
2903
- ...config,
2904
- ...parsed,
2905
- colors: { ...config.colors, ...parsed.colors },
2906
- extensions: { ...config.extensions, ...parsed.extensions }
2907
- };
2908
- }
2909
- return config;
2910
- };
2911
- var getThemeColorsEnv = (prefix, theme) => {
2912
- const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
2913
- return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
2914
- };
2915
- var getSingleThemeColorsEnv = (prefix) => {
2916
- const gradient = [];
2917
- if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
2918
- gradient.push(
2919
- process.env[`${prefix}GRADIENT_START`],
2920
- process.env[`${prefix}GRADIENT_END`]
2921
- );
2922
- } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
2923
- let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
2924
- while (process.env[`${prefix}GRADIENT_${index}`]) {
2925
- gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
2926
- index++;
2927
- }
2928
- }
2929
- return {
2930
- dark: process.env[`${prefix}DARK`],
2931
- light: process.env[`${prefix}LIGHT`],
2932
- brand: process.env[`${prefix}BRAND`],
2933
- alternate: process.env[`${prefix}ALTERNATE`],
2934
- accent: process.env[`${prefix}ACCENT`],
2935
- link: process.env[`${prefix}LINK`],
2936
- discovery: process.env[`${prefix}DISCOVERY`],
2937
- success: process.env[`${prefix}SUCCESS`],
2938
- info: process.env[`${prefix}INFO`],
2939
- debug: process.env[`${prefix}DEBUG`],
2940
- warning: process.env[`${prefix}WARNING`],
2941
- danger: process.env[`${prefix}DANGER`],
2942
- fatal: process.env[`${prefix}FATAL`],
2943
- performance: process.env[`${prefix}PERFORMANCE`],
2944
- positive: process.env[`${prefix}POSITIVE`],
2945
- negative: process.env[`${prefix}NEGATIVE`],
2946
- gradient
2947
- };
2948
- };
2949
- var getMultiThemeColorsEnv = (prefix) => {
2950
- return {
2951
- light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
2952
- dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
2953
- };
2954
- };
2955
- var getBaseThemeColorsEnv = (prefix) => {
2956
- const gradient = [];
2957
- if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
2958
- gradient.push(
2959
- process.env[`${prefix}GRADIENT_START`],
2960
- process.env[`${prefix}GRADIENT_END`]
2961
- );
2962
- } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
2963
- let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
2964
- while (process.env[`${prefix}GRADIENT_${index}`]) {
2965
- gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
2966
- index++;
2040
+ for (let i = 0; i < config.gradient.length; i++) {
2041
+ process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
2967
2042
  }
2968
2043
  }
2969
- return {
2970
- foreground: process.env[`${prefix}FOREGROUND`],
2971
- background: process.env[`${prefix}BACKGROUND`],
2972
- brand: process.env[`${prefix}BRAND`],
2973
- alternate: process.env[`${prefix}ALTERNATE`],
2974
- accent: process.env[`${prefix}ACCENT`],
2975
- link: process.env[`${prefix}LINK`],
2976
- discovery: process.env[`${prefix}DISCOVERY`],
2977
- success: process.env[`${prefix}SUCCESS`],
2978
- info: process.env[`${prefix}INFO`],
2979
- debug: process.env[`${prefix}DEBUG`],
2980
- warning: process.env[`${prefix}WARNING`],
2981
- danger: process.env[`${prefix}DANGER`],
2982
- fatal: process.env[`${prefix}FATAL`],
2983
- performance: process.env[`${prefix}PERFORMANCE`],
2984
- positive: process.env[`${prefix}POSITIVE`],
2985
- negative: process.env[`${prefix}NEGATIVE`],
2986
- gradient
2987
- };
2988
2044
  };
2989
2045
 
2990
- // ../config/dist/schema.js
2991
- init_esm_shims();
2992
-
2993
- // ../config-tools/dist/chunk-J777WNCU.js
2994
- import defu4 from "defu";
2995
- import { existsSync as existsSync7 } from "node:fs";
2046
+ // ../config-tools/src/create-storm-config.ts
2996
2047
  var _extension_cache = /* @__PURE__ */ new WeakMap();
2997
2048
  var _static_cache = void 0;
2998
2049
  var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
@@ -3000,13 +2051,13 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
3000
2051
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
3001
2052
  let _workspaceRoot = workspaceRoot;
3002
2053
  if (!_workspaceRoot) {
3003
- _workspaceRoot = findWorkspaceRoot2();
2054
+ _workspaceRoot = findWorkspaceRoot();
3004
2055
  }
3005
2056
  const configEnv = getConfigEnv();
3006
2057
  const configFile = await getConfigFile(_workspaceRoot);
3007
2058
  if (!configFile) {
3008
2059
  if (!skipLogs) {
3009
- writeWarning2(
2060
+ writeWarning(
3010
2061
  "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",
3011
2062
  { logLevel: "all" }
3012
2063
  );
@@ -3016,17 +2067,17 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
3016
2067
  }
3017
2068
  }
3018
2069
  const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
3019
- const configInput = defu4(
2070
+ const configInput = defu2(
3020
2071
  configEnv,
3021
2072
  configFile,
3022
2073
  defaultConfig
3023
2074
  );
3024
2075
  if (!configInput.variant) {
3025
- configInput.variant = existsSync7(joinPaths2(_workspaceRoot, "nx.json")) || existsSync7(joinPaths2(_workspaceRoot, ".nx")) || existsSync7(joinPaths2(_workspaceRoot, "lerna.json")) || existsSync7(joinPaths2(_workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
2076
+ configInput.variant = existsSync4(joinPaths(_workspaceRoot, "nx.json")) || existsSync4(joinPaths(_workspaceRoot, ".nx")) || existsSync4(joinPaths(_workspaceRoot, "lerna.json")) || existsSync4(joinPaths(_workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
3026
2077
  }
3027
2078
  try {
3028
2079
  const parseResult = await Promise.resolve(
3029
- Ne._zod.parse(
2080
+ workspaceConfigSchema._zod.parse(
3030
2081
  { value: configInput, issues: [] },
3031
2082
  { async: true }
3032
2083
  )
@@ -3037,7 +2088,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
3037
2088
  throw new Error(
3038
2089
  `Failed to parse Storm Workspace configuration${error?.message ? `: ${error.message}` : ""}
3039
2090
 
3040
- Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage2(
2091
+ Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage(
3041
2092
  configInput
3042
2093
  )}`,
3043
2094
  {
@@ -3082,41 +2133,75 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
3082
2133
  );
3083
2134
  setConfigEnv(config);
3084
2135
  if (!skipLogs && !config.skipConfigLogging) {
3085
- writeTrace2(
2136
+ writeTrace(
3086
2137
  `\u2699\uFE0F Using Storm Workspace configuration:
3087
- ${formatLogMessage2(config)}`,
2138
+ ${formatLogMessage(config)}`,
3088
2139
  config
3089
2140
  );
3090
2141
  }
3091
2142
  return config;
3092
2143
  };
3093
2144
 
3094
- // ../config-tools/dist/chunk-ZXR7SS2X.js
2145
+ // ../config-tools/src/get-config.ts
2146
+ init_esm_shims();
3095
2147
  function getConfig(workspaceRoot, skipLogs = false) {
3096
2148
  return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
3097
2149
  }
3098
2150
  function getWorkspaceConfig(skipLogs = true, options = {}) {
3099
2151
  let workspaceRoot = options.workspaceRoot;
3100
2152
  if (!workspaceRoot) {
3101
- workspaceRoot = findWorkspaceRoot2(options.cwd);
2153
+ workspaceRoot = findWorkspaceRoot(options.cwd);
3102
2154
  }
3103
2155
  return getConfig(workspaceRoot, skipLogs);
3104
2156
  }
3105
2157
 
3106
- // ../config-tools/dist/logger/console.js
2158
+ // ../build-tools/src/utilities/get-entry-points.ts
2159
+ import { glob as glob2 } from "glob";
2160
+
2161
+ // ../build-tools/src/utilities/get-env.ts
2162
+ init_esm_shims();
2163
+ var getEnv = (builder, options) => {
2164
+ return {
2165
+ STORM_BUILD: builder,
2166
+ STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
2167
+ STORM_NAME: options.name,
2168
+ STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
2169
+ STORM_PLATFORM: options.platform,
2170
+ STORM_FORMAT: JSON.stringify(options.format),
2171
+ STORM_TARGET: JSON.stringify(options.target),
2172
+ ...options.env
2173
+ };
2174
+ };
2175
+
2176
+ // ../build-tools/src/utilities/get-file-banner.ts
2177
+ init_esm_shims();
2178
+
2179
+ // ../build-tools/src/utilities/get-out-extension.ts
2180
+ init_esm_shims();
2181
+
2182
+ // ../build-tools/src/utilities/get-project-deps.ts
2183
+ init_esm_shims();
2184
+
2185
+ // ../build-tools/src/utilities/read-nx-config.ts
3107
2186
  init_esm_shims();
2187
+ import { existsSync as existsSync5 } from "node:fs";
2188
+ import { readFile as readFile4 } from "node:fs/promises";
3108
2189
 
3109
- // ../config-tools/dist/utilities/correct-paths.js
2190
+ // ../build-tools/src/utilities/task-graph.ts
3110
2191
  init_esm_shims();
2192
+ import {
2193
+ createTaskGraph,
2194
+ mapTargetDefaultsToDependencies
2195
+ } from "nx/src/tasks-runner/create-task-graph";
3111
2196
 
3112
2197
  // src/options.ts
3113
- import defu5 from "defu";
3114
- import { existsSync as existsSync8 } from "node:fs";
2198
+ import defu3 from "defu";
2199
+ import { existsSync as existsSync6 } from "node:fs";
3115
2200
  import hf from "node:fs/promises";
3116
- import { findWorkspaceRoot as findWorkspaceRoot3 } from "nx/src/utils/find-workspace-root";
2201
+ import { findWorkspaceRoot as findWorkspaceRoot2 } from "nx/src/utils/find-workspace-root";
3117
2202
  async function resolveOptions(userOptions) {
3118
2203
  const projectRoot = userOptions.projectRoot;
3119
- const workspaceRoot = findWorkspaceRoot3(projectRoot);
2204
+ const workspaceRoot = findWorkspaceRoot2(projectRoot);
3120
2205
  if (!workspaceRoot) {
3121
2206
  throw new Error("Cannot find Nx workspace root");
3122
2207
  }
@@ -3124,39 +2209,39 @@ async function resolveOptions(userOptions) {
3124
2209
  workspaceRoot: workspaceRoot.dir
3125
2210
  });
3126
2211
  if (!userOptions.silent) {
3127
- writeDebug2(" \u2699\uFE0F Resolving build options", workspaceConfig);
2212
+ writeDebug(" \u2699\uFE0F Resolving build options", workspaceConfig);
3128
2213
  }
3129
2214
  const stopwatch = getStopwatch("Build options resolution");
3130
- const projectJsonPath = joinPaths2(
2215
+ const projectJsonPath = joinPaths(
3131
2216
  workspaceRoot.dir,
3132
2217
  projectRoot,
3133
2218
  "project.json"
3134
2219
  );
3135
- if (!existsSync8(projectJsonPath)) {
2220
+ if (!existsSync6(projectJsonPath)) {
3136
2221
  throw new Error("Cannot find project.json configuration");
3137
2222
  }
3138
2223
  const projectJsonFile = await hf.readFile(projectJsonPath, "utf8");
3139
2224
  const projectJson = JSON.parse(projectJsonFile);
3140
2225
  const projectName = projectJson.name || userOptions.name;
3141
- const options = defu5(userOptions, DEFAULT_BUILD_OPTIONS);
2226
+ const options = defu3(userOptions, DEFAULT_BUILD_OPTIONS);
3142
2227
  options.name ??= projectName;
3143
- const packageJsonPath = joinPaths2(
2228
+ const packageJsonPath = joinPaths(
3144
2229
  workspaceRoot.dir,
3145
2230
  options.projectRoot,
3146
2231
  "package.json"
3147
2232
  );
3148
- if (!existsSync8(packageJsonPath)) {
2233
+ if (!existsSync6(packageJsonPath)) {
3149
2234
  throw new Error("Cannot find package.json configuration");
3150
2235
  }
3151
2236
  const env = getEnv("esbuild", options);
3152
2237
  const resolvedOptions = {
3153
2238
  name: projectName,
3154
- entry: [joinPaths2(workspaceRoot.dir, projectRoot, "src/index.ts")],
2239
+ entry: [joinPaths(workspaceRoot.dir, projectRoot, "src/index.ts")],
3155
2240
  clean: true,
3156
2241
  workspaceConfig,
3157
2242
  ...options,
3158
- outDir: options.outputPath || joinPaths2(workspaceConfig.workspaceRoot, "dist", options.projectRoot),
3159
- tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : joinPaths2(workspaceRoot.dir, projectRoot, "tsconfig.json"),
2243
+ outDir: options.outputPath || joinPaths(workspaceConfig.workspaceRoot, "dist", options.projectRoot),
2244
+ tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : joinPaths(workspaceRoot.dir, projectRoot, "tsconfig.json"),
3160
2245
  env: Object.keys(env).filter((key) => env[key] !== void 0).reduce((ret, key) => {
3161
2246
  const value = JSON.stringify(env[key]);
3162
2247
  const safeKey = key.replaceAll("(", "").replaceAll(")", "");
@@ -3170,10 +2255,10 @@ async function resolveOptions(userOptions) {
3170
2255
  if (!resolvedOptions.silent) {
3171
2256
  stopwatch();
3172
2257
  if (resolvedOptions.verbose) {
3173
- writeDebug2(
2258
+ writeDebug(
3174
2259
  ` \u2699\uFE0F Build options resolved:
3175
2260
 
3176
- ${formatLogMessage2(resolvedOptions)}`,
2261
+ ${formatLogMessage(resolvedOptions)}`,
3177
2262
  { ...workspaceConfig, logLevel: "all" }
3178
2263
  );
3179
2264
  }
@@ -3182,7 +2267,7 @@ ${formatLogMessage2(resolvedOptions)}`,
3182
2267
  }
3183
2268
 
3184
2269
  export {
3185
- writeDebug2 as writeDebug,
2270
+ writeDebug,
3186
2271
  getStopwatch,
3187
2272
  resolveOptions
3188
2273
  };