@storm-software/unbuild 0.49.73 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/bin/unbuild.cjs +550 -248
- package/bin/unbuild.js +550 -248
- package/dist/build.cjs +2 -2
- package/dist/build.js +1 -1
- package/dist/{chunk-5MW4VNSZ.js → chunk-HIH6JOQR.js} +550 -248
- package/dist/{chunk-UM5MAKNS.cjs → chunk-ZP7VG4UX.cjs} +550 -248
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +5 -5
package/bin/unbuild.cjs
CHANGED
|
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
));
|
|
24
24
|
|
|
25
25
|
// ../config/src/schema.ts
|
|
26
|
-
var z = __toESM(require("zod"), 1);
|
|
26
|
+
var z = __toESM(require("zod/mini"), 1);
|
|
27
27
|
|
|
28
28
|
// ../config/src/constants.ts
|
|
29
29
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
@@ -31,12 +31,8 @@ var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
|
31
31
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
32
32
|
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
33
33
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
34
|
-
var STORM_DEFAULT_SOCIAL_TWITTER = "StormSoftwareHQ";
|
|
35
34
|
var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
36
|
-
var STORM_DEFAULT_SOCIAL_TELEGRAM = "https://t.me/storm_software";
|
|
37
35
|
var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
38
|
-
var STORM_DEFAULT_SOCIAL_MEDIUM = "https://medium.com/storm-software";
|
|
39
|
-
var STORM_DEFAULT_SOCIAL_GITHUB = "https://github.com/storm-software";
|
|
40
36
|
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
41
37
|
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.
|
|
42
38
|
|
|
@@ -45,233 +41,487 @@ Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, rec
|
|
|
45
41
|
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!
|
|
46
42
|
`;
|
|
47
43
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
44
|
+
var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
|
|
48
45
|
|
|
49
46
|
// ../config/src/schema.ts
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
|
|
47
|
+
var schemaRegistry = z.registry();
|
|
48
|
+
var colorSchema = z.string().check(
|
|
49
|
+
z.length(7),
|
|
50
|
+
z.toLowerCase(),
|
|
51
|
+
z.regex(/^#([0-9a-f]{3}){1,2}$/i),
|
|
52
|
+
z.trim()
|
|
53
53
|
);
|
|
54
|
-
|
|
55
|
-
"
|
|
54
|
+
schemaRegistry.add(colorSchema, {
|
|
55
|
+
description: "A base schema for describing the format of colors"
|
|
56
|
+
});
|
|
57
|
+
var darkColorSchema = z._default(colorSchema, "#151718");
|
|
58
|
+
schemaRegistry.add(darkColorSchema, {
|
|
59
|
+
description: "The dark background color of the workspace"
|
|
60
|
+
});
|
|
61
|
+
var lightColorSchema = z._default(colorSchema, "#cbd5e1");
|
|
62
|
+
schemaRegistry.add(lightColorSchema, {
|
|
63
|
+
description: "The light background color of the workspace"
|
|
64
|
+
});
|
|
65
|
+
var brandColorSchema = z._default(colorSchema, "#1fb2a6");
|
|
66
|
+
schemaRegistry.add(brandColorSchema, {
|
|
67
|
+
description: "The primary brand specific color of the workspace"
|
|
68
|
+
});
|
|
69
|
+
var alternateColorSchema = z.optional(colorSchema);
|
|
70
|
+
schemaRegistry.add(alternateColorSchema, {
|
|
71
|
+
description: "The alternate brand specific color of the workspace"
|
|
72
|
+
});
|
|
73
|
+
var accentColorSchema = z.optional(colorSchema);
|
|
74
|
+
schemaRegistry.add(accentColorSchema, {
|
|
75
|
+
description: "The secondary brand specific color of the workspace"
|
|
76
|
+
});
|
|
77
|
+
var linkColorSchema = z._default(colorSchema, "#3fa6ff");
|
|
78
|
+
schemaRegistry.add(linkColorSchema, {
|
|
79
|
+
description: "The color used to display hyperlink text"
|
|
80
|
+
});
|
|
81
|
+
var helpColorSchema = z._default(colorSchema, "#818cf8");
|
|
82
|
+
schemaRegistry.add(helpColorSchema, {
|
|
83
|
+
description: "The second brand specific color of the workspace"
|
|
84
|
+
});
|
|
85
|
+
var successColorSchema = z._default(colorSchema, "#45b27e");
|
|
86
|
+
schemaRegistry.add(successColorSchema, {
|
|
87
|
+
description: "The success color of the workspace"
|
|
88
|
+
});
|
|
89
|
+
var infoColorSchema = z._default(colorSchema, "#38bdf8");
|
|
90
|
+
schemaRegistry.add(infoColorSchema, {
|
|
91
|
+
description: "The informational color of the workspace"
|
|
92
|
+
});
|
|
93
|
+
var warningColorSchema = z._default(colorSchema, "#f3d371");
|
|
94
|
+
schemaRegistry.add(warningColorSchema, {
|
|
95
|
+
description: "The warning color of the workspace"
|
|
96
|
+
});
|
|
97
|
+
var dangerColorSchema = z._default(colorSchema, "#d8314a");
|
|
98
|
+
schemaRegistry.add(dangerColorSchema, {
|
|
99
|
+
description: "The danger color of the workspace"
|
|
100
|
+
});
|
|
101
|
+
var fatalColorSchema = z.optional(colorSchema);
|
|
102
|
+
schemaRegistry.add(fatalColorSchema, {
|
|
103
|
+
description: "The fatal color of the workspace"
|
|
104
|
+
});
|
|
105
|
+
var positiveColorSchema = z._default(colorSchema, "#4ade80");
|
|
106
|
+
schemaRegistry.add(positiveColorSchema, {
|
|
107
|
+
description: "The positive number color of the workspace"
|
|
108
|
+
});
|
|
109
|
+
var negativeColorSchema = z._default(colorSchema, "#ef4444");
|
|
110
|
+
schemaRegistry.add(negativeColorSchema, {
|
|
111
|
+
description: "The negative number color of the workspace"
|
|
112
|
+
});
|
|
113
|
+
var gradientStopsSchema = z.optional(z.array(colorSchema));
|
|
114
|
+
schemaRegistry.add(gradientStopsSchema, {
|
|
115
|
+
description: "The color stops for the base gradient color pattern used in the workspace"
|
|
116
|
+
});
|
|
117
|
+
var darkColorsSchema = z.object({
|
|
118
|
+
foreground: lightColorSchema,
|
|
119
|
+
background: darkColorSchema,
|
|
120
|
+
brand: brandColorSchema,
|
|
121
|
+
alternate: alternateColorSchema,
|
|
122
|
+
accent: accentColorSchema,
|
|
123
|
+
link: linkColorSchema,
|
|
124
|
+
help: helpColorSchema,
|
|
125
|
+
success: successColorSchema,
|
|
126
|
+
info: infoColorSchema,
|
|
127
|
+
warning: warningColorSchema,
|
|
128
|
+
danger: dangerColorSchema,
|
|
129
|
+
fatal: fatalColorSchema,
|
|
130
|
+
positive: positiveColorSchema,
|
|
131
|
+
negative: negativeColorSchema,
|
|
132
|
+
gradient: gradientStopsSchema
|
|
133
|
+
});
|
|
134
|
+
var lightColorsSchema = z.object({
|
|
135
|
+
foreground: darkColorSchema,
|
|
136
|
+
background: lightColorSchema,
|
|
137
|
+
brand: brandColorSchema,
|
|
138
|
+
alternate: alternateColorSchema,
|
|
139
|
+
accent: accentColorSchema,
|
|
140
|
+
link: linkColorSchema,
|
|
141
|
+
help: helpColorSchema,
|
|
142
|
+
success: successColorSchema,
|
|
143
|
+
info: infoColorSchema,
|
|
144
|
+
warning: warningColorSchema,
|
|
145
|
+
danger: dangerColorSchema,
|
|
146
|
+
fatal: fatalColorSchema,
|
|
147
|
+
positive: positiveColorSchema,
|
|
148
|
+
negative: negativeColorSchema,
|
|
149
|
+
gradient: gradientStopsSchema
|
|
150
|
+
});
|
|
151
|
+
var multiColorsSchema = z.object({
|
|
152
|
+
dark: darkColorsSchema,
|
|
153
|
+
light: lightColorsSchema
|
|
154
|
+
});
|
|
155
|
+
var singleColorsSchema = z.object({
|
|
156
|
+
dark: darkColorSchema,
|
|
157
|
+
light: lightColorSchema,
|
|
158
|
+
brand: brandColorSchema,
|
|
159
|
+
alternate: alternateColorSchema,
|
|
160
|
+
accent: accentColorSchema,
|
|
161
|
+
link: linkColorSchema,
|
|
162
|
+
help: helpColorSchema,
|
|
163
|
+
success: successColorSchema,
|
|
164
|
+
info: infoColorSchema,
|
|
165
|
+
warning: warningColorSchema,
|
|
166
|
+
danger: dangerColorSchema,
|
|
167
|
+
fatal: fatalColorSchema,
|
|
168
|
+
positive: positiveColorSchema,
|
|
169
|
+
negative: negativeColorSchema,
|
|
170
|
+
gradient: gradientStopsSchema
|
|
171
|
+
});
|
|
172
|
+
var registryUrlConfigSchema = z.optional(z.url());
|
|
173
|
+
schemaRegistry.add(registryUrlConfigSchema, {
|
|
174
|
+
description: "A remote registry URL used to publish distributable packages"
|
|
175
|
+
});
|
|
176
|
+
var registrySchema = z._default(
|
|
177
|
+
z.object({
|
|
178
|
+
github: registryUrlConfigSchema,
|
|
179
|
+
npm: registryUrlConfigSchema,
|
|
180
|
+
cargo: registryUrlConfigSchema,
|
|
181
|
+
cyclone: registryUrlConfigSchema,
|
|
182
|
+
container: registryUrlConfigSchema
|
|
183
|
+
}),
|
|
184
|
+
{}
|
|
185
|
+
);
|
|
186
|
+
schemaRegistry.add(registrySchema, {
|
|
187
|
+
description: "A list of remote registry URLs used by Storm Software"
|
|
188
|
+
});
|
|
189
|
+
var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
|
|
190
|
+
schemaRegistry.add(colorsSchema, {
|
|
191
|
+
description: "Colors used for various workspace elements"
|
|
192
|
+
});
|
|
193
|
+
var themeColorsSchema = z.record(
|
|
194
|
+
z.union([z.union([z.literal("base"), z.string()]), z.string()]),
|
|
195
|
+
colorsSchema
|
|
196
|
+
);
|
|
197
|
+
schemaRegistry.add(themeColorsSchema, {
|
|
198
|
+
description: "Storm theme config values used for styling various package elements"
|
|
199
|
+
});
|
|
200
|
+
var extendsSchema = z.optional(
|
|
201
|
+
z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
|
|
56
202
|
);
|
|
57
|
-
|
|
58
|
-
"The
|
|
203
|
+
schemaRegistry.add(extendsSchema, {
|
|
204
|
+
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."
|
|
205
|
+
});
|
|
206
|
+
var workspaceBotNameSchema = z.string().check(z.trim());
|
|
207
|
+
schemaRegistry.add(workspaceBotNameSchema, {
|
|
208
|
+
description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
209
|
+
});
|
|
210
|
+
var workspaceBotEmailSchema = z.string().check(z.trim());
|
|
211
|
+
schemaRegistry.add(workspaceBotEmailSchema, {
|
|
212
|
+
description: "The email of the workspace bot"
|
|
213
|
+
});
|
|
214
|
+
var workspaceBotSchema = z.object({
|
|
215
|
+
name: workspaceBotNameSchema,
|
|
216
|
+
email: workspaceBotEmailSchema
|
|
217
|
+
});
|
|
218
|
+
schemaRegistry.add(workspaceBotSchema, {
|
|
219
|
+
description: "The workspace's bot user's config used to automated various operations tasks"
|
|
220
|
+
});
|
|
221
|
+
var workspaceReleaseBannerUrlSchema = z.optional(
|
|
222
|
+
z.string().check(z.trim(), z.url())
|
|
223
|
+
);
|
|
224
|
+
schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
|
|
225
|
+
description: "A URL to a banner image used to display the workspace's release"
|
|
226
|
+
});
|
|
227
|
+
var workspaceReleaseBannerAltSchema = z._default(
|
|
228
|
+
z.string().check(z.trim()),
|
|
229
|
+
STORM_DEFAULT_BANNER_ALT
|
|
230
|
+
);
|
|
231
|
+
schemaRegistry.add(workspaceReleaseBannerAltSchema, {
|
|
232
|
+
description: "The alt text for the workspace's release banner image"
|
|
233
|
+
});
|
|
234
|
+
var workspaceReleaseBannerSchema = z.object({
|
|
235
|
+
url: workspaceReleaseBannerUrlSchema,
|
|
236
|
+
alt: workspaceReleaseBannerAltSchema
|
|
237
|
+
});
|
|
238
|
+
schemaRegistry.add(workspaceReleaseBannerSchema, {
|
|
239
|
+
description: "The workspace's banner image used during the release process"
|
|
240
|
+
});
|
|
241
|
+
var workspaceReleaseHeaderSchema = z.optional(
|
|
242
|
+
z.string().check(z.trim())
|
|
243
|
+
);
|
|
244
|
+
schemaRegistry.add(workspaceReleaseHeaderSchema, {
|
|
245
|
+
description: "A header message appended to the start of the workspace's release notes"
|
|
246
|
+
});
|
|
247
|
+
var workspaceReleaseFooterSchema = z.optional(
|
|
248
|
+
z.string().check(z.trim())
|
|
249
|
+
);
|
|
250
|
+
schemaRegistry.add(workspaceReleaseFooterSchema, {
|
|
251
|
+
description: "A footer message appended to the end of the workspace's release notes"
|
|
252
|
+
});
|
|
253
|
+
var workspaceReleaseSchema = z.object({
|
|
254
|
+
banner: z.union([
|
|
255
|
+
workspaceReleaseBannerSchema,
|
|
256
|
+
z.string().check(z.trim(), z.url())
|
|
257
|
+
]),
|
|
258
|
+
header: workspaceReleaseHeaderSchema,
|
|
259
|
+
footer: workspaceReleaseFooterSchema
|
|
260
|
+
});
|
|
261
|
+
schemaRegistry.add(workspaceReleaseSchema, {
|
|
262
|
+
description: "The workspace's release config used during the release process"
|
|
263
|
+
});
|
|
264
|
+
var workspaceSocialsTwitterSchema = z.optional(
|
|
265
|
+
z.string().check(z.trim())
|
|
266
|
+
);
|
|
267
|
+
schemaRegistry.add(workspaceSocialsTwitterSchema, {
|
|
268
|
+
description: "A Twitter/X account associated with the organization/project"
|
|
269
|
+
});
|
|
270
|
+
var workspaceSocialsDiscordSchema = z.optional(
|
|
271
|
+
z.string().check(z.trim())
|
|
272
|
+
);
|
|
273
|
+
schemaRegistry.add(workspaceSocialsDiscordSchema, {
|
|
274
|
+
description: "A Discord account associated with the organization/project"
|
|
275
|
+
});
|
|
276
|
+
var workspaceSocialsTelegramSchema = z.optional(
|
|
277
|
+
z.string().check(z.trim())
|
|
278
|
+
);
|
|
279
|
+
schemaRegistry.add(workspaceSocialsTelegramSchema, {
|
|
280
|
+
description: "A Telegram account associated with the organization/project"
|
|
281
|
+
});
|
|
282
|
+
var workspaceSocialsSlackSchema = z.optional(
|
|
283
|
+
z.string().check(z.trim())
|
|
284
|
+
);
|
|
285
|
+
schemaRegistry.add(workspaceSocialsSlackSchema, {
|
|
286
|
+
description: "A Slack account associated with the organization/project"
|
|
287
|
+
});
|
|
288
|
+
var workspaceSocialsMediumSchema = z.optional(
|
|
289
|
+
z.string().check(z.trim())
|
|
290
|
+
);
|
|
291
|
+
schemaRegistry.add(workspaceSocialsMediumSchema, {
|
|
292
|
+
description: "A Medium account associated with the organization/project"
|
|
293
|
+
});
|
|
294
|
+
var workspaceSocialsGithubSchema = z.optional(
|
|
295
|
+
z.string().check(z.trim())
|
|
59
296
|
);
|
|
60
|
-
|
|
61
|
-
"
|
|
297
|
+
schemaRegistry.add(workspaceSocialsGithubSchema, {
|
|
298
|
+
description: "A GitHub account associated with the organization/project"
|
|
299
|
+
});
|
|
300
|
+
var workspaceSocialsSchema = z.object({
|
|
301
|
+
twitter: workspaceSocialsTwitterSchema,
|
|
302
|
+
discord: workspaceSocialsDiscordSchema,
|
|
303
|
+
telegram: workspaceSocialsTelegramSchema,
|
|
304
|
+
slack: workspaceSocialsSlackSchema,
|
|
305
|
+
medium: workspaceSocialsMediumSchema,
|
|
306
|
+
github: workspaceSocialsGithubSchema
|
|
307
|
+
});
|
|
308
|
+
schemaRegistry.add(workspaceSocialsSchema, {
|
|
309
|
+
description: "The workspace's account config used to store various social media links"
|
|
310
|
+
});
|
|
311
|
+
var workspaceDirectoryCacheSchema = z.optional(
|
|
312
|
+
z.string().check(z.trim())
|
|
62
313
|
);
|
|
63
|
-
|
|
64
|
-
"The
|
|
314
|
+
schemaRegistry.add(workspaceDirectoryCacheSchema, {
|
|
315
|
+
description: "The directory used to store the environment's cached file data"
|
|
316
|
+
});
|
|
317
|
+
var workspaceDirectoryDataSchema = z.optional(
|
|
318
|
+
z.string().check(z.trim())
|
|
65
319
|
);
|
|
66
|
-
|
|
67
|
-
"The
|
|
320
|
+
schemaRegistry.add(workspaceDirectoryDataSchema, {
|
|
321
|
+
description: "The directory used to store the environment's data files"
|
|
322
|
+
});
|
|
323
|
+
var workspaceDirectoryConfigSchema = z.optional(
|
|
324
|
+
z.string().check(z.trim())
|
|
68
325
|
);
|
|
69
|
-
|
|
70
|
-
"The
|
|
326
|
+
schemaRegistry.add(workspaceDirectoryConfigSchema, {
|
|
327
|
+
description: "The directory used to store the environment's configuration files"
|
|
328
|
+
});
|
|
329
|
+
var workspaceDirectoryTempSchema = z.optional(
|
|
330
|
+
z.string().check(z.trim())
|
|
71
331
|
);
|
|
72
|
-
|
|
73
|
-
"The
|
|
332
|
+
schemaRegistry.add(workspaceDirectoryTempSchema, {
|
|
333
|
+
description: "The directory used to store the environment's temp files"
|
|
334
|
+
});
|
|
335
|
+
var workspaceDirectoryLogSchema = z.optional(
|
|
336
|
+
z.string().check(z.trim())
|
|
74
337
|
);
|
|
75
|
-
|
|
76
|
-
"The
|
|
338
|
+
schemaRegistry.add(workspaceDirectoryLogSchema, {
|
|
339
|
+
description: "The directory used to store the environment's log files"
|
|
340
|
+
});
|
|
341
|
+
var workspaceDirectoryBuildSchema = z._default(
|
|
342
|
+
z.string().check(z.trim()),
|
|
343
|
+
"dist"
|
|
77
344
|
);
|
|
78
|
-
|
|
79
|
-
"The
|
|
345
|
+
schemaRegistry.add(workspaceDirectoryBuildSchema, {
|
|
346
|
+
description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
347
|
+
});
|
|
348
|
+
var workspaceDirectorySchema = z.object({
|
|
349
|
+
cache: workspaceDirectoryCacheSchema,
|
|
350
|
+
data: workspaceDirectoryDataSchema,
|
|
351
|
+
config: workspaceDirectoryConfigSchema,
|
|
352
|
+
temp: workspaceDirectoryTempSchema,
|
|
353
|
+
log: workspaceDirectoryLogSchema,
|
|
354
|
+
build: workspaceDirectoryBuildSchema
|
|
355
|
+
});
|
|
356
|
+
schemaRegistry.add(workspaceDirectorySchema, {
|
|
357
|
+
description: "Various directories used by the workspace to store data, cache, and configuration files"
|
|
358
|
+
});
|
|
359
|
+
var errorCodesFileSchema = z._default(
|
|
360
|
+
z.string().check(z.trim()),
|
|
361
|
+
STORM_DEFAULT_ERROR_CODES_FILE
|
|
80
362
|
);
|
|
81
|
-
|
|
82
|
-
"The
|
|
363
|
+
schemaRegistry.add(errorCodesFileSchema, {
|
|
364
|
+
description: "The path to the workspace's error codes JSON file"
|
|
365
|
+
});
|
|
366
|
+
var errorUrlSchema = z.optional(z.url());
|
|
367
|
+
schemaRegistry.add(errorUrlSchema, {
|
|
368
|
+
description: "A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
369
|
+
});
|
|
370
|
+
var errorSchema = z.object({
|
|
371
|
+
codesFile: errorCodesFileSchema,
|
|
372
|
+
url: errorUrlSchema
|
|
373
|
+
});
|
|
374
|
+
schemaRegistry.add(errorSchema, {
|
|
375
|
+
description: "The workspace's error config used when creating error details during a system error"
|
|
376
|
+
});
|
|
377
|
+
var organizationNameSchema = z.optional(
|
|
378
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
83
379
|
);
|
|
84
|
-
|
|
85
|
-
"The
|
|
380
|
+
schemaRegistry.add(organizationNameSchema, {
|
|
381
|
+
description: "The name of the organization"
|
|
382
|
+
});
|
|
383
|
+
var organizationDescriptionSchema = z.optional(
|
|
384
|
+
z.string().check(z.trim())
|
|
86
385
|
);
|
|
87
|
-
|
|
88
|
-
"
|
|
386
|
+
schemaRegistry.add(organizationDescriptionSchema, {
|
|
387
|
+
description: "A description of the organization"
|
|
388
|
+
});
|
|
389
|
+
var organizationLogoSchema = z.optional(z.url());
|
|
390
|
+
schemaRegistry.add(organizationLogoSchema, {
|
|
391
|
+
description: "A URL to the organization's logo image"
|
|
392
|
+
});
|
|
393
|
+
var organizationIconSchema = z.optional(z.url());
|
|
394
|
+
schemaRegistry.add(organizationIconSchema, {
|
|
395
|
+
description: "A URL to the organization's icon image"
|
|
396
|
+
});
|
|
397
|
+
var organizationUrlSchema = z.optional(z.url());
|
|
398
|
+
schemaRegistry.add(organizationUrlSchema, {
|
|
399
|
+
description: "A URL to a page that provides more information about the organization"
|
|
400
|
+
});
|
|
401
|
+
var organizationSchema = z.object({
|
|
402
|
+
name: organizationNameSchema,
|
|
403
|
+
description: organizationDescriptionSchema,
|
|
404
|
+
logo: organizationLogoSchema,
|
|
405
|
+
icon: organizationIconSchema,
|
|
406
|
+
url: organizationUrlSchema
|
|
407
|
+
});
|
|
408
|
+
schemaRegistry.add(organizationSchema, {
|
|
409
|
+
description: "The workspace's organization details"
|
|
410
|
+
});
|
|
411
|
+
var schemaNameSchema = z._default(
|
|
412
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
413
|
+
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
89
414
|
);
|
|
90
|
-
|
|
91
|
-
"The
|
|
415
|
+
schemaRegistry.add(schemaNameSchema, {
|
|
416
|
+
description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
417
|
+
});
|
|
418
|
+
var nameSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
419
|
+
schemaRegistry.add(nameSchema, {
|
|
420
|
+
description: "The name of the workspace/project/service/package/scope using this configuration"
|
|
421
|
+
});
|
|
422
|
+
var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
423
|
+
schemaRegistry.add(namespaceSchema, {
|
|
424
|
+
description: "The namespace of the workspace/project/service/package/scope using this configuration"
|
|
425
|
+
});
|
|
426
|
+
var orgSchema = z.union([
|
|
427
|
+
organizationSchema,
|
|
428
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
429
|
+
]);
|
|
430
|
+
schemaRegistry.add(orgSchema, {
|
|
431
|
+
description: "The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
432
|
+
});
|
|
433
|
+
var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
|
|
434
|
+
schemaRegistry.add(repositorySchema, {
|
|
435
|
+
description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
|
|
436
|
+
});
|
|
437
|
+
var licenseSchema = z._default(
|
|
438
|
+
z.string().check(z.trim()),
|
|
439
|
+
"Apache-2.0"
|
|
92
440
|
);
|
|
93
|
-
|
|
94
|
-
"The
|
|
441
|
+
schemaRegistry.add(licenseSchema, {
|
|
442
|
+
description: "The license type of the package"
|
|
443
|
+
});
|
|
444
|
+
var homepageSchema = z.optional(z.url());
|
|
445
|
+
schemaRegistry.add(homepageSchema, {
|
|
446
|
+
description: "The homepage of the workspace"
|
|
447
|
+
});
|
|
448
|
+
var docsSchema = z.optional(z.url());
|
|
449
|
+
schemaRegistry.add(docsSchema, {
|
|
450
|
+
description: "The documentation site for the workspace"
|
|
451
|
+
});
|
|
452
|
+
var portalSchema = z.optional(z.url());
|
|
453
|
+
schemaRegistry.add(portalSchema, {
|
|
454
|
+
description: "The development portal site for the workspace"
|
|
455
|
+
});
|
|
456
|
+
var licensingSchema = z.optional(z.url());
|
|
457
|
+
schemaRegistry.add(licensingSchema, {
|
|
458
|
+
description: "The licensing site for the workspace"
|
|
459
|
+
});
|
|
460
|
+
var contactSchema = z.optional(z.url());
|
|
461
|
+
schemaRegistry.add(contactSchema, {
|
|
462
|
+
description: "The contact site for the workspace"
|
|
463
|
+
});
|
|
464
|
+
var supportSchema = z.optional(z.url());
|
|
465
|
+
schemaRegistry.add(supportSchema, {
|
|
466
|
+
description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
467
|
+
});
|
|
468
|
+
var branchSchema = z._default(
|
|
469
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
470
|
+
"main"
|
|
95
471
|
);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
accent: AccentColorSchema,
|
|
102
|
-
link: LinkColorSchema,
|
|
103
|
-
help: HelpColorSchema,
|
|
104
|
-
success: SuccessColorSchema,
|
|
105
|
-
info: InfoColorSchema,
|
|
106
|
-
warning: WarningColorSchema,
|
|
107
|
-
danger: DangerColorSchema,
|
|
108
|
-
fatal: FatalColorSchema,
|
|
109
|
-
positive: PositiveColorSchema,
|
|
110
|
-
negative: NegativeColorSchema,
|
|
111
|
-
gradient: GradientStopsSchema
|
|
112
|
-
});
|
|
113
|
-
var LightThemeColorConfigSchema = z.object({
|
|
114
|
-
foreground: DarkColorSchema,
|
|
115
|
-
background: LightColorSchema,
|
|
116
|
-
brand: BrandColorSchema,
|
|
117
|
-
alternate: AlternateColorSchema,
|
|
118
|
-
accent: AccentColorSchema,
|
|
119
|
-
link: LinkColorSchema,
|
|
120
|
-
help: HelpColorSchema,
|
|
121
|
-
success: SuccessColorSchema,
|
|
122
|
-
info: InfoColorSchema,
|
|
123
|
-
warning: WarningColorSchema,
|
|
124
|
-
danger: DangerColorSchema,
|
|
125
|
-
fatal: FatalColorSchema,
|
|
126
|
-
positive: PositiveColorSchema,
|
|
127
|
-
negative: NegativeColorSchema,
|
|
128
|
-
gradient: GradientStopsSchema
|
|
129
|
-
});
|
|
130
|
-
var MultiThemeColorConfigSchema = z.object({
|
|
131
|
-
dark: DarkThemeColorConfigSchema,
|
|
132
|
-
light: LightThemeColorConfigSchema
|
|
133
|
-
});
|
|
134
|
-
var SingleThemeColorConfigSchema = z.object({
|
|
135
|
-
dark: DarkColorSchema,
|
|
136
|
-
light: LightColorSchema,
|
|
137
|
-
brand: BrandColorSchema,
|
|
138
|
-
alternate: AlternateColorSchema,
|
|
139
|
-
accent: AccentColorSchema,
|
|
140
|
-
link: LinkColorSchema,
|
|
141
|
-
help: HelpColorSchema,
|
|
142
|
-
success: SuccessColorSchema,
|
|
143
|
-
info: InfoColorSchema,
|
|
144
|
-
warning: WarningColorSchema,
|
|
145
|
-
danger: DangerColorSchema,
|
|
146
|
-
fatal: FatalColorSchema,
|
|
147
|
-
positive: PositiveColorSchema,
|
|
148
|
-
negative: NegativeColorSchema,
|
|
149
|
-
gradient: GradientStopsSchema
|
|
150
|
-
});
|
|
151
|
-
var RegistryUrlConfigSchema = z.url().optional().describe("A remote registry URL used to publish distributable packages");
|
|
152
|
-
var RegistryConfigSchema = z.object({
|
|
153
|
-
github: RegistryUrlConfigSchema,
|
|
154
|
-
npm: RegistryUrlConfigSchema,
|
|
155
|
-
cargo: RegistryUrlConfigSchema,
|
|
156
|
-
cyclone: RegistryUrlConfigSchema,
|
|
157
|
-
container: RegistryUrlConfigSchema
|
|
158
|
-
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
159
|
-
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
160
|
-
MultiThemeColorConfigSchema
|
|
161
|
-
).describe("Colors used for various workspace elements");
|
|
162
|
-
var ColorConfigMapSchema = z.record(
|
|
163
|
-
z.union([z.literal("base"), z.string()]),
|
|
164
|
-
ColorConfigSchema
|
|
472
|
+
schemaRegistry.add(branchSchema, {
|
|
473
|
+
description: "The branch of the workspace"
|
|
474
|
+
});
|
|
475
|
+
var preidSchema = z.optional(
|
|
476
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
165
477
|
);
|
|
166
|
-
|
|
167
|
-
"
|
|
478
|
+
schemaRegistry.add(preidSchema, {
|
|
479
|
+
description: "A tag specifying the version pre-release identifier"
|
|
480
|
+
});
|
|
481
|
+
var ownerSchema = z.optional(
|
|
482
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
168
483
|
);
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
)
|
|
172
|
-
|
|
484
|
+
schemaRegistry.add(ownerSchema, {
|
|
485
|
+
description: "The owner of the package"
|
|
486
|
+
});
|
|
487
|
+
var modeSchema = z._default(
|
|
488
|
+
z.enum(["development", "staging", "production"]).check(z.trim(), z.toLowerCase()),
|
|
489
|
+
"production"
|
|
173
490
|
);
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
491
|
+
schemaRegistry.add(modeSchema, {
|
|
492
|
+
description: "The current runtime environment mode for the package"
|
|
493
|
+
});
|
|
494
|
+
var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
495
|
+
schemaRegistry.add(workspaceRootSchema, {
|
|
496
|
+
description: "The root directory of the workspace"
|
|
497
|
+
});
|
|
498
|
+
var skipCacheSchema = z._default(z.boolean(), false);
|
|
499
|
+
schemaRegistry.add(skipCacheSchema, {
|
|
500
|
+
description: "Should all known types of workspace caching be skipped?"
|
|
501
|
+
});
|
|
502
|
+
var packageManagerSchema = z._default(
|
|
503
|
+
z.enum(["npm", "yarn", "pnpm", "bun"]),
|
|
504
|
+
"npm"
|
|
181
505
|
);
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
),
|
|
189
|
-
footer: z.string().trim().optional().describe(
|
|
190
|
-
"A footer message appended to the end of the workspace's release notes"
|
|
191
|
-
)
|
|
192
|
-
}).describe("The workspace's release config used during the release process");
|
|
193
|
-
var WorkspaceSocialsConfigSchema = z.object({
|
|
194
|
-
twitter: z.string().trim().default(STORM_DEFAULT_SOCIAL_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
195
|
-
discord: z.string().trim().default(STORM_DEFAULT_SOCIAL_DISCORD).describe("A Discord account associated with the organization/project"),
|
|
196
|
-
telegram: z.string().trim().default(STORM_DEFAULT_SOCIAL_TELEGRAM).describe("A Telegram account associated with the organization/project"),
|
|
197
|
-
slack: z.string().trim().default(STORM_DEFAULT_SOCIAL_SLACK).describe("A Slack account associated with the organization/project"),
|
|
198
|
-
medium: z.string().trim().default(STORM_DEFAULT_SOCIAL_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
199
|
-
github: z.string().trim().default(STORM_DEFAULT_SOCIAL_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
200
|
-
}).describe(
|
|
201
|
-
"The workspace's account config used to store various social media links"
|
|
506
|
+
schemaRegistry.add(packageManagerSchema, {
|
|
507
|
+
description: "The JavaScript/TypeScript package manager used by the repository"
|
|
508
|
+
});
|
|
509
|
+
var timezoneSchema = z._default(
|
|
510
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
511
|
+
"America/New_York"
|
|
202
512
|
);
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
"The directory used to store the environment's configuration files"
|
|
210
|
-
),
|
|
211
|
-
temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
212
|
-
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
213
|
-
build: z.string().trim().default("dist").describe(
|
|
214
|
-
"The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
215
|
-
)
|
|
216
|
-
}).describe(
|
|
217
|
-
"Various directories used by the workspace to store data, cache, and configuration files"
|
|
513
|
+
schemaRegistry.add(timezoneSchema, {
|
|
514
|
+
description: "The default timezone of the workspace"
|
|
515
|
+
});
|
|
516
|
+
var localeSchema = z._default(
|
|
517
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
518
|
+
"en-US"
|
|
218
519
|
);
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}).describe("The workspace's error config used during the error process");
|
|
225
|
-
var organizationConfigSchema = z.object({
|
|
226
|
-
name: z.string().trim().describe("The name of the organization"),
|
|
227
|
-
description: z.string().trim().optional().describe("A description of the organization"),
|
|
228
|
-
logo: z.url().optional().describe("A URL to the organization's logo image"),
|
|
229
|
-
icon: z.url().optional().describe("A URL to the organization's icon image"),
|
|
230
|
-
url: z.url().optional().describe(
|
|
231
|
-
"A URL to a page that provides more information about the organization"
|
|
232
|
-
)
|
|
233
|
-
}).describe("The workspace's organization details");
|
|
234
|
-
var stormWorkspaceConfigSchema = z.object({
|
|
235
|
-
$schema: z.string().trim().default(
|
|
236
|
-
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
237
|
-
).describe(
|
|
238
|
-
"The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
239
|
-
),
|
|
240
|
-
extends: ExtendsSchema.optional(),
|
|
241
|
-
name: z.string().trim().toLowerCase().optional().describe(
|
|
242
|
-
"The name of the service/package/scope using this configuration"
|
|
243
|
-
),
|
|
244
|
-
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
245
|
-
organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
|
|
246
|
-
"The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
247
|
-
),
|
|
248
|
-
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
249
|
-
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
250
|
-
homepage: z.url().optional().describe("The homepage of the workspace"),
|
|
251
|
-
docs: z.url().optional().describe("The documentation site for the workspace"),
|
|
252
|
-
portal: z.url().optional().describe("The development portal site for the workspace"),
|
|
253
|
-
licensing: z.url().optional().describe("The licensing site for the workspace"),
|
|
254
|
-
contact: z.url().optional().describe("The contact site for the workspace"),
|
|
255
|
-
support: z.url().optional().describe(
|
|
256
|
-
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
257
|
-
),
|
|
258
|
-
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
259
|
-
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
260
|
-
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
261
|
-
bot: WorkspaceBotConfigSchema,
|
|
262
|
-
release: WorkspaceReleaseConfigSchema,
|
|
263
|
-
socials: WorkspaceSocialsConfigSchema,
|
|
264
|
-
error: errorConfigSchema,
|
|
265
|
-
mode: z.string().trim().default("production").describe("The current runtime environment mode for the package"),
|
|
266
|
-
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
267
|
-
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
268
|
-
directories: WorkspaceDirectoryConfigSchema,
|
|
269
|
-
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
|
|
270
|
-
"The JavaScript/TypeScript package manager used by the repository"
|
|
271
|
-
),
|
|
272
|
-
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
273
|
-
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
274
|
-
logLevel: z.enum([
|
|
520
|
+
schemaRegistry.add(localeSchema, {
|
|
521
|
+
description: "The default locale of the workspace"
|
|
522
|
+
});
|
|
523
|
+
var logLevelSchema = z._default(
|
|
524
|
+
z.enum([
|
|
275
525
|
"silent",
|
|
276
526
|
"fatal",
|
|
277
527
|
"error",
|
|
@@ -281,23 +531,65 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
281
531
|
"debug",
|
|
282
532
|
"trace",
|
|
283
533
|
"all"
|
|
284
|
-
])
|
|
285
|
-
|
|
286
|
-
),
|
|
287
|
-
skipConfigLogging: z.boolean().optional().describe(
|
|
288
|
-
"Should the logging of the current Storm Workspace configuration be skipped?"
|
|
289
|
-
),
|
|
290
|
-
registry: RegistryConfigSchema,
|
|
291
|
-
configFile: z.string().trim().nullable().default(null).describe(
|
|
292
|
-
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
293
|
-
),
|
|
294
|
-
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
295
|
-
"Storm theme config values used for styling various package elements"
|
|
296
|
-
),
|
|
297
|
-
extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
298
|
-
}).describe(
|
|
299
|
-
"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."
|
|
534
|
+
]),
|
|
535
|
+
"info"
|
|
300
536
|
);
|
|
537
|
+
schemaRegistry.add(logLevelSchema, {
|
|
538
|
+
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`)."
|
|
539
|
+
});
|
|
540
|
+
var skipConfigLoggingSchema = z._default(z.boolean(), true);
|
|
541
|
+
schemaRegistry.add(skipConfigLoggingSchema, {
|
|
542
|
+
description: "Should the logging of the current Storm Workspace configuration be skipped?"
|
|
543
|
+
});
|
|
544
|
+
var configFileSchema = z._default(
|
|
545
|
+
z.nullable(z.string().check(z.trim())),
|
|
546
|
+
null
|
|
547
|
+
);
|
|
548
|
+
schemaRegistry.add(configFileSchema, {
|
|
549
|
+
description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
550
|
+
});
|
|
551
|
+
var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
|
|
552
|
+
schemaRegistry.add(extensionsSchema, {
|
|
553
|
+
description: "Configuration of each used extension"
|
|
554
|
+
});
|
|
555
|
+
var workspaceConfigSchema = z.object({
|
|
556
|
+
$schema: schemaNameSchema,
|
|
557
|
+
extends: extendsSchema,
|
|
558
|
+
name: nameSchema,
|
|
559
|
+
namespace: namespaceSchema,
|
|
560
|
+
organization: orgSchema,
|
|
561
|
+
repository: repositorySchema,
|
|
562
|
+
license: licenseSchema,
|
|
563
|
+
homepage: homepageSchema,
|
|
564
|
+
docs: docsSchema,
|
|
565
|
+
portal: portalSchema,
|
|
566
|
+
licensing: licensingSchema,
|
|
567
|
+
contact: contactSchema,
|
|
568
|
+
support: supportSchema,
|
|
569
|
+
branch: branchSchema,
|
|
570
|
+
preid: preidSchema,
|
|
571
|
+
owner: ownerSchema,
|
|
572
|
+
bot: workspaceBotSchema,
|
|
573
|
+
release: workspaceReleaseSchema,
|
|
574
|
+
socials: workspaceSocialsSchema,
|
|
575
|
+
error: errorSchema,
|
|
576
|
+
mode: modeSchema,
|
|
577
|
+
workspaceRoot: workspaceRootSchema,
|
|
578
|
+
skipCache: skipCacheSchema,
|
|
579
|
+
directories: workspaceDirectorySchema,
|
|
580
|
+
packageManager: packageManagerSchema,
|
|
581
|
+
timezone: timezoneSchema,
|
|
582
|
+
locale: localeSchema,
|
|
583
|
+
logLevel: logLevelSchema,
|
|
584
|
+
skipConfigLogging: skipConfigLoggingSchema,
|
|
585
|
+
registry: registrySchema,
|
|
586
|
+
configFile: configFileSchema,
|
|
587
|
+
colors: z.union([colorsSchema, themeColorsSchema]),
|
|
588
|
+
extensions: extensionsSchema
|
|
589
|
+
});
|
|
590
|
+
schemaRegistry.add(extensionsSchema, {
|
|
591
|
+
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."
|
|
592
|
+
});
|
|
301
593
|
|
|
302
594
|
// ../config-tools/src/create-storm-config.ts
|
|
303
595
|
var import_defu2 = __toESM(require("defu"), 1);
|
|
@@ -1076,7 +1368,10 @@ var getConfigEnv = () => {
|
|
|
1076
1368
|
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
1077
1369
|
},
|
|
1078
1370
|
release: {
|
|
1079
|
-
banner:
|
|
1371
|
+
banner: {
|
|
1372
|
+
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
1373
|
+
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
1374
|
+
},
|
|
1080
1375
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
1081
1376
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
1082
1377
|
},
|
|
@@ -1153,11 +1448,11 @@ var getConfigEnv = () => {
|
|
|
1153
1448
|
);
|
|
1154
1449
|
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
1155
1450
|
(ret, themeName) => {
|
|
1156
|
-
ret[themeName] =
|
|
1451
|
+
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
1157
1452
|
return ret;
|
|
1158
1453
|
},
|
|
1159
1454
|
{}
|
|
1160
|
-
) :
|
|
1455
|
+
) : getThemeColorsEnv(prefix);
|
|
1161
1456
|
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
1162
1457
|
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1163
1458
|
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
@@ -1184,11 +1479,11 @@ var getConfigEnv = () => {
|
|
|
1184
1479
|
}
|
|
1185
1480
|
return config;
|
|
1186
1481
|
};
|
|
1187
|
-
var
|
|
1482
|
+
var getThemeColorsEnv = (prefix, theme) => {
|
|
1188
1483
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
1189
|
-
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ?
|
|
1484
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
1190
1485
|
};
|
|
1191
|
-
var
|
|
1486
|
+
var getSingleThemeColorsEnv = (prefix) => {
|
|
1192
1487
|
const gradient = [];
|
|
1193
1488
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1194
1489
|
gradient.push(
|
|
@@ -1220,15 +1515,13 @@ var getSingleThemeColorConfigEnv = (prefix) => {
|
|
|
1220
1515
|
gradient
|
|
1221
1516
|
};
|
|
1222
1517
|
};
|
|
1223
|
-
var
|
|
1518
|
+
var getMultiThemeColorsEnv = (prefix) => {
|
|
1224
1519
|
return {
|
|
1225
|
-
light:
|
|
1226
|
-
|
|
1227
|
-
),
|
|
1228
|
-
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
1520
|
+
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
1521
|
+
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
1229
1522
|
};
|
|
1230
1523
|
};
|
|
1231
|
-
var
|
|
1524
|
+
var getBaseThemeColorsEnv = (prefix) => {
|
|
1232
1525
|
const gradient = [];
|
|
1233
1526
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1234
1527
|
gradient.push(
|
|
@@ -1307,7 +1600,16 @@ var setConfigEnv = (config) => {
|
|
|
1307
1600
|
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
1308
1601
|
}
|
|
1309
1602
|
if (config.release) {
|
|
1310
|
-
|
|
1603
|
+
if (config.release.banner) {
|
|
1604
|
+
if (typeof config.release.banner === "string") {
|
|
1605
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1606
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
|
|
1607
|
+
} else {
|
|
1608
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
|
|
1609
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
|
|
1610
|
+
process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1311
1613
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
1312
1614
|
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
1313
1615
|
}
|
|
@@ -1450,10 +1752,10 @@ var setConfigEnv = (config) => {
|
|
|
1450
1752
|
}
|
|
1451
1753
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
1452
1754
|
for (const key of Object.keys(config.colors)) {
|
|
1453
|
-
|
|
1755
|
+
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1454
1756
|
}
|
|
1455
1757
|
} else {
|
|
1456
|
-
|
|
1758
|
+
setThemeColorsEnv(
|
|
1457
1759
|
`${prefix}COLOR_`,
|
|
1458
1760
|
config.colors
|
|
1459
1761
|
);
|
|
@@ -1508,10 +1810,10 @@ var setConfigEnv = (config) => {
|
|
|
1508
1810
|
}
|
|
1509
1811
|
}
|
|
1510
1812
|
};
|
|
1511
|
-
var
|
|
1512
|
-
return config?.light?.brand || config?.dark?.brand ?
|
|
1813
|
+
var setThemeColorsEnv = (prefix, config) => {
|
|
1814
|
+
return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
1513
1815
|
};
|
|
1514
|
-
var
|
|
1816
|
+
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
1515
1817
|
if (config.dark) {
|
|
1516
1818
|
process.env[`${prefix}DARK`] = config.dark;
|
|
1517
1819
|
}
|
|
@@ -1560,13 +1862,13 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
|
1560
1862
|
}
|
|
1561
1863
|
}
|
|
1562
1864
|
};
|
|
1563
|
-
var
|
|
1865
|
+
var setMultiThemeColorsEnv = (prefix, config) => {
|
|
1564
1866
|
return {
|
|
1565
|
-
light:
|
|
1566
|
-
dark:
|
|
1867
|
+
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
1868
|
+
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
1567
1869
|
};
|
|
1568
1870
|
};
|
|
1569
|
-
var
|
|
1871
|
+
var setBaseThemeColorsEnv = (prefix, config) => {
|
|
1570
1872
|
if (config.foreground) {
|
|
1571
1873
|
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
1572
1874
|
}
|
|
@@ -1647,7 +1949,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1647
1949
|
);
|
|
1648
1950
|
try {
|
|
1649
1951
|
result = applyDefaultConfig(
|
|
1650
|
-
await
|
|
1952
|
+
await workspaceConfigSchema.parseAsync(configInput)
|
|
1651
1953
|
);
|
|
1652
1954
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1653
1955
|
} catch (error) {
|