@storm-software/esbuild 0.45.48 → 0.45.54
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 +1 -1
- package/dist/assets.cjs +4 -4
- package/dist/assets.js +3 -3
- package/dist/build.cjs +11 -11
- package/dist/build.js +10 -10
- package/dist/{chunk-XT7RUW5O.js → chunk-3FBWVPJW.js} +4 -4
- package/dist/{chunk-3W7YORKS.js → chunk-3GCNEVK7.js} +1 -1
- package/dist/{chunk-OQIHAJKM.cjs → chunk-A6NQIRGS.cjs} +5 -5
- package/dist/{chunk-IICFSC7H.js → chunk-ADBXIH6V.js} +5 -5
- package/dist/chunk-BQT3OVTI.js +325 -0
- package/dist/{chunk-PX7DC45G.cjs → chunk-FJYBNKEX.cjs} +3 -3
- package/dist/{chunk-HVYEXIBG.cjs → chunk-GA67YJGQ.cjs} +585 -55
- package/dist/{chunk-GSMUB44K.js → chunk-KX7KPO7S.js} +2 -2
- package/dist/{chunk-ANVMKD2B.cjs → chunk-LBZ4HJFB.cjs} +3 -3
- package/dist/{chunk-TOHPM7SD.js → chunk-NMZ7BF3X.js} +1 -1
- package/dist/{chunk-CUDPQHBO.cjs → chunk-O5JRHLWQ.cjs} +3 -3
- package/dist/{chunk-UWWLDIJW.js → chunk-R7KP6WNL.js} +551 -21
- package/dist/{chunk-4PCPRDCN.js → chunk-RKF72MBJ.js} +7 -7
- package/dist/{chunk-5KDTAKBV.js → chunk-RM2PYDML.js} +6 -6
- package/dist/chunk-SOB2SZPD.cjs +325 -0
- package/dist/{chunk-YMMROUG3.js → chunk-UK6WDL5V.js} +1 -1
- package/dist/{chunk-LAH6PYTD.cjs → chunk-ULU7VZRK.cjs} +4 -4
- package/dist/{chunk-XC2LNBUH.cjs → chunk-VMZTU5MH.cjs} +7 -7
- package/dist/{chunk-OUSMQA4F.cjs → chunk-XFVVEEPC.cjs} +22 -22
- package/dist/{chunk-VWTTBHHC.cjs → chunk-XUAZ6AMA.cjs} +11 -11
- package/dist/clean.cjs +3 -4
- package/dist/clean.js +2 -3
- package/dist/config.cjs +4 -4
- package/dist/config.js +3 -3
- package/dist/context.cjs +5 -5
- package/dist/context.js +4 -4
- package/dist/index.cjs +11 -11
- package/dist/index.js +10 -10
- package/dist/package-json.cjs +4 -4
- package/dist/package-json.js +3 -3
- package/dist/plugins/deps-check.cjs +3 -4
- package/dist/plugins/deps-check.js +2 -3
- package/dist/tsup.cjs +3 -3
- package/dist/tsup.js +2 -2
- package/dist/watch.cjs +3 -4
- package/dist/watch.js +1 -2
- package/package.json +5 -5
- package/dist/chunk-4PYGUUI5.cjs +0 -786
- package/dist/chunk-R2UH2X62.js +0 -786
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
correctPaths,
|
|
3
|
+
joinPaths
|
|
4
|
+
} from "./chunk-6RS6PUM7.js";
|
|
5
|
+
import {
|
|
3
6
|
LogLevel,
|
|
4
|
-
STORM_DEFAULT_DOCS,
|
|
5
|
-
STORM_DEFAULT_HOMEPAGE,
|
|
6
|
-
STORM_DEFAULT_LICENSING,
|
|
7
|
-
applyDefaultConfig,
|
|
8
|
-
findWorkspaceRoot,
|
|
9
7
|
formatLogMessage,
|
|
10
8
|
getLogLevel,
|
|
11
9
|
getLogLevelLabel,
|
|
12
|
-
getPackageJsonConfig,
|
|
13
|
-
stormWorkspaceConfigSchema,
|
|
14
10
|
writeDebug,
|
|
15
11
|
writeTrace,
|
|
16
12
|
writeWarning
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
correctPaths,
|
|
20
|
-
joinPaths
|
|
21
|
-
} from "./chunk-6RS6PUM7.js";
|
|
13
|
+
} from "./chunk-BQT3OVTI.js";
|
|
22
14
|
import {
|
|
23
15
|
init_esm_shims
|
|
24
16
|
} from "./chunk-RJEZSH2W.js";
|
|
@@ -110,8 +102,108 @@ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `//
|
|
|
110
102
|
// ../build-tools/src/utilities/generate-package-json.ts
|
|
111
103
|
init_esm_shims();
|
|
112
104
|
import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
|
|
105
|
+
|
|
106
|
+
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
107
|
+
init_esm_shims();
|
|
108
|
+
|
|
109
|
+
// ../config-tools/src/utilities/find-up.ts
|
|
110
|
+
init_esm_shims();
|
|
111
|
+
import { existsSync } from "node:fs";
|
|
112
|
+
import { join } from "node:path";
|
|
113
|
+
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
114
|
+
var depth = 0;
|
|
115
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
116
|
+
const _startPath = startPath ?? process.cwd();
|
|
117
|
+
if (endDirectoryNames.some(
|
|
118
|
+
(endDirName) => existsSync(join(_startPath, endDirName))
|
|
119
|
+
)) {
|
|
120
|
+
return _startPath;
|
|
121
|
+
}
|
|
122
|
+
if (endFileNames.some(
|
|
123
|
+
(endFileName) => existsSync(join(_startPath, endFileName))
|
|
124
|
+
)) {
|
|
125
|
+
return _startPath;
|
|
126
|
+
}
|
|
127
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
128
|
+
const parent = join(_startPath, "..");
|
|
129
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
130
|
+
}
|
|
131
|
+
return void 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
135
|
+
var rootFiles = [
|
|
136
|
+
"storm-workspace.json",
|
|
137
|
+
"storm-workspace.yaml",
|
|
138
|
+
"storm-workspace.yml",
|
|
139
|
+
"storm-workspace.js",
|
|
140
|
+
"storm-workspace.ts",
|
|
141
|
+
".storm-workspace.json",
|
|
142
|
+
".storm-workspace.yaml",
|
|
143
|
+
".storm-workspace.yml",
|
|
144
|
+
".storm-workspace.js",
|
|
145
|
+
".storm-workspace.ts",
|
|
146
|
+
"lerna.json",
|
|
147
|
+
"nx.json",
|
|
148
|
+
"turbo.json",
|
|
149
|
+
"npm-workspace.json",
|
|
150
|
+
"yarn-workspace.json",
|
|
151
|
+
"pnpm-workspace.json",
|
|
152
|
+
"npm-workspace.yaml",
|
|
153
|
+
"yarn-workspace.yaml",
|
|
154
|
+
"pnpm-workspace.yaml",
|
|
155
|
+
"npm-workspace.yml",
|
|
156
|
+
"yarn-workspace.yml",
|
|
157
|
+
"pnpm-workspace.yml",
|
|
158
|
+
"npm-lock.json",
|
|
159
|
+
"yarn-lock.json",
|
|
160
|
+
"pnpm-lock.json",
|
|
161
|
+
"npm-lock.yaml",
|
|
162
|
+
"yarn-lock.yaml",
|
|
163
|
+
"pnpm-lock.yaml",
|
|
164
|
+
"npm-lock.yml",
|
|
165
|
+
"yarn-lock.yml",
|
|
166
|
+
"pnpm-lock.yml",
|
|
167
|
+
"bun.lockb"
|
|
168
|
+
];
|
|
169
|
+
var rootDirectories = [
|
|
170
|
+
".storm-workspace",
|
|
171
|
+
".nx",
|
|
172
|
+
".github",
|
|
173
|
+
".vscode",
|
|
174
|
+
".verdaccio"
|
|
175
|
+
];
|
|
176
|
+
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
177
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
178
|
+
return correctPaths(
|
|
179
|
+
process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
return correctPaths(
|
|
183
|
+
findFolderUp(
|
|
184
|
+
pathInsideMonorepo ?? process.cwd(),
|
|
185
|
+
rootFiles,
|
|
186
|
+
rootDirectories
|
|
187
|
+
)
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
191
|
+
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
192
|
+
if (!result) {
|
|
193
|
+
throw new Error(
|
|
194
|
+
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
195
|
+
${rootFiles.join(
|
|
196
|
+
"\n"
|
|
197
|
+
)}
|
|
198
|
+
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
return result;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// ../build-tools/src/utilities/generate-package-json.ts
|
|
113
205
|
import { Glob } from "glob";
|
|
114
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
206
|
+
import { existsSync as existsSync2, readFileSync } from "node:fs";
|
|
115
207
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
116
208
|
import {
|
|
117
209
|
createProjectGraphAsync,
|
|
@@ -151,7 +243,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
151
243
|
projectNode.data.root,
|
|
152
244
|
"package.json"
|
|
153
245
|
);
|
|
154
|
-
if (
|
|
246
|
+
if (existsSync2(projectPackageJsonPath)) {
|
|
155
247
|
const projectPackageJsonContent = await readFile2(
|
|
156
248
|
projectPackageJsonPath,
|
|
157
249
|
"utf8"
|
|
@@ -186,7 +278,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
186
278
|
projectConfigurations.projects[dep].root,
|
|
187
279
|
"package.json"
|
|
188
280
|
);
|
|
189
|
-
if (
|
|
281
|
+
if (existsSync2(depPackageJsonPath)) {
|
|
190
282
|
const depPackageJsonContent = readFileSync(
|
|
191
283
|
depPackageJsonPath,
|
|
192
284
|
"utf8"
|
|
@@ -264,12 +356,411 @@ init_esm_shims();
|
|
|
264
356
|
|
|
265
357
|
// ../config-tools/src/create-storm-config.ts
|
|
266
358
|
init_esm_shims();
|
|
359
|
+
|
|
360
|
+
// ../config/src/schema.ts
|
|
361
|
+
init_esm_shims();
|
|
362
|
+
import * as z from "zod";
|
|
363
|
+
|
|
364
|
+
// ../config/src/constants.ts
|
|
365
|
+
init_esm_shims();
|
|
366
|
+
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
367
|
+
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
368
|
+
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
369
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
370
|
+
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
371
|
+
var STORM_DEFAULT_SOCIAL_TWITTER = "StormSoftwareHQ";
|
|
372
|
+
var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
373
|
+
var STORM_DEFAULT_SOCIAL_TELEGRAM = "https://t.me/storm_software";
|
|
374
|
+
var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
375
|
+
var STORM_DEFAULT_SOCIAL_MEDIUM = "https://medium.com/storm-software";
|
|
376
|
+
var STORM_DEFAULT_SOCIAL_GITHUB = "https://github.com/storm-software";
|
|
377
|
+
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
378
|
+
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.
|
|
379
|
+
|
|
380
|
+
Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
381
|
+
|
|
382
|
+
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!
|
|
383
|
+
`;
|
|
384
|
+
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
385
|
+
|
|
386
|
+
// ../config/src/schema.ts
|
|
387
|
+
var ColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7);
|
|
388
|
+
var DarkColorSchema = ColorSchema.default("#151718").describe(
|
|
389
|
+
"The dark background color of the workspace"
|
|
390
|
+
);
|
|
391
|
+
var LightColorSchema = ColorSchema.default("#cbd5e1").describe(
|
|
392
|
+
"The light background color of the workspace"
|
|
393
|
+
);
|
|
394
|
+
var BrandColorSchema = ColorSchema.default("#1fb2a6").describe(
|
|
395
|
+
"The primary brand specific color of the workspace"
|
|
396
|
+
);
|
|
397
|
+
var AlternateColorSchema = ColorSchema.optional().describe(
|
|
398
|
+
"The alternate brand specific color of the workspace"
|
|
399
|
+
);
|
|
400
|
+
var AccentColorSchema = ColorSchema.optional().describe(
|
|
401
|
+
"The secondary brand specific color of the workspace"
|
|
402
|
+
);
|
|
403
|
+
var LinkColorSchema = ColorSchema.default("#3fa6ff").describe(
|
|
404
|
+
"The color used to display hyperlink text"
|
|
405
|
+
);
|
|
406
|
+
var HelpColorSchema = ColorSchema.default("#818cf8").describe(
|
|
407
|
+
"The second brand specific color of the workspace"
|
|
408
|
+
);
|
|
409
|
+
var SuccessColorSchema = ColorSchema.default("#45b27e").describe(
|
|
410
|
+
"The success color of the workspace"
|
|
411
|
+
);
|
|
412
|
+
var InfoColorSchema = ColorSchema.default("#38bdf8").describe(
|
|
413
|
+
"The informational color of the workspace"
|
|
414
|
+
);
|
|
415
|
+
var WarningColorSchema = ColorSchema.default("#f3d371").describe(
|
|
416
|
+
"The warning color of the workspace"
|
|
417
|
+
);
|
|
418
|
+
var DangerColorSchema = ColorSchema.default("#d8314a").describe(
|
|
419
|
+
"The danger color of the workspace"
|
|
420
|
+
);
|
|
421
|
+
var FatalColorSchema = ColorSchema.optional().describe(
|
|
422
|
+
"The fatal color of the workspace"
|
|
423
|
+
);
|
|
424
|
+
var PositiveColorSchema = ColorSchema.default("#4ade80").describe(
|
|
425
|
+
"The positive number color of the workspace"
|
|
426
|
+
);
|
|
427
|
+
var NegativeColorSchema = ColorSchema.default("#ef4444").describe(
|
|
428
|
+
"The negative number color of the workspace"
|
|
429
|
+
);
|
|
430
|
+
var GradientStopsSchema = z.array(ColorSchema).optional().describe(
|
|
431
|
+
"The color stops for the base gradient color pattern used in the workspace"
|
|
432
|
+
);
|
|
433
|
+
var DarkThemeColorConfigSchema = z.object({
|
|
434
|
+
foreground: LightColorSchema,
|
|
435
|
+
background: DarkColorSchema,
|
|
436
|
+
brand: BrandColorSchema,
|
|
437
|
+
alternate: AlternateColorSchema,
|
|
438
|
+
accent: AccentColorSchema,
|
|
439
|
+
link: LinkColorSchema,
|
|
440
|
+
help: HelpColorSchema,
|
|
441
|
+
success: SuccessColorSchema,
|
|
442
|
+
info: InfoColorSchema,
|
|
443
|
+
warning: WarningColorSchema,
|
|
444
|
+
danger: DangerColorSchema,
|
|
445
|
+
fatal: FatalColorSchema,
|
|
446
|
+
positive: PositiveColorSchema,
|
|
447
|
+
negative: NegativeColorSchema,
|
|
448
|
+
gradient: GradientStopsSchema
|
|
449
|
+
});
|
|
450
|
+
var LightThemeColorConfigSchema = z.object({
|
|
451
|
+
foreground: DarkColorSchema,
|
|
452
|
+
background: LightColorSchema,
|
|
453
|
+
brand: BrandColorSchema,
|
|
454
|
+
alternate: AlternateColorSchema,
|
|
455
|
+
accent: AccentColorSchema,
|
|
456
|
+
link: LinkColorSchema,
|
|
457
|
+
help: HelpColorSchema,
|
|
458
|
+
success: SuccessColorSchema,
|
|
459
|
+
info: InfoColorSchema,
|
|
460
|
+
warning: WarningColorSchema,
|
|
461
|
+
danger: DangerColorSchema,
|
|
462
|
+
fatal: FatalColorSchema,
|
|
463
|
+
positive: PositiveColorSchema,
|
|
464
|
+
negative: NegativeColorSchema,
|
|
465
|
+
gradient: GradientStopsSchema
|
|
466
|
+
});
|
|
467
|
+
var MultiThemeColorConfigSchema = z.object({
|
|
468
|
+
dark: DarkThemeColorConfigSchema,
|
|
469
|
+
light: LightThemeColorConfigSchema
|
|
470
|
+
});
|
|
471
|
+
var SingleThemeColorConfigSchema = z.object({
|
|
472
|
+
dark: DarkColorSchema,
|
|
473
|
+
light: LightColorSchema,
|
|
474
|
+
brand: BrandColorSchema,
|
|
475
|
+
alternate: AlternateColorSchema,
|
|
476
|
+
accent: AccentColorSchema,
|
|
477
|
+
link: LinkColorSchema,
|
|
478
|
+
help: HelpColorSchema,
|
|
479
|
+
success: SuccessColorSchema,
|
|
480
|
+
info: InfoColorSchema,
|
|
481
|
+
warning: WarningColorSchema,
|
|
482
|
+
danger: DangerColorSchema,
|
|
483
|
+
fatal: FatalColorSchema,
|
|
484
|
+
positive: PositiveColorSchema,
|
|
485
|
+
negative: NegativeColorSchema,
|
|
486
|
+
gradient: GradientStopsSchema
|
|
487
|
+
});
|
|
488
|
+
var RegistryUrlConfigSchema = z.url().optional().describe("A remote registry URL used to publish distributable packages");
|
|
489
|
+
var RegistryConfigSchema = z.object({
|
|
490
|
+
github: RegistryUrlConfigSchema,
|
|
491
|
+
npm: RegistryUrlConfigSchema,
|
|
492
|
+
cargo: RegistryUrlConfigSchema,
|
|
493
|
+
cyclone: RegistryUrlConfigSchema,
|
|
494
|
+
container: RegistryUrlConfigSchema
|
|
495
|
+
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
496
|
+
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
497
|
+
MultiThemeColorConfigSchema
|
|
498
|
+
).describe("Colors used for various workspace elements");
|
|
499
|
+
var ColorConfigMapSchema = z.record(
|
|
500
|
+
z.union([z.literal("base"), z.string()]),
|
|
501
|
+
ColorConfigSchema
|
|
502
|
+
);
|
|
503
|
+
var ExtendsItemSchema = z.string().trim().describe(
|
|
504
|
+
"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."
|
|
505
|
+
);
|
|
506
|
+
var ExtendsSchema = ExtendsItemSchema.or(
|
|
507
|
+
z.array(ExtendsItemSchema)
|
|
508
|
+
).describe(
|
|
509
|
+
"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."
|
|
510
|
+
);
|
|
511
|
+
var WorkspaceBotConfigSchema = z.object({
|
|
512
|
+
name: z.string().trim().default("stormie-bot").describe(
|
|
513
|
+
"The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
514
|
+
),
|
|
515
|
+
email: z.email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
516
|
+
}).describe(
|
|
517
|
+
"The workspace's bot user's config used to automated various operations tasks"
|
|
518
|
+
);
|
|
519
|
+
var WorkspaceReleaseConfigSchema = z.object({
|
|
520
|
+
banner: z.string().trim().optional().describe(
|
|
521
|
+
"A URL to a banner image used to display the workspace's release"
|
|
522
|
+
),
|
|
523
|
+
header: z.string().trim().optional().describe(
|
|
524
|
+
"A header message appended to the start of the workspace's release notes"
|
|
525
|
+
),
|
|
526
|
+
footer: z.string().trim().optional().describe(
|
|
527
|
+
"A footer message appended to the end of the workspace's release notes"
|
|
528
|
+
)
|
|
529
|
+
}).describe("The workspace's release config used during the release process");
|
|
530
|
+
var WorkspaceSocialsConfigSchema = z.object({
|
|
531
|
+
twitter: z.string().trim().default(STORM_DEFAULT_SOCIAL_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
532
|
+
discord: z.string().trim().default(STORM_DEFAULT_SOCIAL_DISCORD).describe("A Discord account associated with the organization/project"),
|
|
533
|
+
telegram: z.string().trim().default(STORM_DEFAULT_SOCIAL_TELEGRAM).describe("A Telegram account associated with the organization/project"),
|
|
534
|
+
slack: z.string().trim().default(STORM_DEFAULT_SOCIAL_SLACK).describe("A Slack account associated with the organization/project"),
|
|
535
|
+
medium: z.string().trim().default(STORM_DEFAULT_SOCIAL_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
536
|
+
github: z.string().trim().default(STORM_DEFAULT_SOCIAL_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
537
|
+
}).describe(
|
|
538
|
+
"The workspace's account config used to store various social media links"
|
|
539
|
+
);
|
|
540
|
+
var WorkspaceDirectoryConfigSchema = z.object({
|
|
541
|
+
cache: z.string().trim().optional().describe(
|
|
542
|
+
"The directory used to store the environment's cached file data"
|
|
543
|
+
),
|
|
544
|
+
data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
545
|
+
config: z.string().trim().optional().describe(
|
|
546
|
+
"The directory used to store the environment's configuration files"
|
|
547
|
+
),
|
|
548
|
+
temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
549
|
+
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
550
|
+
build: z.string().trim().default("dist").describe(
|
|
551
|
+
"The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
552
|
+
)
|
|
553
|
+
}).describe(
|
|
554
|
+
"Various directories used by the workspace to store data, cache, and configuration files"
|
|
555
|
+
);
|
|
556
|
+
var errorConfigSchema = z.object({
|
|
557
|
+
codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
|
|
558
|
+
url: z.url().optional().describe(
|
|
559
|
+
"A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
560
|
+
)
|
|
561
|
+
}).describe("The workspace's error config used during the error process");
|
|
562
|
+
var organizationConfigSchema = z.object({
|
|
563
|
+
name: z.string().trim().describe("The name of the organization"),
|
|
564
|
+
description: z.string().trim().optional().describe("A description of the organization"),
|
|
565
|
+
logo: z.url().optional().describe("A URL to the organization's logo image"),
|
|
566
|
+
icon: z.url().optional().describe("A URL to the organization's icon image"),
|
|
567
|
+
url: z.url().optional().describe(
|
|
568
|
+
"A URL to a page that provides more information about the organization"
|
|
569
|
+
)
|
|
570
|
+
}).describe("The workspace's organization details");
|
|
571
|
+
var stormWorkspaceConfigSchema = z.object({
|
|
572
|
+
$schema: z.string().trim().default(
|
|
573
|
+
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
574
|
+
).describe(
|
|
575
|
+
"The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
576
|
+
),
|
|
577
|
+
extends: ExtendsSchema.optional(),
|
|
578
|
+
name: z.string().trim().toLowerCase().optional().describe(
|
|
579
|
+
"The name of the service/package/scope using this configuration"
|
|
580
|
+
),
|
|
581
|
+
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
582
|
+
organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
|
|
583
|
+
"The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
584
|
+
),
|
|
585
|
+
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
586
|
+
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
587
|
+
homepage: z.url().optional().describe("The homepage of the workspace"),
|
|
588
|
+
docs: z.url().optional().describe("The documentation site for the workspace"),
|
|
589
|
+
portal: z.url().optional().describe("The development portal site for the workspace"),
|
|
590
|
+
licensing: z.url().optional().describe("The licensing site for the workspace"),
|
|
591
|
+
contact: z.url().optional().describe("The contact site for the workspace"),
|
|
592
|
+
support: z.url().optional().describe(
|
|
593
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
594
|
+
),
|
|
595
|
+
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
596
|
+
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
597
|
+
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
598
|
+
bot: WorkspaceBotConfigSchema,
|
|
599
|
+
release: WorkspaceReleaseConfigSchema,
|
|
600
|
+
socials: WorkspaceSocialsConfigSchema,
|
|
601
|
+
error: errorConfigSchema,
|
|
602
|
+
mode: z.string().trim().default("production").describe("The current runtime environment mode for the package"),
|
|
603
|
+
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
604
|
+
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
605
|
+
directories: WorkspaceDirectoryConfigSchema,
|
|
606
|
+
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
|
|
607
|
+
"The JavaScript/TypeScript package manager used by the repository"
|
|
608
|
+
),
|
|
609
|
+
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
610
|
+
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
611
|
+
logLevel: z.enum([
|
|
612
|
+
"silent",
|
|
613
|
+
"fatal",
|
|
614
|
+
"error",
|
|
615
|
+
"warn",
|
|
616
|
+
"success",
|
|
617
|
+
"info",
|
|
618
|
+
"debug",
|
|
619
|
+
"trace",
|
|
620
|
+
"all"
|
|
621
|
+
]).default("info").describe(
|
|
622
|
+
"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`)."
|
|
623
|
+
),
|
|
624
|
+
skipConfigLogging: z.boolean().optional().describe(
|
|
625
|
+
"Should the logging of the current Storm Workspace configuration be skipped?"
|
|
626
|
+
),
|
|
627
|
+
registry: RegistryConfigSchema,
|
|
628
|
+
configFile: z.string().trim().nullable().default(null).describe(
|
|
629
|
+
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
630
|
+
),
|
|
631
|
+
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
632
|
+
"Storm theme config values used for styling various package elements"
|
|
633
|
+
),
|
|
634
|
+
extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
635
|
+
}).describe(
|
|
636
|
+
"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."
|
|
637
|
+
);
|
|
638
|
+
|
|
639
|
+
// ../config-tools/src/create-storm-config.ts
|
|
267
640
|
import defu2 from "defu";
|
|
268
641
|
|
|
269
642
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
270
643
|
init_esm_shims();
|
|
271
644
|
import { loadConfig } from "c12";
|
|
272
645
|
import defu from "defu";
|
|
646
|
+
|
|
647
|
+
// ../config-tools/src/utilities/get-default-config.ts
|
|
648
|
+
init_esm_shims();
|
|
649
|
+
|
|
650
|
+
// ../config/src/index.ts
|
|
651
|
+
init_esm_shims();
|
|
652
|
+
|
|
653
|
+
// ../config/src/define-config.ts
|
|
654
|
+
init_esm_shims();
|
|
655
|
+
|
|
656
|
+
// ../config/src/types.ts
|
|
657
|
+
init_esm_shims();
|
|
658
|
+
var COLOR_KEYS = [
|
|
659
|
+
"dark",
|
|
660
|
+
"light",
|
|
661
|
+
"base",
|
|
662
|
+
"brand",
|
|
663
|
+
"alternate",
|
|
664
|
+
"accent",
|
|
665
|
+
"link",
|
|
666
|
+
"success",
|
|
667
|
+
"help",
|
|
668
|
+
"info",
|
|
669
|
+
"warning",
|
|
670
|
+
"danger",
|
|
671
|
+
"fatal",
|
|
672
|
+
"positive",
|
|
673
|
+
"negative"
|
|
674
|
+
];
|
|
675
|
+
|
|
676
|
+
// ../config-tools/src/utilities/get-default-config.ts
|
|
677
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
678
|
+
import { readFile as readFile3 } from "node:fs/promises";
|
|
679
|
+
import { join as join2 } from "node:path";
|
|
680
|
+
async function getPackageJsonConfig(root) {
|
|
681
|
+
let license = STORM_DEFAULT_LICENSE;
|
|
682
|
+
let homepage = void 0;
|
|
683
|
+
let support = void 0;
|
|
684
|
+
let name = void 0;
|
|
685
|
+
let namespace = void 0;
|
|
686
|
+
let repository = void 0;
|
|
687
|
+
const workspaceRoot = findWorkspaceRoot(root);
|
|
688
|
+
if (existsSync3(join2(workspaceRoot, "package.json"))) {
|
|
689
|
+
const file = await readFile3(
|
|
690
|
+
joinPaths(workspaceRoot, "package.json"),
|
|
691
|
+
"utf8"
|
|
692
|
+
);
|
|
693
|
+
if (file) {
|
|
694
|
+
const packageJson = JSON.parse(file);
|
|
695
|
+
if (packageJson.name) {
|
|
696
|
+
name = packageJson.name;
|
|
697
|
+
}
|
|
698
|
+
if (packageJson.namespace) {
|
|
699
|
+
namespace = packageJson.namespace;
|
|
700
|
+
}
|
|
701
|
+
if (packageJson.repository) {
|
|
702
|
+
if (typeof packageJson.repository === "string") {
|
|
703
|
+
repository = packageJson.repository;
|
|
704
|
+
} else if (packageJson.repository.url) {
|
|
705
|
+
repository = packageJson.repository.url;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
if (packageJson.license) {
|
|
709
|
+
license = packageJson.license;
|
|
710
|
+
}
|
|
711
|
+
if (packageJson.homepage) {
|
|
712
|
+
homepage = packageJson.homepage;
|
|
713
|
+
}
|
|
714
|
+
if (packageJson.bugs) {
|
|
715
|
+
if (typeof packageJson.bugs === "string") {
|
|
716
|
+
support = packageJson.bugs;
|
|
717
|
+
} else if (packageJson.bugs.url) {
|
|
718
|
+
support = packageJson.bugs.url;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
return {
|
|
724
|
+
workspaceRoot,
|
|
725
|
+
name,
|
|
726
|
+
namespace,
|
|
727
|
+
repository,
|
|
728
|
+
license,
|
|
729
|
+
homepage,
|
|
730
|
+
support
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
function applyDefaultConfig(config) {
|
|
734
|
+
if (!config.support && config.contact) {
|
|
735
|
+
config.support = config.contact;
|
|
736
|
+
}
|
|
737
|
+
if (!config.contact && config.support) {
|
|
738
|
+
config.contact = config.support;
|
|
739
|
+
}
|
|
740
|
+
if (config.homepage) {
|
|
741
|
+
if (!config.docs) {
|
|
742
|
+
config.docs = `${config.homepage}/docs`;
|
|
743
|
+
}
|
|
744
|
+
if (!config.license) {
|
|
745
|
+
config.license = `${config.homepage}/license`;
|
|
746
|
+
}
|
|
747
|
+
if (!config.support) {
|
|
748
|
+
config.support = `${config.homepage}/support`;
|
|
749
|
+
}
|
|
750
|
+
if (!config.contact) {
|
|
751
|
+
config.contact = `${config.homepage}/contact`;
|
|
752
|
+
}
|
|
753
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
754
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
755
|
+
if (config.homepage) {
|
|
756
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
return config;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
// ../config-tools/src/config-file/get-config-file.ts
|
|
273
764
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
274
765
|
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
275
766
|
const configs = await Promise.all([
|
|
@@ -484,6 +975,19 @@ var getThemeColorConfigEnv = (prefix, theme) => {
|
|
|
484
975
|
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
485
976
|
};
|
|
486
977
|
var getSingleThemeColorConfigEnv = (prefix) => {
|
|
978
|
+
const gradient = [];
|
|
979
|
+
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
980
|
+
gradient.push(
|
|
981
|
+
process.env[`${prefix}GRADIENT_START`],
|
|
982
|
+
process.env[`${prefix}GRADIENT_END`]
|
|
983
|
+
);
|
|
984
|
+
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
985
|
+
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
986
|
+
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
987
|
+
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
988
|
+
index++;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
487
991
|
return {
|
|
488
992
|
dark: process.env[`${prefix}DARK`],
|
|
489
993
|
light: process.env[`${prefix}LIGHT`],
|
|
@@ -498,7 +1002,8 @@ var getSingleThemeColorConfigEnv = (prefix) => {
|
|
|
498
1002
|
danger: process.env[`${prefix}DANGER`],
|
|
499
1003
|
fatal: process.env[`${prefix}FATAL`],
|
|
500
1004
|
positive: process.env[`${prefix}POSITIVE`],
|
|
501
|
-
negative: process.env[`${prefix}NEGATIVE`]
|
|
1005
|
+
negative: process.env[`${prefix}NEGATIVE`],
|
|
1006
|
+
gradient
|
|
502
1007
|
};
|
|
503
1008
|
};
|
|
504
1009
|
var getMultiThemeColorConfigEnv = (prefix) => {
|
|
@@ -510,6 +1015,19 @@ var getMultiThemeColorConfigEnv = (prefix) => {
|
|
|
510
1015
|
};
|
|
511
1016
|
};
|
|
512
1017
|
var getBaseThemeColorConfigEnv = (prefix) => {
|
|
1018
|
+
const gradient = [];
|
|
1019
|
+
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1020
|
+
gradient.push(
|
|
1021
|
+
process.env[`${prefix}GRADIENT_START`],
|
|
1022
|
+
process.env[`${prefix}GRADIENT_END`]
|
|
1023
|
+
);
|
|
1024
|
+
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
1025
|
+
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
1026
|
+
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
1027
|
+
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
1028
|
+
index++;
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
513
1031
|
return {
|
|
514
1032
|
foreground: process.env[`${prefix}FOREGROUND`],
|
|
515
1033
|
background: process.env[`${prefix}BACKGROUND`],
|
|
@@ -524,7 +1042,8 @@ var getBaseThemeColorConfigEnv = (prefix) => {
|
|
|
524
1042
|
danger: process.env[`${prefix}DANGER`],
|
|
525
1043
|
fatal: process.env[`${prefix}FATAL`],
|
|
526
1044
|
positive: process.env[`${prefix}POSITIVE`],
|
|
527
|
-
negative: process.env[`${prefix}NEGATIVE`]
|
|
1045
|
+
negative: process.env[`${prefix}NEGATIVE`],
|
|
1046
|
+
gradient
|
|
528
1047
|
};
|
|
529
1048
|
};
|
|
530
1049
|
|
|
@@ -656,11 +1175,12 @@ var setConfigEnv = (config) => {
|
|
|
656
1175
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
657
1176
|
process.env.TZ = config.timezone;
|
|
658
1177
|
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
1178
|
+
process.env.TIMEZONE = config.timezone;
|
|
659
1179
|
}
|
|
660
1180
|
if (config.locale) {
|
|
661
1181
|
process.env[`${prefix}LOCALE`] = config.locale;
|
|
662
|
-
process.env.LOCALE = config.locale;
|
|
663
1182
|
process.env.DEFAULT_LOCALE = config.locale;
|
|
1183
|
+
process.env.LOCALE = config.locale;
|
|
664
1184
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
665
1185
|
}
|
|
666
1186
|
if (config.configFile) {
|
|
@@ -821,6 +1341,11 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
|
821
1341
|
if (config.negative) {
|
|
822
1342
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
823
1343
|
}
|
|
1344
|
+
if (config.gradient) {
|
|
1345
|
+
for (let i = 0; i < config.gradient.length; i++) {
|
|
1346
|
+
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
824
1349
|
};
|
|
825
1350
|
var setMultiThemeColorConfigEnv = (prefix, config) => {
|
|
826
1351
|
return {
|
|
@@ -871,6 +1396,11 @@ var setBaseThemeColorConfigEnv = (prefix, config) => {
|
|
|
871
1396
|
if (config.negative) {
|
|
872
1397
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
873
1398
|
}
|
|
1399
|
+
if (config.gradient) {
|
|
1400
|
+
for (let i = 0; i < config.gradient.length; i++) {
|
|
1401
|
+
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
874
1404
|
};
|
|
875
1405
|
|
|
876
1406
|
// ../config-tools/src/create-storm-config.ts
|
|
@@ -1038,8 +1568,8 @@ init_esm_shims();
|
|
|
1038
1568
|
|
|
1039
1569
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
1040
1570
|
init_esm_shims();
|
|
1041
|
-
import { existsSync as
|
|
1042
|
-
import { readFile as
|
|
1571
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
1572
|
+
import { readFile as readFile4 } from "node:fs/promises";
|
|
1043
1573
|
|
|
1044
1574
|
// ../build-tools/src/utilities/task-graph.ts
|
|
1045
1575
|
init_esm_shims();
|