@storm-software/esbuild 0.45.47 → 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 -2
- 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-ZTMDVBNM.js → chunk-3FBWVPJW.js} +4 -4
- package/dist/{chunk-J74RGYQI.js → chunk-3GCNEVK7.js} +1 -1
- package/dist/{chunk-ZHCRIZX4.cjs → chunk-A6NQIRGS.cjs} +5 -5
- package/dist/{chunk-HZ6BNSS3.js → chunk-ADBXIH6V.js} +5 -5
- package/dist/chunk-BQT3OVTI.js +325 -0
- package/dist/{chunk-5V44WSEQ.cjs → chunk-FJYBNKEX.cjs} +3 -3
- package/dist/{chunk-3QTGPAFH.cjs → chunk-GA67YJGQ.cjs} +585 -55
- package/dist/{chunk-XUCB6TCU.js → chunk-KX7KPO7S.js} +2 -2
- package/dist/{chunk-LMT6SCQY.cjs → chunk-LBZ4HJFB.cjs} +3 -3
- package/dist/{chunk-COBB3623.js → chunk-NMZ7BF3X.js} +1 -1
- package/dist/{chunk-7AUR6KMD.cjs → chunk-O5JRHLWQ.cjs} +3 -3
- package/dist/{chunk-I2CMMOTM.js → chunk-R7KP6WNL.js} +551 -21
- package/dist/{chunk-J4RZ3FKG.js → chunk-RKF72MBJ.js} +7 -7
- package/dist/{chunk-AYBBPHCS.js → chunk-RM2PYDML.js} +6 -6
- package/dist/chunk-SOB2SZPD.cjs +325 -0
- package/dist/{chunk-RR2XH2CX.js → chunk-UK6WDL5V.js} +1 -1
- package/dist/{chunk-THTBJBUW.cjs → chunk-ULU7VZRK.cjs} +4 -4
- package/dist/{chunk-RGNHUXNY.cjs → chunk-VMZTU5MH.cjs} +7 -7
- package/dist/{chunk-UJEJHNVJ.cjs → chunk-XFVVEEPC.cjs} +22 -22
- package/dist/{chunk-3MZOT2NQ.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-7L6G2FBR.cjs +0 -787
- package/dist/chunk-DKJQPXS2.js +0 -787
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
9
2
|
|
|
10
3
|
|
|
4
|
+
var _chunkM37UEA6Vcjs = require('./chunk-M37UEA6V.cjs');
|
|
11
5
|
|
|
12
6
|
|
|
13
7
|
|
|
14
8
|
|
|
15
9
|
|
|
16
10
|
|
|
17
|
-
var _chunk7L6G2FBRcjs = require('./chunk-7L6G2FBR.cjs');
|
|
18
11
|
|
|
19
12
|
|
|
20
|
-
|
|
21
|
-
var _chunkM37UEA6Vcjs = require('./chunk-M37UEA6V.cjs');
|
|
13
|
+
var _chunkSOB2SZPDcjs = require('./chunk-SOB2SZPD.cjs');
|
|
22
14
|
|
|
23
15
|
|
|
24
16
|
var _chunkDRSI5NMScjs = require('./chunk-DRSI5NMS.cjs');
|
|
@@ -65,7 +57,7 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
65
57
|
output: "src/"
|
|
66
58
|
});
|
|
67
59
|
}
|
|
68
|
-
|
|
60
|
+
_chunkSOB2SZPDcjs.writeTrace.call(void 0,
|
|
69
61
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
70
62
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkM37UEA6Vcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
71
63
|
config
|
|
@@ -77,9 +69,9 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
77
69
|
assets: pendingAssets
|
|
78
70
|
});
|
|
79
71
|
await assetHandler.processAllAssetsOnce();
|
|
80
|
-
|
|
72
|
+
_chunkSOB2SZPDcjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
81
73
|
if (includeSrc === true) {
|
|
82
|
-
|
|
74
|
+
_chunkSOB2SZPDcjs.writeDebug.call(void 0,
|
|
83
75
|
`\u{1F4DD} Adding banner and writing source files: ${_chunkM37UEA6Vcjs.joinPaths.call(void 0,
|
|
84
76
|
outputPath,
|
|
85
77
|
"src"
|
|
@@ -111,7 +103,107 @@ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `//
|
|
|
111
103
|
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
112
104
|
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
113
105
|
|
|
106
|
+
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
107
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
108
|
+
|
|
109
|
+
// ../config-tools/src/utilities/find-up.ts
|
|
110
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
114
111
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
112
|
+
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
113
|
+
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
114
|
+
var depth = 0;
|
|
115
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
116
|
+
const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
|
|
117
|
+
if (endDirectoryNames.some(
|
|
118
|
+
(endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName))
|
|
119
|
+
)) {
|
|
120
|
+
return _startPath;
|
|
121
|
+
}
|
|
122
|
+
if (endFileNames.some(
|
|
123
|
+
(endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName))
|
|
124
|
+
)) {
|
|
125
|
+
return _startPath;
|
|
126
|
+
}
|
|
127
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
128
|
+
const parent = _path.join.call(void 0, _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 _chunkM37UEA6Vcjs.correctPaths.call(void 0,
|
|
179
|
+
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
return _chunkM37UEA6Vcjs.correctPaths.call(void 0,
|
|
183
|
+
findFolderUp(
|
|
184
|
+
_nullishCoalesce(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
|
|
205
|
+
|
|
206
|
+
|
|
115
207
|
|
|
116
208
|
|
|
117
209
|
|
|
@@ -164,7 +256,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
164
256
|
}
|
|
165
257
|
}
|
|
166
258
|
if (localPackages.length > 0) {
|
|
167
|
-
|
|
259
|
+
_chunkSOB2SZPDcjs.writeTrace.call(void 0,
|
|
168
260
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
169
261
|
);
|
|
170
262
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
@@ -212,12 +304,12 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
212
304
|
return ret;
|
|
213
305
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
214
306
|
} else {
|
|
215
|
-
|
|
307
|
+
_chunkSOB2SZPDcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
216
308
|
}
|
|
217
309
|
return packageJson;
|
|
218
310
|
};
|
|
219
311
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
220
|
-
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
312
|
+
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
|
|
221
313
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
222
314
|
_chunkM37UEA6Vcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
223
315
|
"utf8"
|
|
@@ -264,20 +356,419 @@ _chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
|
264
356
|
|
|
265
357
|
// ../config-tools/src/create-storm-config.ts
|
|
266
358
|
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
359
|
+
|
|
360
|
+
// ../config/src/schema.ts
|
|
361
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
362
|
+
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
363
|
+
|
|
364
|
+
// ../config/src/constants.ts
|
|
365
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
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
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
268
641
|
|
|
269
642
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
270
643
|
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
271
644
|
var _c12 = require('c12');
|
|
272
645
|
|
|
646
|
+
|
|
647
|
+
// ../config-tools/src/utilities/get-default-config.ts
|
|
648
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
649
|
+
|
|
650
|
+
// ../config/src/index.ts
|
|
651
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
652
|
+
|
|
653
|
+
// ../config/src/define-config.ts
|
|
654
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
655
|
+
|
|
656
|
+
// ../config/src/types.ts
|
|
657
|
+
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
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
|
+
|
|
678
|
+
|
|
679
|
+
|
|
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 (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
689
|
+
const file = await _promises.readFile.call(void 0,
|
|
690
|
+
_chunkM37UEA6Vcjs.joinPaths.call(void 0, 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 (!_optionalChain([config, 'access', _24 => _24.error, 'optionalAccess', _25 => _25.codesFile]) || !_optionalChain([config, 'optionalAccess', _26 => _26.error, 'optionalAccess', _27 => _27.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
|
-
const workspacePath = filePath ||
|
|
765
|
+
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
275
766
|
const configs = await Promise.all([
|
|
276
767
|
_c12.loadConfig.call(void 0, {
|
|
277
768
|
cwd: workspacePath,
|
|
278
769
|
packageJson: true,
|
|
279
770
|
name: fileName,
|
|
280
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
771
|
+
envName: _optionalChain([fileName, 'optionalAccess', _28 => _28.toUpperCase, 'call', _29 => _29()]),
|
|
281
772
|
jitiOptions: {
|
|
282
773
|
debug: false,
|
|
283
774
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkM37UEA6Vcjs.joinPaths.call(void 0,
|
|
@@ -291,7 +782,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
291
782
|
cwd: workspacePath,
|
|
292
783
|
packageJson: true,
|
|
293
784
|
name: fileName,
|
|
294
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
785
|
+
envName: _optionalChain([fileName, 'optionalAccess', _30 => _30.toUpperCase, 'call', _31 => _31()]),
|
|
295
786
|
jitiOptions: {
|
|
296
787
|
debug: false,
|
|
297
788
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkM37UEA6Vcjs.joinPaths.call(void 0,
|
|
@@ -306,12 +797,12 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
306
797
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
307
798
|
};
|
|
308
799
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
309
|
-
const workspacePath = filePath ? filePath :
|
|
800
|
+
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
310
801
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
311
802
|
let config = result.config;
|
|
312
803
|
const configFile = result.configFile;
|
|
313
804
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
314
|
-
|
|
805
|
+
_chunkSOB2SZPDcjs.writeTrace.call(void 0,
|
|
315
806
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
316
807
|
{
|
|
317
808
|
logLevel: "all"
|
|
@@ -325,9 +816,9 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
325
816
|
)
|
|
326
817
|
);
|
|
327
818
|
for (const result2 of results) {
|
|
328
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
819
|
+
if (_optionalChain([result2, 'optionalAccess', _32 => _32.config]) && _optionalChain([result2, 'optionalAccess', _33 => _33.configFile]) && Object.keys(result2.config).length > 0) {
|
|
329
820
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
330
|
-
|
|
821
|
+
_chunkSOB2SZPDcjs.writeTrace.call(void 0,
|
|
331
822
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
332
823
|
{
|
|
333
824
|
logLevel: "all"
|
|
@@ -436,13 +927,13 @@ var getConfigEnv = () => {
|
|
|
436
927
|
},
|
|
437
928
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
438
929
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
439
|
-
) ?
|
|
930
|
+
) ? _chunkSOB2SZPDcjs.getLogLevelLabel.call(void 0,
|
|
440
931
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
441
932
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
442
933
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
443
934
|
};
|
|
444
935
|
const themeNames = Object.keys(process.env).filter(
|
|
445
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
936
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
|
|
446
937
|
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
447
938
|
)
|
|
448
939
|
);
|
|
@@ -453,16 +944,16 @@ var getConfigEnv = () => {
|
|
|
453
944
|
},
|
|
454
945
|
{}
|
|
455
946
|
) : getThemeColorConfigEnv(prefix);
|
|
456
|
-
if (config.docs ===
|
|
457
|
-
if (config.homepage ===
|
|
458
|
-
config.docs = `${
|
|
947
|
+
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
948
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
949
|
+
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
459
950
|
} else {
|
|
460
951
|
config.docs = `${config.homepage}/docs`;
|
|
461
952
|
}
|
|
462
953
|
}
|
|
463
|
-
if (config.licensing ===
|
|
464
|
-
if (config.homepage ===
|
|
465
|
-
config.licensing = `${
|
|
954
|
+
if (config.licensing === STORM_DEFAULT_LICENSING) {
|
|
955
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
956
|
+
config.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
466
957
|
} else {
|
|
467
958
|
config.licensing = `${config.homepage}/docs`;
|
|
468
959
|
}
|
|
@@ -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
|
|
|
@@ -533,16 +1052,16 @@ _chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
|
533
1052
|
var setExtensionEnv = (extensionName, extension) => {
|
|
534
1053
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
535
1054
|
if (extension[key]) {
|
|
536
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
1055
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _34 => _34.replace, 'call', _35 => _35(
|
|
537
1056
|
/([A-Z])+/g,
|
|
538
|
-
(input) => input ? _optionalChain([input, 'access',
|
|
539
|
-
), 'access',
|
|
1057
|
+
(input) => input ? _optionalChain([input, 'access', _36 => _36[0], 'optionalAccess', _37 => _37.toUpperCase, 'call', _38 => _38()]) + input.slice(1) : ""
|
|
1058
|
+
), 'access', _39 => _39.split, 'call', _40 => _40(/(?=[A-Z])|[.\-\s_]/), 'access', _41 => _41.map, 'call', _42 => _42((x) => x.toLowerCase())]), () => ( []));
|
|
540
1059
|
let extensionKey;
|
|
541
1060
|
if (result.length === 0) {
|
|
542
1061
|
return;
|
|
543
1062
|
}
|
|
544
1063
|
if (result.length === 1) {
|
|
545
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
1064
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _43 => _43[0], 'optionalAccess', _44 => _44.toUpperCase, 'call', _45 => _45()]), () => ( ""));
|
|
546
1065
|
} else {
|
|
547
1066
|
extensionKey = result.reduce((ret, part) => {
|
|
548
1067
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -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) {
|
|
@@ -715,7 +1235,7 @@ var setConfigEnv = (config) => {
|
|
|
715
1235
|
process.env.NODE_ENV = config.mode;
|
|
716
1236
|
process.env.ENVIRONMENT = config.mode;
|
|
717
1237
|
}
|
|
718
|
-
if (_optionalChain([config, 'access',
|
|
1238
|
+
if (_optionalChain([config, 'access', _46 => _46.colors, 'optionalAccess', _47 => _47.base, 'optionalAccess', _48 => _48.light]) || _optionalChain([config, 'access', _49 => _49.colors, 'optionalAccess', _50 => _50.base, 'optionalAccess', _51 => _51.dark])) {
|
|
719
1239
|
for (const key of Object.keys(config.colors)) {
|
|
720
1240
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
721
1241
|
}
|
|
@@ -759,9 +1279,9 @@ var setConfigEnv = (config) => {
|
|
|
759
1279
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
760
1280
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
761
1281
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
762
|
-
|
|
1282
|
+
_chunkSOB2SZPDcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkSOB2SZPDcjs.LogLevel.DEBUG ? true : false
|
|
763
1283
|
);
|
|
764
|
-
process.env.RUST_BACKTRACE =
|
|
1284
|
+
process.env.RUST_BACKTRACE = _chunkSOB2SZPDcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkSOB2SZPDcjs.LogLevel.DEBUG ? "full" : "none";
|
|
765
1285
|
}
|
|
766
1286
|
if (config.skipConfigLogging !== void 0) {
|
|
767
1287
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -776,7 +1296,7 @@ var setConfigEnv = (config) => {
|
|
|
776
1296
|
}
|
|
777
1297
|
};
|
|
778
1298
|
var setThemeColorConfigEnv = (prefix, config) => {
|
|
779
|
-
return _optionalChain([config, 'optionalAccess',
|
|
1299
|
+
return _optionalChain([config, 'optionalAccess', _52 => _52.light, 'optionalAccess', _53 => _53.brand]) || _optionalChain([config, 'optionalAccess', _54 => _54.dark, 'optionalAccess', _55 => _55.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
780
1300
|
};
|
|
781
1301
|
var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
782
1302
|
if (config.dark) {
|
|
@@ -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
|
|
@@ -878,16 +1408,16 @@ var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
|
878
1408
|
var _static_cache = void 0;
|
|
879
1409
|
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
880
1410
|
let result;
|
|
881
|
-
if (!_optionalChain([_static_cache, 'optionalAccess',
|
|
1411
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _56 => _56.data]) || !_optionalChain([_static_cache, 'optionalAccess', _57 => _57.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
882
1412
|
let _workspaceRoot = workspaceRoot;
|
|
883
1413
|
if (!_workspaceRoot) {
|
|
884
|
-
_workspaceRoot =
|
|
1414
|
+
_workspaceRoot = findWorkspaceRoot();
|
|
885
1415
|
}
|
|
886
1416
|
const configEnv = getConfigEnv();
|
|
887
1417
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
888
1418
|
if (!configFile) {
|
|
889
1419
|
if (!skipLogs) {
|
|
890
|
-
|
|
1420
|
+
_chunkSOB2SZPDcjs.writeWarning.call(void 0,
|
|
891
1421
|
"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",
|
|
892
1422
|
{ logLevel: "all" }
|
|
893
1423
|
);
|
|
@@ -896,22 +1426,22 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
896
1426
|
return void 0;
|
|
897
1427
|
}
|
|
898
1428
|
}
|
|
899
|
-
const defaultConfig = await
|
|
1429
|
+
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
900
1430
|
const configInput = _defu2.default.call(void 0,
|
|
901
1431
|
configEnv,
|
|
902
1432
|
configFile,
|
|
903
1433
|
defaultConfig
|
|
904
1434
|
);
|
|
905
1435
|
try {
|
|
906
|
-
result =
|
|
907
|
-
await
|
|
1436
|
+
result = applyDefaultConfig(
|
|
1437
|
+
await stormWorkspaceConfigSchema.parseAsync(configInput)
|
|
908
1438
|
);
|
|
909
1439
|
result.workspaceRoot ??= _workspaceRoot;
|
|
910
1440
|
} catch (error) {
|
|
911
1441
|
throw new Error(
|
|
912
|
-
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess',
|
|
1442
|
+
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _58 => _58.message]) ? `: ${error.message}` : ""}
|
|
913
1443
|
|
|
914
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
1444
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkSOB2SZPDcjs.formatLogMessage.call(void 0,
|
|
915
1445
|
configInput
|
|
916
1446
|
)}`,
|
|
917
1447
|
{
|
|
@@ -956,9 +1486,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
956
1486
|
);
|
|
957
1487
|
setConfigEnv(config);
|
|
958
1488
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
959
|
-
|
|
1489
|
+
_chunkSOB2SZPDcjs.writeTrace.call(void 0,
|
|
960
1490
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
961
|
-
${
|
|
1491
|
+
${_chunkSOB2SZPDcjs.formatLogMessage.call(void 0, config)}`,
|
|
962
1492
|
config
|
|
963
1493
|
);
|
|
964
1494
|
}
|
|
@@ -972,7 +1502,7 @@ var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
|
972
1502
|
var getWorkspaceConfig = (skipLogs = true, options = {}) => {
|
|
973
1503
|
let workspaceRoot = options.workspaceRoot;
|
|
974
1504
|
if (!workspaceRoot) {
|
|
975
|
-
workspaceRoot =
|
|
1505
|
+
workspaceRoot = findWorkspaceRoot(options.cwd);
|
|
976
1506
|
}
|
|
977
1507
|
return getConfig(workspaceRoot, skipLogs);
|
|
978
1508
|
};
|
|
@@ -1009,7 +1539,7 @@ var _core = require('@swc/core');
|
|
|
1009
1539
|
_chunkDRSI5NMScjs.init_cjs_shims.call(void 0, );
|
|
1010
1540
|
|
|
1011
1541
|
var _module = require('module');
|
|
1012
|
-
|
|
1542
|
+
|
|
1013
1543
|
var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
|
|
1014
1544
|
|
|
1015
1545
|
// ../build-tools/src/plugins/type-definitions.ts
|