@storm-software/esbuild 0.52.20 → 0.53.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/esbuild.cjs +1 -1
- package/dist/assets.cjs +3 -6
- package/dist/assets.js +2 -5
- package/dist/build.cjs +9 -12
- package/dist/build.js +8 -11
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/{chunk-GRCBCRT3.cjs → chunk-BXCOVK3I.cjs} +4 -9
- package/dist/{chunk-JUYIXFPA.cjs → chunk-CRFWMPZN.cjs} +13 -20
- package/dist/{chunk-FE36AM5O.js → chunk-CZC4I6SL.js} +5 -12
- package/dist/{chunk-YEL4SZSU.js → chunk-D4DSKI5N.js} +9 -17
- package/dist/{chunk-MEWZGWK3.cjs → chunk-DJNFLJSO.cjs} +6 -13
- package/dist/chunk-GGNOJ77I.js +0 -0
- package/dist/{chunk-UNIT3DUA.js → chunk-MTZGYTJP.js} +3 -10
- package/dist/{chunk-U4FGDMUR.cjs → chunk-MYIRPP4C.cjs} +4 -11
- package/dist/chunk-OBGZSXTJ.cjs +10 -0
- package/dist/{chunk-OOJQKVMY.cjs → chunk-P3PATQE5.cjs} +19 -27
- package/dist/chunk-SFZRYJZ2.cjs +1 -0
- package/dist/{chunk-FFM36UWY.js → chunk-SJ6BFZTX.js} +8 -12
- package/dist/{chunk-ZSMWNUMF.js → chunk-TTW7MNRE.js} +1 -8
- package/dist/chunk-V7AFF6GW.cjs +25 -0
- package/dist/{chunk-DEU6FC3P.cjs → chunk-XAUXKCOD.cjs} +21 -25
- package/dist/{chunk-QPLYTZHZ.js → chunk-XKSMSRQZ.js} +2 -7
- package/dist/chunk-ZH5YCT67.js +25 -0
- package/dist/clean.cjs +3 -4
- package/dist/clean.js +2 -3
- package/dist/config.cjs +3 -6
- package/dist/config.js +2 -5
- package/dist/context.cjs +4 -7
- package/dist/context.js +3 -6
- package/dist/index.cjs +10 -18
- package/dist/index.js +9 -17
- package/dist/package-json.cjs +3 -6
- package/dist/package-json.js +2 -5
- package/dist/plugins/deps-check.cjs +6 -8
- package/dist/plugins/deps-check.js +6 -8
- package/dist/plugins/resolve-paths.cjs +12 -38
- package/dist/plugins/resolve-paths.js +4 -30
- package/dist/tsup.cjs +3 -5
- package/dist/tsup.js +2 -4
- package/dist/types.cjs +1 -2
- package/dist/types.js +1 -2
- package/dist/watch.cjs +5 -9
- package/dist/watch.js +4 -8
- package/package.json +7 -7
- package/assets/cjs_shims.js +0 -11
- package/assets/esm_shims.js +0 -9
- package/dist/chunk-2C3MWYHH.cjs +0 -47
- package/dist/chunk-7SWZ2ZGX.cjs +0 -135
- package/dist/chunk-AFLE3LVA.js +0 -1906
- package/dist/chunk-B3BJCWKI.cjs +0 -2687
- package/dist/chunk-BYH4XDRH.cjs +0 -6
- package/dist/chunk-ETBYMZ46.cjs +0 -6
- package/dist/chunk-GZSSIGNC.cjs +0 -153
- package/dist/chunk-HFWPMK44.cjs +0 -325
- package/dist/chunk-IVZEDCLS.js +0 -6
- package/dist/chunk-JBXDZTFM.js +0 -135
- package/dist/chunk-JZ25TPTY.cjs +0 -42
- package/dist/chunk-KT4NC6CJ.js +0 -325
- package/dist/chunk-OKPZK64Q.cjs +0 -1906
- package/dist/chunk-TWFEYLU4.cjs +0 -352
- package/dist/chunk-VGC3FXLU.cjs +0 -203
- package/dist/chunk-Z7VDLMOZ.js +0 -54
- package/dist/chunk-ZFVQ4LC4.js +0 -2718
- package/dist/rollup.cjs +0 -6906
package/dist/chunk-OKPZK64Q.cjs
DELETED
|
@@ -1,1906 +0,0 @@
|
|
|
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; }
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunk7SWZ2ZGXcjs = require('./chunk-7SWZ2ZGX.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var _chunkHFWPMK44cjs = require('./chunk-HFWPMK44.cjs');
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _chunk2C3MWYHHcjs = require('./chunk-2C3MWYHH.cjs');
|
|
17
|
-
|
|
18
|
-
// ../build-tools/src/config.ts
|
|
19
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
20
|
-
var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
21
|
-
*
|
|
22
|
-
* \u26A1 Built by Storm Software
|
|
23
|
-
*
|
|
24
|
-
*****************************************/
|
|
25
|
-
`;
|
|
26
|
-
var DEFAULT_ENVIRONMENT = "production";
|
|
27
|
-
var DEFAULT_ORGANIZATION = "storm-software";
|
|
28
|
-
|
|
29
|
-
// ../build-tools/src/utilities/copy-assets.ts
|
|
30
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
31
|
-
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
32
|
-
var _glob = require('glob');
|
|
33
|
-
var _promises = require('fs/promises');
|
|
34
|
-
var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
|
|
35
|
-
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
36
|
-
pendingAssets.push({
|
|
37
|
-
input: projectRoot,
|
|
38
|
-
glob: "*.md",
|
|
39
|
-
output: "."
|
|
40
|
-
});
|
|
41
|
-
pendingAssets.push({
|
|
42
|
-
input: ".",
|
|
43
|
-
glob: "LICENSE",
|
|
44
|
-
output: "."
|
|
45
|
-
});
|
|
46
|
-
if (generatePackageJson === false) {
|
|
47
|
-
pendingAssets.push({
|
|
48
|
-
input: projectRoot,
|
|
49
|
-
glob: "package.json",
|
|
50
|
-
output: "."
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
if (includeSrc === true) {
|
|
54
|
-
pendingAssets.push({
|
|
55
|
-
input: sourceRoot,
|
|
56
|
-
glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
|
|
57
|
-
output: "src/"
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
_chunkHFWPMK44cjs.writeTrace.call(void 0,
|
|
61
|
-
`\u{1F4DD} Copying the following assets to the output directory:
|
|
62
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk7SWZ2ZGXcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
63
|
-
config
|
|
64
|
-
);
|
|
65
|
-
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
66
|
-
projectDir: projectRoot,
|
|
67
|
-
rootDir: config.workspaceRoot,
|
|
68
|
-
outputDir: outputPath,
|
|
69
|
-
assets: pendingAssets
|
|
70
|
-
});
|
|
71
|
-
await assetHandler.processAllAssetsOnce();
|
|
72
|
-
_chunkHFWPMK44cjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
73
|
-
if (includeSrc === true) {
|
|
74
|
-
_chunkHFWPMK44cjs.writeDebug.call(void 0,
|
|
75
|
-
`\u{1F4DD} Adding banner and writing source files: ${_chunk7SWZ2ZGXcjs.joinPaths.call(void 0,
|
|
76
|
-
outputPath,
|
|
77
|
-
"src"
|
|
78
|
-
)}`,
|
|
79
|
-
config
|
|
80
|
-
);
|
|
81
|
-
const files = await _glob.glob.call(void 0, [
|
|
82
|
-
_chunk7SWZ2ZGXcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
83
|
-
_chunk7SWZ2ZGXcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
84
|
-
_chunk7SWZ2ZGXcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
85
|
-
_chunk7SWZ2ZGXcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
86
|
-
]);
|
|
87
|
-
await Promise.allSettled(
|
|
88
|
-
files.map(
|
|
89
|
-
async (file) => _promises.writeFile.call(void 0,
|
|
90
|
-
file,
|
|
91
|
-
`${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
92
|
-
|
|
93
|
-
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
94
|
-
|
|
95
|
-
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
96
|
-
)
|
|
97
|
-
)
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// ../build-tools/src/utilities/generate-package-json.ts
|
|
103
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
104
|
-
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
105
|
-
|
|
106
|
-
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
107
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
108
|
-
|
|
109
|
-
// ../config-tools/src/utilities/find-up.ts
|
|
110
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
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
|
-
".git",
|
|
173
|
-
".github",
|
|
174
|
-
".vscode",
|
|
175
|
-
".verdaccio"
|
|
176
|
-
];
|
|
177
|
-
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
178
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
179
|
-
return _chunk7SWZ2ZGXcjs.correctPaths.call(void 0,
|
|
180
|
-
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
return _chunk7SWZ2ZGXcjs.correctPaths.call(void 0,
|
|
184
|
-
findFolderUp(
|
|
185
|
-
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
186
|
-
rootFiles,
|
|
187
|
-
rootDirectories
|
|
188
|
-
)
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
192
|
-
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
193
|
-
if (!result) {
|
|
194
|
-
throw new Error(
|
|
195
|
-
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
196
|
-
${rootFiles.join(
|
|
197
|
-
"\n"
|
|
198
|
-
)}
|
|
199
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
return result;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// ../build-tools/src/utilities/generate-package-json.ts
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
214
|
-
var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, packageJson) => {
|
|
215
|
-
let projectGraph;
|
|
216
|
-
try {
|
|
217
|
-
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
218
|
-
} catch (e) {
|
|
219
|
-
await _projectgraph.createProjectGraphAsync.call(void 0, );
|
|
220
|
-
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
221
|
-
}
|
|
222
|
-
if (!projectGraph) {
|
|
223
|
-
throw new Error(
|
|
224
|
-
"The Build process failed because the project graph is not available. Please run the build command again."
|
|
225
|
-
);
|
|
226
|
-
}
|
|
227
|
-
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
|
|
228
|
-
void 0,
|
|
229
|
-
projectGraph,
|
|
230
|
-
workspaceRoot,
|
|
231
|
-
projectName,
|
|
232
|
-
process.env.NX_TASK_TARGET_TARGET || "build",
|
|
233
|
-
process.env.NX_TASK_TARGET_CONFIGURATION || "production",
|
|
234
|
-
true
|
|
235
|
-
);
|
|
236
|
-
const localPackages = [];
|
|
237
|
-
for (const project of projectDependencies.dependencies.filter(
|
|
238
|
-
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot
|
|
239
|
-
)) {
|
|
240
|
-
const projectNode = project.node;
|
|
241
|
-
if (projectNode.data.root) {
|
|
242
|
-
const projectPackageJsonPath = _chunk7SWZ2ZGXcjs.joinPaths.call(void 0,
|
|
243
|
-
workspaceRoot,
|
|
244
|
-
projectNode.data.root,
|
|
245
|
-
"package.json"
|
|
246
|
-
);
|
|
247
|
-
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
248
|
-
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
249
|
-
projectPackageJsonPath,
|
|
250
|
-
"utf8"
|
|
251
|
-
);
|
|
252
|
-
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
253
|
-
if (projectPackageJson.private !== true) {
|
|
254
|
-
localPackages.push(projectPackageJson);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
if (localPackages.length > 0) {
|
|
260
|
-
_chunkHFWPMK44cjs.writeTrace.call(void 0,
|
|
261
|
-
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
262
|
-
);
|
|
263
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
264
|
-
_chunk7SWZ2ZGXcjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
265
|
-
"utf8"
|
|
266
|
-
);
|
|
267
|
-
const projectJson = JSON.parse(projectJsonFile);
|
|
268
|
-
const projectName2 = projectJson.name;
|
|
269
|
-
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
270
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess', _7 => _7.projects, 'optionalAccess', _8 => _8[projectName2]])) {
|
|
271
|
-
throw new Error(
|
|
272
|
-
"The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
|
|
273
|
-
);
|
|
274
|
-
}
|
|
275
|
-
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[projectName2], 'access', _11 => _11.implicitDependencies, 'optionalAccess', _12 => _12.reduce, 'call', _13 => _13((ret, dep) => {
|
|
276
|
-
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
277
|
-
const depPackageJsonPath = _chunk7SWZ2ZGXcjs.joinPaths.call(void 0,
|
|
278
|
-
workspaceRoot,
|
|
279
|
-
projectConfigurations.projects[dep].root,
|
|
280
|
-
"package.json"
|
|
281
|
-
);
|
|
282
|
-
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
283
|
-
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
284
|
-
depPackageJsonPath,
|
|
285
|
-
"utf8"
|
|
286
|
-
);
|
|
287
|
-
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
288
|
-
if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
|
|
289
|
-
ret.push(depPackageJson.name);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
return ret;
|
|
294
|
-
}, [])]);
|
|
295
|
-
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
296
|
-
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _16 => _16.includes, 'call', _17 => _17(localPackage.name)]) && _optionalChain([packageJson, 'access', _18 => _18.devDependencies, 'optionalAccess', _19 => _19[localPackage.name]]) === void 0) {
|
|
297
|
-
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
298
|
-
}
|
|
299
|
-
return ret;
|
|
300
|
-
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
301
|
-
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
302
|
-
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _20 => _20.includes, 'call', _21 => _21(localPackage.name)]) && _optionalChain([packageJson, 'access', _22 => _22.dependencies, 'optionalAccess', _23 => _23[localPackage.name]]) === void 0) {
|
|
303
|
-
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
304
|
-
}
|
|
305
|
-
return ret;
|
|
306
|
-
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
307
|
-
} else {
|
|
308
|
-
_chunkHFWPMK44cjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
309
|
-
}
|
|
310
|
-
return packageJson;
|
|
311
|
-
};
|
|
312
|
-
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
313
|
-
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
|
|
314
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
315
|
-
_chunk7SWZ2ZGXcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
316
|
-
"utf8"
|
|
317
|
-
);
|
|
318
|
-
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
319
|
-
packageJson.type ??= "module";
|
|
320
|
-
packageJson.sideEffects ??= false;
|
|
321
|
-
if (includeSrc === true) {
|
|
322
|
-
let distSrc = sourceRoot.replace(projectRoot, "");
|
|
323
|
-
if (distSrc.startsWith("/")) {
|
|
324
|
-
distSrc = distSrc.substring(1);
|
|
325
|
-
}
|
|
326
|
-
packageJson.source ??= `${_chunk7SWZ2ZGXcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
327
|
-
}
|
|
328
|
-
packageJson.files ??= ["dist/**/*"];
|
|
329
|
-
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
330
|
-
packageJson.files.push("src/**/*");
|
|
331
|
-
}
|
|
332
|
-
packageJson.publishConfig ??= {
|
|
333
|
-
access: "public"
|
|
334
|
-
};
|
|
335
|
-
packageJson.description ??= workspacePackageJson.description;
|
|
336
|
-
packageJson.homepage ??= workspacePackageJson.homepage;
|
|
337
|
-
packageJson.bugs ??= workspacePackageJson.bugs;
|
|
338
|
-
packageJson.license ??= workspacePackageJson.license;
|
|
339
|
-
packageJson.keywords ??= workspacePackageJson.keywords;
|
|
340
|
-
packageJson.funding ??= workspacePackageJson.funding;
|
|
341
|
-
packageJson.author ??= workspacePackageJson.author;
|
|
342
|
-
packageJson.maintainers ??= workspacePackageJson.maintainers;
|
|
343
|
-
if (!packageJson.maintainers && packageJson.author) {
|
|
344
|
-
packageJson.maintainers = [packageJson.author];
|
|
345
|
-
}
|
|
346
|
-
packageJson.contributors ??= workspacePackageJson.contributors;
|
|
347
|
-
if (!packageJson.contributors && packageJson.author) {
|
|
348
|
-
packageJson.contributors = [packageJson.author];
|
|
349
|
-
}
|
|
350
|
-
packageJson.repository ??= workspacePackageJson.repository;
|
|
351
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk7SWZ2ZGXcjs.joinPaths.call(void 0, "packages", projectName);
|
|
352
|
-
return packageJson;
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
// ../config-tools/src/get-config.ts
|
|
356
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
357
|
-
|
|
358
|
-
// ../config-tools/src/create-storm-config.ts
|
|
359
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
360
|
-
|
|
361
|
-
// ../config/src/schema.ts
|
|
362
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
363
|
-
var _mini = require('zod/mini'); var z = _interopRequireWildcard(_mini);
|
|
364
|
-
|
|
365
|
-
// ../config/src/constants.ts
|
|
366
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
367
|
-
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
368
|
-
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
369
|
-
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
370
|
-
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
371
|
-
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
372
|
-
var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
373
|
-
var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
374
|
-
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
375
|
-
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.
|
|
376
|
-
|
|
377
|
-
Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
378
|
-
|
|
379
|
-
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!
|
|
380
|
-
`;
|
|
381
|
-
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
382
|
-
var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
|
|
383
|
-
|
|
384
|
-
// ../config/src/schema.ts
|
|
385
|
-
var schemaRegistry = z.registry();
|
|
386
|
-
var colorSchema = z.string().check(
|
|
387
|
-
z.length(7),
|
|
388
|
-
z.toLowerCase(),
|
|
389
|
-
z.regex(/^#([0-9a-f]{3}){1,2}$/i),
|
|
390
|
-
z.trim()
|
|
391
|
-
);
|
|
392
|
-
schemaRegistry.add(colorSchema, {
|
|
393
|
-
description: "A base schema for describing the format of colors"
|
|
394
|
-
});
|
|
395
|
-
var darkColorSchema = z._default(colorSchema, "#151718");
|
|
396
|
-
schemaRegistry.add(darkColorSchema, {
|
|
397
|
-
description: "The dark background color of the workspace"
|
|
398
|
-
});
|
|
399
|
-
var lightColorSchema = z._default(colorSchema, "#cbd5e1");
|
|
400
|
-
schemaRegistry.add(lightColorSchema, {
|
|
401
|
-
description: "The light background color of the workspace"
|
|
402
|
-
});
|
|
403
|
-
var brandColorSchema = z._default(colorSchema, "#1fb2a6");
|
|
404
|
-
schemaRegistry.add(brandColorSchema, {
|
|
405
|
-
description: "The primary brand specific color of the workspace"
|
|
406
|
-
});
|
|
407
|
-
var alternateColorSchema = z.optional(colorSchema);
|
|
408
|
-
schemaRegistry.add(alternateColorSchema, {
|
|
409
|
-
description: "The alternate brand specific color of the workspace"
|
|
410
|
-
});
|
|
411
|
-
var accentColorSchema = z.optional(colorSchema);
|
|
412
|
-
schemaRegistry.add(accentColorSchema, {
|
|
413
|
-
description: "The secondary brand specific color of the workspace"
|
|
414
|
-
});
|
|
415
|
-
var linkColorSchema = z._default(colorSchema, "#3fa6ff");
|
|
416
|
-
schemaRegistry.add(linkColorSchema, {
|
|
417
|
-
description: "The color used to display hyperlink text"
|
|
418
|
-
});
|
|
419
|
-
var helpColorSchema = z._default(colorSchema, "#818cf8");
|
|
420
|
-
schemaRegistry.add(helpColorSchema, {
|
|
421
|
-
description: "The second brand specific color of the workspace"
|
|
422
|
-
});
|
|
423
|
-
var successColorSchema = z._default(colorSchema, "#45b27e");
|
|
424
|
-
schemaRegistry.add(successColorSchema, {
|
|
425
|
-
description: "The success color of the workspace"
|
|
426
|
-
});
|
|
427
|
-
var infoColorSchema = z._default(colorSchema, "#38bdf8");
|
|
428
|
-
schemaRegistry.add(infoColorSchema, {
|
|
429
|
-
description: "The informational color of the workspace"
|
|
430
|
-
});
|
|
431
|
-
var warningColorSchema = z._default(colorSchema, "#f3d371");
|
|
432
|
-
schemaRegistry.add(warningColorSchema, {
|
|
433
|
-
description: "The warning color of the workspace"
|
|
434
|
-
});
|
|
435
|
-
var dangerColorSchema = z._default(colorSchema, "#d8314a");
|
|
436
|
-
schemaRegistry.add(dangerColorSchema, {
|
|
437
|
-
description: "The danger color of the workspace"
|
|
438
|
-
});
|
|
439
|
-
var fatalColorSchema = z.optional(colorSchema);
|
|
440
|
-
schemaRegistry.add(fatalColorSchema, {
|
|
441
|
-
description: "The fatal color of the workspace"
|
|
442
|
-
});
|
|
443
|
-
var positiveColorSchema = z._default(colorSchema, "#4ade80");
|
|
444
|
-
schemaRegistry.add(positiveColorSchema, {
|
|
445
|
-
description: "The positive number color of the workspace"
|
|
446
|
-
});
|
|
447
|
-
var negativeColorSchema = z._default(colorSchema, "#ef4444");
|
|
448
|
-
schemaRegistry.add(negativeColorSchema, {
|
|
449
|
-
description: "The negative number color of the workspace"
|
|
450
|
-
});
|
|
451
|
-
var gradientStopsSchema = z.optional(z.array(colorSchema));
|
|
452
|
-
schemaRegistry.add(gradientStopsSchema, {
|
|
453
|
-
description: "The color stops for the base gradient color pattern used in the workspace"
|
|
454
|
-
});
|
|
455
|
-
var darkColorsSchema = z.object({
|
|
456
|
-
foreground: lightColorSchema,
|
|
457
|
-
background: darkColorSchema,
|
|
458
|
-
brand: brandColorSchema,
|
|
459
|
-
alternate: alternateColorSchema,
|
|
460
|
-
accent: accentColorSchema,
|
|
461
|
-
link: linkColorSchema,
|
|
462
|
-
help: helpColorSchema,
|
|
463
|
-
success: successColorSchema,
|
|
464
|
-
info: infoColorSchema,
|
|
465
|
-
warning: warningColorSchema,
|
|
466
|
-
danger: dangerColorSchema,
|
|
467
|
-
fatal: fatalColorSchema,
|
|
468
|
-
positive: positiveColorSchema,
|
|
469
|
-
negative: negativeColorSchema,
|
|
470
|
-
gradient: gradientStopsSchema
|
|
471
|
-
});
|
|
472
|
-
var lightColorsSchema = z.object({
|
|
473
|
-
foreground: darkColorSchema,
|
|
474
|
-
background: lightColorSchema,
|
|
475
|
-
brand: brandColorSchema,
|
|
476
|
-
alternate: alternateColorSchema,
|
|
477
|
-
accent: accentColorSchema,
|
|
478
|
-
link: linkColorSchema,
|
|
479
|
-
help: helpColorSchema,
|
|
480
|
-
success: successColorSchema,
|
|
481
|
-
info: infoColorSchema,
|
|
482
|
-
warning: warningColorSchema,
|
|
483
|
-
danger: dangerColorSchema,
|
|
484
|
-
fatal: fatalColorSchema,
|
|
485
|
-
positive: positiveColorSchema,
|
|
486
|
-
negative: negativeColorSchema,
|
|
487
|
-
gradient: gradientStopsSchema
|
|
488
|
-
});
|
|
489
|
-
var multiColorsSchema = z.object({
|
|
490
|
-
dark: darkColorsSchema,
|
|
491
|
-
light: lightColorsSchema
|
|
492
|
-
});
|
|
493
|
-
var singleColorsSchema = z.object({
|
|
494
|
-
dark: darkColorSchema,
|
|
495
|
-
light: lightColorSchema,
|
|
496
|
-
brand: brandColorSchema,
|
|
497
|
-
alternate: alternateColorSchema,
|
|
498
|
-
accent: accentColorSchema,
|
|
499
|
-
link: linkColorSchema,
|
|
500
|
-
help: helpColorSchema,
|
|
501
|
-
success: successColorSchema,
|
|
502
|
-
info: infoColorSchema,
|
|
503
|
-
warning: warningColorSchema,
|
|
504
|
-
danger: dangerColorSchema,
|
|
505
|
-
fatal: fatalColorSchema,
|
|
506
|
-
positive: positiveColorSchema,
|
|
507
|
-
negative: negativeColorSchema,
|
|
508
|
-
gradient: gradientStopsSchema
|
|
509
|
-
});
|
|
510
|
-
var registryUrlConfigSchema = z.optional(z.url());
|
|
511
|
-
schemaRegistry.add(registryUrlConfigSchema, {
|
|
512
|
-
description: "A remote registry URL used to publish distributable packages"
|
|
513
|
-
});
|
|
514
|
-
var registrySchema = z._default(
|
|
515
|
-
z.object({
|
|
516
|
-
github: registryUrlConfigSchema,
|
|
517
|
-
npm: registryUrlConfigSchema,
|
|
518
|
-
cargo: registryUrlConfigSchema,
|
|
519
|
-
cyclone: registryUrlConfigSchema,
|
|
520
|
-
container: registryUrlConfigSchema
|
|
521
|
-
}),
|
|
522
|
-
{}
|
|
523
|
-
);
|
|
524
|
-
schemaRegistry.add(registrySchema, {
|
|
525
|
-
description: "A list of remote registry URLs used by Storm Software"
|
|
526
|
-
});
|
|
527
|
-
var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
|
|
528
|
-
schemaRegistry.add(colorsSchema, {
|
|
529
|
-
description: "Colors used for various workspace elements"
|
|
530
|
-
});
|
|
531
|
-
var themeColorsSchema = z.record(
|
|
532
|
-
z.union([z.union([z.literal("base"), z.string()]), z.string()]),
|
|
533
|
-
colorsSchema
|
|
534
|
-
);
|
|
535
|
-
schemaRegistry.add(themeColorsSchema, {
|
|
536
|
-
description: "Storm theme config values used for styling various package elements"
|
|
537
|
-
});
|
|
538
|
-
var extendsSchema = z.optional(
|
|
539
|
-
z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
|
|
540
|
-
);
|
|
541
|
-
schemaRegistry.add(extendsSchema, {
|
|
542
|
-
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."
|
|
543
|
-
});
|
|
544
|
-
var workspaceBotNameSchema = z.string().check(z.trim());
|
|
545
|
-
schemaRegistry.add(workspaceBotNameSchema, {
|
|
546
|
-
description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
547
|
-
});
|
|
548
|
-
var workspaceBotEmailSchema = z.string().check(z.trim());
|
|
549
|
-
schemaRegistry.add(workspaceBotEmailSchema, {
|
|
550
|
-
description: "The email of the workspace bot"
|
|
551
|
-
});
|
|
552
|
-
var workspaceBotSchema = z.object({
|
|
553
|
-
name: workspaceBotNameSchema,
|
|
554
|
-
email: workspaceBotEmailSchema
|
|
555
|
-
});
|
|
556
|
-
schemaRegistry.add(workspaceBotSchema, {
|
|
557
|
-
description: "The workspace's bot user's config used to automated various operations tasks"
|
|
558
|
-
});
|
|
559
|
-
var workspaceReleaseBannerUrlSchema = z.optional(
|
|
560
|
-
z.string().check(z.trim(), z.url())
|
|
561
|
-
);
|
|
562
|
-
schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
|
|
563
|
-
description: "A URL to a banner image used to display the workspace's release"
|
|
564
|
-
});
|
|
565
|
-
var workspaceReleaseBannerAltSchema = z._default(
|
|
566
|
-
z.string().check(z.trim()),
|
|
567
|
-
STORM_DEFAULT_BANNER_ALT
|
|
568
|
-
);
|
|
569
|
-
schemaRegistry.add(workspaceReleaseBannerAltSchema, {
|
|
570
|
-
description: "The alt text for the workspace's release banner image"
|
|
571
|
-
});
|
|
572
|
-
var workspaceReleaseBannerSchema = z.object({
|
|
573
|
-
url: workspaceReleaseBannerUrlSchema,
|
|
574
|
-
alt: workspaceReleaseBannerAltSchema
|
|
575
|
-
});
|
|
576
|
-
schemaRegistry.add(workspaceReleaseBannerSchema, {
|
|
577
|
-
description: "The workspace's banner image used during the release process"
|
|
578
|
-
});
|
|
579
|
-
var workspaceReleaseHeaderSchema = z.optional(
|
|
580
|
-
z.string().check(z.trim())
|
|
581
|
-
);
|
|
582
|
-
schemaRegistry.add(workspaceReleaseHeaderSchema, {
|
|
583
|
-
description: "A header message appended to the start of the workspace's release notes"
|
|
584
|
-
});
|
|
585
|
-
var workspaceReleaseFooterSchema = z.optional(
|
|
586
|
-
z.string().check(z.trim())
|
|
587
|
-
);
|
|
588
|
-
schemaRegistry.add(workspaceReleaseFooterSchema, {
|
|
589
|
-
description: "A footer message appended to the end of the workspace's release notes"
|
|
590
|
-
});
|
|
591
|
-
var workspaceReleaseSchema = z.object({
|
|
592
|
-
banner: z.union([
|
|
593
|
-
workspaceReleaseBannerSchema,
|
|
594
|
-
z.string().check(z.trim(), z.url())
|
|
595
|
-
]),
|
|
596
|
-
header: workspaceReleaseHeaderSchema,
|
|
597
|
-
footer: workspaceReleaseFooterSchema
|
|
598
|
-
});
|
|
599
|
-
schemaRegistry.add(workspaceReleaseSchema, {
|
|
600
|
-
description: "The workspace's release config used during the release process"
|
|
601
|
-
});
|
|
602
|
-
var workspaceSocialsTwitterSchema = z.optional(
|
|
603
|
-
z.string().check(z.trim())
|
|
604
|
-
);
|
|
605
|
-
schemaRegistry.add(workspaceSocialsTwitterSchema, {
|
|
606
|
-
description: "A Twitter/X account associated with the organization/project"
|
|
607
|
-
});
|
|
608
|
-
var workspaceSocialsDiscordSchema = z.optional(
|
|
609
|
-
z.string().check(z.trim())
|
|
610
|
-
);
|
|
611
|
-
schemaRegistry.add(workspaceSocialsDiscordSchema, {
|
|
612
|
-
description: "A Discord account associated with the organization/project"
|
|
613
|
-
});
|
|
614
|
-
var workspaceSocialsTelegramSchema = z.optional(
|
|
615
|
-
z.string().check(z.trim())
|
|
616
|
-
);
|
|
617
|
-
schemaRegistry.add(workspaceSocialsTelegramSchema, {
|
|
618
|
-
description: "A Telegram account associated with the organization/project"
|
|
619
|
-
});
|
|
620
|
-
var workspaceSocialsSlackSchema = z.optional(
|
|
621
|
-
z.string().check(z.trim())
|
|
622
|
-
);
|
|
623
|
-
schemaRegistry.add(workspaceSocialsSlackSchema, {
|
|
624
|
-
description: "A Slack account associated with the organization/project"
|
|
625
|
-
});
|
|
626
|
-
var workspaceSocialsMediumSchema = z.optional(
|
|
627
|
-
z.string().check(z.trim())
|
|
628
|
-
);
|
|
629
|
-
schemaRegistry.add(workspaceSocialsMediumSchema, {
|
|
630
|
-
description: "A Medium account associated with the organization/project"
|
|
631
|
-
});
|
|
632
|
-
var workspaceSocialsGithubSchema = z.optional(
|
|
633
|
-
z.string().check(z.trim())
|
|
634
|
-
);
|
|
635
|
-
schemaRegistry.add(workspaceSocialsGithubSchema, {
|
|
636
|
-
description: "A GitHub account associated with the organization/project"
|
|
637
|
-
});
|
|
638
|
-
var workspaceSocialsSchema = z.object({
|
|
639
|
-
twitter: workspaceSocialsTwitterSchema,
|
|
640
|
-
discord: workspaceSocialsDiscordSchema,
|
|
641
|
-
telegram: workspaceSocialsTelegramSchema,
|
|
642
|
-
slack: workspaceSocialsSlackSchema,
|
|
643
|
-
medium: workspaceSocialsMediumSchema,
|
|
644
|
-
github: workspaceSocialsGithubSchema
|
|
645
|
-
});
|
|
646
|
-
schemaRegistry.add(workspaceSocialsSchema, {
|
|
647
|
-
description: "The workspace's account config used to store various social media links"
|
|
648
|
-
});
|
|
649
|
-
var workspaceDirectoryCacheSchema = z.optional(
|
|
650
|
-
z.string().check(z.trim())
|
|
651
|
-
);
|
|
652
|
-
schemaRegistry.add(workspaceDirectoryCacheSchema, {
|
|
653
|
-
description: "The directory used to store the environment's cached file data"
|
|
654
|
-
});
|
|
655
|
-
var workspaceDirectoryDataSchema = z.optional(
|
|
656
|
-
z.string().check(z.trim())
|
|
657
|
-
);
|
|
658
|
-
schemaRegistry.add(workspaceDirectoryDataSchema, {
|
|
659
|
-
description: "The directory used to store the environment's data files"
|
|
660
|
-
});
|
|
661
|
-
var workspaceDirectoryConfigSchema = z.optional(
|
|
662
|
-
z.string().check(z.trim())
|
|
663
|
-
);
|
|
664
|
-
schemaRegistry.add(workspaceDirectoryConfigSchema, {
|
|
665
|
-
description: "The directory used to store the environment's configuration files"
|
|
666
|
-
});
|
|
667
|
-
var workspaceDirectoryTempSchema = z.optional(
|
|
668
|
-
z.string().check(z.trim())
|
|
669
|
-
);
|
|
670
|
-
schemaRegistry.add(workspaceDirectoryTempSchema, {
|
|
671
|
-
description: "The directory used to store the environment's temp files"
|
|
672
|
-
});
|
|
673
|
-
var workspaceDirectoryLogSchema = z.optional(
|
|
674
|
-
z.string().check(z.trim())
|
|
675
|
-
);
|
|
676
|
-
schemaRegistry.add(workspaceDirectoryLogSchema, {
|
|
677
|
-
description: "The directory used to store the environment's log files"
|
|
678
|
-
});
|
|
679
|
-
var workspaceDirectoryBuildSchema = z._default(
|
|
680
|
-
z.string().check(z.trim()),
|
|
681
|
-
"dist"
|
|
682
|
-
);
|
|
683
|
-
schemaRegistry.add(workspaceDirectoryBuildSchema, {
|
|
684
|
-
description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
685
|
-
});
|
|
686
|
-
var workspaceDirectorySchema = z.object({
|
|
687
|
-
cache: workspaceDirectoryCacheSchema,
|
|
688
|
-
data: workspaceDirectoryDataSchema,
|
|
689
|
-
config: workspaceDirectoryConfigSchema,
|
|
690
|
-
temp: workspaceDirectoryTempSchema,
|
|
691
|
-
log: workspaceDirectoryLogSchema,
|
|
692
|
-
build: workspaceDirectoryBuildSchema
|
|
693
|
-
});
|
|
694
|
-
schemaRegistry.add(workspaceDirectorySchema, {
|
|
695
|
-
description: "Various directories used by the workspace to store data, cache, and configuration files"
|
|
696
|
-
});
|
|
697
|
-
var variantSchema = z._default(
|
|
698
|
-
z.enum(["minimal", "monorepo"]),
|
|
699
|
-
"monorepo"
|
|
700
|
-
);
|
|
701
|
-
schemaRegistry.add(variantSchema, {
|
|
702
|
-
description: "The variant of the workspace. This can be used to enable or disable certain features or configurations."
|
|
703
|
-
});
|
|
704
|
-
var errorCodesFileSchema = z._default(
|
|
705
|
-
z.string().check(z.trim()),
|
|
706
|
-
STORM_DEFAULT_ERROR_CODES_FILE
|
|
707
|
-
);
|
|
708
|
-
schemaRegistry.add(errorCodesFileSchema, {
|
|
709
|
-
description: "The path to the workspace's error codes JSON file"
|
|
710
|
-
});
|
|
711
|
-
var errorUrlSchema = z.optional(z.url());
|
|
712
|
-
schemaRegistry.add(errorUrlSchema, {
|
|
713
|
-
description: "A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
714
|
-
});
|
|
715
|
-
var errorSchema = z.object({
|
|
716
|
-
codesFile: errorCodesFileSchema,
|
|
717
|
-
url: errorUrlSchema
|
|
718
|
-
});
|
|
719
|
-
schemaRegistry.add(errorSchema, {
|
|
720
|
-
description: "The workspace's error config used when creating error details during a system error"
|
|
721
|
-
});
|
|
722
|
-
var organizationNameSchema = z.optional(
|
|
723
|
-
z.string().check(z.trim(), z.toLowerCase())
|
|
724
|
-
);
|
|
725
|
-
schemaRegistry.add(organizationNameSchema, {
|
|
726
|
-
description: "The name of the organization"
|
|
727
|
-
});
|
|
728
|
-
var organizationDescriptionSchema = z.optional(
|
|
729
|
-
z.string().check(z.trim())
|
|
730
|
-
);
|
|
731
|
-
schemaRegistry.add(organizationDescriptionSchema, {
|
|
732
|
-
description: "A description of the organization"
|
|
733
|
-
});
|
|
734
|
-
var organizationLogoSchema = z.optional(z.url());
|
|
735
|
-
schemaRegistry.add(organizationLogoSchema, {
|
|
736
|
-
description: "A URL to the organization's logo image"
|
|
737
|
-
});
|
|
738
|
-
var organizationIconSchema = z.optional(z.url());
|
|
739
|
-
schemaRegistry.add(organizationIconSchema, {
|
|
740
|
-
description: "A URL to the organization's icon image"
|
|
741
|
-
});
|
|
742
|
-
var organizationUrlSchema = z.optional(z.url());
|
|
743
|
-
schemaRegistry.add(organizationUrlSchema, {
|
|
744
|
-
description: "A URL to a page that provides more information about the organization"
|
|
745
|
-
});
|
|
746
|
-
var organizationSchema = z.object({
|
|
747
|
-
name: organizationNameSchema,
|
|
748
|
-
description: organizationDescriptionSchema,
|
|
749
|
-
logo: organizationLogoSchema,
|
|
750
|
-
icon: organizationIconSchema,
|
|
751
|
-
url: organizationUrlSchema
|
|
752
|
-
});
|
|
753
|
-
schemaRegistry.add(organizationSchema, {
|
|
754
|
-
description: "The workspace's organization details"
|
|
755
|
-
});
|
|
756
|
-
var schemaNameSchema = z._default(
|
|
757
|
-
z.string().check(z.trim(), z.toLowerCase()),
|
|
758
|
-
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
759
|
-
);
|
|
760
|
-
schemaRegistry.add(schemaNameSchema, {
|
|
761
|
-
description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
762
|
-
});
|
|
763
|
-
var nameSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
764
|
-
schemaRegistry.add(nameSchema, {
|
|
765
|
-
description: "The name of the workspace/project/service/package/scope using this configuration"
|
|
766
|
-
});
|
|
767
|
-
var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
768
|
-
schemaRegistry.add(namespaceSchema, {
|
|
769
|
-
description: "The namespace of the workspace/project/service/package/scope using this configuration"
|
|
770
|
-
});
|
|
771
|
-
var orgSchema = z.union([
|
|
772
|
-
organizationSchema,
|
|
773
|
-
z.string().check(z.trim(), z.toLowerCase())
|
|
774
|
-
]);
|
|
775
|
-
schemaRegistry.add(orgSchema, {
|
|
776
|
-
description: "The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
777
|
-
});
|
|
778
|
-
var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
|
|
779
|
-
schemaRegistry.add(repositorySchema, {
|
|
780
|
-
description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
|
|
781
|
-
});
|
|
782
|
-
var licenseSchema = z._default(
|
|
783
|
-
z.string().check(z.trim()),
|
|
784
|
-
"Apache-2.0"
|
|
785
|
-
);
|
|
786
|
-
schemaRegistry.add(licenseSchema, {
|
|
787
|
-
description: "The license type of the package"
|
|
788
|
-
});
|
|
789
|
-
var homepageSchema = z.optional(z.url());
|
|
790
|
-
schemaRegistry.add(homepageSchema, {
|
|
791
|
-
description: "The homepage of the workspace"
|
|
792
|
-
});
|
|
793
|
-
var docsSchema = z.optional(z.url());
|
|
794
|
-
schemaRegistry.add(docsSchema, {
|
|
795
|
-
description: "The documentation site for the workspace"
|
|
796
|
-
});
|
|
797
|
-
var portalSchema = z.optional(z.url());
|
|
798
|
-
schemaRegistry.add(portalSchema, {
|
|
799
|
-
description: "The development portal site for the workspace"
|
|
800
|
-
});
|
|
801
|
-
var licensingSchema = z.optional(z.url());
|
|
802
|
-
schemaRegistry.add(licensingSchema, {
|
|
803
|
-
description: "The licensing site for the workspace"
|
|
804
|
-
});
|
|
805
|
-
var contactSchema = z.optional(z.url());
|
|
806
|
-
schemaRegistry.add(contactSchema, {
|
|
807
|
-
description: "The contact site for the workspace"
|
|
808
|
-
});
|
|
809
|
-
var supportSchema = z.optional(z.url());
|
|
810
|
-
schemaRegistry.add(supportSchema, {
|
|
811
|
-
description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
812
|
-
});
|
|
813
|
-
var branchSchema = z._default(
|
|
814
|
-
z.string().check(z.trim(), z.toLowerCase()),
|
|
815
|
-
"main"
|
|
816
|
-
);
|
|
817
|
-
schemaRegistry.add(branchSchema, {
|
|
818
|
-
description: "The branch of the workspace"
|
|
819
|
-
});
|
|
820
|
-
var preidSchema = z.optional(
|
|
821
|
-
z.string().check(z.trim(), z.toLowerCase())
|
|
822
|
-
);
|
|
823
|
-
schemaRegistry.add(preidSchema, {
|
|
824
|
-
description: "A tag specifying the version pre-release identifier"
|
|
825
|
-
});
|
|
826
|
-
var ownerSchema = z.optional(
|
|
827
|
-
z.string().check(z.trim(), z.toLowerCase())
|
|
828
|
-
);
|
|
829
|
-
schemaRegistry.add(ownerSchema, {
|
|
830
|
-
description: "The owner of the package"
|
|
831
|
-
});
|
|
832
|
-
var modeSchema = z._default(
|
|
833
|
-
z.enum(["development", "test", "production"]).check(z.trim(), z.toLowerCase()),
|
|
834
|
-
"production"
|
|
835
|
-
);
|
|
836
|
-
schemaRegistry.add(modeSchema, {
|
|
837
|
-
description: "The current runtime environment mode for the package"
|
|
838
|
-
});
|
|
839
|
-
var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
840
|
-
schemaRegistry.add(workspaceRootSchema, {
|
|
841
|
-
description: "The root directory of the workspace"
|
|
842
|
-
});
|
|
843
|
-
var skipCacheSchema = z._default(z.boolean(), false);
|
|
844
|
-
schemaRegistry.add(skipCacheSchema, {
|
|
845
|
-
description: "Should all known types of workspace caching be skipped?"
|
|
846
|
-
});
|
|
847
|
-
var packageManagerSchema = z._default(
|
|
848
|
-
z.enum(["npm", "yarn", "pnpm", "bun"]),
|
|
849
|
-
"npm"
|
|
850
|
-
);
|
|
851
|
-
schemaRegistry.add(packageManagerSchema, {
|
|
852
|
-
description: "The JavaScript/TypeScript package manager used by the repository"
|
|
853
|
-
});
|
|
854
|
-
var timezoneSchema = z._default(
|
|
855
|
-
z.string().check(z.trim()),
|
|
856
|
-
"America/New_York"
|
|
857
|
-
);
|
|
858
|
-
schemaRegistry.add(timezoneSchema, {
|
|
859
|
-
description: "The default timezone of the workspace"
|
|
860
|
-
});
|
|
861
|
-
var localeSchema = z._default(z.string().check(z.trim()), "en-US");
|
|
862
|
-
schemaRegistry.add(localeSchema, {
|
|
863
|
-
description: "The default locale of the workspace"
|
|
864
|
-
});
|
|
865
|
-
var logLevelSchema = z._default(
|
|
866
|
-
z.enum([
|
|
867
|
-
"silent",
|
|
868
|
-
"fatal",
|
|
869
|
-
"error",
|
|
870
|
-
"warn",
|
|
871
|
-
"success",
|
|
872
|
-
"info",
|
|
873
|
-
"debug",
|
|
874
|
-
"trace",
|
|
875
|
-
"all"
|
|
876
|
-
]),
|
|
877
|
-
"info"
|
|
878
|
-
);
|
|
879
|
-
schemaRegistry.add(logLevelSchema, {
|
|
880
|
-
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`)."
|
|
881
|
-
});
|
|
882
|
-
var skipConfigLoggingSchema = z._default(z.boolean(), true);
|
|
883
|
-
schemaRegistry.add(skipConfigLoggingSchema, {
|
|
884
|
-
description: "Should the logging of the current Storm Workspace configuration be skipped?"
|
|
885
|
-
});
|
|
886
|
-
var configFileSchema = z._default(
|
|
887
|
-
z.nullable(z.string().check(z.trim())),
|
|
888
|
-
null
|
|
889
|
-
);
|
|
890
|
-
schemaRegistry.add(configFileSchema, {
|
|
891
|
-
description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
892
|
-
});
|
|
893
|
-
var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
|
|
894
|
-
schemaRegistry.add(extensionsSchema, {
|
|
895
|
-
description: "Configuration of each used extension"
|
|
896
|
-
});
|
|
897
|
-
var workspaceConfigSchema = z.object({
|
|
898
|
-
$schema: schemaNameSchema,
|
|
899
|
-
extends: extendsSchema,
|
|
900
|
-
name: nameSchema,
|
|
901
|
-
variant: variantSchema,
|
|
902
|
-
namespace: namespaceSchema,
|
|
903
|
-
organization: orgSchema,
|
|
904
|
-
repository: repositorySchema,
|
|
905
|
-
license: licenseSchema,
|
|
906
|
-
homepage: homepageSchema,
|
|
907
|
-
docs: docsSchema,
|
|
908
|
-
portal: portalSchema,
|
|
909
|
-
licensing: licensingSchema,
|
|
910
|
-
contact: contactSchema,
|
|
911
|
-
support: supportSchema,
|
|
912
|
-
branch: branchSchema,
|
|
913
|
-
preid: preidSchema,
|
|
914
|
-
owner: ownerSchema,
|
|
915
|
-
bot: workspaceBotSchema,
|
|
916
|
-
release: workspaceReleaseSchema,
|
|
917
|
-
socials: workspaceSocialsSchema,
|
|
918
|
-
error: errorSchema,
|
|
919
|
-
mode: modeSchema,
|
|
920
|
-
workspaceRoot: workspaceRootSchema,
|
|
921
|
-
skipCache: skipCacheSchema,
|
|
922
|
-
directories: workspaceDirectorySchema,
|
|
923
|
-
packageManager: packageManagerSchema,
|
|
924
|
-
timezone: timezoneSchema,
|
|
925
|
-
locale: localeSchema,
|
|
926
|
-
logLevel: logLevelSchema,
|
|
927
|
-
skipConfigLogging: skipConfigLoggingSchema,
|
|
928
|
-
registry: registrySchema,
|
|
929
|
-
configFile: configFileSchema,
|
|
930
|
-
colors: z.union([colorsSchema, themeColorsSchema]),
|
|
931
|
-
extensions: extensionsSchema
|
|
932
|
-
});
|
|
933
|
-
schemaRegistry.add(extensionsSchema, {
|
|
934
|
-
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."
|
|
935
|
-
});
|
|
936
|
-
|
|
937
|
-
// ../config-tools/src/create-storm-config.ts
|
|
938
|
-
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
// ../config-tools/src/config-file/get-config-file.ts
|
|
942
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
943
|
-
var _c12 = require('c12');
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
// ../config-tools/src/utilities/get-default-config.ts
|
|
947
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
948
|
-
|
|
949
|
-
// ../config/src/index.ts
|
|
950
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
951
|
-
|
|
952
|
-
// ../config/src/define-config.ts
|
|
953
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
954
|
-
|
|
955
|
-
// ../config/src/types.ts
|
|
956
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
957
|
-
var COLOR_KEYS = [
|
|
958
|
-
"dark",
|
|
959
|
-
"light",
|
|
960
|
-
"base",
|
|
961
|
-
"brand",
|
|
962
|
-
"alternate",
|
|
963
|
-
"accent",
|
|
964
|
-
"link",
|
|
965
|
-
"success",
|
|
966
|
-
"help",
|
|
967
|
-
"info",
|
|
968
|
-
"warning",
|
|
969
|
-
"danger",
|
|
970
|
-
"fatal",
|
|
971
|
-
"positive",
|
|
972
|
-
"negative"
|
|
973
|
-
];
|
|
974
|
-
|
|
975
|
-
// ../config-tools/src/utilities/get-default-config.ts
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
async function getPackageJsonConfig(root) {
|
|
980
|
-
let license = STORM_DEFAULT_LICENSE;
|
|
981
|
-
let homepage = void 0;
|
|
982
|
-
let support = void 0;
|
|
983
|
-
let name = void 0;
|
|
984
|
-
let namespace = void 0;
|
|
985
|
-
let repository = void 0;
|
|
986
|
-
const workspaceRoot = findWorkspaceRoot(root);
|
|
987
|
-
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
988
|
-
const file = await _promises.readFile.call(void 0,
|
|
989
|
-
_chunk7SWZ2ZGXcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
990
|
-
"utf8"
|
|
991
|
-
);
|
|
992
|
-
if (file) {
|
|
993
|
-
const packageJson = JSON.parse(file);
|
|
994
|
-
if (packageJson.name) {
|
|
995
|
-
name = packageJson.name;
|
|
996
|
-
}
|
|
997
|
-
if (packageJson.namespace) {
|
|
998
|
-
namespace = packageJson.namespace;
|
|
999
|
-
}
|
|
1000
|
-
if (packageJson.repository) {
|
|
1001
|
-
if (typeof packageJson.repository === "string") {
|
|
1002
|
-
repository = packageJson.repository;
|
|
1003
|
-
} else if (packageJson.repository.url) {
|
|
1004
|
-
repository = packageJson.repository.url;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
if (packageJson.license) {
|
|
1008
|
-
license = packageJson.license;
|
|
1009
|
-
}
|
|
1010
|
-
if (packageJson.homepage) {
|
|
1011
|
-
homepage = packageJson.homepage;
|
|
1012
|
-
}
|
|
1013
|
-
if (packageJson.bugs) {
|
|
1014
|
-
if (typeof packageJson.bugs === "string") {
|
|
1015
|
-
support = packageJson.bugs;
|
|
1016
|
-
} else if (packageJson.bugs.url) {
|
|
1017
|
-
support = packageJson.bugs.url;
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
return {
|
|
1023
|
-
workspaceRoot,
|
|
1024
|
-
name,
|
|
1025
|
-
namespace,
|
|
1026
|
-
repository,
|
|
1027
|
-
license,
|
|
1028
|
-
homepage,
|
|
1029
|
-
support
|
|
1030
|
-
};
|
|
1031
|
-
}
|
|
1032
|
-
function applyDefaultConfig(config) {
|
|
1033
|
-
if (!config.support && config.contact) {
|
|
1034
|
-
config.support = config.contact;
|
|
1035
|
-
}
|
|
1036
|
-
if (!config.contact && config.support) {
|
|
1037
|
-
config.contact = config.support;
|
|
1038
|
-
}
|
|
1039
|
-
if (config.homepage) {
|
|
1040
|
-
if (!config.docs) {
|
|
1041
|
-
config.docs = `${config.homepage}/docs`;
|
|
1042
|
-
}
|
|
1043
|
-
if (!config.license) {
|
|
1044
|
-
config.license = `${config.homepage}/license`;
|
|
1045
|
-
}
|
|
1046
|
-
if (!config.support) {
|
|
1047
|
-
config.support = `${config.homepage}/support`;
|
|
1048
|
-
}
|
|
1049
|
-
if (!config.contact) {
|
|
1050
|
-
config.contact = `${config.homepage}/contact`;
|
|
1051
|
-
}
|
|
1052
|
-
if (!_optionalChain([config, 'access', _24 => _24.error, 'optionalAccess', _25 => _25.codesFile]) || !_optionalChain([config, 'optionalAccess', _26 => _26.error, 'optionalAccess', _27 => _27.url])) {
|
|
1053
|
-
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
1054
|
-
if (config.homepage) {
|
|
1055
|
-
config.error.url ??= `${config.homepage}/errors`;
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
return config;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
// ../config-tools/src/config-file/get-config-file.ts
|
|
1063
|
-
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
1064
|
-
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
1065
|
-
const configs = await Promise.all([
|
|
1066
|
-
_c12.loadConfig.call(void 0, {
|
|
1067
|
-
cwd: workspacePath,
|
|
1068
|
-
packageJson: true,
|
|
1069
|
-
name: fileName,
|
|
1070
|
-
envName: _optionalChain([fileName, 'optionalAccess', _28 => _28.toUpperCase, 'call', _29 => _29()]),
|
|
1071
|
-
jitiOptions: {
|
|
1072
|
-
debug: false,
|
|
1073
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk7SWZ2ZGXcjs.joinPaths.call(void 0,
|
|
1074
|
-
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
1075
|
-
"jiti"
|
|
1076
|
-
)
|
|
1077
|
-
},
|
|
1078
|
-
...options
|
|
1079
|
-
}),
|
|
1080
|
-
_c12.loadConfig.call(void 0, {
|
|
1081
|
-
cwd: workspacePath,
|
|
1082
|
-
packageJson: true,
|
|
1083
|
-
name: fileName,
|
|
1084
|
-
envName: _optionalChain([fileName, 'optionalAccess', _30 => _30.toUpperCase, 'call', _31 => _31()]),
|
|
1085
|
-
jitiOptions: {
|
|
1086
|
-
debug: false,
|
|
1087
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk7SWZ2ZGXcjs.joinPaths.call(void 0,
|
|
1088
|
-
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
1089
|
-
"jiti"
|
|
1090
|
-
)
|
|
1091
|
-
},
|
|
1092
|
-
configFile: fileName,
|
|
1093
|
-
...options
|
|
1094
|
-
})
|
|
1095
|
-
]);
|
|
1096
|
-
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
1097
|
-
};
|
|
1098
|
-
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
1099
|
-
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
1100
|
-
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
1101
|
-
let config = result.config;
|
|
1102
|
-
const configFile = result.configFile;
|
|
1103
|
-
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
1104
|
-
_chunkHFWPMK44cjs.writeTrace.call(void 0,
|
|
1105
|
-
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
1106
|
-
{
|
|
1107
|
-
logLevel: "all"
|
|
1108
|
-
}
|
|
1109
|
-
);
|
|
1110
|
-
}
|
|
1111
|
-
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
1112
|
-
const results = await Promise.all(
|
|
1113
|
-
additionalFileNames.map(
|
|
1114
|
-
(fileName) => getConfigFileByName(fileName, workspacePath)
|
|
1115
|
-
)
|
|
1116
|
-
);
|
|
1117
|
-
for (const result2 of results) {
|
|
1118
|
-
if (_optionalChain([result2, 'optionalAccess', _32 => _32.config]) && _optionalChain([result2, 'optionalAccess', _33 => _33.configFile]) && Object.keys(result2.config).length > 0) {
|
|
1119
|
-
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
1120
|
-
_chunkHFWPMK44cjs.writeTrace.call(void 0,
|
|
1121
|
-
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
1122
|
-
{
|
|
1123
|
-
logLevel: "all"
|
|
1124
|
-
}
|
|
1125
|
-
);
|
|
1126
|
-
}
|
|
1127
|
-
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
if (!config || Object.keys(config).length === 0) {
|
|
1132
|
-
return void 0;
|
|
1133
|
-
}
|
|
1134
|
-
config.configFile = configFile;
|
|
1135
|
-
return config;
|
|
1136
|
-
};
|
|
1137
|
-
|
|
1138
|
-
// ../config-tools/src/env/get-env.ts
|
|
1139
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1140
|
-
var getExtensionEnv = (extensionName) => {
|
|
1141
|
-
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
1142
|
-
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
1143
|
-
const name = key.replace(prefix, "").split("_").map(
|
|
1144
|
-
(i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
|
|
1145
|
-
).join("");
|
|
1146
|
-
if (name) {
|
|
1147
|
-
ret[name] = process.env[key];
|
|
1148
|
-
}
|
|
1149
|
-
return ret;
|
|
1150
|
-
}, {});
|
|
1151
|
-
};
|
|
1152
|
-
var getConfigEnv = () => {
|
|
1153
|
-
const prefix = "STORM_";
|
|
1154
|
-
let config = {
|
|
1155
|
-
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
1156
|
-
name: process.env[`${prefix}NAME`] || void 0,
|
|
1157
|
-
variant: process.env[`${prefix}VARIANT`] || void 0,
|
|
1158
|
-
namespace: process.env[`${prefix}NAMESPACE`] || void 0,
|
|
1159
|
-
owner: process.env[`${prefix}OWNER`] || void 0,
|
|
1160
|
-
bot: {
|
|
1161
|
-
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
1162
|
-
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
1163
|
-
},
|
|
1164
|
-
release: {
|
|
1165
|
-
banner: {
|
|
1166
|
-
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
1167
|
-
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
1168
|
-
},
|
|
1169
|
-
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
1170
|
-
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
1171
|
-
},
|
|
1172
|
-
error: {
|
|
1173
|
-
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
1174
|
-
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
1175
|
-
},
|
|
1176
|
-
socials: {
|
|
1177
|
-
twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
|
|
1178
|
-
discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
|
|
1179
|
-
telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
|
|
1180
|
-
slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
|
|
1181
|
-
medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
|
|
1182
|
-
github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
|
|
1183
|
-
},
|
|
1184
|
-
organization: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] ? process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] ? {
|
|
1185
|
-
name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
|
|
1186
|
-
description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
|
|
1187
|
-
url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
|
|
1188
|
-
logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
|
|
1189
|
-
icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
|
|
1190
|
-
} : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
|
|
1191
|
-
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
1192
|
-
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
1193
|
-
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
1194
|
-
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
1195
|
-
portal: process.env[`${prefix}PORTAL`] || void 0,
|
|
1196
|
-
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
1197
|
-
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
1198
|
-
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
1199
|
-
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
1200
|
-
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
1201
|
-
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
1202
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
1203
|
-
directories: {
|
|
1204
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
1205
|
-
data: process.env[`${prefix}DATA_DIR`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
1206
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
1207
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
1208
|
-
log: process.env[`${prefix}LOG_DIR`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
1209
|
-
build: process.env[`${prefix}BUILD_DIR`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
1210
|
-
},
|
|
1211
|
-
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
1212
|
-
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
1213
|
-
// ci:
|
|
1214
|
-
// process.env[`${prefix}CI`] !== undefined
|
|
1215
|
-
// ? Boolean(
|
|
1216
|
-
// process.env[`${prefix}CI`] ??
|
|
1217
|
-
// process.env.CI ??
|
|
1218
|
-
// process.env.CONTINUOUS_INTEGRATION
|
|
1219
|
-
// )
|
|
1220
|
-
// : undefined,
|
|
1221
|
-
repository: process.env[`${prefix}REPOSITORY`] || void 0,
|
|
1222
|
-
branch: process.env[`${prefix}BRANCH`] || void 0,
|
|
1223
|
-
preid: process.env[`${prefix}PRE_ID`] || void 0,
|
|
1224
|
-
registry: {
|
|
1225
|
-
github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
|
|
1226
|
-
npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
|
|
1227
|
-
cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
|
|
1228
|
-
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
1229
|
-
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
1230
|
-
},
|
|
1231
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
1232
|
-
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1233
|
-
) ? _chunkHFWPMK44cjs.getLogLevelLabel.call(void 0,
|
|
1234
|
-
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1235
|
-
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
1236
|
-
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
1237
|
-
};
|
|
1238
|
-
const themeNames = Object.keys(process.env).filter(
|
|
1239
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
|
|
1240
|
-
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
1241
|
-
)
|
|
1242
|
-
);
|
|
1243
|
-
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
1244
|
-
(ret, themeName) => {
|
|
1245
|
-
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
1246
|
-
return ret;
|
|
1247
|
-
},
|
|
1248
|
-
{}
|
|
1249
|
-
) : getThemeColorsEnv(prefix);
|
|
1250
|
-
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
1251
|
-
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1252
|
-
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
1253
|
-
} else {
|
|
1254
|
-
config.docs = `${config.homepage}/docs`;
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
if (config.licensing === STORM_DEFAULT_LICENSING) {
|
|
1258
|
-
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1259
|
-
config.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
1260
|
-
} else {
|
|
1261
|
-
config.licensing = `${config.homepage}/docs`;
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
|
|
1265
|
-
if (serializedConfig) {
|
|
1266
|
-
const parsed = JSON.parse(serializedConfig);
|
|
1267
|
-
config = {
|
|
1268
|
-
...config,
|
|
1269
|
-
...parsed,
|
|
1270
|
-
colors: { ...config.colors, ...parsed.colors },
|
|
1271
|
-
extensions: { ...config.extensions, ...parsed.extensions }
|
|
1272
|
-
};
|
|
1273
|
-
}
|
|
1274
|
-
return config;
|
|
1275
|
-
};
|
|
1276
|
-
var getThemeColorsEnv = (prefix, theme) => {
|
|
1277
|
-
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
1278
|
-
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
1279
|
-
};
|
|
1280
|
-
var getSingleThemeColorsEnv = (prefix) => {
|
|
1281
|
-
const gradient = [];
|
|
1282
|
-
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1283
|
-
gradient.push(
|
|
1284
|
-
process.env[`${prefix}GRADIENT_START`],
|
|
1285
|
-
process.env[`${prefix}GRADIENT_END`]
|
|
1286
|
-
);
|
|
1287
|
-
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
1288
|
-
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
1289
|
-
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
1290
|
-
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
1291
|
-
index++;
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
return {
|
|
1295
|
-
dark: process.env[`${prefix}DARK`],
|
|
1296
|
-
light: process.env[`${prefix}LIGHT`],
|
|
1297
|
-
brand: process.env[`${prefix}BRAND`],
|
|
1298
|
-
alternate: process.env[`${prefix}ALTERNATE`],
|
|
1299
|
-
accent: process.env[`${prefix}ACCENT`],
|
|
1300
|
-
link: process.env[`${prefix}LINK`],
|
|
1301
|
-
help: process.env[`${prefix}HELP`],
|
|
1302
|
-
success: process.env[`${prefix}SUCCESS`],
|
|
1303
|
-
info: process.env[`${prefix}INFO`],
|
|
1304
|
-
warning: process.env[`${prefix}WARNING`],
|
|
1305
|
-
danger: process.env[`${prefix}DANGER`],
|
|
1306
|
-
fatal: process.env[`${prefix}FATAL`],
|
|
1307
|
-
positive: process.env[`${prefix}POSITIVE`],
|
|
1308
|
-
negative: process.env[`${prefix}NEGATIVE`],
|
|
1309
|
-
gradient
|
|
1310
|
-
};
|
|
1311
|
-
};
|
|
1312
|
-
var getMultiThemeColorsEnv = (prefix) => {
|
|
1313
|
-
return {
|
|
1314
|
-
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
1315
|
-
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
1316
|
-
};
|
|
1317
|
-
};
|
|
1318
|
-
var getBaseThemeColorsEnv = (prefix) => {
|
|
1319
|
-
const gradient = [];
|
|
1320
|
-
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1321
|
-
gradient.push(
|
|
1322
|
-
process.env[`${prefix}GRADIENT_START`],
|
|
1323
|
-
process.env[`${prefix}GRADIENT_END`]
|
|
1324
|
-
);
|
|
1325
|
-
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
1326
|
-
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
1327
|
-
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
1328
|
-
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
1329
|
-
index++;
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
return {
|
|
1333
|
-
foreground: process.env[`${prefix}FOREGROUND`],
|
|
1334
|
-
background: process.env[`${prefix}BACKGROUND`],
|
|
1335
|
-
brand: process.env[`${prefix}BRAND`],
|
|
1336
|
-
alternate: process.env[`${prefix}ALTERNATE`],
|
|
1337
|
-
accent: process.env[`${prefix}ACCENT`],
|
|
1338
|
-
link: process.env[`${prefix}LINK`],
|
|
1339
|
-
help: process.env[`${prefix}HELP`],
|
|
1340
|
-
success: process.env[`${prefix}SUCCESS`],
|
|
1341
|
-
info: process.env[`${prefix}INFO`],
|
|
1342
|
-
warning: process.env[`${prefix}WARNING`],
|
|
1343
|
-
danger: process.env[`${prefix}DANGER`],
|
|
1344
|
-
fatal: process.env[`${prefix}FATAL`],
|
|
1345
|
-
positive: process.env[`${prefix}POSITIVE`],
|
|
1346
|
-
negative: process.env[`${prefix}NEGATIVE`],
|
|
1347
|
-
gradient
|
|
1348
|
-
};
|
|
1349
|
-
};
|
|
1350
|
-
|
|
1351
|
-
// ../config-tools/src/env/set-env.ts
|
|
1352
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1353
|
-
var setExtensionEnv = (extensionName, extension) => {
|
|
1354
|
-
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
1355
|
-
if (extension[key]) {
|
|
1356
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _34 => _34.replace, 'call', _35 => _35(
|
|
1357
|
-
/([A-Z])+/g,
|
|
1358
|
-
(input) => input ? _optionalChain([input, 'access', _36 => _36[0], 'optionalAccess', _37 => _37.toUpperCase, 'call', _38 => _38()]) + input.slice(1) : ""
|
|
1359
|
-
), 'access', _39 => _39.split, 'call', _40 => _40(/(?=[A-Z])|[.\-\s_]/), 'access', _41 => _41.map, 'call', _42 => _42((x) => x.toLowerCase())]), () => ( []));
|
|
1360
|
-
let extensionKey;
|
|
1361
|
-
if (result.length === 0) {
|
|
1362
|
-
return;
|
|
1363
|
-
}
|
|
1364
|
-
if (result.length === 1) {
|
|
1365
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _43 => _43[0], 'optionalAccess', _44 => _44.toUpperCase, 'call', _45 => _45()]), () => ( ""));
|
|
1366
|
-
} else {
|
|
1367
|
-
extensionKey = result.reduce((ret, part) => {
|
|
1368
|
-
return `${ret}_${part.toLowerCase()}`;
|
|
1369
|
-
});
|
|
1370
|
-
}
|
|
1371
|
-
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
};
|
|
1375
|
-
var setConfigEnv = (config) => {
|
|
1376
|
-
const prefix = "STORM_";
|
|
1377
|
-
if (config.extends) {
|
|
1378
|
-
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
1379
|
-
}
|
|
1380
|
-
if (config.name) {
|
|
1381
|
-
process.env[`${prefix}NAME`] = config.name;
|
|
1382
|
-
}
|
|
1383
|
-
if (config.variant) {
|
|
1384
|
-
process.env[`${prefix}VARIANT`] = config.variant;
|
|
1385
|
-
}
|
|
1386
|
-
if (config.namespace) {
|
|
1387
|
-
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
1388
|
-
}
|
|
1389
|
-
if (config.owner) {
|
|
1390
|
-
process.env[`${prefix}OWNER`] = config.owner;
|
|
1391
|
-
}
|
|
1392
|
-
if (config.bot) {
|
|
1393
|
-
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
1394
|
-
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
1395
|
-
}
|
|
1396
|
-
if (config.error) {
|
|
1397
|
-
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
1398
|
-
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
1399
|
-
}
|
|
1400
|
-
if (config.release) {
|
|
1401
|
-
if (config.release.banner) {
|
|
1402
|
-
if (typeof config.release.banner === "string") {
|
|
1403
|
-
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1404
|
-
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
|
|
1405
|
-
} else {
|
|
1406
|
-
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
|
|
1407
|
-
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
|
|
1408
|
-
process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
1412
|
-
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
1413
|
-
}
|
|
1414
|
-
if (config.socials) {
|
|
1415
|
-
if (config.socials.twitter) {
|
|
1416
|
-
process.env[`${prefix}SOCIAL_TWITTER`] = config.socials.twitter;
|
|
1417
|
-
}
|
|
1418
|
-
if (config.socials.discord) {
|
|
1419
|
-
process.env[`${prefix}SOCIAL_DISCORD`] = config.socials.discord;
|
|
1420
|
-
}
|
|
1421
|
-
if (config.socials.telegram) {
|
|
1422
|
-
process.env[`${prefix}SOCIAL_TELEGRAM`] = config.socials.telegram;
|
|
1423
|
-
}
|
|
1424
|
-
if (config.socials.slack) {
|
|
1425
|
-
process.env[`${prefix}SOCIAL_SLACK`] = config.socials.slack;
|
|
1426
|
-
}
|
|
1427
|
-
if (config.socials.medium) {
|
|
1428
|
-
process.env[`${prefix}SOCIAL_MEDIUM`] = config.socials.medium;
|
|
1429
|
-
}
|
|
1430
|
-
if (config.socials.github) {
|
|
1431
|
-
process.env[`${prefix}SOCIAL_GITHUB`] = config.socials.github;
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
if (config.organization) {
|
|
1435
|
-
if (typeof config.organization === "string") {
|
|
1436
|
-
process.env[`${prefix}ORG`] = config.organization;
|
|
1437
|
-
process.env[`${prefix}ORG_NAME`] = config.organization;
|
|
1438
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
1439
|
-
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
|
|
1440
|
-
} else {
|
|
1441
|
-
process.env[`${prefix}ORG`] = config.organization.name;
|
|
1442
|
-
process.env[`${prefix}ORG_NAME`] = config.organization.name;
|
|
1443
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization.name;
|
|
1444
|
-
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
|
|
1445
|
-
if (config.organization.url) {
|
|
1446
|
-
process.env[`${prefix}ORG_URL`] = config.organization.url;
|
|
1447
|
-
process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
|
|
1448
|
-
}
|
|
1449
|
-
if (config.organization.description) {
|
|
1450
|
-
process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
|
|
1451
|
-
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
|
|
1452
|
-
}
|
|
1453
|
-
if (config.organization.logo) {
|
|
1454
|
-
process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
|
|
1455
|
-
process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
|
|
1456
|
-
}
|
|
1457
|
-
if (config.organization.icon) {
|
|
1458
|
-
process.env[`${prefix}ORG_ICON`] = config.organization.icon;
|
|
1459
|
-
process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
if (config.packageManager) {
|
|
1464
|
-
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
1465
|
-
}
|
|
1466
|
-
if (config.license) {
|
|
1467
|
-
process.env[`${prefix}LICENSE`] = config.license;
|
|
1468
|
-
}
|
|
1469
|
-
if (config.homepage) {
|
|
1470
|
-
process.env[`${prefix}HOMEPAGE`] = config.homepage;
|
|
1471
|
-
}
|
|
1472
|
-
if (config.docs) {
|
|
1473
|
-
process.env[`${prefix}DOCS`] = config.docs;
|
|
1474
|
-
}
|
|
1475
|
-
if (config.portal) {
|
|
1476
|
-
process.env[`${prefix}PORTAL`] = config.portal;
|
|
1477
|
-
}
|
|
1478
|
-
if (config.licensing) {
|
|
1479
|
-
process.env[`${prefix}LICENSING`] = config.licensing;
|
|
1480
|
-
}
|
|
1481
|
-
if (config.contact) {
|
|
1482
|
-
process.env[`${prefix}CONTACT`] = config.contact;
|
|
1483
|
-
}
|
|
1484
|
-
if (config.support) {
|
|
1485
|
-
process.env[`${prefix}SUPPORT`] = config.support;
|
|
1486
|
-
}
|
|
1487
|
-
if (config.timezone) {
|
|
1488
|
-
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
1489
|
-
process.env.TZ = config.timezone;
|
|
1490
|
-
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
1491
|
-
process.env.TIMEZONE = config.timezone;
|
|
1492
|
-
}
|
|
1493
|
-
if (config.locale) {
|
|
1494
|
-
process.env[`${prefix}LOCALE`] = config.locale;
|
|
1495
|
-
process.env.DEFAULT_LOCALE = config.locale;
|
|
1496
|
-
process.env.LOCALE = config.locale;
|
|
1497
|
-
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
1498
|
-
}
|
|
1499
|
-
if (config.configFile) {
|
|
1500
|
-
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0,
|
|
1501
|
-
config.configFile
|
|
1502
|
-
);
|
|
1503
|
-
}
|
|
1504
|
-
if (config.workspaceRoot) {
|
|
1505
|
-
process.env[`${prefix}WORKSPACE_ROOT`] = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
1506
|
-
process.env.NX_WORKSPACE_ROOT = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
1507
|
-
process.env.NX_WORKSPACE_ROOT_PATH = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
1508
|
-
}
|
|
1509
|
-
if (config.directories) {
|
|
1510
|
-
if (!config.skipCache && config.directories.cache) {
|
|
1511
|
-
process.env[`${prefix}CACHE_DIR`] = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0,
|
|
1512
|
-
config.directories.cache
|
|
1513
|
-
);
|
|
1514
|
-
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1515
|
-
}
|
|
1516
|
-
if (config.directories.data) {
|
|
1517
|
-
process.env[`${prefix}DATA_DIR`] = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, config.directories.data);
|
|
1518
|
-
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1519
|
-
}
|
|
1520
|
-
if (config.directories.config) {
|
|
1521
|
-
process.env[`${prefix}CONFIG_DIR`] = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0,
|
|
1522
|
-
config.directories.config
|
|
1523
|
-
);
|
|
1524
|
-
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1525
|
-
}
|
|
1526
|
-
if (config.directories.temp) {
|
|
1527
|
-
process.env[`${prefix}TEMP_DIR`] = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, config.directories.temp);
|
|
1528
|
-
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1529
|
-
}
|
|
1530
|
-
if (config.directories.log) {
|
|
1531
|
-
process.env[`${prefix}LOG_DIR`] = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0, config.directories.log);
|
|
1532
|
-
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1533
|
-
}
|
|
1534
|
-
if (config.directories.build) {
|
|
1535
|
-
process.env[`${prefix}BUILD_DIR`] = _chunk7SWZ2ZGXcjs.correctPaths.call(void 0,
|
|
1536
|
-
config.directories.build
|
|
1537
|
-
);
|
|
1538
|
-
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
if (config.skipCache !== void 0) {
|
|
1542
|
-
process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
|
|
1543
|
-
if (config.skipCache) {
|
|
1544
|
-
process.env.NX_SKIP_NX_CACHE ??= String(config.skipCache);
|
|
1545
|
-
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
if (config.mode) {
|
|
1549
|
-
process.env[`${prefix}MODE`] = config.mode;
|
|
1550
|
-
process.env.NODE_ENV = config.mode;
|
|
1551
|
-
process.env.ENVIRONMENT = config.mode;
|
|
1552
|
-
}
|
|
1553
|
-
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])) {
|
|
1554
|
-
for (const key of Object.keys(config.colors)) {
|
|
1555
|
-
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1556
|
-
}
|
|
1557
|
-
} else {
|
|
1558
|
-
setThemeColorsEnv(
|
|
1559
|
-
`${prefix}COLOR_`,
|
|
1560
|
-
config.colors
|
|
1561
|
-
);
|
|
1562
|
-
}
|
|
1563
|
-
if (config.repository) {
|
|
1564
|
-
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
1565
|
-
}
|
|
1566
|
-
if (config.branch) {
|
|
1567
|
-
process.env[`${prefix}BRANCH`] = config.branch;
|
|
1568
|
-
}
|
|
1569
|
-
if (config.preid) {
|
|
1570
|
-
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
1571
|
-
}
|
|
1572
|
-
if (config.registry) {
|
|
1573
|
-
if (config.registry.github) {
|
|
1574
|
-
process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
|
|
1575
|
-
}
|
|
1576
|
-
if (config.registry.npm) {
|
|
1577
|
-
process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
|
|
1578
|
-
}
|
|
1579
|
-
if (config.registry.cargo) {
|
|
1580
|
-
process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
|
|
1581
|
-
}
|
|
1582
|
-
if (config.registry.cyclone) {
|
|
1583
|
-
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
1584
|
-
config.registry.cyclone
|
|
1585
|
-
);
|
|
1586
|
-
}
|
|
1587
|
-
if (config.registry.container) {
|
|
1588
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
1589
|
-
config.registry.container
|
|
1590
|
-
);
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
if (config.logLevel) {
|
|
1594
|
-
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
1595
|
-
process.env.LOG_LEVEL = String(config.logLevel);
|
|
1596
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
1597
|
-
_chunkHFWPMK44cjs.getLogLevel.call(void 0, config.logLevel) >= _chunkHFWPMK44cjs.LogLevel.DEBUG ? true : false
|
|
1598
|
-
);
|
|
1599
|
-
process.env.RUST_BACKTRACE = _chunkHFWPMK44cjs.getLogLevel.call(void 0, config.logLevel) >= _chunkHFWPMK44cjs.LogLevel.DEBUG ? "full" : "none";
|
|
1600
|
-
}
|
|
1601
|
-
if (config.skipConfigLogging !== void 0) {
|
|
1602
|
-
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
1603
|
-
config.skipConfigLogging
|
|
1604
|
-
);
|
|
1605
|
-
}
|
|
1606
|
-
process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config);
|
|
1607
|
-
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
1608
|
-
if (config.extensions[key] && Object.keys(config.extensions[key])) {
|
|
1609
|
-
setExtensionEnv(key, config.extensions[key]);
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
};
|
|
1613
|
-
var setThemeColorsEnv = (prefix, config) => {
|
|
1614
|
-
return _optionalChain([config, 'optionalAccess', _52 => _52.light, 'optionalAccess', _53 => _53.brand]) || _optionalChain([config, 'optionalAccess', _54 => _54.dark, 'optionalAccess', _55 => _55.brand]) ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
1615
|
-
};
|
|
1616
|
-
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
1617
|
-
if (config.dark) {
|
|
1618
|
-
process.env[`${prefix}DARK`] = config.dark;
|
|
1619
|
-
}
|
|
1620
|
-
if (config.light) {
|
|
1621
|
-
process.env[`${prefix}LIGHT`] = config.light;
|
|
1622
|
-
}
|
|
1623
|
-
if (config.brand) {
|
|
1624
|
-
process.env[`${prefix}BRAND`] = config.brand;
|
|
1625
|
-
}
|
|
1626
|
-
if (config.alternate) {
|
|
1627
|
-
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
1628
|
-
}
|
|
1629
|
-
if (config.accent) {
|
|
1630
|
-
process.env[`${prefix}ACCENT`] = config.accent;
|
|
1631
|
-
}
|
|
1632
|
-
if (config.link) {
|
|
1633
|
-
process.env[`${prefix}LINK`] = config.link;
|
|
1634
|
-
}
|
|
1635
|
-
if (config.help) {
|
|
1636
|
-
process.env[`${prefix}HELP`] = config.help;
|
|
1637
|
-
}
|
|
1638
|
-
if (config.success) {
|
|
1639
|
-
process.env[`${prefix}SUCCESS`] = config.success;
|
|
1640
|
-
}
|
|
1641
|
-
if (config.info) {
|
|
1642
|
-
process.env[`${prefix}INFO`] = config.info;
|
|
1643
|
-
}
|
|
1644
|
-
if (config.warning) {
|
|
1645
|
-
process.env[`${prefix}WARNING`] = config.warning;
|
|
1646
|
-
}
|
|
1647
|
-
if (config.danger) {
|
|
1648
|
-
process.env[`${prefix}DANGER`] = config.danger;
|
|
1649
|
-
}
|
|
1650
|
-
if (config.fatal) {
|
|
1651
|
-
process.env[`${prefix}FATAL`] = config.fatal;
|
|
1652
|
-
}
|
|
1653
|
-
if (config.positive) {
|
|
1654
|
-
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
1655
|
-
}
|
|
1656
|
-
if (config.negative) {
|
|
1657
|
-
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1658
|
-
}
|
|
1659
|
-
if (config.gradient) {
|
|
1660
|
-
for (let i = 0; i < config.gradient.length; i++) {
|
|
1661
|
-
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
};
|
|
1665
|
-
var setMultiThemeColorsEnv = (prefix, config) => {
|
|
1666
|
-
return {
|
|
1667
|
-
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
1668
|
-
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
1669
|
-
};
|
|
1670
|
-
};
|
|
1671
|
-
var setBaseThemeColorsEnv = (prefix, config) => {
|
|
1672
|
-
if (config.foreground) {
|
|
1673
|
-
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
1674
|
-
}
|
|
1675
|
-
if (config.background) {
|
|
1676
|
-
process.env[`${prefix}BACKGROUND`] = config.background;
|
|
1677
|
-
}
|
|
1678
|
-
if (config.brand) {
|
|
1679
|
-
process.env[`${prefix}BRAND`] = config.brand;
|
|
1680
|
-
}
|
|
1681
|
-
if (config.alternate) {
|
|
1682
|
-
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
1683
|
-
}
|
|
1684
|
-
if (config.accent) {
|
|
1685
|
-
process.env[`${prefix}ACCENT`] = config.accent;
|
|
1686
|
-
}
|
|
1687
|
-
if (config.link) {
|
|
1688
|
-
process.env[`${prefix}LINK`] = config.link;
|
|
1689
|
-
}
|
|
1690
|
-
if (config.help) {
|
|
1691
|
-
process.env[`${prefix}HELP`] = config.help;
|
|
1692
|
-
}
|
|
1693
|
-
if (config.success) {
|
|
1694
|
-
process.env[`${prefix}SUCCESS`] = config.success;
|
|
1695
|
-
}
|
|
1696
|
-
if (config.info) {
|
|
1697
|
-
process.env[`${prefix}INFO`] = config.info;
|
|
1698
|
-
}
|
|
1699
|
-
if (config.warning) {
|
|
1700
|
-
process.env[`${prefix}WARNING`] = config.warning;
|
|
1701
|
-
}
|
|
1702
|
-
if (config.danger) {
|
|
1703
|
-
process.env[`${prefix}DANGER`] = config.danger;
|
|
1704
|
-
}
|
|
1705
|
-
if (config.fatal) {
|
|
1706
|
-
process.env[`${prefix}FATAL`] = config.fatal;
|
|
1707
|
-
}
|
|
1708
|
-
if (config.positive) {
|
|
1709
|
-
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
1710
|
-
}
|
|
1711
|
-
if (config.negative) {
|
|
1712
|
-
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1713
|
-
}
|
|
1714
|
-
if (config.gradient) {
|
|
1715
|
-
for (let i = 0; i < config.gradient.length; i++) {
|
|
1716
|
-
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
};
|
|
1720
|
-
|
|
1721
|
-
// ../config-tools/src/create-storm-config.ts
|
|
1722
|
-
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1723
|
-
var _static_cache = void 0;
|
|
1724
|
-
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
1725
|
-
let result;
|
|
1726
|
-
if (!_optionalChain([_static_cache, 'optionalAccess', _56 => _56.data]) || !_optionalChain([_static_cache, 'optionalAccess', _57 => _57.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1727
|
-
let _workspaceRoot = workspaceRoot;
|
|
1728
|
-
if (!_workspaceRoot) {
|
|
1729
|
-
_workspaceRoot = findWorkspaceRoot();
|
|
1730
|
-
}
|
|
1731
|
-
const configEnv = getConfigEnv();
|
|
1732
|
-
const configFile = await getConfigFile(_workspaceRoot);
|
|
1733
|
-
if (!configFile) {
|
|
1734
|
-
if (!skipLogs) {
|
|
1735
|
-
_chunkHFWPMK44cjs.writeWarning.call(void 0,
|
|
1736
|
-
"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",
|
|
1737
|
-
{ logLevel: "all" }
|
|
1738
|
-
);
|
|
1739
|
-
}
|
|
1740
|
-
if (useDefault === false) {
|
|
1741
|
-
return void 0;
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
1745
|
-
const configInput = _defu2.default.call(void 0,
|
|
1746
|
-
configEnv,
|
|
1747
|
-
configFile,
|
|
1748
|
-
defaultConfig
|
|
1749
|
-
);
|
|
1750
|
-
if (!configInput.variant) {
|
|
1751
|
-
configInput.variant = _fs.existsSync.call(void 0, _chunk7SWZ2ZGXcjs.joinPaths.call(void 0, _workspaceRoot, "nx.json")) || _fs.existsSync.call(void 0, _chunk7SWZ2ZGXcjs.joinPaths.call(void 0, _workspaceRoot, ".nx")) || _fs.existsSync.call(void 0, _chunk7SWZ2ZGXcjs.joinPaths.call(void 0, _workspaceRoot, "lerna.json")) || _fs.existsSync.call(void 0, _chunk7SWZ2ZGXcjs.joinPaths.call(void 0, _workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
|
|
1752
|
-
}
|
|
1753
|
-
try {
|
|
1754
|
-
result = applyDefaultConfig(
|
|
1755
|
-
await workspaceConfigSchema.parseAsync(configInput)
|
|
1756
|
-
);
|
|
1757
|
-
result.workspaceRoot ??= _workspaceRoot;
|
|
1758
|
-
} catch (error) {
|
|
1759
|
-
throw new Error(
|
|
1760
|
-
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _58 => _58.message]) ? `: ${error.message}` : ""}
|
|
1761
|
-
|
|
1762
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunkHFWPMK44cjs.formatLogMessage.call(void 0,
|
|
1763
|
-
configInput
|
|
1764
|
-
)}`,
|
|
1765
|
-
{
|
|
1766
|
-
cause: error
|
|
1767
|
-
}
|
|
1768
|
-
);
|
|
1769
|
-
}
|
|
1770
|
-
} else {
|
|
1771
|
-
result = _static_cache.data;
|
|
1772
|
-
}
|
|
1773
|
-
if (schema && extensionName) {
|
|
1774
|
-
result.extensions = {
|
|
1775
|
-
...result.extensions,
|
|
1776
|
-
[extensionName]: createConfigExtension(extensionName, schema)
|
|
1777
|
-
};
|
|
1778
|
-
}
|
|
1779
|
-
_static_cache = {
|
|
1780
|
-
timestamp: Date.now(),
|
|
1781
|
-
data: result
|
|
1782
|
-
};
|
|
1783
|
-
return result;
|
|
1784
|
-
};
|
|
1785
|
-
var createConfigExtension = (extensionName, schema) => {
|
|
1786
|
-
const extension_cache_key = { extensionName };
|
|
1787
|
-
if (_extension_cache.has(extension_cache_key)) {
|
|
1788
|
-
return _extension_cache.get(extension_cache_key);
|
|
1789
|
-
}
|
|
1790
|
-
let extension = getExtensionEnv(extensionName);
|
|
1791
|
-
if (schema) {
|
|
1792
|
-
extension = schema.parse(extension);
|
|
1793
|
-
}
|
|
1794
|
-
_extension_cache.set(extension_cache_key, extension);
|
|
1795
|
-
return extension;
|
|
1796
|
-
};
|
|
1797
|
-
var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
1798
|
-
const config = await createStormWorkspaceConfig(
|
|
1799
|
-
void 0,
|
|
1800
|
-
void 0,
|
|
1801
|
-
workspaceRoot,
|
|
1802
|
-
skipLogs,
|
|
1803
|
-
true
|
|
1804
|
-
);
|
|
1805
|
-
setConfigEnv(config);
|
|
1806
|
-
if (!skipLogs && !config.skipConfigLogging) {
|
|
1807
|
-
_chunkHFWPMK44cjs.writeTrace.call(void 0,
|
|
1808
|
-
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1809
|
-
${_chunkHFWPMK44cjs.formatLogMessage.call(void 0, config)}`,
|
|
1810
|
-
config
|
|
1811
|
-
);
|
|
1812
|
-
}
|
|
1813
|
-
return config;
|
|
1814
|
-
};
|
|
1815
|
-
|
|
1816
|
-
// ../config-tools/src/get-config.ts
|
|
1817
|
-
function getConfig(workspaceRoot, skipLogs = false) {
|
|
1818
|
-
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
1819
|
-
}
|
|
1820
|
-
function getWorkspaceConfig(skipLogs = true, options = {}) {
|
|
1821
|
-
let workspaceRoot = options.workspaceRoot;
|
|
1822
|
-
if (!workspaceRoot) {
|
|
1823
|
-
workspaceRoot = findWorkspaceRoot(options.cwd);
|
|
1824
|
-
}
|
|
1825
|
-
return getConfig(workspaceRoot, skipLogs);
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
// ../build-tools/src/utilities/get-env.ts
|
|
1829
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1830
|
-
var getEnv = (builder, options) => {
|
|
1831
|
-
return {
|
|
1832
|
-
STORM_BUILD: builder,
|
|
1833
|
-
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
1834
|
-
STORM_NAME: options.name,
|
|
1835
|
-
STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
|
|
1836
|
-
STORM_PLATFORM: options.platform,
|
|
1837
|
-
STORM_FORMAT: JSON.stringify(options.format),
|
|
1838
|
-
STORM_TARGET: JSON.stringify(options.target),
|
|
1839
|
-
...options.env
|
|
1840
|
-
};
|
|
1841
|
-
};
|
|
1842
|
-
|
|
1843
|
-
// ../build-tools/src/index.ts
|
|
1844
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1845
|
-
|
|
1846
|
-
// ../build-tools/src/plugins/index.ts
|
|
1847
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1848
|
-
|
|
1849
|
-
// ../build-tools/src/plugins/analyze.ts
|
|
1850
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1851
|
-
|
|
1852
|
-
// ../build-tools/src/plugins/swc.ts
|
|
1853
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1854
|
-
var _core = require('@swc/core');
|
|
1855
|
-
|
|
1856
|
-
// ../build-tools/src/plugins/ts-resolve.ts
|
|
1857
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1858
|
-
|
|
1859
|
-
var _module = require('module');
|
|
1860
|
-
|
|
1861
|
-
var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
|
|
1862
|
-
|
|
1863
|
-
// ../build-tools/src/plugins/type-definitions.ts
|
|
1864
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1865
|
-
var _devkit = require('@nx/devkit');
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
// ../build-tools/src/types.ts
|
|
1869
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1870
|
-
|
|
1871
|
-
// ../build-tools/src/utilities/index.ts
|
|
1872
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1873
|
-
|
|
1874
|
-
// ../build-tools/src/utilities/get-entry-points.ts
|
|
1875
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
// ../build-tools/src/utilities/get-file-banner.ts
|
|
1879
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1880
|
-
|
|
1881
|
-
// ../build-tools/src/utilities/get-out-extension.ts
|
|
1882
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1883
|
-
|
|
1884
|
-
// ../build-tools/src/utilities/get-project-deps.ts
|
|
1885
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1886
|
-
|
|
1887
|
-
// ../build-tools/src/utilities/read-nx-config.ts
|
|
1888
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
// ../build-tools/src/utilities/task-graph.ts
|
|
1893
|
-
_chunk2C3MWYHHcjs.init_cjs_shims.call(void 0, );
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
exports.DEFAULT_COMPILED_BANNER = DEFAULT_COMPILED_BANNER; exports.copyAssets = copyAssets; exports.addPackageDependencies = addPackageDependencies; exports.addWorkspacePackageJsonFields = addWorkspacePackageJsonFields; exports.getWorkspaceConfig = getWorkspaceConfig; exports.getEnv = getEnv;
|