@storm-software/pulumi-tools 0.7.79 → 0.7.81
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/CHANGELOG.md +24 -0
- package/README.md +1 -1
- package/dist/{chunk-DD4EVDG7.mjs → chunk-2MM34QNY.mjs} +1189 -769
- package/dist/chunk-2QAZEBOG.js +42 -0
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/chunk-5ZBO7GC6.js +16 -0
- package/dist/chunk-C6HV3VOH.mjs +16 -0
- package/dist/{chunk-AJICSYTL.mjs → chunk-ESHAP37L.mjs} +1 -1
- package/dist/{chunk-DBLK3NPE.js → chunk-HUKXHFCA.js} +4 -9
- package/dist/chunk-IBJKPAXV.mjs +42 -0
- package/dist/{chunk-L2DHGVS5.mjs → chunk-IEZKYJSF.mjs} +3 -6
- package/dist/{chunk-GZGV3XVE.js → chunk-J5NVVVHZ.js} +2 -2
- package/dist/{chunk-KXK6HK7Z.mjs → chunk-JWQAUSXZ.mjs} +1 -1
- package/dist/{chunk-FOZFHF2O.mjs → chunk-KPFHCT4A.mjs} +3 -8
- package/dist/{chunk-U7IKOXSI.mjs → chunk-LVBND7MN.mjs} +1 -1
- package/dist/chunk-MHBRG7UB.js +18 -0
- package/dist/chunk-QW6YGFF7.js +133 -0
- package/dist/{chunk-AKO3NFBS.js → chunk-S3CLNYH2.js} +1171 -751
- package/dist/chunk-TCPQS3FC.mjs +133 -0
- package/dist/{chunk-I3FRKBMS.js → chunk-TRMMILFW.js} +2 -2
- package/dist/{chunk-QNQZE4KJ.js → chunk-XOH426DW.js} +2 -2
- package/dist/chunk-YTI55E4Z.mjs +18 -0
- package/dist/executors.js +8 -8
- package/dist/executors.mjs +8 -8
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +11 -11
- package/dist/index.mjs +10 -10
- package/dist/src/base/base-executor.js +4 -4
- package/dist/src/base/base-executor.mjs +3 -3
- package/dist/src/base/index.js +5 -5
- package/dist/src/base/index.mjs +4 -4
- package/dist/src/base/providers.js +3 -3
- package/dist/src/base/providers.mjs +2 -2
- package/dist/src/executors/config/executor.js +5 -5
- package/dist/src/executors/config/executor.mjs +4 -4
- package/dist/src/executors/import/executor.js +5 -5
- package/dist/src/executors/import/executor.mjs +4 -4
- package/dist/src/executors/preview/executor.js +5 -5
- package/dist/src/executors/preview/executor.mjs +4 -4
- package/dist/src/executors/refresh/executor.js +5 -5
- package/dist/src/executors/refresh/executor.mjs +4 -4
- package/dist/src/executors/up/executor.js +5 -5
- package/dist/src/executors/up/executor.mjs +4 -4
- package/dist/src/generators/init/generator.js +5 -5
- package/dist/src/generators/init/generator.mjs +4 -4
- package/dist/tsup.config.js +3 -8
- package/dist/tsup.config.mjs +3 -8
- package/package.json +1 -1
- package/dist/chunk-2FBBYFXH.js +0 -15
- package/dist/chunk-3GQAWCBQ.js +0 -13
- package/dist/chunk-A6G6LISR.js +0 -109
- package/dist/chunk-DFGQICYB.mjs +0 -13
- package/dist/chunk-P47FZNOX.js +0 -35
- package/dist/chunk-Q5MONGV7.mjs +0 -109
- package/dist/chunk-UV2ERO6Z.js +0 -13
- package/dist/chunk-WEKJLMNL.mjs +0 -35
- package/dist/chunk-ZNKCM4HA.mjs +0 -15
|
@@ -1,12 +1,11 @@
|
|
|
1
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
2
|
|
|
3
|
-
|
|
4
|
-
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
3
|
+
var _chunk3RG5ZIWIjs = require('./chunk-3RG5ZIWI.js');
|
|
5
4
|
|
|
6
5
|
// ../config-tools/src/utilities/run.ts
|
|
7
6
|
var _child_process = require('child_process');
|
|
8
7
|
var LARGE_BUFFER = 1024 * 1e6;
|
|
9
|
-
var run =
|
|
8
|
+
var run = (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), stdio = "inherit", env = process.env) => {
|
|
10
9
|
return _child_process.execSync.call(void 0, command, {
|
|
11
10
|
cwd,
|
|
12
11
|
env: {
|
|
@@ -20,7 +19,7 @@ var run = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config, command,
|
|
|
20
19
|
maxBuffer: LARGE_BUFFER,
|
|
21
20
|
killSignal: "SIGTERM"
|
|
22
21
|
});
|
|
23
|
-
}
|
|
22
|
+
};
|
|
24
23
|
|
|
25
24
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
26
25
|
var _c12 = require('c12');
|
|
@@ -148,23 +147,39 @@ var RegistryConfigSchema = _zod2.default.object({
|
|
|
148
147
|
cyclone: RegistryUrlConfigSchema,
|
|
149
148
|
container: RegistryUrlConfigSchema
|
|
150
149
|
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
151
|
-
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
150
|
+
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
151
|
+
MultiThemeColorConfigSchema
|
|
152
|
+
).describe("Colors used for various workspace elements");
|
|
152
153
|
var ColorConfigMapSchema = _zod2.default.union([
|
|
153
|
-
_zod2.default.object({
|
|
154
|
-
base: ColorConfigSchema
|
|
155
|
-
}),
|
|
154
|
+
_zod2.default.object({ base: ColorConfigSchema }),
|
|
156
155
|
_zod2.default.record(_zod2.default.string(), ColorConfigSchema)
|
|
157
156
|
]);
|
|
158
|
-
var ExtendsItemSchema = _zod2.default.string().trim().describe(
|
|
159
|
-
|
|
157
|
+
var ExtendsItemSchema = _zod2.default.string().trim().describe(
|
|
158
|
+
"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."
|
|
159
|
+
);
|
|
160
|
+
var ExtendsSchema = ExtendsItemSchema.or(
|
|
161
|
+
_zod2.default.array(ExtendsItemSchema)
|
|
162
|
+
).describe(
|
|
163
|
+
"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."
|
|
164
|
+
);
|
|
160
165
|
var WorkspaceBotConfigSchema = _zod2.default.object({
|
|
161
|
-
name: _zod2.default.string().trim().default("stormie-bot").describe(
|
|
166
|
+
name: _zod2.default.string().trim().default("stormie-bot").describe(
|
|
167
|
+
"The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
168
|
+
),
|
|
162
169
|
email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
163
|
-
}).describe(
|
|
170
|
+
}).describe(
|
|
171
|
+
"The workspace's bot user's config used to automated various operations tasks"
|
|
172
|
+
);
|
|
164
173
|
var WorkspaceReleaseConfigSchema = _zod2.default.object({
|
|
165
|
-
banner: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
|
|
166
|
-
|
|
167
|
-
|
|
174
|
+
banner: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
|
|
175
|
+
"A URL to a banner image used to display the workspace's release"
|
|
176
|
+
),
|
|
177
|
+
header: _zod2.default.string().trim().optional().describe(
|
|
178
|
+
"A header message appended to the start of the workspace's release notes"
|
|
179
|
+
),
|
|
180
|
+
footer: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe(
|
|
181
|
+
"A footer message appended to the end of the workspace's release notes"
|
|
182
|
+
)
|
|
168
183
|
}).describe("The workspace's release config used during the release process");
|
|
169
184
|
var WorkspaceAccountConfigSchema = _zod2.default.object({
|
|
170
185
|
twitter: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
@@ -173,23 +188,41 @@ var WorkspaceAccountConfigSchema = _zod2.default.object({
|
|
|
173
188
|
slack: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
|
|
174
189
|
medium: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
175
190
|
github: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
176
|
-
}).describe(
|
|
191
|
+
}).describe(
|
|
192
|
+
"The workspace's account config used to store various social media links"
|
|
193
|
+
);
|
|
177
194
|
var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
178
|
-
cache: _zod2.default.string().trim().optional().describe(
|
|
195
|
+
cache: _zod2.default.string().trim().optional().describe(
|
|
196
|
+
"The directory used to store the environment's cached file data"
|
|
197
|
+
),
|
|
179
198
|
data: _zod2.default.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
180
|
-
config: _zod2.default.string().trim().optional().describe(
|
|
199
|
+
config: _zod2.default.string().trim().optional().describe(
|
|
200
|
+
"The directory used to store the environment's configuration files"
|
|
201
|
+
),
|
|
181
202
|
temp: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
182
203
|
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
183
|
-
build: _zod2.default.string().trim().default("dist").describe(
|
|
184
|
-
|
|
204
|
+
build: _zod2.default.string().trim().default("dist").describe(
|
|
205
|
+
"The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
206
|
+
)
|
|
207
|
+
}).describe(
|
|
208
|
+
"Various directories used by the workspace to store data, cache, and configuration files"
|
|
209
|
+
);
|
|
185
210
|
var errorConfigSchema = _zod2.default.object({
|
|
186
211
|
codesFile: _zod2.default.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
|
|
187
|
-
url: _zod2.default.string().trim().url().optional().describe(
|
|
212
|
+
url: _zod2.default.string().trim().url().optional().describe(
|
|
213
|
+
"A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
214
|
+
)
|
|
188
215
|
}).describe("The workspace's error config used during the error process");
|
|
189
216
|
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
190
|
-
$schema: _zod2.default.string().trim().default(
|
|
217
|
+
$schema: _zod2.default.string().trim().default(
|
|
218
|
+
"https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
|
|
219
|
+
).optional().nullish().describe(
|
|
220
|
+
"The URL to the JSON schema file that describes the Storm configuration file"
|
|
221
|
+
),
|
|
191
222
|
extends: ExtendsSchema.optional(),
|
|
192
|
-
name: _zod2.default.string().trim().toLowerCase().optional().describe(
|
|
223
|
+
name: _zod2.default.string().trim().toLowerCase().optional().describe(
|
|
224
|
+
"The name of the service/package/scope using this configuration"
|
|
225
|
+
),
|
|
193
226
|
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
194
227
|
organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
195
228
|
repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
@@ -205,21 +238,16 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
205
238
|
release: WorkspaceReleaseConfigSchema,
|
|
206
239
|
account: WorkspaceAccountConfigSchema,
|
|
207
240
|
error: errorConfigSchema,
|
|
208
|
-
mode: _zod2.default.enum([
|
|
209
|
-
"development",
|
|
210
|
-
"staging",
|
|
211
|
-
"production"
|
|
212
|
-
]).default("production").describe("The current runtime environment mode for the package"),
|
|
241
|
+
mode: _zod2.default.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment mode for the package"),
|
|
213
242
|
workspaceRoot: _zod2.default.string().trim().describe("The root directory of the workspace"),
|
|
214
|
-
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe(
|
|
243
|
+
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe(
|
|
244
|
+
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
245
|
+
),
|
|
215
246
|
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
216
247
|
directories: WorkspaceDirectoryConfigSchema,
|
|
217
|
-
packageManager: _zod2.default.enum([
|
|
218
|
-
"
|
|
219
|
-
|
|
220
|
-
"pnpm",
|
|
221
|
-
"bun"
|
|
222
|
-
]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
|
|
248
|
+
packageManager: _zod2.default.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
|
|
249
|
+
"The JavaScript/TypeScript package manager used by the repository"
|
|
250
|
+
),
|
|
223
251
|
timezone: _zod2.default.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
224
252
|
locale: _zod2.default.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
225
253
|
logLevel: _zod2.default.enum([
|
|
@@ -232,13 +260,23 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
232
260
|
"debug",
|
|
233
261
|
"trace",
|
|
234
262
|
"all"
|
|
235
|
-
]).default("info").describe(
|
|
236
|
-
|
|
263
|
+
]).default("info").describe(
|
|
264
|
+
"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`)."
|
|
265
|
+
),
|
|
266
|
+
skipConfigLogging: _zod2.default.boolean().optional().describe(
|
|
267
|
+
"Should the logging of the current Storm Workspace configuration be skipped?"
|
|
268
|
+
),
|
|
237
269
|
registry: RegistryConfigSchema,
|
|
238
|
-
configFile: _zod2.default.string().trim().nullable().default(null).describe(
|
|
239
|
-
|
|
270
|
+
configFile: _zod2.default.string().trim().nullable().default(null).describe(
|
|
271
|
+
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
272
|
+
),
|
|
273
|
+
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
274
|
+
"Storm theme config values used for styling various package elements"
|
|
275
|
+
),
|
|
240
276
|
extensions: _zod2.default.record(_zod2.default.any()).optional().default({}).describe("Configuration of each used extension")
|
|
241
|
-
}).describe(
|
|
277
|
+
}).describe(
|
|
278
|
+
"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."
|
|
279
|
+
);
|
|
242
280
|
|
|
243
281
|
// ../config/src/types.ts
|
|
244
282
|
var COLOR_KEYS = [
|
|
@@ -272,11 +310,10 @@ function normalizeWindowsPath(input = "") {
|
|
|
272
310
|
}
|
|
273
311
|
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
274
312
|
}
|
|
275
|
-
_chunk3GQAWCBQjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
|
|
276
313
|
var _UNC_REGEX = /^[/\\]{2}/;
|
|
277
314
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
278
315
|
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
279
|
-
var correctPaths =
|
|
316
|
+
var correctPaths = function(path5) {
|
|
280
317
|
if (!path5 || path5.length === 0) {
|
|
281
318
|
return ".";
|
|
282
319
|
}
|
|
@@ -304,8 +341,8 @@ var correctPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function
|
|
|
304
341
|
return `//${path5}`;
|
|
305
342
|
}
|
|
306
343
|
return isPathAbsolute && !isAbsolute(path5) ? `/${path5}` : path5;
|
|
307
|
-
}
|
|
308
|
-
var joinPaths =
|
|
344
|
+
};
|
|
345
|
+
var joinPaths = function(...segments) {
|
|
309
346
|
let path5 = "";
|
|
310
347
|
for (const seg of segments) {
|
|
311
348
|
if (!seg) {
|
|
@@ -325,7 +362,7 @@ var joinPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(..
|
|
|
325
362
|
}
|
|
326
363
|
}
|
|
327
364
|
return correctPaths(path5);
|
|
328
|
-
}
|
|
365
|
+
};
|
|
329
366
|
function normalizeString(path5, allowAboveRoot) {
|
|
330
367
|
let res = "";
|
|
331
368
|
let lastSegmentLength = 0;
|
|
@@ -386,10 +423,9 @@ function normalizeString(path5, allowAboveRoot) {
|
|
|
386
423
|
}
|
|
387
424
|
return res;
|
|
388
425
|
}
|
|
389
|
-
|
|
390
|
-
var isAbsolute = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(p) {
|
|
426
|
+
var isAbsolute = function(p) {
|
|
391
427
|
return _IS_ABSOLUTE_RE.test(p);
|
|
392
|
-
}
|
|
428
|
+
};
|
|
393
429
|
|
|
394
430
|
// ../config-tools/src/utilities/find-up.ts
|
|
395
431
|
|
|
@@ -398,10 +434,14 @@ var MAX_PATH_SEARCH_DEPTH = 30;
|
|
|
398
434
|
var depth = 0;
|
|
399
435
|
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
400
436
|
const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
|
|
401
|
-
if (endDirectoryNames.some(
|
|
437
|
+
if (endDirectoryNames.some(
|
|
438
|
+
(endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName))
|
|
439
|
+
)) {
|
|
402
440
|
return _startPath;
|
|
403
441
|
}
|
|
404
|
-
if (endFileNames.some(
|
|
442
|
+
if (endFileNames.some(
|
|
443
|
+
(endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName))
|
|
444
|
+
)) {
|
|
405
445
|
return _startPath;
|
|
406
446
|
}
|
|
407
447
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
@@ -410,7 +450,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
410
450
|
}
|
|
411
451
|
return void 0;
|
|
412
452
|
}
|
|
413
|
-
_chunk3GQAWCBQjs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
414
453
|
|
|
415
454
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
416
455
|
var rootFiles = [
|
|
@@ -457,21 +496,31 @@ var rootDirectories = [
|
|
|
457
496
|
];
|
|
458
497
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
459
498
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
460
|
-
return correctPaths(
|
|
461
|
-
|
|
462
|
-
|
|
499
|
+
return correctPaths(
|
|
500
|
+
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
return correctPaths(
|
|
504
|
+
findFolderUp(
|
|
505
|
+
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
506
|
+
rootFiles,
|
|
507
|
+
rootDirectories
|
|
508
|
+
)
|
|
509
|
+
);
|
|
463
510
|
}
|
|
464
|
-
_chunk3GQAWCBQjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
465
511
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
466
512
|
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
467
513
|
if (!result) {
|
|
468
|
-
throw new Error(
|
|
469
|
-
|
|
470
|
-
|
|
514
|
+
throw new Error(
|
|
515
|
+
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
516
|
+
${rootFiles.join(
|
|
517
|
+
"\n"
|
|
518
|
+
)}
|
|
519
|
+
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
520
|
+
);
|
|
471
521
|
}
|
|
472
522
|
return result;
|
|
473
523
|
}
|
|
474
|
-
_chunk3GQAWCBQjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
|
|
475
524
|
|
|
476
525
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
477
526
|
var DEFAULT_COLOR_CONFIG = {
|
|
@@ -502,7 +551,7 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
502
551
|
negative: "#dc2626"
|
|
503
552
|
}
|
|
504
553
|
};
|
|
505
|
-
var getDefaultConfig =
|
|
554
|
+
var getDefaultConfig = async (root) => {
|
|
506
555
|
let license = STORM_DEFAULT_LICENSE;
|
|
507
556
|
let homepage = STORM_DEFAULT_HOMEPAGE;
|
|
508
557
|
let name = void 0;
|
|
@@ -510,7 +559,10 @@ var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, asyn
|
|
|
510
559
|
let repository = void 0;
|
|
511
560
|
const workspaceRoot3 = findWorkspaceRoot(root);
|
|
512
561
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot3, "package.json"))) {
|
|
513
|
-
const file = await _promises.readFile.call(void 0,
|
|
562
|
+
const file = await _promises.readFile.call(void 0,
|
|
563
|
+
joinPaths(workspaceRoot3, "package.json"),
|
|
564
|
+
"utf8"
|
|
565
|
+
);
|
|
514
566
|
if (file) {
|
|
515
567
|
const packageJson = JSON.parse(file);
|
|
516
568
|
if (packageJson.name) {
|
|
@@ -547,36 +599,36 @@ var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, asyn
|
|
|
547
599
|
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
548
600
|
}
|
|
549
601
|
};
|
|
550
|
-
}
|
|
602
|
+
};
|
|
551
603
|
|
|
552
604
|
// ../config-tools/src/logger/chalk.ts
|
|
553
605
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
554
606
|
var chalkDefault = {
|
|
555
|
-
hex:
|
|
556
|
-
bgHex:
|
|
557
|
-
whiteBright:
|
|
558
|
-
}),
|
|
559
|
-
whiteBright:
|
|
560
|
-
gray:
|
|
607
|
+
hex: (_) => (message) => message,
|
|
608
|
+
bgHex: (_) => ({
|
|
609
|
+
whiteBright: (message) => message
|
|
610
|
+
}),
|
|
611
|
+
whiteBright: (message) => message,
|
|
612
|
+
gray: (message) => message,
|
|
561
613
|
bold: {
|
|
562
|
-
hex:
|
|
563
|
-
bgHex:
|
|
564
|
-
whiteBright:
|
|
565
|
-
}),
|
|
566
|
-
whiteBright:
|
|
614
|
+
hex: (_) => (message) => message,
|
|
615
|
+
bgHex: (_) => ({
|
|
616
|
+
whiteBright: (message) => message
|
|
617
|
+
}),
|
|
618
|
+
whiteBright: (message) => message
|
|
567
619
|
},
|
|
568
620
|
dim: {
|
|
569
|
-
hex:
|
|
570
|
-
gray:
|
|
621
|
+
hex: (_) => (message) => message,
|
|
622
|
+
gray: (message) => message
|
|
571
623
|
}
|
|
572
624
|
};
|
|
573
|
-
var getChalk =
|
|
625
|
+
var getChalk = () => {
|
|
574
626
|
let _chalk = _chalk3.default;
|
|
575
627
|
if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright])) {
|
|
576
628
|
_chalk = chalkDefault;
|
|
577
629
|
}
|
|
578
630
|
return _chalk;
|
|
579
|
-
}
|
|
631
|
+
};
|
|
580
632
|
|
|
581
633
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
582
634
|
function isUnicodeSupported() {
|
|
@@ -588,10 +640,9 @@ function isUnicodeSupported() {
|
|
|
588
640
|
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
589
641
|
process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
590
642
|
}
|
|
591
|
-
_chunk3GQAWCBQjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
|
|
592
643
|
|
|
593
644
|
// ../config-tools/src/logger/console-icons.ts
|
|
594
|
-
var useIcon =
|
|
645
|
+
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
595
646
|
var CONSOLE_ICONS = {
|
|
596
647
|
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
597
648
|
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
@@ -604,12 +655,12 @@ var CONSOLE_ICONS = {
|
|
|
604
655
|
};
|
|
605
656
|
|
|
606
657
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
607
|
-
var formatTimestamp =
|
|
658
|
+
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
608
659
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
609
|
-
}
|
|
660
|
+
};
|
|
610
661
|
|
|
611
662
|
// ../config-tools/src/logger/get-log-level.ts
|
|
612
|
-
var getLogLevel =
|
|
663
|
+
var getLogLevel = (label) => {
|
|
613
664
|
switch (label) {
|
|
614
665
|
case "all":
|
|
615
666
|
return LogLevel.ALL;
|
|
@@ -630,8 +681,8 @@ var getLogLevel = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (label) =
|
|
|
630
681
|
default:
|
|
631
682
|
return LogLevel.INFO;
|
|
632
683
|
}
|
|
633
|
-
}
|
|
634
|
-
var getLogLevelLabel =
|
|
684
|
+
};
|
|
685
|
+
var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
635
686
|
if (logLevel >= LogLevel.ALL) {
|
|
636
687
|
return LogLevelLabel.ALL;
|
|
637
688
|
}
|
|
@@ -657,10 +708,10 @@ var getLogLevelLabel = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (log
|
|
|
657
708
|
return LogLevelLabel.SILENT;
|
|
658
709
|
}
|
|
659
710
|
return LogLevelLabel.INFO;
|
|
660
|
-
}
|
|
711
|
+
};
|
|
661
712
|
|
|
662
713
|
// ../config-tools/src/logger/console.ts
|
|
663
|
-
var getLogFn =
|
|
714
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
664
715
|
const colors = !_optionalChain([config, 'access', _7 => _7.colors, 'optionalAccess', _8 => _8.dark]) && !_optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10["base"]]) && !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20["base"]]) ? _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
665
716
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
666
717
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
@@ -669,102 +720,122 @@ var getLogFn = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (logLevel =
|
|
|
669
720
|
}
|
|
670
721
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
671
722
|
return (message) => {
|
|
672
|
-
console.error(
|
|
723
|
+
console.error(
|
|
724
|
+
`
|
|
673
725
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
674
|
-
`
|
|
726
|
+
`
|
|
727
|
+
);
|
|
675
728
|
};
|
|
676
729
|
}
|
|
677
730
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
678
731
|
return (message) => {
|
|
679
|
-
console.error(
|
|
732
|
+
console.error(
|
|
733
|
+
`
|
|
680
734
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
681
|
-
`
|
|
735
|
+
`
|
|
736
|
+
);
|
|
682
737
|
};
|
|
683
738
|
}
|
|
684
739
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
685
740
|
return (message) => {
|
|
686
|
-
console.warn(
|
|
741
|
+
console.warn(
|
|
742
|
+
`
|
|
687
743
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
688
|
-
`
|
|
744
|
+
`
|
|
745
|
+
);
|
|
689
746
|
};
|
|
690
747
|
}
|
|
691
748
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
692
749
|
return (message) => {
|
|
693
|
-
console.info(
|
|
750
|
+
console.info(
|
|
751
|
+
`
|
|
694
752
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
695
|
-
`
|
|
753
|
+
`
|
|
754
|
+
);
|
|
696
755
|
};
|
|
697
756
|
}
|
|
698
757
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
699
758
|
return (message) => {
|
|
700
|
-
console.info(
|
|
759
|
+
console.info(
|
|
760
|
+
`
|
|
701
761
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
702
|
-
`
|
|
762
|
+
`
|
|
763
|
+
);
|
|
703
764
|
};
|
|
704
765
|
}
|
|
705
766
|
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
706
767
|
return (message) => {
|
|
707
|
-
console.debug(
|
|
768
|
+
console.debug(
|
|
769
|
+
`
|
|
708
770
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
709
|
-
`
|
|
771
|
+
`
|
|
772
|
+
);
|
|
710
773
|
};
|
|
711
774
|
}
|
|
712
775
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
713
776
|
return (message) => {
|
|
714
|
-
console.debug(
|
|
777
|
+
console.debug(
|
|
778
|
+
`
|
|
715
779
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
716
|
-
`
|
|
780
|
+
`
|
|
781
|
+
);
|
|
717
782
|
};
|
|
718
783
|
}
|
|
719
784
|
return (message) => {
|
|
720
|
-
console.log(
|
|
785
|
+
console.log(
|
|
786
|
+
`
|
|
721
787
|
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
722
|
-
`
|
|
788
|
+
`
|
|
789
|
+
);
|
|
723
790
|
};
|
|
724
|
-
}
|
|
725
|
-
var writeFatal =
|
|
726
|
-
var writeError =
|
|
727
|
-
var writeWarning =
|
|
728
|
-
var writeInfo =
|
|
729
|
-
var writeSuccess =
|
|
730
|
-
var writeDebug =
|
|
731
|
-
var writeTrace =
|
|
732
|
-
var getStopwatch =
|
|
791
|
+
};
|
|
792
|
+
var writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
|
|
793
|
+
var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
794
|
+
var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
795
|
+
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
796
|
+
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
797
|
+
var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
798
|
+
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
799
|
+
var getStopwatch = (name) => {
|
|
733
800
|
const start = process.hrtime();
|
|
734
801
|
return () => {
|
|
735
802
|
const end = process.hrtime(start);
|
|
736
|
-
console.info(
|
|
737
|
-
|
|
738
|
-
`
|
|
803
|
+
console.info(
|
|
804
|
+
`
|
|
805
|
+
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
806
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
807
|
+
)}ms to complete
|
|
808
|
+
`
|
|
809
|
+
);
|
|
739
810
|
};
|
|
740
|
-
}
|
|
811
|
+
};
|
|
741
812
|
var MAX_DEPTH = 4;
|
|
742
|
-
var formatLogMessage =
|
|
813
|
+
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
743
814
|
if (depth2 > MAX_DEPTH) {
|
|
744
815
|
return "<max depth>";
|
|
745
816
|
}
|
|
746
817
|
const prefix = _nullishCoalesce(options.prefix, () => ( "-"));
|
|
747
818
|
const skip = _nullishCoalesce(options.skip, () => ( []));
|
|
748
819
|
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
|
|
749
|
-
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
}
|
|
758
|
-
var _isFunction =
|
|
820
|
+
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
|
|
821
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
822
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
|
|
823
|
+
message[key],
|
|
824
|
+
{ prefix: `${prefix}-`, skip },
|
|
825
|
+
depth2 + 1
|
|
826
|
+
) : message[key]}`
|
|
827
|
+
).join("\n")}` : message;
|
|
828
|
+
};
|
|
829
|
+
var _isFunction = (value) => {
|
|
759
830
|
try {
|
|
760
831
|
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _23 => _23.constructor]) && _optionalChain([value, 'optionalAccess', _24 => _24.call]) && _optionalChain([value, 'optionalAccess', _25 => _25.apply]));
|
|
761
832
|
} catch (e) {
|
|
762
833
|
return false;
|
|
763
834
|
}
|
|
764
|
-
}
|
|
835
|
+
};
|
|
765
836
|
|
|
766
837
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
767
|
-
var applyWorkspaceBaseTokens =
|
|
838
|
+
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
768
839
|
let result = option;
|
|
769
840
|
if (!result) {
|
|
770
841
|
return result;
|
|
@@ -774,7 +845,10 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
774
845
|
if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
|
|
775
846
|
for (const optionKey of optionKeys) {
|
|
776
847
|
if (result.includes(`{${optionKey}}`)) {
|
|
777
|
-
result = result.replaceAll(
|
|
848
|
+
result = result.replaceAll(
|
|
849
|
+
`{${optionKey}}`,
|
|
850
|
+
_optionalChain([tokenParams, 'optionalAccess', _26 => _26[optionKey]]) || ""
|
|
851
|
+
);
|
|
778
852
|
}
|
|
779
853
|
}
|
|
780
854
|
}
|
|
@@ -784,40 +858,56 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
784
858
|
if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
|
|
785
859
|
for (const configKey of configKeys) {
|
|
786
860
|
if (result.includes(`{${configKey}}`)) {
|
|
787
|
-
result = result.replaceAll(
|
|
861
|
+
result = result.replaceAll(
|
|
862
|
+
`{${configKey}}`,
|
|
863
|
+
tokenParams.config[configKey] || ""
|
|
864
|
+
);
|
|
788
865
|
}
|
|
789
866
|
}
|
|
790
867
|
}
|
|
791
868
|
}
|
|
792
869
|
if (result.includes("{workspaceRoot}")) {
|
|
793
|
-
result = result.replaceAll(
|
|
870
|
+
result = result.replaceAll(
|
|
871
|
+
"{workspaceRoot}",
|
|
872
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _27 => _27.config, 'optionalAccess', _28 => _28.workspaceRoot]))), () => ( findWorkspaceRoot()))
|
|
873
|
+
);
|
|
794
874
|
}
|
|
795
875
|
return result;
|
|
796
|
-
}
|
|
797
|
-
var applyWorkspaceProjectTokens =
|
|
876
|
+
};
|
|
877
|
+
var applyWorkspaceProjectTokens = (option, tokenParams) => {
|
|
798
878
|
return applyWorkspaceBaseTokens(option, tokenParams);
|
|
799
|
-
}
|
|
800
|
-
var applyWorkspaceTokens =
|
|
879
|
+
};
|
|
880
|
+
var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
801
881
|
if (!options) {
|
|
802
882
|
return {};
|
|
803
883
|
}
|
|
804
884
|
const result = {};
|
|
805
885
|
for (const option of Object.keys(options)) {
|
|
806
886
|
if (typeof options[option] === "string") {
|
|
807
|
-
result[option] = await Promise.resolve(
|
|
887
|
+
result[option] = await Promise.resolve(
|
|
888
|
+
tokenizerFn(options[option], tokenParams)
|
|
889
|
+
);
|
|
808
890
|
} else if (Array.isArray(options[option])) {
|
|
809
|
-
result[option] = await Promise.all(
|
|
891
|
+
result[option] = await Promise.all(
|
|
892
|
+
options[option].map(
|
|
893
|
+
async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item
|
|
894
|
+
)
|
|
895
|
+
);
|
|
810
896
|
} else if (typeof options[option] === "object") {
|
|
811
|
-
result[option] = await applyWorkspaceTokens(
|
|
897
|
+
result[option] = await applyWorkspaceTokens(
|
|
898
|
+
options[option],
|
|
899
|
+
tokenParams,
|
|
900
|
+
tokenizerFn
|
|
901
|
+
);
|
|
812
902
|
} else {
|
|
813
903
|
result[option] = options[option];
|
|
814
904
|
}
|
|
815
905
|
}
|
|
816
906
|
return result;
|
|
817
|
-
}
|
|
907
|
+
};
|
|
818
908
|
|
|
819
909
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
820
|
-
var getConfigFileByName =
|
|
910
|
+
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
821
911
|
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
822
912
|
const configs = await Promise.all([
|
|
823
913
|
_c12.loadConfig.call(void 0, {
|
|
@@ -827,7 +917,10 @@ var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, a
|
|
|
827
917
|
envName: _optionalChain([fileName, 'optionalAccess', _29 => _29.toUpperCase, 'call', _30 => _30()]),
|
|
828
918
|
jitiOptions: {
|
|
829
919
|
debug: false,
|
|
830
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
920
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
921
|
+
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
922
|
+
"jiti"
|
|
923
|
+
)
|
|
831
924
|
},
|
|
832
925
|
...options
|
|
833
926
|
}),
|
|
@@ -838,32 +931,45 @@ var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, a
|
|
|
838
931
|
envName: _optionalChain([fileName, 'optionalAccess', _31 => _31.toUpperCase, 'call', _32 => _32()]),
|
|
839
932
|
jitiOptions: {
|
|
840
933
|
debug: false,
|
|
841
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
934
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
935
|
+
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
936
|
+
"jiti"
|
|
937
|
+
)
|
|
842
938
|
},
|
|
843
939
|
configFile: fileName,
|
|
844
940
|
...options
|
|
845
941
|
})
|
|
846
942
|
]);
|
|
847
943
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
848
|
-
}
|
|
849
|
-
var getConfigFile =
|
|
944
|
+
};
|
|
945
|
+
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
850
946
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
851
947
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
852
948
|
let config = result.config;
|
|
853
949
|
const configFile = result.configFile;
|
|
854
950
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
855
|
-
writeTrace(
|
|
856
|
-
|
|
857
|
-
|
|
951
|
+
writeTrace(
|
|
952
|
+
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
953
|
+
{
|
|
954
|
+
logLevel: "all"
|
|
955
|
+
}
|
|
956
|
+
);
|
|
858
957
|
}
|
|
859
958
|
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
860
|
-
const results = await Promise.all(
|
|
959
|
+
const results = await Promise.all(
|
|
960
|
+
additionalFileNames.map(
|
|
961
|
+
(fileName) => getConfigFileByName(fileName, workspacePath)
|
|
962
|
+
)
|
|
963
|
+
);
|
|
861
964
|
for (const result2 of results) {
|
|
862
965
|
if (_optionalChain([result2, 'optionalAccess', _33 => _33.config]) && _optionalChain([result2, 'optionalAccess', _34 => _34.configFile]) && Object.keys(result2.config).length > 0) {
|
|
863
966
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
864
|
-
writeTrace(
|
|
865
|
-
|
|
866
|
-
|
|
967
|
+
writeTrace(
|
|
968
|
+
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
969
|
+
{
|
|
970
|
+
logLevel: "all"
|
|
971
|
+
}
|
|
972
|
+
);
|
|
867
973
|
}
|
|
868
974
|
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
869
975
|
}
|
|
@@ -874,23 +980,25 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
|
|
|
874
980
|
}
|
|
875
981
|
config.configFile = configFile;
|
|
876
982
|
return config;
|
|
877
|
-
}
|
|
983
|
+
};
|
|
878
984
|
|
|
879
985
|
// ../config-tools/src/create-storm-config.ts
|
|
880
986
|
|
|
881
987
|
|
|
882
988
|
// ../config-tools/src/env/get-env.ts
|
|
883
|
-
var getExtensionEnv =
|
|
989
|
+
var getExtensionEnv = (extensionName) => {
|
|
884
990
|
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
885
991
|
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
886
|
-
const name = key.replace(prefix, "").split("_").map(
|
|
992
|
+
const name = key.replace(prefix, "").split("_").map(
|
|
993
|
+
(i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
|
|
994
|
+
).join("");
|
|
887
995
|
if (name) {
|
|
888
996
|
ret[name] = process.env[key];
|
|
889
997
|
}
|
|
890
998
|
return ret;
|
|
891
999
|
}, {});
|
|
892
|
-
}
|
|
893
|
-
var getConfigEnv =
|
|
1000
|
+
};
|
|
1001
|
+
var getConfigEnv = () => {
|
|
894
1002
|
const prefix = "STORM_";
|
|
895
1003
|
let config = {
|
|
896
1004
|
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
@@ -958,14 +1066,25 @@ var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
|
958
1066
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
959
1067
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
960
1068
|
},
|
|
961
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
1069
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
1070
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1071
|
+
) ? getLogLevelLabel(
|
|
1072
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1073
|
+
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
962
1074
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
963
1075
|
};
|
|
964
|
-
const themeNames = Object.keys(process.env).filter(
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1076
|
+
const themeNames = Object.keys(process.env).filter(
|
|
1077
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
|
|
1078
|
+
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
1079
|
+
)
|
|
1080
|
+
);
|
|
1081
|
+
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
1082
|
+
(ret, themeName) => {
|
|
1083
|
+
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
1084
|
+
return ret;
|
|
1085
|
+
},
|
|
1086
|
+
{}
|
|
1087
|
+
) : getThemeColorConfigEnv(prefix);
|
|
969
1088
|
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
970
1089
|
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
971
1090
|
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
@@ -986,23 +1105,17 @@ var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
|
986
1105
|
config = {
|
|
987
1106
|
...config,
|
|
988
1107
|
...parsed,
|
|
989
|
-
colors: {
|
|
990
|
-
|
|
991
|
-
...parsed.colors
|
|
992
|
-
},
|
|
993
|
-
extensions: {
|
|
994
|
-
...config.extensions,
|
|
995
|
-
...parsed.extensions
|
|
996
|
-
}
|
|
1108
|
+
colors: { ...config.colors, ...parsed.colors },
|
|
1109
|
+
extensions: { ...config.extensions, ...parsed.extensions }
|
|
997
1110
|
};
|
|
998
1111
|
}
|
|
999
1112
|
return config;
|
|
1000
|
-
}
|
|
1001
|
-
var getThemeColorConfigEnv =
|
|
1113
|
+
};
|
|
1114
|
+
var getThemeColorConfigEnv = (prefix, theme) => {
|
|
1002
1115
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
1003
1116
|
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
1004
|
-
}
|
|
1005
|
-
var getSingleThemeColorConfigEnv =
|
|
1117
|
+
};
|
|
1118
|
+
var getSingleThemeColorConfigEnv = (prefix) => {
|
|
1006
1119
|
return {
|
|
1007
1120
|
dark: process.env[`${prefix}DARK`],
|
|
1008
1121
|
light: process.env[`${prefix}LIGHT`],
|
|
@@ -1019,14 +1132,16 @@ var getSingleThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(
|
|
|
1019
1132
|
positive: process.env[`${prefix}POSITIVE`],
|
|
1020
1133
|
negative: process.env[`${prefix}NEGATIVE`]
|
|
1021
1134
|
};
|
|
1022
|
-
}
|
|
1023
|
-
var getMultiThemeColorConfigEnv =
|
|
1135
|
+
};
|
|
1136
|
+
var getMultiThemeColorConfigEnv = (prefix) => {
|
|
1024
1137
|
return {
|
|
1025
|
-
light: getBaseThemeColorConfigEnv(
|
|
1138
|
+
light: getBaseThemeColorConfigEnv(
|
|
1139
|
+
`${prefix}_LIGHT_`
|
|
1140
|
+
),
|
|
1026
1141
|
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
1027
1142
|
};
|
|
1028
|
-
}
|
|
1029
|
-
var getBaseThemeColorConfigEnv =
|
|
1143
|
+
};
|
|
1144
|
+
var getBaseThemeColorConfigEnv = (prefix) => {
|
|
1030
1145
|
return {
|
|
1031
1146
|
foreground: process.env[`${prefix}FOREGROUND`],
|
|
1032
1147
|
background: process.env[`${prefix}BACKGROUND`],
|
|
@@ -1043,13 +1158,16 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1043
1158
|
positive: process.env[`${prefix}POSITIVE`],
|
|
1044
1159
|
negative: process.env[`${prefix}NEGATIVE`]
|
|
1045
1160
|
};
|
|
1046
|
-
}
|
|
1161
|
+
};
|
|
1047
1162
|
|
|
1048
1163
|
// ../config-tools/src/env/set-env.ts
|
|
1049
|
-
var setExtensionEnv =
|
|
1164
|
+
var setExtensionEnv = (extensionName, extension) => {
|
|
1050
1165
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
1051
1166
|
if (extension[key]) {
|
|
1052
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _35 => _35.replace, 'call', _36 => _36(
|
|
1167
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _35 => _35.replace, 'call', _36 => _36(
|
|
1168
|
+
/([A-Z])+/g,
|
|
1169
|
+
(input) => input ? _optionalChain([input, 'access', _37 => _37[0], 'optionalAccess', _38 => _38.toUpperCase, 'call', _39 => _39()]) + input.slice(1) : ""
|
|
1170
|
+
), 'access', _40 => _40.split, 'call', _41 => _41(/(?=[A-Z])|[.\-\s_]/), 'access', _42 => _42.map, 'call', _43 => _43((x) => x.toLowerCase())]), () => ( []));
|
|
1053
1171
|
let extensionKey;
|
|
1054
1172
|
if (result.length === 0) {
|
|
1055
1173
|
return;
|
|
@@ -1064,8 +1182,8 @@ var setExtensionEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (exte
|
|
|
1064
1182
|
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
1065
1183
|
}
|
|
1066
1184
|
}
|
|
1067
|
-
}
|
|
1068
|
-
var setConfigEnv =
|
|
1185
|
+
};
|
|
1186
|
+
var setConfigEnv = (config) => {
|
|
1069
1187
|
const prefix = "STORM_";
|
|
1070
1188
|
if (config.extends) {
|
|
1071
1189
|
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
@@ -1154,7 +1272,9 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1154
1272
|
}
|
|
1155
1273
|
if (config.directories) {
|
|
1156
1274
|
if (!config.skipCache && config.directories.cache) {
|
|
1157
|
-
process.env[`${prefix}CACHE_DIR`] = correctPaths(
|
|
1275
|
+
process.env[`${prefix}CACHE_DIR`] = correctPaths(
|
|
1276
|
+
config.directories.cache
|
|
1277
|
+
);
|
|
1158
1278
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1159
1279
|
}
|
|
1160
1280
|
if (config.directories.data) {
|
|
@@ -1162,7 +1282,9 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1162
1282
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1163
1283
|
}
|
|
1164
1284
|
if (config.directories.config) {
|
|
1165
|
-
process.env[`${prefix}CONFIG_DIR`] = correctPaths(
|
|
1285
|
+
process.env[`${prefix}CONFIG_DIR`] = correctPaths(
|
|
1286
|
+
config.directories.config
|
|
1287
|
+
);
|
|
1166
1288
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1167
1289
|
}
|
|
1168
1290
|
if (config.directories.temp) {
|
|
@@ -1174,7 +1296,9 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1174
1296
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1175
1297
|
}
|
|
1176
1298
|
if (config.directories.build) {
|
|
1177
|
-
process.env[`${prefix}BUILD_DIR`] = correctPaths(
|
|
1299
|
+
process.env[`${prefix}BUILD_DIR`] = correctPaths(
|
|
1300
|
+
config.directories.build
|
|
1301
|
+
);
|
|
1178
1302
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
1179
1303
|
}
|
|
1180
1304
|
}
|
|
@@ -1195,7 +1319,10 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1195
1319
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1196
1320
|
}
|
|
1197
1321
|
} else {
|
|
1198
|
-
setThemeColorConfigEnv(
|
|
1322
|
+
setThemeColorConfigEnv(
|
|
1323
|
+
`${prefix}COLOR_`,
|
|
1324
|
+
config.colors
|
|
1325
|
+
);
|
|
1199
1326
|
}
|
|
1200
1327
|
if (config.repository) {
|
|
1201
1328
|
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
@@ -1207,7 +1334,9 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1207
1334
|
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
1208
1335
|
}
|
|
1209
1336
|
if (config.externalPackagePatterns) {
|
|
1210
|
-
process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(
|
|
1337
|
+
process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(
|
|
1338
|
+
config.externalPackagePatterns
|
|
1339
|
+
);
|
|
1211
1340
|
}
|
|
1212
1341
|
if (config.registry) {
|
|
1213
1342
|
if (config.registry.github) {
|
|
@@ -1220,20 +1349,28 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1220
1349
|
process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
|
|
1221
1350
|
}
|
|
1222
1351
|
if (config.registry.cyclone) {
|
|
1223
|
-
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
1352
|
+
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
1353
|
+
config.registry.cyclone
|
|
1354
|
+
);
|
|
1224
1355
|
}
|
|
1225
1356
|
if (config.registry.container) {
|
|
1226
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
1357
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
1358
|
+
config.registry.container
|
|
1359
|
+
);
|
|
1227
1360
|
}
|
|
1228
1361
|
}
|
|
1229
1362
|
if (config.logLevel) {
|
|
1230
1363
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
1231
1364
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
1232
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
1365
|
+
process.env.NX_VERBOSE_LOGGING = String(
|
|
1366
|
+
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
1367
|
+
);
|
|
1233
1368
|
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1234
1369
|
}
|
|
1235
1370
|
if (config.skipConfigLogging !== void 0) {
|
|
1236
|
-
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
1371
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
1372
|
+
config.skipConfigLogging
|
|
1373
|
+
);
|
|
1237
1374
|
}
|
|
1238
1375
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1239
1376
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
@@ -1241,11 +1378,11 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1241
1378
|
setExtensionEnv(key, config.extensions[key]);
|
|
1242
1379
|
}
|
|
1243
1380
|
}
|
|
1244
|
-
}
|
|
1245
|
-
var setThemeColorConfigEnv =
|
|
1381
|
+
};
|
|
1382
|
+
var setThemeColorConfigEnv = (prefix, config) => {
|
|
1246
1383
|
return _optionalChain([config, 'optionalAccess', _53 => _53.light, 'optionalAccess', _54 => _54.brand]) || _optionalChain([config, 'optionalAccess', _55 => _55.dark, 'optionalAccess', _56 => _56.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
1247
|
-
}
|
|
1248
|
-
var setSingleThemeColorConfigEnv =
|
|
1384
|
+
};
|
|
1385
|
+
var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
1249
1386
|
if (config.dark) {
|
|
1250
1387
|
process.env[`${prefix}DARK`] = config.dark;
|
|
1251
1388
|
}
|
|
@@ -1288,14 +1425,14 @@ var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(
|
|
|
1288
1425
|
if (config.negative) {
|
|
1289
1426
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1290
1427
|
}
|
|
1291
|
-
}
|
|
1292
|
-
var setMultiThemeColorConfigEnv =
|
|
1428
|
+
};
|
|
1429
|
+
var setMultiThemeColorConfigEnv = (prefix, config) => {
|
|
1293
1430
|
return {
|
|
1294
1431
|
light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
|
|
1295
1432
|
dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
|
|
1296
1433
|
};
|
|
1297
|
-
}
|
|
1298
|
-
var setBaseThemeColorConfigEnv =
|
|
1434
|
+
};
|
|
1435
|
+
var setBaseThemeColorConfigEnv = (prefix, config) => {
|
|
1299
1436
|
if (config.foreground) {
|
|
1300
1437
|
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
1301
1438
|
}
|
|
@@ -1338,12 +1475,12 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1338
1475
|
if (config.negative) {
|
|
1339
1476
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1340
1477
|
}
|
|
1341
|
-
}
|
|
1478
|
+
};
|
|
1342
1479
|
|
|
1343
1480
|
// ../config-tools/src/create-storm-config.ts
|
|
1344
1481
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1345
1482
|
var _static_cache = void 0;
|
|
1346
|
-
var createStormWorkspaceConfig =
|
|
1483
|
+
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot3, skipLogs = false, useDefault = true) => {
|
|
1347
1484
|
let result;
|
|
1348
1485
|
if (!_optionalChain([_static_cache, 'optionalAccess', _57 => _57.data]) || !_optionalChain([_static_cache, 'optionalAccess', _58 => _58.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1349
1486
|
let _workspaceRoot = workspaceRoot3;
|
|
@@ -1354,16 +1491,19 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1354
1491
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1355
1492
|
if (!configFile) {
|
|
1356
1493
|
if (!skipLogs) {
|
|
1357
|
-
writeWarning(
|
|
1358
|
-
|
|
1359
|
-
|
|
1494
|
+
writeWarning(
|
|
1495
|
+
"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",
|
|
1496
|
+
{ logLevel: "all" }
|
|
1497
|
+
);
|
|
1360
1498
|
}
|
|
1361
1499
|
if (useDefault === false) {
|
|
1362
1500
|
return void 0;
|
|
1363
1501
|
}
|
|
1364
1502
|
}
|
|
1365
1503
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1366
|
-
result = await stormWorkspaceConfigSchema.parseAsync(
|
|
1504
|
+
result = await stormWorkspaceConfigSchema.parseAsync(
|
|
1505
|
+
_defu2.default.call(void 0, configEnv, configFile, defaultConfig)
|
|
1506
|
+
);
|
|
1367
1507
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1368
1508
|
} else {
|
|
1369
1509
|
result = _static_cache.data;
|
|
@@ -1379,11 +1519,9 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1379
1519
|
data: result
|
|
1380
1520
|
};
|
|
1381
1521
|
return result;
|
|
1382
|
-
}
|
|
1383
|
-
var createConfigExtension =
|
|
1384
|
-
const extension_cache_key = {
|
|
1385
|
-
extensionName
|
|
1386
|
-
};
|
|
1522
|
+
};
|
|
1523
|
+
var createConfigExtension = (extensionName, schema) => {
|
|
1524
|
+
const extension_cache_key = { extensionName };
|
|
1387
1525
|
if (_extension_cache.has(extension_cache_key)) {
|
|
1388
1526
|
return _extension_cache.get(extension_cache_key);
|
|
1389
1527
|
}
|
|
@@ -1393,38 +1531,49 @@ var createConfigExtension = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
1393
1531
|
}
|
|
1394
1532
|
_extension_cache.set(extension_cache_key, extension);
|
|
1395
1533
|
return extension;
|
|
1396
|
-
}
|
|
1397
|
-
var loadStormWorkspaceConfig =
|
|
1398
|
-
const config = await createStormWorkspaceConfig(
|
|
1534
|
+
};
|
|
1535
|
+
var loadStormWorkspaceConfig = async (workspaceRoot3, skipLogs = false) => {
|
|
1536
|
+
const config = await createStormWorkspaceConfig(
|
|
1537
|
+
void 0,
|
|
1538
|
+
void 0,
|
|
1539
|
+
workspaceRoot3,
|
|
1540
|
+
skipLogs,
|
|
1541
|
+
true
|
|
1542
|
+
);
|
|
1399
1543
|
setConfigEnv(config);
|
|
1400
1544
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1401
|
-
writeTrace(
|
|
1402
|
-
|
|
1545
|
+
writeTrace(
|
|
1546
|
+
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1547
|
+
${formatLogMessage(config)}`,
|
|
1548
|
+
config
|
|
1549
|
+
);
|
|
1403
1550
|
}
|
|
1404
1551
|
return config;
|
|
1405
|
-
}
|
|
1552
|
+
};
|
|
1406
1553
|
|
|
1407
1554
|
// ../config-tools/src/get-config.ts
|
|
1408
|
-
var getConfig =
|
|
1555
|
+
var getConfig = (workspaceRoot3, skipLogs = false) => {
|
|
1409
1556
|
return loadStormWorkspaceConfig(workspaceRoot3, skipLogs);
|
|
1410
|
-
}
|
|
1411
|
-
var getWorkspaceConfig =
|
|
1557
|
+
};
|
|
1558
|
+
var getWorkspaceConfig = (skipLogs = false, options = {}) => {
|
|
1412
1559
|
let workspaceRoot3 = options.workspaceRoot;
|
|
1413
1560
|
if (!workspaceRoot3) {
|
|
1414
1561
|
workspaceRoot3 = findWorkspaceRoot(options.cwd);
|
|
1415
1562
|
}
|
|
1416
1563
|
return getConfig(workspaceRoot3, skipLogs);
|
|
1417
|
-
}
|
|
1564
|
+
};
|
|
1418
1565
|
|
|
1419
1566
|
// ../workspace-tools/src/base/base-executor.ts
|
|
1420
1567
|
|
|
1421
|
-
var withRunExecutor =
|
|
1568
|
+
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
1422
1569
|
const stopwatch = getStopwatch(name);
|
|
1423
1570
|
let options = _options;
|
|
1424
1571
|
let config = {};
|
|
1425
1572
|
try {
|
|
1426
1573
|
if (!_optionalChain([context, 'access', _59 => _59.projectsConfigurations, 'optionalAccess', _60 => _60.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1427
|
-
throw new Error(
|
|
1574
|
+
throw new Error(
|
|
1575
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
1576
|
+
);
|
|
1428
1577
|
}
|
|
1429
1578
|
const workspaceRoot3 = findWorkspaceRoot();
|
|
1430
1579
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot3;
|
|
@@ -1433,35 +1582,50 @@ var withRunExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name
|
|
|
1433
1582
|
config.workspaceRoot = workspaceRoot3;
|
|
1434
1583
|
writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
1435
1584
|
if (!executorOptions.skipReadingConfig) {
|
|
1436
|
-
writeTrace(
|
|
1585
|
+
writeTrace(
|
|
1586
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1437
1587
|
- workspaceRoot: ${workspaceRoot3}
|
|
1438
1588
|
- projectRoot: ${projectRoot}
|
|
1439
1589
|
- sourceRoot: ${sourceRoot}
|
|
1440
1590
|
- projectName: ${projectName}
|
|
1441
|
-
`,
|
|
1591
|
+
`,
|
|
1592
|
+
config
|
|
1593
|
+
);
|
|
1442
1594
|
config = await getConfig(workspaceRoot3);
|
|
1443
1595
|
}
|
|
1444
1596
|
if (_optionalChain([executorOptions, 'optionalAccess', _61 => _61.hooks, 'optionalAccess', _62 => _62.applyDefaultOptions])) {
|
|
1445
1597
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
1446
|
-
options = await Promise.resolve(
|
|
1598
|
+
options = await Promise.resolve(
|
|
1599
|
+
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
1600
|
+
);
|
|
1447
1601
|
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
1448
1602
|
}
|
|
1449
|
-
writeTrace(
|
|
1603
|
+
writeTrace(
|
|
1604
|
+
`Executor schema options \u2699\uFE0F
|
|
1450
1605
|
${formatLogMessage(options)}
|
|
1451
|
-
`,
|
|
1452
|
-
const tokenized = await applyWorkspaceTokens(options, _defu.defu.call(void 0, {
|
|
1453
|
-
workspaceRoot: workspaceRoot3,
|
|
1454
|
-
projectRoot,
|
|
1455
|
-
sourceRoot,
|
|
1456
|
-
projectName,
|
|
1606
|
+
`,
|
|
1457
1607
|
config
|
|
1458
|
-
|
|
1459
|
-
|
|
1608
|
+
);
|
|
1609
|
+
const tokenized = await applyWorkspaceTokens(
|
|
1610
|
+
options,
|
|
1611
|
+
_defu.defu.call(void 0,
|
|
1612
|
+
{ workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config },
|
|
1613
|
+
config,
|
|
1614
|
+
context.projectsConfigurations.projects[context.projectName]
|
|
1615
|
+
),
|
|
1616
|
+
applyWorkspaceProjectTokens
|
|
1617
|
+
);
|
|
1618
|
+
writeTrace(
|
|
1619
|
+
`Executor schema tokenized options \u2699\uFE0F
|
|
1460
1620
|
${formatLogMessage(tokenized)}
|
|
1461
|
-
`,
|
|
1621
|
+
`,
|
|
1622
|
+
config
|
|
1623
|
+
);
|
|
1462
1624
|
if (_optionalChain([executorOptions, 'optionalAccess', _63 => _63.hooks, 'optionalAccess', _64 => _64.preProcess])) {
|
|
1463
1625
|
writeDebug("Running the preProcess hook...", config);
|
|
1464
|
-
await Promise.resolve(
|
|
1626
|
+
await Promise.resolve(
|
|
1627
|
+
executorOptions.hooks.preProcess(tokenized, config)
|
|
1628
|
+
);
|
|
1465
1629
|
writeDebug("Completed the preProcess hook", config);
|
|
1466
1630
|
}
|
|
1467
1631
|
const ret = executorFn(tokenized, context, config);
|
|
@@ -1471,10 +1635,15 @@ ${formatLogMessage(tokenized)}
|
|
|
1471
1635
|
void iter;
|
|
1472
1636
|
}
|
|
1473
1637
|
}
|
|
1474
|
-
const result = await Promise.resolve(
|
|
1638
|
+
const result = await Promise.resolve(
|
|
1639
|
+
ret
|
|
1640
|
+
);
|
|
1475
1641
|
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _66 => _66.error, 'optionalAccess', _67 => _67.message]) && typeof _optionalChain([result, 'optionalAccess', _68 => _68.error, 'optionalAccess', _69 => _69.message]) === "string" && _optionalChain([result, 'optionalAccess', _70 => _70.error, 'optionalAccess', _71 => _71.name]) && typeof _optionalChain([result, 'optionalAccess', _72 => _72.error, 'optionalAccess', _73 => _73.name]) === "string")) {
|
|
1476
|
-
writeTrace(
|
|
1477
|
-
${
|
|
1642
|
+
writeTrace(
|
|
1643
|
+
`Failure determined by the ${name} executor
|
|
1644
|
+
${formatLogMessage(result)}`,
|
|
1645
|
+
config
|
|
1646
|
+
);
|
|
1478
1647
|
console.error(result);
|
|
1479
1648
|
throw new Error(`The ${name} executor failed to run`, {
|
|
1480
1649
|
cause: _optionalChain([result, 'optionalAccess', _74 => _74.error])
|
|
@@ -1491,27 +1660,33 @@ ${formatLogMessage(result)}`, config);
|
|
|
1491
1660
|
success: true
|
|
1492
1661
|
};
|
|
1493
1662
|
} catch (error) {
|
|
1494
|
-
writeFatal(
|
|
1495
|
-
|
|
1663
|
+
writeFatal(
|
|
1664
|
+
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
1665
|
+
config
|
|
1666
|
+
);
|
|
1667
|
+
writeError(
|
|
1668
|
+
`An exception was thrown in the executor's process
|
|
1496
1669
|
- Details: ${error.message}
|
|
1497
|
-
- Stacktrace: ${error.stack}`,
|
|
1670
|
+
- Stacktrace: ${error.stack}`,
|
|
1671
|
+
config
|
|
1672
|
+
);
|
|
1498
1673
|
return {
|
|
1499
1674
|
success: false
|
|
1500
1675
|
};
|
|
1501
1676
|
} finally {
|
|
1502
1677
|
stopwatch();
|
|
1503
1678
|
}
|
|
1504
|
-
}
|
|
1505
|
-
var _isFunction2 =
|
|
1679
|
+
};
|
|
1680
|
+
var _isFunction2 = (value) => {
|
|
1506
1681
|
try {
|
|
1507
1682
|
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _77 => _77.constructor]) && _optionalChain([value, 'optionalAccess', _78 => _78.call]) && _optionalChain([value, 'optionalAccess', _79 => _79.apply]));
|
|
1508
1683
|
} catch (e) {
|
|
1509
1684
|
return false;
|
|
1510
1685
|
}
|
|
1511
|
-
}
|
|
1686
|
+
};
|
|
1512
1687
|
|
|
1513
1688
|
// ../workspace-tools/src/base/base-generator.ts
|
|
1514
|
-
var withRunGenerator =
|
|
1689
|
+
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1515
1690
|
skipReadingConfig: false
|
|
1516
1691
|
}) => async (tree, _options) => {
|
|
1517
1692
|
const stopwatch = getStopwatch(name);
|
|
@@ -1523,27 +1698,40 @@ var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (nam
|
|
|
1523
1698
|
`, config);
|
|
1524
1699
|
const workspaceRoot3 = findWorkspaceRoot();
|
|
1525
1700
|
if (!generatorOptions.skipReadingConfig) {
|
|
1526
|
-
writeDebug(
|
|
1527
|
-
|
|
1701
|
+
writeDebug(
|
|
1702
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1703
|
+
- workspaceRoot: ${workspaceRoot3}`,
|
|
1704
|
+
config
|
|
1705
|
+
);
|
|
1528
1706
|
config = await getConfig(workspaceRoot3);
|
|
1529
1707
|
}
|
|
1530
1708
|
if (_optionalChain([generatorOptions, 'optionalAccess', _80 => _80.hooks, 'optionalAccess', _81 => _81.applyDefaultOptions])) {
|
|
1531
1709
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
1532
|
-
options = await Promise.resolve(
|
|
1710
|
+
options = await Promise.resolve(
|
|
1711
|
+
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1712
|
+
);
|
|
1533
1713
|
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
1534
1714
|
}
|
|
1535
|
-
writeTrace(
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
workspaceRoot: tree.root,
|
|
1715
|
+
writeTrace(
|
|
1716
|
+
`Generator schema options \u2699\uFE0F
|
|
1717
|
+
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1539
1718
|
config
|
|
1540
|
-
|
|
1719
|
+
);
|
|
1720
|
+
const tokenized = await applyWorkspaceTokens(
|
|
1721
|
+
options,
|
|
1722
|
+
{ workspaceRoot: tree.root, config },
|
|
1723
|
+
applyWorkspaceBaseTokens
|
|
1724
|
+
);
|
|
1541
1725
|
if (_optionalChain([generatorOptions, 'optionalAccess', _82 => _82.hooks, 'optionalAccess', _83 => _83.preProcess])) {
|
|
1542
1726
|
writeDebug("Running the preProcess hook...", config);
|
|
1543
|
-
await Promise.resolve(
|
|
1727
|
+
await Promise.resolve(
|
|
1728
|
+
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1729
|
+
);
|
|
1544
1730
|
writeDebug("Completed the preProcess hook", config);
|
|
1545
1731
|
}
|
|
1546
|
-
const result = await Promise.resolve(
|
|
1732
|
+
const result = await Promise.resolve(
|
|
1733
|
+
generatorFn(tree, tokenized, config)
|
|
1734
|
+
);
|
|
1547
1735
|
if (result) {
|
|
1548
1736
|
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _84 => _84.error, 'optionalAccess', _85 => _85.message]) && typeof _optionalChain([result, 'optionalAccess', _86 => _86.error, 'optionalAccess', _87 => _87.message]) === "string" && _optionalChain([result, 'optionalAccess', _88 => _88.error, 'optionalAccess', _89 => _89.name]) && typeof _optionalChain([result, 'optionalAccess', _90 => _90.error, 'optionalAccess', _91 => _91.name]) === "string") {
|
|
1549
1737
|
throw new Error(`The ${name} generator failed to run`, {
|
|
@@ -1564,41 +1752,56 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1564
1752
|
};
|
|
1565
1753
|
} catch (error) {
|
|
1566
1754
|
return () => {
|
|
1567
|
-
writeFatal(
|
|
1568
|
-
|
|
1755
|
+
writeFatal(
|
|
1756
|
+
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1757
|
+
config
|
|
1758
|
+
);
|
|
1759
|
+
writeError(
|
|
1760
|
+
`An exception was thrown in the generator's process
|
|
1569
1761
|
- Details: ${error.message}
|
|
1570
|
-
- Stacktrace: ${error.stack}`,
|
|
1762
|
+
- Stacktrace: ${error.stack}`,
|
|
1763
|
+
config
|
|
1764
|
+
);
|
|
1571
1765
|
};
|
|
1572
1766
|
} finally {
|
|
1573
1767
|
stopwatch();
|
|
1574
1768
|
}
|
|
1575
|
-
}
|
|
1769
|
+
};
|
|
1576
1770
|
|
|
1577
1771
|
// ../workspace-tools/src/generators/init/init.ts
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
|
|
1578
1775
|
var _devkit = require('@nx/devkit');
|
|
1579
1776
|
async function initGenerator(tree, schema) {
|
|
1580
|
-
const task = _devkit.addDependenciesToPackageJson.call(void 0,
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1777
|
+
const task = _devkit.addDependenciesToPackageJson.call(void 0,
|
|
1778
|
+
tree,
|
|
1779
|
+
{
|
|
1780
|
+
nx: "^19.6.2",
|
|
1781
|
+
"@nx/workspace": "^19.6.2",
|
|
1782
|
+
"@nx/js": "^19.6.2",
|
|
1783
|
+
"@storm-software/eslint": "latest",
|
|
1784
|
+
"@storm-software/prettier": "latest",
|
|
1785
|
+
"@storm-software/config-tools": "latest",
|
|
1786
|
+
"@storm-software/testing-tools": "latest",
|
|
1787
|
+
"@storm-software/git-tools": "latest",
|
|
1788
|
+
"@storm-software/linting-tools": "latest"
|
|
1789
|
+
},
|
|
1790
|
+
{}
|
|
1791
|
+
);
|
|
1591
1792
|
if (!schema.skipFormat) {
|
|
1592
1793
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1593
1794
|
}
|
|
1594
1795
|
return task;
|
|
1595
1796
|
}
|
|
1596
|
-
_chunk3GQAWCBQjs.__name.call(void 0, initGenerator, "initGenerator");
|
|
1597
1797
|
|
|
1598
1798
|
// ../workspace-tools/src/utils/cargo.ts
|
|
1599
1799
|
|
|
1600
1800
|
|
|
1601
1801
|
|
|
1802
|
+
|
|
1803
|
+
|
|
1804
|
+
|
|
1602
1805
|
var INVALID_CARGO_ARGS = [
|
|
1603
1806
|
"allFeatures",
|
|
1604
1807
|
"allTargets",
|
|
@@ -1607,7 +1810,7 @@ var INVALID_CARGO_ARGS = [
|
|
|
1607
1810
|
"package",
|
|
1608
1811
|
"tsConfig"
|
|
1609
1812
|
];
|
|
1610
|
-
var buildCargoCommand =
|
|
1813
|
+
var buildCargoCommand = (baseCommand, options, context) => {
|
|
1611
1814
|
const args = [];
|
|
1612
1815
|
if (options.toolchain && options.toolchain !== "stable") {
|
|
1613
1816
|
args.push(`+${options.toolchain}`);
|
|
@@ -1645,13 +1848,12 @@ var buildCargoCommand = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (ba
|
|
|
1645
1848
|
args.push("--target-dir", options.outputPath);
|
|
1646
1849
|
}
|
|
1647
1850
|
return args;
|
|
1648
|
-
}
|
|
1851
|
+
};
|
|
1649
1852
|
async function cargoCommand(...args) {
|
|
1650
1853
|
console.log(`> cargo ${args.join(" ")}`);
|
|
1651
1854
|
args.push("--color", "always");
|
|
1652
1855
|
return await Promise.resolve(runProcess("cargo", ...args));
|
|
1653
1856
|
}
|
|
1654
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cargoCommand, "cargoCommand");
|
|
1655
1857
|
function cargoCommandSync(args = "", options) {
|
|
1656
1858
|
const normalizedOptions = {
|
|
1657
1859
|
stdio: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _95 => _95.stdio]), () => ( "inherit")),
|
|
@@ -1678,7 +1880,6 @@ function cargoCommandSync(args = "", options) {
|
|
|
1678
1880
|
};
|
|
1679
1881
|
}
|
|
1680
1882
|
}
|
|
1681
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cargoCommandSync, "cargoCommandSync");
|
|
1682
1883
|
function cargoMetadata() {
|
|
1683
1884
|
const output3 = cargoCommandSync("metadata --format-version=1", {
|
|
1684
1885
|
stdio: "pipe"
|
|
@@ -1689,15 +1890,12 @@ function cargoMetadata() {
|
|
|
1689
1890
|
}
|
|
1690
1891
|
return JSON.parse(output3.output);
|
|
1691
1892
|
}
|
|
1692
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cargoMetadata, "cargoMetadata");
|
|
1693
1893
|
function runProcess(processCmd, ...args) {
|
|
1694
1894
|
const metadata = cargoMetadata();
|
|
1695
1895
|
const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _97 => _97.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, _devkit.workspaceRoot, "dist", "cargo")));
|
|
1696
1896
|
return new Promise((resolve) => {
|
|
1697
1897
|
if (process.env.VERCEL) {
|
|
1698
|
-
return resolve({
|
|
1699
|
-
success: true
|
|
1700
|
-
});
|
|
1898
|
+
return resolve({ success: true });
|
|
1701
1899
|
}
|
|
1702
1900
|
_child_process.execSync.call(void 0, `${processCmd} ${args.join(" ")}`, {
|
|
1703
1901
|
cwd: process.cwd(),
|
|
@@ -1708,113 +1906,119 @@ function runProcess(processCmd, ...args) {
|
|
|
1708
1906
|
CARGO_BUILD_TARGET_DIR: targetDir
|
|
1709
1907
|
},
|
|
1710
1908
|
windowsHide: true,
|
|
1711
|
-
stdio: [
|
|
1712
|
-
"inherit",
|
|
1713
|
-
"inherit",
|
|
1714
|
-
"inherit"
|
|
1715
|
-
]
|
|
1716
|
-
});
|
|
1717
|
-
resolve({
|
|
1718
|
-
success: true
|
|
1909
|
+
stdio: ["inherit", "inherit", "inherit"]
|
|
1719
1910
|
});
|
|
1911
|
+
resolve({ success: true });
|
|
1720
1912
|
});
|
|
1721
1913
|
}
|
|
1722
|
-
_chunk3GQAWCBQjs.__name.call(void 0, runProcess, "runProcess");
|
|
1723
1914
|
|
|
1724
1915
|
// ../workspace-tools/src/executors/cargo-build/executor.ts
|
|
1725
1916
|
async function cargoBuildExecutor(options, context) {
|
|
1726
1917
|
const command = buildCargoCommand("build", options, context);
|
|
1727
1918
|
return await cargoCommand(...command);
|
|
1728
1919
|
}
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
options
|
|
1736
|
-
|
|
1737
|
-
|
|
1920
|
+
var executor_default = withRunExecutor(
|
|
1921
|
+
"Cargo Build",
|
|
1922
|
+
cargoBuildExecutor,
|
|
1923
|
+
{
|
|
1924
|
+
skipReadingConfig: false,
|
|
1925
|
+
hooks: {
|
|
1926
|
+
applyDefaultOptions: (options) => {
|
|
1927
|
+
options.outputPath ??= "dist/target/{projectRoot}";
|
|
1928
|
+
options.toolchain ??= "stable";
|
|
1929
|
+
return options;
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1738
1932
|
}
|
|
1739
|
-
|
|
1933
|
+
);
|
|
1740
1934
|
|
|
1741
1935
|
// ../workspace-tools/src/executors/cargo-check/executor.ts
|
|
1742
1936
|
async function cargoCheckExecutor(options, context) {
|
|
1743
1937
|
const command = buildCargoCommand("check", options, context);
|
|
1744
1938
|
return await cargoCommand(...command);
|
|
1745
1939
|
}
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1940
|
+
var executor_default2 = withRunExecutor(
|
|
1941
|
+
"Cargo Check",
|
|
1942
|
+
cargoCheckExecutor,
|
|
1943
|
+
{
|
|
1944
|
+
skipReadingConfig: false,
|
|
1945
|
+
hooks: {
|
|
1946
|
+
applyDefaultOptions: (options) => {
|
|
1947
|
+
options.toolchain ??= "stable";
|
|
1948
|
+
return options;
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1754
1951
|
}
|
|
1755
|
-
|
|
1952
|
+
);
|
|
1756
1953
|
|
|
1757
1954
|
// ../workspace-tools/src/executors/cargo-clippy/executor.ts
|
|
1758
1955
|
async function cargoClippyExecutor(options, context) {
|
|
1759
1956
|
const command = buildCargoCommand("clippy", options, context);
|
|
1760
1957
|
return await cargoCommand(...command);
|
|
1761
1958
|
}
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
options
|
|
1769
|
-
|
|
1770
|
-
|
|
1959
|
+
var executor_default3 = withRunExecutor(
|
|
1960
|
+
"Cargo Clippy",
|
|
1961
|
+
cargoClippyExecutor,
|
|
1962
|
+
{
|
|
1963
|
+
skipReadingConfig: false,
|
|
1964
|
+
hooks: {
|
|
1965
|
+
applyDefaultOptions: (options) => {
|
|
1966
|
+
options.toolchain ??= "stable";
|
|
1967
|
+
options.fix ??= false;
|
|
1968
|
+
return options;
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1771
1971
|
}
|
|
1772
|
-
|
|
1972
|
+
);
|
|
1773
1973
|
|
|
1774
1974
|
// ../workspace-tools/src/executors/cargo-doc/executor.ts
|
|
1775
1975
|
async function cargoDocExecutor(options, context) {
|
|
1776
|
-
const opts = {
|
|
1777
|
-
...options
|
|
1778
|
-
};
|
|
1976
|
+
const opts = { ...options };
|
|
1779
1977
|
opts["no-deps"] = opts.noDeps;
|
|
1780
1978
|
delete opts.noDeps;
|
|
1781
1979
|
const command = buildCargoCommand("doc", options, context);
|
|
1782
1980
|
return await cargoCommand(...command);
|
|
1783
1981
|
}
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
options
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1982
|
+
var executor_default4 = withRunExecutor(
|
|
1983
|
+
"Cargo Doc",
|
|
1984
|
+
cargoDocExecutor,
|
|
1985
|
+
{
|
|
1986
|
+
skipReadingConfig: false,
|
|
1987
|
+
hooks: {
|
|
1988
|
+
applyDefaultOptions: (options) => {
|
|
1989
|
+
options.outputPath ??= "dist/docs/{projectRoot}";
|
|
1990
|
+
options.toolchain ??= "stable";
|
|
1991
|
+
options.release ??= options.profile ? false : true;
|
|
1992
|
+
options.allFeatures ??= true;
|
|
1993
|
+
options.lib ??= true;
|
|
1994
|
+
options.bins ??= true;
|
|
1995
|
+
options.examples ??= true;
|
|
1996
|
+
options.noDeps ??= false;
|
|
1997
|
+
return options;
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
1799
2000
|
}
|
|
1800
|
-
|
|
2001
|
+
);
|
|
1801
2002
|
|
|
1802
2003
|
// ../workspace-tools/src/executors/cargo-format/executor.ts
|
|
1803
2004
|
async function cargoFormatExecutor(options, context) {
|
|
1804
2005
|
const command = buildCargoCommand("fmt", options, context);
|
|
1805
2006
|
return await cargoCommand(...command);
|
|
1806
2007
|
}
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
options
|
|
1814
|
-
|
|
1815
|
-
|
|
2008
|
+
var executor_default5 = withRunExecutor(
|
|
2009
|
+
"Cargo Format",
|
|
2010
|
+
cargoFormatExecutor,
|
|
2011
|
+
{
|
|
2012
|
+
skipReadingConfig: false,
|
|
2013
|
+
hooks: {
|
|
2014
|
+
applyDefaultOptions: (options) => {
|
|
2015
|
+
options.outputPath ??= "dist/target/{projectRoot}";
|
|
2016
|
+
options.toolchain ??= "stable";
|
|
2017
|
+
return options;
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
1816
2020
|
}
|
|
1817
|
-
|
|
2021
|
+
);
|
|
1818
2022
|
|
|
1819
2023
|
// ../workspace-tools/src/executors/cargo-publish/executor.ts
|
|
1820
2024
|
|
|
@@ -1860,7 +2064,7 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
|
|
|
1860
2064
|
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
1861
2065
|
var _glob = require('glob');
|
|
1862
2066
|
|
|
1863
|
-
var copyAssets =
|
|
2067
|
+
var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
|
|
1864
2068
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
1865
2069
|
pendingAssets.push({
|
|
1866
2070
|
input: projectRoot,
|
|
@@ -1886,8 +2090,11 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
1886
2090
|
output: "src/"
|
|
1887
2091
|
});
|
|
1888
2092
|
}
|
|
1889
|
-
writeTrace(
|
|
1890
|
-
|
|
2093
|
+
writeTrace(
|
|
2094
|
+
`\u{1F4DD} Copying the following assets to the output directory:
|
|
2095
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
2096
|
+
config
|
|
2097
|
+
);
|
|
1891
2098
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
1892
2099
|
projectDir: projectRoot,
|
|
1893
2100
|
rootDir: config.workspaceRoot,
|
|
@@ -1896,28 +2103,45 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
1896
2103
|
});
|
|
1897
2104
|
await assetHandler.processAllAssetsOnce();
|
|
1898
2105
|
if (includeSrc === true) {
|
|
1899
|
-
writeDebug(
|
|
2106
|
+
writeDebug(
|
|
2107
|
+
`\u{1F4DD} Adding banner and writing source files: ${joinPaths(
|
|
2108
|
+
outputPath,
|
|
2109
|
+
"src"
|
|
2110
|
+
)}`,
|
|
2111
|
+
config
|
|
2112
|
+
);
|
|
1900
2113
|
const files = await _glob.glob.call(void 0, [
|
|
1901
2114
|
joinPaths(config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
1902
2115
|
joinPaths(config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
1903
2116
|
joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
1904
2117
|
joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
1905
2118
|
]);
|
|
1906
|
-
await Promise.allSettled(
|
|
2119
|
+
await Promise.allSettled(
|
|
2120
|
+
files.map(
|
|
2121
|
+
async (file) => _promises.writeFile.call(void 0,
|
|
2122
|
+
file,
|
|
2123
|
+
`${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
1907
2124
|
|
|
1908
2125
|
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
1909
2126
|
|
|
1910
|
-
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
2127
|
+
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
2128
|
+
)
|
|
2129
|
+
)
|
|
2130
|
+
);
|
|
1911
2131
|
}
|
|
1912
|
-
}
|
|
2132
|
+
};
|
|
1913
2133
|
|
|
1914
2134
|
// ../build-tools/src/utilities/generate-package-json.ts
|
|
1915
2135
|
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
1916
2136
|
|
|
1917
2137
|
|
|
1918
2138
|
|
|
2139
|
+
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
|
|
1919
2143
|
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
1920
|
-
var addPackageDependencies =
|
|
2144
|
+
var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, packageJson) => {
|
|
1921
2145
|
let projectGraph;
|
|
1922
2146
|
try {
|
|
1923
2147
|
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
@@ -1926,16 +2150,35 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
1926
2150
|
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
1927
2151
|
}
|
|
1928
2152
|
if (!projectGraph) {
|
|
1929
|
-
throw new Error(
|
|
2153
|
+
throw new Error(
|
|
2154
|
+
"The Build process failed because the project graph is not available. Please run the build command again."
|
|
2155
|
+
);
|
|
1930
2156
|
}
|
|
1931
|
-
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
|
|
2157
|
+
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
|
|
2158
|
+
void 0,
|
|
2159
|
+
projectGraph,
|
|
2160
|
+
workspaceRoot3,
|
|
2161
|
+
projectName,
|
|
2162
|
+
process.env.NX_TASK_TARGET_TARGET || "build",
|
|
2163
|
+
process.env.NX_TASK_TARGET_CONFIGURATION || "production",
|
|
2164
|
+
true
|
|
2165
|
+
);
|
|
1932
2166
|
const localPackages = [];
|
|
1933
|
-
for (const project of projectDependencies.dependencies.filter(
|
|
2167
|
+
for (const project of projectDependencies.dependencies.filter(
|
|
2168
|
+
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _98 => _98.node, 'access', _99 => _99.data, 'optionalAccess', _100 => _100.root]) !== projectRoot && _optionalChain([dep, 'access', _101 => _101.node, 'access', _102 => _102.data, 'optionalAccess', _103 => _103.root]) !== workspaceRoot3
|
|
2169
|
+
)) {
|
|
1934
2170
|
const projectNode = project.node;
|
|
1935
2171
|
if (projectNode.data.root) {
|
|
1936
|
-
const projectPackageJsonPath = joinPaths(
|
|
2172
|
+
const projectPackageJsonPath = joinPaths(
|
|
2173
|
+
workspaceRoot3,
|
|
2174
|
+
projectNode.data.root,
|
|
2175
|
+
"package.json"
|
|
2176
|
+
);
|
|
1937
2177
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
1938
|
-
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
2178
|
+
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
2179
|
+
projectPackageJsonPath,
|
|
2180
|
+
"utf8"
|
|
2181
|
+
);
|
|
1939
2182
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
1940
2183
|
if (projectPackageJson.private !== true) {
|
|
1941
2184
|
localPackages.push(projectPackageJson);
|
|
@@ -1944,19 +2187,33 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
1944
2187
|
}
|
|
1945
2188
|
}
|
|
1946
2189
|
if (localPackages.length > 0) {
|
|
1947
|
-
writeTrace(
|
|
1948
|
-
|
|
2190
|
+
writeTrace(
|
|
2191
|
+
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
2192
|
+
);
|
|
2193
|
+
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
2194
|
+
joinPaths(projectRoot, "project.json"),
|
|
2195
|
+
"utf8"
|
|
2196
|
+
);
|
|
1949
2197
|
const projectJson = JSON.parse(projectJsonFile);
|
|
1950
2198
|
const projectName2 = projectJson.name;
|
|
1951
2199
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1952
2200
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _104 => _104.projects, 'optionalAccess', _105 => _105[projectName2]])) {
|
|
1953
|
-
throw new Error(
|
|
2201
|
+
throw new Error(
|
|
2202
|
+
"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."
|
|
2203
|
+
);
|
|
1954
2204
|
}
|
|
1955
2205
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _106 => _106.projects, 'optionalAccess', _107 => _107[projectName2], 'access', _108 => _108.implicitDependencies, 'optionalAccess', _109 => _109.reduce, 'call', _110 => _110((ret, dep) => {
|
|
1956
2206
|
if (_optionalChain([projectConfigurations, 'access', _111 => _111.projects, 'optionalAccess', _112 => _112[dep]])) {
|
|
1957
|
-
const depPackageJsonPath = joinPaths(
|
|
2207
|
+
const depPackageJsonPath = joinPaths(
|
|
2208
|
+
workspaceRoot3,
|
|
2209
|
+
projectConfigurations.projects[dep].root,
|
|
2210
|
+
"package.json"
|
|
2211
|
+
);
|
|
1958
2212
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
1959
|
-
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
2213
|
+
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
2214
|
+
depPackageJsonPath,
|
|
2215
|
+
"utf8"
|
|
2216
|
+
);
|
|
1960
2217
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
1961
2218
|
if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
|
|
1962
2219
|
ret.push(depPackageJson.name);
|
|
@@ -1981,10 +2238,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
1981
2238
|
writeTrace("\u{1F4E6} No local packages dependencies to add to package.json");
|
|
1982
2239
|
}
|
|
1983
2240
|
return packageJson;
|
|
1984
|
-
}
|
|
1985
|
-
var addWorkspacePackageJsonFields =
|
|
2241
|
+
};
|
|
2242
|
+
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
1986
2243
|
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
|
|
1987
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
2244
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
2245
|
+
joinPaths(workspaceRoot3, "package.json"),
|
|
2246
|
+
"utf8"
|
|
2247
|
+
);
|
|
1988
2248
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
1989
2249
|
packageJson.type ??= "module";
|
|
1990
2250
|
packageJson.sideEffects ??= false;
|
|
@@ -1995,9 +2255,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
1995
2255
|
}
|
|
1996
2256
|
packageJson.source ??= `${joinPaths(distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
1997
2257
|
}
|
|
1998
|
-
packageJson.files ??= [
|
|
1999
|
-
"dist/**/*"
|
|
2000
|
-
];
|
|
2258
|
+
packageJson.files ??= ["dist/**/*"];
|
|
2001
2259
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
2002
2260
|
packageJson.files.push("src/**/*");
|
|
2003
2261
|
}
|
|
@@ -2013,26 +2271,22 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
2013
2271
|
packageJson.author ??= workspacePackageJson.author;
|
|
2014
2272
|
packageJson.maintainers ??= workspacePackageJson.maintainers;
|
|
2015
2273
|
if (!packageJson.maintainers && packageJson.author) {
|
|
2016
|
-
packageJson.maintainers = [
|
|
2017
|
-
packageJson.author
|
|
2018
|
-
];
|
|
2274
|
+
packageJson.maintainers = [packageJson.author];
|
|
2019
2275
|
}
|
|
2020
2276
|
packageJson.contributors ??= workspacePackageJson.contributors;
|
|
2021
2277
|
if (!packageJson.contributors && packageJson.author) {
|
|
2022
|
-
packageJson.contributors = [
|
|
2023
|
-
packageJson.author
|
|
2024
|
-
];
|
|
2278
|
+
packageJson.contributors = [packageJson.author];
|
|
2025
2279
|
}
|
|
2026
2280
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
2027
2281
|
packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
|
|
2028
2282
|
return packageJson;
|
|
2029
|
-
}
|
|
2283
|
+
};
|
|
2030
2284
|
|
|
2031
2285
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
2032
2286
|
|
|
2033
2287
|
|
|
2034
2288
|
// ../build-tools/src/utilities/get-env.ts
|
|
2035
|
-
var getEnv =
|
|
2289
|
+
var getEnv = (builder, options) => {
|
|
2036
2290
|
return {
|
|
2037
2291
|
STORM_BUILD: builder,
|
|
2038
2292
|
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
@@ -2043,42 +2297,54 @@ var getEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (builder, opti
|
|
|
2043
2297
|
STORM_TARGET: JSON.stringify(options.target),
|
|
2044
2298
|
...options.env
|
|
2045
2299
|
};
|
|
2046
|
-
}
|
|
2300
|
+
};
|
|
2047
2301
|
|
|
2048
2302
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
2049
2303
|
|
|
2050
2304
|
|
|
2051
2305
|
|
|
2052
2306
|
// ../build-tools/src/utilities/task-graph.ts
|
|
2307
|
+
|
|
2308
|
+
|
|
2309
|
+
|
|
2053
2310
|
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
2054
2311
|
|
|
2055
2312
|
// ../esbuild/src/assets.ts
|
|
2056
2313
|
async function copyBuildAssets(context) {
|
|
2057
2314
|
if (_optionalChain([context, 'access', _121 => _121.result, 'optionalAccess', _122 => _122.errors, 'access', _123 => _123.length]) === 0) {
|
|
2058
|
-
writeDebug(
|
|
2315
|
+
writeDebug(
|
|
2316
|
+
` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
|
|
2317
|
+
context.workspaceConfig
|
|
2318
|
+
);
|
|
2059
2319
|
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
2060
|
-
await copyAssets(
|
|
2320
|
+
await copyAssets(
|
|
2321
|
+
context.workspaceConfig,
|
|
2322
|
+
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
2323
|
+
context.outputPath,
|
|
2324
|
+
context.options.projectRoot,
|
|
2325
|
+
context.sourceRoot,
|
|
2326
|
+
true,
|
|
2327
|
+
false
|
|
2328
|
+
);
|
|
2061
2329
|
stopwatch();
|
|
2062
2330
|
}
|
|
2063
2331
|
return context;
|
|
2064
2332
|
}
|
|
2065
|
-
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
2066
2333
|
|
|
2067
2334
|
// ../esbuild/src/clean.ts
|
|
2068
2335
|
|
|
2069
2336
|
async function cleanDirectories(directory) {
|
|
2070
|
-
await _promises.rm.call(void 0, directory, {
|
|
2071
|
-
recursive: true,
|
|
2072
|
-
force: true
|
|
2073
|
-
});
|
|
2337
|
+
await _promises.rm.call(void 0, directory, { recursive: true, force: true });
|
|
2074
2338
|
}
|
|
2075
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
2076
2339
|
|
|
2077
2340
|
// ../esbuild/src/context.ts
|
|
2078
2341
|
|
|
2079
2342
|
|
|
2080
2343
|
|
|
2081
2344
|
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
|
|
2082
2348
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
2083
2349
|
|
|
2084
2350
|
// ../esbuild/src/config.ts
|
|
@@ -2132,43 +2398,46 @@ function resolvePathsConfig(options, cwd, projectRoot) {
|
|
|
2132
2398
|
if (_optionalChain([options, 'optionalAccess', _124 => _124.compilerOptions, 'optionalAccess', _125 => _125.paths])) {
|
|
2133
2399
|
const paths = Object.entries(options.compilerOptions.paths);
|
|
2134
2400
|
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
2135
|
-
return [
|
|
2136
|
-
key,
|
|
2137
|
-
paths2.map((v) => path4.default.resolve(cwd, v))
|
|
2138
|
-
];
|
|
2401
|
+
return [key, paths2.map((v) => path4.default.resolve(cwd, v))];
|
|
2139
2402
|
});
|
|
2140
2403
|
return Object.fromEntries(resolvedPaths);
|
|
2141
2404
|
}
|
|
2142
2405
|
if (options.extends) {
|
|
2143
|
-
const extendsPath = path4.default.resolve(
|
|
2406
|
+
const extendsPath = path4.default.resolve(
|
|
2407
|
+
projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends)
|
|
2408
|
+
);
|
|
2144
2409
|
const extendsDir = path4.default.dirname(extendsPath);
|
|
2145
|
-
const extendsConfig =
|
|
2410
|
+
const extendsConfig = _chunk3RG5ZIWIjs.__require.call(void 0, extendsPath);
|
|
2146
2411
|
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
2147
2412
|
}
|
|
2148
2413
|
return [];
|
|
2149
2414
|
}
|
|
2150
|
-
|
|
2151
|
-
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context) => ({
|
|
2415
|
+
var resolvePathsPlugin = (context) => ({
|
|
2152
2416
|
name: "storm:resolve-paths",
|
|
2153
2417
|
setup(build3) {
|
|
2154
|
-
const parentTsConfig = build3.initialOptions.tsconfig ?
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2418
|
+
const parentTsConfig = build3.initialOptions.tsconfig ? _chunk3RG5ZIWIjs.__require.call(void 0, joinPaths(
|
|
2419
|
+
context.workspaceConfig.workspaceRoot,
|
|
2420
|
+
build3.initialOptions.tsconfig.replace(
|
|
2421
|
+
context.workspaceConfig.workspaceRoot,
|
|
2422
|
+
""
|
|
2423
|
+
)
|
|
2424
|
+
)) : _chunk3RG5ZIWIjs.__require.call(void 0, joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
2425
|
+
const resolvedTsPaths = resolvePathsConfig(
|
|
2426
|
+
parentTsConfig,
|
|
2427
|
+
context.workspaceConfig.workspaceRoot,
|
|
2428
|
+
context.options.projectRoot
|
|
2429
|
+
);
|
|
2430
|
+
const packagesRegex = new RegExp(
|
|
2431
|
+
`^(${Object.keys(resolvedTsPaths).join("|")})$`
|
|
2432
|
+
);
|
|
2433
|
+
build3.onResolve({ filter: packagesRegex }, (args) => {
|
|
2160
2434
|
if (_optionalChain([build3, 'access', _126 => _126.initialOptions, 'access', _127 => _127.external, 'optionalAccess', _128 => _128.includes, 'call', _129 => _129(args.path)])) {
|
|
2161
|
-
return {
|
|
2162
|
-
path: args.path,
|
|
2163
|
-
external: true
|
|
2164
|
-
};
|
|
2435
|
+
return { path: args.path, external: true };
|
|
2165
2436
|
}
|
|
2166
|
-
return {
|
|
2167
|
-
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
2168
|
-
};
|
|
2437
|
+
return { path: `${resolvedTsPaths[args.path][0]}/index.ts` };
|
|
2169
2438
|
});
|
|
2170
2439
|
}
|
|
2171
|
-
})
|
|
2440
|
+
});
|
|
2172
2441
|
|
|
2173
2442
|
// ../esbuild/src/context.ts
|
|
2174
2443
|
async function resolveContext(userOptions) {
|
|
@@ -2185,7 +2454,11 @@ async function resolveContext(userOptions) {
|
|
|
2185
2454
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
2186
2455
|
exitOnError: true
|
|
2187
2456
|
});
|
|
2188
|
-
const projectJsonPath = joinPaths(
|
|
2457
|
+
const projectJsonPath = joinPaths(
|
|
2458
|
+
workspaceRoot3.dir,
|
|
2459
|
+
projectRoot,
|
|
2460
|
+
"project.json"
|
|
2461
|
+
);
|
|
2189
2462
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2190
2463
|
throw new Error("Cannot find project.json configuration");
|
|
2191
2464
|
}
|
|
@@ -2194,11 +2467,17 @@ async function resolveContext(userOptions) {
|
|
|
2194
2467
|
const projectName = projectJson.name || userOptions.name;
|
|
2195
2468
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2196
2469
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _130 => _130.projects, 'optionalAccess', _131 => _131[projectName]])) {
|
|
2197
|
-
throw new Error(
|
|
2470
|
+
throw new Error(
|
|
2471
|
+
"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."
|
|
2472
|
+
);
|
|
2198
2473
|
}
|
|
2199
2474
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
2200
2475
|
options.name ??= projectName;
|
|
2201
|
-
const packageJsonPath = joinPaths(
|
|
2476
|
+
const packageJsonPath = joinPaths(
|
|
2477
|
+
workspaceRoot3.dir,
|
|
2478
|
+
options.projectRoot,
|
|
2479
|
+
"package.json"
|
|
2480
|
+
);
|
|
2202
2481
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2203
2482
|
throw new Error("Cannot find package.json configuration");
|
|
2204
2483
|
}
|
|
@@ -2232,7 +2511,11 @@ async function resolveContext(userOptions) {
|
|
|
2232
2511
|
projectName,
|
|
2233
2512
|
projectGraph,
|
|
2234
2513
|
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || joinPaths(resolvedOptions.projectRoot, "src"),
|
|
2235
|
-
outputPath: resolvedOptions.outputPath || joinPaths(
|
|
2514
|
+
outputPath: resolvedOptions.outputPath || joinPaths(
|
|
2515
|
+
workspaceConfig.workspaceRoot,
|
|
2516
|
+
"dist",
|
|
2517
|
+
resolvedOptions.projectRoot
|
|
2518
|
+
),
|
|
2236
2519
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2237
2520
|
};
|
|
2238
2521
|
context.options.esbuildPlugins = [
|
|
@@ -2241,7 +2524,6 @@ async function resolveContext(userOptions) {
|
|
|
2241
2524
|
];
|
|
2242
2525
|
return context;
|
|
2243
2526
|
}
|
|
2244
|
-
_chunk3GQAWCBQjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
2245
2527
|
|
|
2246
2528
|
// ../esbuild/src/package-json.ts
|
|
2247
2529
|
|
|
@@ -2251,17 +2533,39 @@ async function generatePackageJson(context) {
|
|
|
2251
2533
|
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, joinPaths(context.options.projectRoot, "package.json"))) {
|
|
2252
2534
|
writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
2253
2535
|
const stopwatch = getStopwatch("Write package.json file");
|
|
2254
|
-
const packageJsonPath = joinPaths(
|
|
2536
|
+
const packageJsonPath = joinPaths(
|
|
2537
|
+
context.options.projectRoot,
|
|
2538
|
+
"project.json"
|
|
2539
|
+
);
|
|
2255
2540
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2256
2541
|
throw new Error("Cannot find package.json configuration");
|
|
2257
2542
|
}
|
|
2258
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
2543
|
+
const packageJsonFile = await _promises2.default.readFile(
|
|
2544
|
+
joinPaths(
|
|
2545
|
+
context.workspaceConfig.workspaceRoot,
|
|
2546
|
+
context.options.projectRoot,
|
|
2547
|
+
"package.json"
|
|
2548
|
+
),
|
|
2549
|
+
"utf8"
|
|
2550
|
+
);
|
|
2259
2551
|
let packageJson = JSON.parse(packageJsonFile);
|
|
2260
2552
|
if (!packageJson) {
|
|
2261
2553
|
throw new Error("Cannot find package.json configuration file");
|
|
2262
2554
|
}
|
|
2263
|
-
packageJson = await addPackageDependencies(
|
|
2264
|
-
|
|
2555
|
+
packageJson = await addPackageDependencies(
|
|
2556
|
+
context.workspaceConfig.workspaceRoot,
|
|
2557
|
+
context.options.projectRoot,
|
|
2558
|
+
context.projectName,
|
|
2559
|
+
packageJson
|
|
2560
|
+
);
|
|
2561
|
+
packageJson = await addWorkspacePackageJsonFields(
|
|
2562
|
+
context.workspaceConfig,
|
|
2563
|
+
context.options.projectRoot,
|
|
2564
|
+
context.sourceRoot,
|
|
2565
|
+
context.projectName,
|
|
2566
|
+
false,
|
|
2567
|
+
packageJson
|
|
2568
|
+
);
|
|
2265
2569
|
if (context.options.entry) {
|
|
2266
2570
|
packageJson.exports ??= {};
|
|
2267
2571
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
@@ -2331,20 +2635,25 @@ async function generatePackageJson(context) {
|
|
|
2331
2635
|
if (isDts) {
|
|
2332
2636
|
packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
|
|
2333
2637
|
}
|
|
2334
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
2335
|
-
|
|
2336
|
-
ret[key.replace("/index", "")]
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2638
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
2639
|
+
(ret, key) => {
|
|
2640
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
2641
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
2642
|
+
}
|
|
2643
|
+
return ret;
|
|
2644
|
+
},
|
|
2645
|
+
packageJson.exports
|
|
2646
|
+
);
|
|
2340
2647
|
}
|
|
2341
2648
|
}
|
|
2342
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
2649
|
+
await _devkit.writeJsonFile.call(void 0,
|
|
2650
|
+
joinPaths(context.outputPath, "package.json"),
|
|
2651
|
+
packageJson
|
|
2652
|
+
);
|
|
2343
2653
|
stopwatch();
|
|
2344
2654
|
}
|
|
2345
2655
|
return context;
|
|
2346
2656
|
}
|
|
2347
|
-
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
2348
2657
|
|
|
2349
2658
|
// ../esbuild/src/plugins/deps-check.ts
|
|
2350
2659
|
|
|
@@ -2373,16 +2682,12 @@ var unusedIgnore = [
|
|
|
2373
2682
|
// these are indirectly used by build
|
|
2374
2683
|
"buffer"
|
|
2375
2684
|
];
|
|
2376
|
-
var missingIgnore = [
|
|
2377
|
-
|
|
2378
|
-
"@prisma/client",
|
|
2379
|
-
"ts-toolbelt"
|
|
2380
|
-
];
|
|
2381
|
-
var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bundle) => ({
|
|
2685
|
+
var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
|
|
2686
|
+
var depsCheckPlugin = (bundle) => ({
|
|
2382
2687
|
name: "storm:deps-check",
|
|
2383
2688
|
setup(build3) {
|
|
2384
2689
|
const pkgJsonPath = path4.default.join(process.cwd(), "package.json");
|
|
2385
|
-
const pkgContents =
|
|
2690
|
+
const pkgContents = _chunk3RG5ZIWIjs.__require.call(void 0, pkgJsonPath);
|
|
2386
2691
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
2387
2692
|
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
2388
2693
|
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
@@ -2392,9 +2697,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
2392
2697
|
];
|
|
2393
2698
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2394
2699
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2395
|
-
build3.onResolve({
|
|
2396
|
-
filter: onlyPackages
|
|
2397
|
-
}, (args) => {
|
|
2700
|
+
build3.onResolve({ filter: onlyPackages }, (args) => {
|
|
2398
2701
|
if (args.importer.includes(process.cwd())) {
|
|
2399
2702
|
if (args.path[0] === "@") {
|
|
2400
2703
|
const [org, pkg] = args.path.split("/");
|
|
@@ -2404,19 +2707,13 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
2404
2707
|
collectedDependencies.add(pkg);
|
|
2405
2708
|
}
|
|
2406
2709
|
}
|
|
2407
|
-
return {
|
|
2408
|
-
external: true
|
|
2409
|
-
};
|
|
2710
|
+
return { external: true };
|
|
2410
2711
|
});
|
|
2411
2712
|
build3.onEnd(() => {
|
|
2412
|
-
const unusedDependencies = [
|
|
2413
|
-
...dependencies
|
|
2414
|
-
].filter((dep) => {
|
|
2713
|
+
const unusedDependencies = [...dependencies].filter((dep) => {
|
|
2415
2714
|
return !collectedDependencies.has(dep) || _module.builtinModules.includes(dep);
|
|
2416
2715
|
});
|
|
2417
|
-
const missingDependencies = [
|
|
2418
|
-
...collectedDependencies
|
|
2419
|
-
].filter((dep) => {
|
|
2716
|
+
const missingDependencies = [...collectedDependencies].filter((dep) => {
|
|
2420
2717
|
return !dependencies.includes(dep) && !_module.builtinModules.includes(dep);
|
|
2421
2718
|
});
|
|
2422
2719
|
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
@@ -2425,8 +2722,12 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
2425
2722
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
2426
2723
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
2427
2724
|
});
|
|
2428
|
-
writeWarning(
|
|
2429
|
-
|
|
2725
|
+
writeWarning(
|
|
2726
|
+
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
2727
|
+
);
|
|
2728
|
+
writeError(
|
|
2729
|
+
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
2730
|
+
);
|
|
2430
2731
|
if (filteredMissingDeps.length > 0) {
|
|
2431
2732
|
throw new Error(`Missing dependencies detected - please install them:
|
|
2432
2733
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -2434,12 +2735,15 @@ ${JSON.stringify(filteredMissingDeps)}
|
|
|
2434
2735
|
}
|
|
2435
2736
|
});
|
|
2436
2737
|
}
|
|
2437
|
-
})
|
|
2738
|
+
});
|
|
2438
2739
|
|
|
2439
2740
|
// ../esbuild/src/tsup.ts
|
|
2440
2741
|
var _tsup = require('tsup');
|
|
2441
2742
|
async function executeTsup(context) {
|
|
2442
|
-
writeDebug(
|
|
2743
|
+
writeDebug(
|
|
2744
|
+
` \u{1F680} Running ${context.options.name} build`,
|
|
2745
|
+
context.workspaceConfig
|
|
2746
|
+
);
|
|
2443
2747
|
const stopwatch = getStopwatch(`${context.options.name} build`);
|
|
2444
2748
|
await _tsup.build.call(void 0, {
|
|
2445
2749
|
...context.options,
|
|
@@ -2449,21 +2753,30 @@ async function executeTsup(context) {
|
|
|
2449
2753
|
stopwatch();
|
|
2450
2754
|
return context;
|
|
2451
2755
|
}
|
|
2452
|
-
_chunk3GQAWCBQjs.__name.call(void 0, executeTsup, "executeTsup");
|
|
2453
2756
|
|
|
2454
2757
|
// ../esbuild/src/build.ts
|
|
2455
2758
|
async function reportResults(context) {
|
|
2456
2759
|
if (_optionalChain([context, 'access', _132 => _132.result, 'optionalAccess', _133 => _133.errors, 'access', _134 => _134.length]) === 0) {
|
|
2457
2760
|
if (context.result.warnings.length > 0) {
|
|
2458
|
-
writeWarning(
|
|
2761
|
+
writeWarning(
|
|
2762
|
+
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
2763
|
+
context.workspaceConfig
|
|
2764
|
+
);
|
|
2459
2765
|
}
|
|
2460
|
-
writeSuccess(
|
|
2766
|
+
writeSuccess(
|
|
2767
|
+
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
2768
|
+
context.workspaceConfig
|
|
2769
|
+
);
|
|
2461
2770
|
} else if (_optionalChain([context, 'access', _135 => _135.result, 'optionalAccess', _136 => _136.errors]) && _optionalChain([context, 'access', _137 => _137.result, 'optionalAccess', _138 => _138.errors, 'access', _139 => _139.length]) > 0) {
|
|
2462
|
-
writeError(
|
|
2463
|
-
|
|
2771
|
+
writeError(
|
|
2772
|
+
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
2773
|
+
context.workspaceConfig
|
|
2774
|
+
);
|
|
2775
|
+
throw new Error(
|
|
2776
|
+
`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
|
|
2777
|
+
);
|
|
2464
2778
|
}
|
|
2465
2779
|
}
|
|
2466
|
-
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
2467
2780
|
async function dependencyCheck(options) {
|
|
2468
2781
|
if (process.env.DEV === "true") {
|
|
2469
2782
|
return void 0;
|
|
@@ -2474,43 +2787,39 @@ async function dependencyCheck(options) {
|
|
|
2474
2787
|
const buildPromise = esbuild.build({
|
|
2475
2788
|
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
2476
2789
|
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
2477
|
-
ignore: [
|
|
2478
|
-
"./src/__tests__/**/*",
|
|
2479
|
-
"./tests/e2e/**/*",
|
|
2480
|
-
"./dist/**/*"
|
|
2481
|
-
],
|
|
2790
|
+
ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
|
|
2482
2791
|
gitignore: true
|
|
2483
2792
|
}),
|
|
2484
2793
|
logLevel: "silent",
|
|
2794
|
+
// there will be errors
|
|
2485
2795
|
bundle: true,
|
|
2796
|
+
// we bundle to get everything
|
|
2486
2797
|
write: false,
|
|
2798
|
+
// no need to write for analysis
|
|
2487
2799
|
outdir: "out",
|
|
2488
|
-
plugins: [
|
|
2489
|
-
depsCheckPlugin(options.bundle)
|
|
2490
|
-
]
|
|
2800
|
+
plugins: [depsCheckPlugin(options.bundle)]
|
|
2491
2801
|
});
|
|
2492
2802
|
await buildPromise.catch(() => {
|
|
2493
2803
|
});
|
|
2494
2804
|
return void 0;
|
|
2495
2805
|
}
|
|
2496
|
-
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
2497
2806
|
async function cleanOutputPath(context) {
|
|
2498
2807
|
if (context.clean !== false && context.outputPath) {
|
|
2499
|
-
writeDebug(
|
|
2808
|
+
writeDebug(
|
|
2809
|
+
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
2810
|
+
context.workspaceConfig
|
|
2811
|
+
);
|
|
2500
2812
|
const stopwatch = getStopwatch(`${context.options.name} output clean`);
|
|
2501
2813
|
await cleanDirectories(context.outputPath);
|
|
2502
2814
|
stopwatch();
|
|
2503
2815
|
}
|
|
2504
2816
|
return context;
|
|
2505
2817
|
}
|
|
2506
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
2507
2818
|
async function build2(options) {
|
|
2508
2819
|
writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
|
|
2509
2820
|
const stopwatch = getStopwatch("ESBuild pipeline");
|
|
2510
2821
|
try {
|
|
2511
|
-
const opts = Array.isArray(options) ? options : [
|
|
2512
|
-
options
|
|
2513
|
-
];
|
|
2822
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
2514
2823
|
if (opts.length === 0) {
|
|
2515
2824
|
throw new Error("No build options were provided");
|
|
2516
2825
|
}
|
|
@@ -2525,19 +2834,22 @@ async function build2(options) {
|
|
|
2525
2834
|
await reportResults(context);
|
|
2526
2835
|
writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
2527
2836
|
} catch (error) {
|
|
2528
|
-
writeFatal(
|
|
2837
|
+
writeFatal(
|
|
2838
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
2839
|
+
);
|
|
2529
2840
|
throw error;
|
|
2530
2841
|
} finally {
|
|
2531
2842
|
stopwatch();
|
|
2532
2843
|
}
|
|
2533
2844
|
}
|
|
2534
|
-
_chunk3GQAWCBQjs.__name.call(void 0, build2, "build");
|
|
2535
2845
|
|
|
2536
2846
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
2537
2847
|
async function esbuildExecutorFn(options, context, config) {
|
|
2538
2848
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
2539
2849
|
if (!_optionalChain([context, 'access', _140 => _140.projectsConfigurations, 'optionalAccess', _141 => _141.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _142 => _142.projectsConfigurations, 'access', _143 => _143.projects, 'access', _144 => _144[context.projectName], 'optionalAccess', _145 => _145.root])) {
|
|
2540
|
-
throw new Error(
|
|
2850
|
+
throw new Error(
|
|
2851
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
2852
|
+
);
|
|
2541
2853
|
}
|
|
2542
2854
|
await build2({
|
|
2543
2855
|
...options,
|
|
@@ -2551,20 +2863,21 @@ async function esbuildExecutorFn(options, context, config) {
|
|
|
2551
2863
|
success: true
|
|
2552
2864
|
};
|
|
2553
2865
|
}
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2866
|
+
var executor_default6 = withRunExecutor(
|
|
2867
|
+
"Storm ESBuild build",
|
|
2868
|
+
esbuildExecutorFn,
|
|
2869
|
+
{
|
|
2870
|
+
skipReadingConfig: false,
|
|
2871
|
+
hooks: {
|
|
2872
|
+
applyDefaultOptions: async (options, config) => {
|
|
2873
|
+
options.entry ??= ["src/index.ts"];
|
|
2874
|
+
options.outputPath ??= "dist/{projectRoot}";
|
|
2875
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
2876
|
+
return options;
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2566
2879
|
}
|
|
2567
|
-
|
|
2880
|
+
);
|
|
2568
2881
|
|
|
2569
2882
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
2570
2883
|
|
|
@@ -2587,31 +2900,38 @@ var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_fi
|
|
|
2587
2900
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
2588
2901
|
async function sizeLimitExecutorFn(options, context, config) {
|
|
2589
2902
|
if (!_optionalChain([context, 'optionalAccess', _154 => _154.projectName]) || !_optionalChain([context, 'access', _155 => _155.projectsConfigurations, 'optionalAccess', _156 => _156.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2590
|
-
throw new Error(
|
|
2903
|
+
throw new Error(
|
|
2904
|
+
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
2905
|
+
);
|
|
2591
2906
|
}
|
|
2592
2907
|
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
2593
|
-
_sizelimit2.default.call(void 0, [
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _157 => _157.projectsConfigurations, 'access', _158 => _158.projects, 'access', _159 => _159[context.projectName], 'optionalAccess', _160 => _160.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context, 'access', _161 => _161.projectsConfigurations, 'access', _162 => _162.projects, 'access', _163 => _163[context.projectName], 'optionalAccess', _164 => _164.root]), () => ( "./")), "src")))
|
|
2908
|
+
_sizelimit2.default.call(void 0, [_file2.default, _esbuild3.default, _esbuildwhy2.default], {
|
|
2909
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _157 => _157.projectsConfigurations, 'access', _158 => _158.projects, 'access', _159 => _159[context.projectName], 'optionalAccess', _160 => _160.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
2910
|
+
_nullishCoalesce(_optionalChain([context, 'access', _161 => _161.projectsConfigurations, 'access', _162 => _162.projects, 'access', _163 => _163[context.projectName], 'optionalAccess', _164 => _164.root]), () => ( "./")),
|
|
2911
|
+
"src"
|
|
2912
|
+
)))
|
|
2599
2913
|
}).then((result) => {
|
|
2600
|
-
writeInfo(
|
|
2914
|
+
writeInfo(
|
|
2915
|
+
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
2916
|
+
config
|
|
2917
|
+
);
|
|
2601
2918
|
});
|
|
2602
2919
|
return {
|
|
2603
2920
|
success: true
|
|
2604
2921
|
};
|
|
2605
2922
|
}
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2923
|
+
var executor_default7 = withRunExecutor(
|
|
2924
|
+
"Size-Limit Performance Test Executor",
|
|
2925
|
+
sizeLimitExecutorFn,
|
|
2926
|
+
{
|
|
2927
|
+
skipReadingConfig: false,
|
|
2928
|
+
hooks: {
|
|
2929
|
+
applyDefaultOptions: (options) => {
|
|
2930
|
+
return options;
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2613
2933
|
}
|
|
2614
|
-
|
|
2934
|
+
);
|
|
2615
2935
|
|
|
2616
2936
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
2617
2937
|
var _fsextra = require('fs-extra');
|
|
@@ -2621,33 +2941,36 @@ async function typiaExecutorFn(options, _, config) {
|
|
|
2621
2941
|
writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
2622
2942
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
2623
2943
|
}
|
|
2624
|
-
await Promise.all(
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2944
|
+
await Promise.all(
|
|
2945
|
+
options.entry.map((entry) => {
|
|
2946
|
+
writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
2947
|
+
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
2948
|
+
input: entry,
|
|
2949
|
+
output: options.outputPath,
|
|
2950
|
+
project: options.tsconfig
|
|
2951
|
+
});
|
|
2952
|
+
})
|
|
2953
|
+
);
|
|
2632
2954
|
return {
|
|
2633
2955
|
success: true
|
|
2634
2956
|
};
|
|
2635
2957
|
}
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2958
|
+
var executor_default8 = withRunExecutor(
|
|
2959
|
+
"Typia runtime validation generator",
|
|
2960
|
+
typiaExecutorFn,
|
|
2961
|
+
{
|
|
2962
|
+
skipReadingConfig: false,
|
|
2963
|
+
hooks: {
|
|
2964
|
+
applyDefaultOptions: (options) => {
|
|
2965
|
+
options.entry ??= ["{sourceRoot}/index.ts"];
|
|
2966
|
+
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
2967
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
2968
|
+
options.clean ??= true;
|
|
2969
|
+
return options;
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2649
2972
|
}
|
|
2650
|
-
|
|
2973
|
+
);
|
|
2651
2974
|
|
|
2652
2975
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
2653
2976
|
|
|
@@ -2655,75 +2978,116 @@ var _jiti = require('jiti');
|
|
|
2655
2978
|
async function unbuildExecutorFn(options, context, config) {
|
|
2656
2979
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2657
2980
|
if (!_optionalChain([context, 'access', _165 => _165.projectsConfigurations, 'optionalAccess', _166 => _166.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2658
|
-
throw new Error(
|
|
2981
|
+
throw new Error(
|
|
2982
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
2983
|
+
);
|
|
2659
2984
|
}
|
|
2660
2985
|
if (!context.projectsConfigurations.projects[context.projectName].root) {
|
|
2661
|
-
throw new Error(
|
|
2986
|
+
throw new Error(
|
|
2987
|
+
"The Build process failed because the project root is not valid. Please run this command from a workspace root directory."
|
|
2988
|
+
);
|
|
2662
2989
|
}
|
|
2663
2990
|
if (!context.projectsConfigurations.projects[context.projectName].sourceRoot) {
|
|
2664
|
-
throw new Error(
|
|
2991
|
+
throw new Error(
|
|
2992
|
+
"The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory."
|
|
2993
|
+
);
|
|
2665
2994
|
}
|
|
2666
2995
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
2667
|
-
fsCache: config.skipCache ? false : joinPaths(
|
|
2996
|
+
fsCache: config.skipCache ? false : joinPaths(
|
|
2997
|
+
config.workspaceRoot,
|
|
2998
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
2999
|
+
"jiti"
|
|
3000
|
+
),
|
|
2668
3001
|
interopDefault: true
|
|
2669
3002
|
});
|
|
2670
|
-
const stormUnbuild = await jiti.import(
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
}
|
|
2682
|
-
},
|
|
2683
|
-
rollup: {
|
|
2684
|
-
emitCJS: true,
|
|
2685
|
-
watch: false,
|
|
2686
|
-
dts: {
|
|
2687
|
-
respectExternal: true
|
|
3003
|
+
const stormUnbuild = await jiti.import(
|
|
3004
|
+
jiti.esmResolve("@storm-software/unbuild/build")
|
|
3005
|
+
);
|
|
3006
|
+
await stormUnbuild.build(
|
|
3007
|
+
_defu.defu.call(void 0,
|
|
3008
|
+
{
|
|
3009
|
+
...options,
|
|
3010
|
+
projectRoot: context.projectsConfigurations.projects[context.projectName].root,
|
|
3011
|
+
projectName: context.projectName,
|
|
3012
|
+
sourceRoot: context.projectsConfigurations.projects[context.projectName].sourceRoot,
|
|
3013
|
+
platform: options.platform
|
|
2688
3014
|
},
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
3015
|
+
{
|
|
3016
|
+
stubOptions: {
|
|
3017
|
+
jiti: {
|
|
3018
|
+
fsCache: config.skipCache ? false : joinPaths(
|
|
3019
|
+
config.workspaceRoot,
|
|
3020
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
3021
|
+
"jiti"
|
|
3022
|
+
)
|
|
3023
|
+
}
|
|
3024
|
+
},
|
|
3025
|
+
rollup: {
|
|
3026
|
+
emitCJS: true,
|
|
3027
|
+
watch: false,
|
|
3028
|
+
dts: {
|
|
3029
|
+
respectExternal: true
|
|
3030
|
+
},
|
|
3031
|
+
esbuild: {
|
|
3032
|
+
target: options.target,
|
|
3033
|
+
format: "esm",
|
|
3034
|
+
platform: options.platform,
|
|
3035
|
+
minify: _nullishCoalesce(options.minify, () => ( !options.debug)),
|
|
3036
|
+
sourcemap: _nullishCoalesce(options.sourcemap, () => ( options.debug)),
|
|
3037
|
+
treeShaking: options.treeShaking
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
2696
3040
|
}
|
|
2697
|
-
|
|
2698
|
-
|
|
3041
|
+
)
|
|
3042
|
+
);
|
|
2699
3043
|
return {
|
|
2700
3044
|
success: true
|
|
2701
3045
|
};
|
|
2702
3046
|
}
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
options
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
"
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
3047
|
+
var executor_default9 = withRunExecutor(
|
|
3048
|
+
"TypeScript Unbuild build",
|
|
3049
|
+
unbuildExecutorFn,
|
|
3050
|
+
{
|
|
3051
|
+
skipReadingConfig: false,
|
|
3052
|
+
hooks: {
|
|
3053
|
+
applyDefaultOptions: async (options, config) => {
|
|
3054
|
+
options.debug ??= false;
|
|
3055
|
+
options.treeShaking ??= true;
|
|
3056
|
+
options.buildOnly ??= false;
|
|
3057
|
+
options.platform ??= "neutral";
|
|
3058
|
+
options.entry ??= ["{sourceRoot}"];
|
|
3059
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
3060
|
+
return options;
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
2718
3063
|
}
|
|
2719
|
-
|
|
3064
|
+
);
|
|
2720
3065
|
|
|
2721
3066
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2722
3067
|
|
|
2723
3068
|
|
|
3069
|
+
|
|
3070
|
+
|
|
3071
|
+
|
|
3072
|
+
|
|
3073
|
+
|
|
2724
3074
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
2725
3075
|
|
|
3076
|
+
|
|
3077
|
+
|
|
3078
|
+
|
|
3079
|
+
|
|
3080
|
+
|
|
3081
|
+
|
|
3082
|
+
|
|
3083
|
+
|
|
3084
|
+
|
|
3085
|
+
|
|
2726
3086
|
var _projectnameandrootutils = require('@nx/devkit/src/generators/project-name-and-root-utils');
|
|
3087
|
+
|
|
3088
|
+
|
|
3089
|
+
|
|
3090
|
+
|
|
2727
3091
|
var _js = require('@nx/js');
|
|
2728
3092
|
var _init = require('@nx/js/src/generators/init/init'); var _init2 = _interopRequireDefault(_init);
|
|
2729
3093
|
var _generator = require('@nx/js/src/generators/setup-verdaccio/generator'); var _generator2 = _interopRequireDefault(_generator);
|
|
@@ -2766,23 +3130,27 @@ var ProjectTagConstants = {
|
|
|
2766
3130
|
TAG_ID: "plugin"
|
|
2767
3131
|
}
|
|
2768
3132
|
};
|
|
2769
|
-
var formatProjectTag =
|
|
3133
|
+
var formatProjectTag = (variant, value) => {
|
|
2770
3134
|
return `${variant}:${value}`;
|
|
2771
|
-
}
|
|
2772
|
-
var hasProjectTag =
|
|
3135
|
+
};
|
|
3136
|
+
var hasProjectTag = (project, variant) => {
|
|
2773
3137
|
project.tags = _nullishCoalesce(project.tags, () => ( []));
|
|
2774
3138
|
const prefix = formatProjectTag(variant, "");
|
|
2775
|
-
return project.tags.some(
|
|
2776
|
-
|
|
2777
|
-
|
|
3139
|
+
return project.tags.some(
|
|
3140
|
+
(tag) => tag.startsWith(prefix) && tag.length > prefix.length
|
|
3141
|
+
);
|
|
3142
|
+
};
|
|
3143
|
+
var addProjectTag = (project, variant, value, options = {
|
|
2778
3144
|
overwrite: false
|
|
2779
3145
|
}) => {
|
|
2780
3146
|
project.tags = _nullishCoalesce(project.tags, () => ( []));
|
|
2781
3147
|
if (options.overwrite || !hasProjectTag(project, variant)) {
|
|
2782
|
-
project.tags = project.tags.filter(
|
|
3148
|
+
project.tags = project.tags.filter(
|
|
3149
|
+
(tag) => !tag.startsWith(formatProjectTag(variant, ""))
|
|
3150
|
+
);
|
|
2783
3151
|
project.tags.push(formatProjectTag(variant, value));
|
|
2784
3152
|
}
|
|
2785
|
-
}
|
|
3153
|
+
};
|
|
2786
3154
|
|
|
2787
3155
|
// ../workspace-tools/src/utils/versions.ts
|
|
2788
3156
|
var typesNodeVersion = "20.9.0";
|
|
@@ -2792,24 +3160,27 @@ var pnpmVersion = "8.10.2";
|
|
|
2792
3160
|
|
|
2793
3161
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
2794
3162
|
async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
2795
|
-
const normalized = await normalizeOptions(tree, {
|
|
2796
|
-
...options
|
|
2797
|
-
});
|
|
3163
|
+
const normalized = await normalizeOptions(tree, { ...options });
|
|
2798
3164
|
const tasks = [];
|
|
2799
|
-
tasks.push(
|
|
2800
|
-
|
|
2801
|
-
tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
|
|
2802
|
-
}));
|
|
2803
|
-
tasks.push(_devkit.addDependenciesToPackageJson.call(void 0, tree, {}, {
|
|
2804
|
-
"@storm-software/workspace-tools": "latest",
|
|
2805
|
-
"@storm-software/testing-tools": "latest",
|
|
2806
|
-
..._nullishCoalesce(options.devDependencies, () => ( {}))
|
|
2807
|
-
}));
|
|
2808
|
-
if (normalized.publishable) {
|
|
2809
|
-
tasks.push(await _generator2.default.call(void 0, tree, {
|
|
3165
|
+
tasks.push(
|
|
3166
|
+
await _init2.default.call(void 0, tree, {
|
|
2810
3167
|
...normalized,
|
|
2811
|
-
|
|
2812
|
-
})
|
|
3168
|
+
tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
|
|
3169
|
+
})
|
|
3170
|
+
);
|
|
3171
|
+
tasks.push(
|
|
3172
|
+
_devkit.addDependenciesToPackageJson.call(void 0,
|
|
3173
|
+
tree,
|
|
3174
|
+
{},
|
|
3175
|
+
{
|
|
3176
|
+
"@storm-software/workspace-tools": "latest",
|
|
3177
|
+
"@storm-software/testing-tools": "latest",
|
|
3178
|
+
..._nullishCoalesce(options.devDependencies, () => ( {}))
|
|
3179
|
+
}
|
|
3180
|
+
)
|
|
3181
|
+
);
|
|
3182
|
+
if (normalized.publishable) {
|
|
3183
|
+
tasks.push(await _generator2.default.call(void 0, tree, { ...normalized, skipFormat: true }));
|
|
2813
3184
|
}
|
|
2814
3185
|
const projectConfig = {
|
|
2815
3186
|
root: normalized.directory,
|
|
@@ -2818,13 +3189,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2818
3189
|
targets: {
|
|
2819
3190
|
build: {
|
|
2820
3191
|
executor: options.buildExecutor,
|
|
2821
|
-
outputs: [
|
|
2822
|
-
"{options.outputPath}"
|
|
2823
|
-
],
|
|
3192
|
+
outputs: ["{options.outputPath}"],
|
|
2824
3193
|
options: {
|
|
2825
|
-
entry: [
|
|
2826
|
-
joinPaths(normalized.projectRoot, "src", "index.ts")
|
|
2827
|
-
],
|
|
3194
|
+
entry: [joinPaths(normalized.projectRoot, "src", "index.ts")],
|
|
2828
3195
|
outputPath: getOutputPath(normalized),
|
|
2829
3196
|
tsconfig: joinPaths(normalized.projectRoot, "tsconfig.json"),
|
|
2830
3197
|
project: joinPaths(normalized.projectRoot, "package.json"),
|
|
@@ -2859,9 +3226,12 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2859
3226
|
if (options.platform) {
|
|
2860
3227
|
projectConfig.targets.build.options.platform = options.platform === "worker" ? "node" : options.platform;
|
|
2861
3228
|
}
|
|
2862
|
-
addProjectTag(
|
|
2863
|
-
|
|
2864
|
-
|
|
3229
|
+
addProjectTag(
|
|
3230
|
+
projectConfig,
|
|
3231
|
+
ProjectTagConstants.Platform.TAG_ID,
|
|
3232
|
+
options.platform === "node" ? ProjectTagConstants.Platform.NODE : options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL,
|
|
3233
|
+
{ overwrite: false }
|
|
3234
|
+
);
|
|
2865
3235
|
createProjectTsConfigJson(tree, normalized);
|
|
2866
3236
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
2867
3237
|
let repository = {
|
|
@@ -2938,7 +3308,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2938
3308
|
}));
|
|
2939
3309
|
}
|
|
2940
3310
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2941
|
-
joinPaths(
|
|
3311
|
+
joinPaths(
|
|
3312
|
+
normalized.projectRoot,
|
|
3313
|
+
"./src",
|
|
3314
|
+
`index.${normalized.js ? "js" : "ts"}`
|
|
3315
|
+
)
|
|
2942
3316
|
]);
|
|
2943
3317
|
_js.addTsConfigPath.call(void 0, tree, joinPaths(normalized.importPath, "/*"), [
|
|
2944
3318
|
joinPaths(normalized.projectRoot, "./src", "/*")
|
|
@@ -2966,25 +3340,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2966
3340
|
outDir: `${_devkit.offsetFromRoot.call(void 0, normalized.projectRoot)}dist/out-tsc`
|
|
2967
3341
|
},
|
|
2968
3342
|
files: [],
|
|
2969
|
-
include: [
|
|
2970
|
-
|
|
2971
|
-
"src/**/*.js"
|
|
2972
|
-
],
|
|
2973
|
-
exclude: [
|
|
2974
|
-
"jest.config.ts",
|
|
2975
|
-
"src/**/*.spec.ts",
|
|
2976
|
-
"src/**/*.test.ts"
|
|
2977
|
-
]
|
|
3343
|
+
include: ["src/**/*.ts", "src/**/*.js"],
|
|
3344
|
+
exclude: ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
|
|
2978
3345
|
});
|
|
2979
3346
|
}
|
|
2980
3347
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2981
3348
|
return null;
|
|
2982
3349
|
}
|
|
2983
|
-
_chunk3GQAWCBQjs.__name.call(void 0, typeScriptLibraryGeneratorFn, "typeScriptLibraryGeneratorFn");
|
|
2984
3350
|
function getOutputPath(options) {
|
|
2985
|
-
const parts = [
|
|
2986
|
-
"dist"
|
|
2987
|
-
];
|
|
3351
|
+
const parts = ["dist"];
|
|
2988
3352
|
if (options.projectRoot === ".") {
|
|
2989
3353
|
parts.push(options.name);
|
|
2990
3354
|
} else {
|
|
@@ -2992,7 +3356,6 @@ function getOutputPath(options) {
|
|
|
2992
3356
|
}
|
|
2993
3357
|
return joinPaths(...parts);
|
|
2994
3358
|
}
|
|
2995
|
-
_chunk3GQAWCBQjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2996
3359
|
function createProjectTsConfigJson(tree, options) {
|
|
2997
3360
|
const tsconfig = {
|
|
2998
3361
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
@@ -3003,9 +3366,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
3003
3366
|
noEmit: true,
|
|
3004
3367
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _179 => _179.tsconfigOptions, 'optionalAccess', _180 => _180.compilerOptions]), () => ( {}))
|
|
3005
3368
|
},
|
|
3006
|
-
files: [
|
|
3007
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _181 => _181.tsconfigOptions, 'optionalAccess', _182 => _182.files]), () => ( []))
|
|
3008
|
-
],
|
|
3369
|
+
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _181 => _181.tsconfigOptions, 'optionalAccess', _182 => _182.files]), () => ( []))],
|
|
3009
3370
|
include: [
|
|
3010
3371
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _183 => _183.tsconfigOptions, 'optionalAccess', _184 => _184.include]), () => ( [])),
|
|
3011
3372
|
"src/**/*.ts",
|
|
@@ -3021,7 +3382,6 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
3021
3382
|
};
|
|
3022
3383
|
_devkit.writeJson.call(void 0, tree, joinPaths(options.projectRoot, "tsconfig.json"), tsconfig);
|
|
3023
3384
|
}
|
|
3024
|
-
_chunk3GQAWCBQjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
3025
3385
|
async function normalizeOptions(tree, options, config) {
|
|
3026
3386
|
let importPath = options.importPath;
|
|
3027
3387
|
if (!importPath && _optionalChain([config, 'optionalAccess', _187 => _187.namespace])) {
|
|
@@ -3029,7 +3389,9 @@ async function normalizeOptions(tree, options, config) {
|
|
|
3029
3389
|
}
|
|
3030
3390
|
if (options.publishable) {
|
|
3031
3391
|
if (!importPath) {
|
|
3032
|
-
throw new Error(
|
|
3392
|
+
throw new Error(
|
|
3393
|
+
`For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`
|
|
3394
|
+
);
|
|
3033
3395
|
}
|
|
3034
3396
|
}
|
|
3035
3397
|
let bundler = "tsc";
|
|
@@ -3038,7 +3400,12 @@ async function normalizeOptions(tree, options, config) {
|
|
|
3038
3400
|
}
|
|
3039
3401
|
const { Linter } = _devkit.ensurePackage.call(void 0, "@nx/eslint", nxVersion);
|
|
3040
3402
|
const rootProject = false;
|
|
3041
|
-
const {
|
|
3403
|
+
const {
|
|
3404
|
+
projectName,
|
|
3405
|
+
names: projectNames,
|
|
3406
|
+
projectRoot,
|
|
3407
|
+
importPath: normalizedImportPath
|
|
3408
|
+
} = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, tree, {
|
|
3042
3409
|
name: options.name,
|
|
3043
3410
|
projectType: "library",
|
|
3044
3411
|
directory: options.directory,
|
|
@@ -3075,11 +3442,16 @@ async function normalizeOptions(tree, options, config) {
|
|
|
3075
3442
|
shouldUseSwcJest: false
|
|
3076
3443
|
};
|
|
3077
3444
|
}
|
|
3078
|
-
_chunk3GQAWCBQjs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
3079
3445
|
|
|
3080
3446
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
3081
3447
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
3082
|
-
const filesDir = joinPaths(
|
|
3448
|
+
const filesDir = joinPaths(
|
|
3449
|
+
__dirname,
|
|
3450
|
+
"src",
|
|
3451
|
+
"generators",
|
|
3452
|
+
"browser-library",
|
|
3453
|
+
"files"
|
|
3454
|
+
);
|
|
3083
3455
|
const tsLibraryGeneratorOptions = {
|
|
3084
3456
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
3085
3457
|
platform: "browser",
|
|
@@ -3105,7 +3477,9 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
3105
3477
|
directory: schema.directory
|
|
3106
3478
|
};
|
|
3107
3479
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
3108
|
-
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
3480
|
+
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
3481
|
+
options.projectNames.projectFileName
|
|
3482
|
+
);
|
|
3109
3483
|
_devkit.generateFiles.call(void 0, tree, filesDir, options.projectRoot, {
|
|
3110
3484
|
...schema,
|
|
3111
3485
|
dot: ".",
|
|
@@ -3136,52 +3510,82 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
|
3136
3510
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3137
3511
|
return null;
|
|
3138
3512
|
}
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
options
|
|
3145
|
-
|
|
3146
|
-
|
|
3513
|
+
var generator_default = withRunGenerator(
|
|
3514
|
+
"TypeScript Library Creator (Browser Platform)",
|
|
3515
|
+
browserLibraryGeneratorFn,
|
|
3516
|
+
{
|
|
3517
|
+
hooks: {
|
|
3518
|
+
applyDefaultOptions: (options) => {
|
|
3519
|
+
options.description ??= "A library used by Storm Software to support browser applications";
|
|
3520
|
+
options.platform ??= "browser";
|
|
3521
|
+
return options;
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3147
3524
|
}
|
|
3148
|
-
|
|
3525
|
+
);
|
|
3149
3526
|
|
|
3150
3527
|
// ../workspace-tools/src/generators/config-schema/generator.ts
|
|
3151
3528
|
|
|
3152
3529
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
3153
3530
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
3154
|
-
writeInfo(
|
|
3155
|
-
|
|
3531
|
+
writeInfo(
|
|
3532
|
+
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
3533
|
+
config
|
|
3534
|
+
);
|
|
3535
|
+
writeTrace(
|
|
3536
|
+
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
3537
|
+
config
|
|
3538
|
+
);
|
|
3156
3539
|
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, stormWorkspaceConfigSchema, {
|
|
3157
3540
|
name: "StormWorkspaceConfiguration"
|
|
3158
3541
|
});
|
|
3159
3542
|
writeTrace(jsonSchema, config);
|
|
3160
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3543
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
3544
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _189 => _189.workspaceRoot]), () => ( findWorkspaceRoot())),
|
|
3545
|
+
_optionalChain([options, 'access', _190 => _190.outputFile, 'optionalAccess', _191 => _191.startsWith, 'call', _192 => _192("./")]) ? "" : "./"
|
|
3546
|
+
);
|
|
3547
|
+
writeTrace(
|
|
3548
|
+
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
3549
|
+
config
|
|
3550
|
+
);
|
|
3551
|
+
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
3165
3552
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3166
|
-
writeSuccess(
|
|
3553
|
+
writeSuccess(
|
|
3554
|
+
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
3555
|
+
config
|
|
3556
|
+
);
|
|
3167
3557
|
return {
|
|
3168
3558
|
success: true
|
|
3169
3559
|
};
|
|
3170
3560
|
}
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3561
|
+
var generator_default2 = withRunGenerator(
|
|
3562
|
+
"Configuration Schema Creator",
|
|
3563
|
+
configSchemaGeneratorFn,
|
|
3564
|
+
{
|
|
3565
|
+
hooks: {
|
|
3566
|
+
applyDefaultOptions: (options) => {
|
|
3567
|
+
options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
|
|
3568
|
+
return options;
|
|
3569
|
+
}
|
|
3570
|
+
}
|
|
3178
3571
|
}
|
|
3179
|
-
|
|
3572
|
+
);
|
|
3180
3573
|
|
|
3181
3574
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
3182
3575
|
|
|
3576
|
+
|
|
3577
|
+
|
|
3578
|
+
|
|
3579
|
+
|
|
3580
|
+
|
|
3183
3581
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
3184
|
-
const filesDir = joinPaths(
|
|
3582
|
+
const filesDir = joinPaths(
|
|
3583
|
+
__dirname,
|
|
3584
|
+
"src",
|
|
3585
|
+
"generators",
|
|
3586
|
+
"neutral-library",
|
|
3587
|
+
"files"
|
|
3588
|
+
);
|
|
3185
3589
|
const tsLibraryGeneratorOptions = {
|
|
3186
3590
|
...schema,
|
|
3187
3591
|
platform: "neutral",
|
|
@@ -3189,7 +3593,9 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
|
3189
3593
|
buildExecutor: "@storm-software/workspace-tools:unbuild"
|
|
3190
3594
|
};
|
|
3191
3595
|
const options = await normalizeOptions(tree, tsLibraryGeneratorOptions);
|
|
3192
|
-
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
3596
|
+
const { className, name, propertyName } = _devkit.names.call(void 0,
|
|
3597
|
+
options.projectNames.projectFileName
|
|
3598
|
+
);
|
|
3193
3599
|
_devkit.generateFiles.call(void 0, tree, filesDir, options.projectRoot, {
|
|
3194
3600
|
...schema,
|
|
3195
3601
|
dot: ".",
|
|
@@ -3210,21 +3616,35 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
|
3210
3616
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3211
3617
|
return null;
|
|
3212
3618
|
}
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
options
|
|
3219
|
-
|
|
3220
|
-
|
|
3619
|
+
var generator_default3 = withRunGenerator(
|
|
3620
|
+
"TypeScript Library Creator (Neutral Platform)",
|
|
3621
|
+
neutralLibraryGeneratorFn,
|
|
3622
|
+
{
|
|
3623
|
+
hooks: {
|
|
3624
|
+
applyDefaultOptions: (options) => {
|
|
3625
|
+
options.description ??= "A library used by Storm Software to support either browser or NodeJs applications";
|
|
3626
|
+
options.platform = "neutral";
|
|
3627
|
+
return options;
|
|
3628
|
+
}
|
|
3629
|
+
}
|
|
3221
3630
|
}
|
|
3222
|
-
|
|
3631
|
+
);
|
|
3223
3632
|
|
|
3224
3633
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
3225
3634
|
|
|
3635
|
+
|
|
3636
|
+
|
|
3637
|
+
|
|
3638
|
+
|
|
3639
|
+
|
|
3226
3640
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
3227
|
-
const filesDir = joinPaths(
|
|
3641
|
+
const filesDir = joinPaths(
|
|
3642
|
+
__dirname,
|
|
3643
|
+
"src",
|
|
3644
|
+
"generators",
|
|
3645
|
+
"node-library",
|
|
3646
|
+
"files"
|
|
3647
|
+
);
|
|
3228
3648
|
const tsLibraryGeneratorOptions = {
|
|
3229
3649
|
platform: "node",
|
|
3230
3650
|
devDependencies: {
|
|
@@ -3257,20 +3677,30 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
|
3257
3677
|
await _devkit.formatFiles.call(void 0, tree);
|
|
3258
3678
|
return null;
|
|
3259
3679
|
}
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
options
|
|
3266
|
-
|
|
3267
|
-
|
|
3680
|
+
var generator_default4 = withRunGenerator(
|
|
3681
|
+
"TypeScript Library Creator (NodeJs Platform)",
|
|
3682
|
+
nodeLibraryGeneratorFn,
|
|
3683
|
+
{
|
|
3684
|
+
hooks: {
|
|
3685
|
+
applyDefaultOptions: (options) => {
|
|
3686
|
+
options.description ??= "A library used by Storm Software to support NodeJs applications";
|
|
3687
|
+
options.platform ??= "node";
|
|
3688
|
+
return options;
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3268
3691
|
}
|
|
3269
|
-
|
|
3692
|
+
);
|
|
3270
3693
|
|
|
3271
3694
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
3272
3695
|
|
|
3273
3696
|
|
|
3697
|
+
|
|
3698
|
+
|
|
3699
|
+
|
|
3700
|
+
|
|
3701
|
+
|
|
3702
|
+
|
|
3703
|
+
|
|
3274
3704
|
async function presetGeneratorFn(tree, options) {
|
|
3275
3705
|
const projectRoot = ".";
|
|
3276
3706
|
options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
|
|
@@ -3484,14 +3914,30 @@ async function presetGeneratorFn(tree, options) {
|
|
|
3484
3914
|
"nx-cloud": "latest"
|
|
3485
3915
|
};
|
|
3486
3916
|
}
|
|
3487
|
-
await Promise.resolve(
|
|
3917
|
+
await Promise.resolve(
|
|
3918
|
+
_devkit.addDependenciesToPackageJson.call(void 0,
|
|
3919
|
+
tree,
|
|
3920
|
+
dependencies,
|
|
3921
|
+
{},
|
|
3922
|
+
_devkit.joinPathFragments.call(void 0, projectRoot, "package.json")
|
|
3923
|
+
)
|
|
3924
|
+
);
|
|
3488
3925
|
return null;
|
|
3489
3926
|
}
|
|
3490
|
-
|
|
3491
|
-
|
|
3927
|
+
var generator_default5 = withRunGenerator(
|
|
3928
|
+
"Storm Workspace Preset Generator",
|
|
3929
|
+
presetGeneratorFn
|
|
3930
|
+
);
|
|
3492
3931
|
|
|
3493
3932
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
3494
3933
|
|
|
3934
|
+
|
|
3935
|
+
|
|
3936
|
+
|
|
3937
|
+
|
|
3938
|
+
|
|
3939
|
+
|
|
3940
|
+
|
|
3495
3941
|
var _resolvelocalpackagedependencies = require('@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies');
|
|
3496
3942
|
var _updatelockfile = require('@nx/js/src/release/utils/update-lock-file');
|
|
3497
3943
|
|
|
@@ -3630,7 +4076,9 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
3630
4076
|
type: "select",
|
|
3631
4077
|
title: "Commit Type",
|
|
3632
4078
|
description: "Select the commit type that best describes your changes",
|
|
3633
|
-
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
|
|
4079
|
+
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
|
|
4080
|
+
(type) => DEFAULT_COMMIT_TYPES[type].hidden !== true
|
|
4081
|
+
).reduce((ret, type) => {
|
|
3634
4082
|
ret[type] = DEFAULT_COMMIT_TYPES[type];
|
|
3635
4083
|
return ret;
|
|
3636
4084
|
}, {}),
|
|
@@ -3670,7 +4118,7 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
3670
4118
|
type: "input",
|
|
3671
4119
|
title: "Breaking Changes (Details)",
|
|
3672
4120
|
description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
|
|
3673
|
-
when:
|
|
4121
|
+
when: (answers) => answers.isBreaking === true,
|
|
3674
4122
|
maxLength: 600,
|
|
3675
4123
|
minLength: 3
|
|
3676
4124
|
},
|
|
@@ -3684,25 +4132,28 @@ var DEFAULT_COMMIT_QUESTIONS = {
|
|
|
3684
4132
|
type: "input",
|
|
3685
4133
|
title: "Open Issue Affected (Details)",
|
|
3686
4134
|
description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
|
|
3687
|
-
when:
|
|
4135
|
+
when: (answers) => answers.isIssueAffected === true,
|
|
3688
4136
|
maxLength: 600,
|
|
3689
4137
|
minLength: 3
|
|
3690
4138
|
}
|
|
3691
4139
|
};
|
|
3692
|
-
var RuleConfigSeverity;
|
|
3693
|
-
(function(RuleConfigSeverity2) {
|
|
3694
|
-
RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
|
|
3695
|
-
RuleConfigSeverity2[RuleConfigSeverity2["Warning"] = 1] = "Warning";
|
|
3696
|
-
RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
|
|
3697
|
-
})(RuleConfigSeverity || (RuleConfigSeverity = {}));
|
|
3698
4140
|
|
|
3699
4141
|
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
3700
4142
|
|
|
3701
4143
|
|
|
3702
4144
|
var _config = require('nx/src/command-line/release/config/config');
|
|
4145
|
+
|
|
4146
|
+
|
|
4147
|
+
|
|
3703
4148
|
var _git = require('nx/src/command-line/release/utils/git');
|
|
4149
|
+
|
|
4150
|
+
|
|
4151
|
+
|
|
3704
4152
|
var _resolvesemverspecifier = require('nx/src/command-line/release/utils/resolve-semver-specifier');
|
|
3705
4153
|
var _semver = require('nx/src/command-line/release/utils/semver');
|
|
4154
|
+
|
|
4155
|
+
|
|
4156
|
+
|
|
3706
4157
|
var _versionlegacy = require('nx/src/command-line/release/version-legacy');
|
|
3707
4158
|
var _utils = require('nx/src/tasks-runner/utils');
|
|
3708
4159
|
var _semver3 = require('semver');
|
|
@@ -3765,11 +4216,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
3765
4216
|
$schema: {
|
|
3766
4217
|
title: "Toolchain",
|
|
3767
4218
|
description: "The type of toolchain to use for the build",
|
|
3768
|
-
enum: [
|
|
3769
|
-
"stable",
|
|
3770
|
-
"beta",
|
|
3771
|
-
"nightly"
|
|
3772
|
-
],
|
|
4219
|
+
enum: ["stable", "beta", "nightly"],
|
|
3773
4220
|
default: "stable"
|
|
3774
4221
|
},
|
|
3775
4222
|
$default: "stable"
|
|
@@ -3807,17 +4254,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
|
|
|
3807
4254
|
title: "Features",
|
|
3808
4255
|
type: "string",
|
|
3809
4256
|
description: "The features to build",
|
|
3810
|
-
oneOf: [
|
|
3811
|
-
{
|
|
3812
|
-
type: "string"
|
|
3813
|
-
},
|
|
3814
|
-
{
|
|
3815
|
-
type: "array",
|
|
3816
|
-
items: {
|
|
3817
|
-
type: "string"
|
|
3818
|
-
}
|
|
3819
|
-
}
|
|
3820
|
-
]
|
|
4257
|
+
oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }]
|
|
3821
4258
|
}
|
|
3822
4259
|
},
|
|
3823
4260
|
allFeatures: {
|
|
@@ -3837,10 +4274,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3837
4274
|
id: "TypeScriptBuildExecutorSchema",
|
|
3838
4275
|
title: "TypeScript Build Executor",
|
|
3839
4276
|
description: "A type definition for the base TypeScript build executor schema",
|
|
3840
|
-
required: [
|
|
3841
|
-
"entry",
|
|
3842
|
-
"tsconfig"
|
|
3843
|
-
]
|
|
4277
|
+
required: ["entry", "tsconfig"]
|
|
3844
4278
|
},
|
|
3845
4279
|
entry: {
|
|
3846
4280
|
$schema: {
|
|
@@ -3848,13 +4282,9 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3848
4282
|
format: "path",
|
|
3849
4283
|
type: "array",
|
|
3850
4284
|
description: "The entry file or files to build",
|
|
3851
|
-
items: {
|
|
3852
|
-
type: "string"
|
|
3853
|
-
}
|
|
4285
|
+
items: { type: "string" }
|
|
3854
4286
|
},
|
|
3855
|
-
$default: [
|
|
3856
|
-
"{sourceRoot}/index.ts"
|
|
3857
|
-
]
|
|
4287
|
+
$default: ["{sourceRoot}/index.ts"]
|
|
3858
4288
|
},
|
|
3859
4289
|
tsconfig: {
|
|
3860
4290
|
$schema: {
|
|
@@ -3934,7 +4364,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3934
4364
|
]
|
|
3935
4365
|
},
|
|
3936
4366
|
$default: "esnext",
|
|
3937
|
-
$resolve:
|
|
4367
|
+
$resolve: (val = "esnext") => val.toLowerCase()
|
|
3938
4368
|
},
|
|
3939
4369
|
format: {
|
|
3940
4370
|
$schema: {
|
|
@@ -3943,28 +4373,17 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3943
4373
|
description: "The format to build",
|
|
3944
4374
|
items: {
|
|
3945
4375
|
type: "string",
|
|
3946
|
-
enum: [
|
|
3947
|
-
"cjs",
|
|
3948
|
-
"esm",
|
|
3949
|
-
"iife"
|
|
3950
|
-
]
|
|
4376
|
+
enum: ["cjs", "esm", "iife"]
|
|
3951
4377
|
}
|
|
3952
4378
|
},
|
|
3953
|
-
$resolve:
|
|
3954
|
-
"cjs",
|
|
3955
|
-
"esm"
|
|
3956
|
-
]) => [].concat(val), "$resolve")
|
|
4379
|
+
$resolve: (val = ["cjs", "esm"]) => [].concat(val)
|
|
3957
4380
|
},
|
|
3958
4381
|
platform: {
|
|
3959
4382
|
$schema: {
|
|
3960
4383
|
title: "Platform",
|
|
3961
4384
|
type: "string",
|
|
3962
4385
|
description: "The platform to build",
|
|
3963
|
-
enum: [
|
|
3964
|
-
"neutral",
|
|
3965
|
-
"node",
|
|
3966
|
-
"browser"
|
|
3967
|
-
]
|
|
4386
|
+
enum: ["neutral", "node", "browser"]
|
|
3968
4387
|
},
|
|
3969
4388
|
$default: "neutral"
|
|
3970
4389
|
},
|
|
@@ -3974,7 +4393,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3974
4393
|
type: "array",
|
|
3975
4394
|
description: "The external dependencies"
|
|
3976
4395
|
},
|
|
3977
|
-
$resolve:
|
|
4396
|
+
$resolve: (val = []) => [].concat(val)
|
|
3978
4397
|
},
|
|
3979
4398
|
define: {
|
|
3980
4399
|
$schema: {
|
|
@@ -3983,7 +4402,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3983
4402
|
tsType: "Record<string, string>",
|
|
3984
4403
|
description: "The define values"
|
|
3985
4404
|
},
|
|
3986
|
-
$resolve:
|
|
4405
|
+
$resolve: (val = {}) => val,
|
|
3987
4406
|
$default: {}
|
|
3988
4407
|
},
|
|
3989
4408
|
env: {
|
|
@@ -3993,7 +4412,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
3993
4412
|
tsType: "Record<string, string>",
|
|
3994
4413
|
description: "The environment variable values"
|
|
3995
4414
|
},
|
|
3996
|
-
$resolve:
|
|
4415
|
+
$resolve: (val = {}) => val,
|
|
3997
4416
|
$default: {}
|
|
3998
4417
|
}
|
|
3999
4418
|
});
|
|
@@ -4006,10 +4425,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4006
4425
|
id: "TypeScriptLibraryGeneratorSchema",
|
|
4007
4426
|
title: "TypeScript Library Generator",
|
|
4008
4427
|
description: "A type definition for the base TypeScript Library Generator schema",
|
|
4009
|
-
required: [
|
|
4010
|
-
"directory",
|
|
4011
|
-
"name"
|
|
4012
|
-
]
|
|
4428
|
+
required: ["directory", "name"]
|
|
4013
4429
|
},
|
|
4014
4430
|
name: {
|
|
4015
4431
|
$schema: {
|
|
@@ -4038,12 +4454,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4038
4454
|
title: "Platform",
|
|
4039
4455
|
type: "string",
|
|
4040
4456
|
description: "The platform to target with the library",
|
|
4041
|
-
enum: [
|
|
4042
|
-
"neutral",
|
|
4043
|
-
"node",
|
|
4044
|
-
"worker",
|
|
4045
|
-
"browser"
|
|
4046
|
-
]
|
|
4457
|
+
enum: ["neutral", "node", "worker", "browser"]
|
|
4047
4458
|
},
|
|
4048
4459
|
$default: "neutral"
|
|
4049
4460
|
},
|
|
@@ -4065,11 +4476,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4065
4476
|
$schema: {
|
|
4066
4477
|
title: "Unit Test Runner",
|
|
4067
4478
|
type: "string",
|
|
4068
|
-
enum: [
|
|
4069
|
-
"jest",
|
|
4070
|
-
"vitest",
|
|
4071
|
-
"none"
|
|
4072
|
-
],
|
|
4479
|
+
enum: ["jest", "vitest", "none"],
|
|
4073
4480
|
description: "The unit test runner to use"
|
|
4074
4481
|
}
|
|
4075
4482
|
},
|
|
@@ -4077,10 +4484,7 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
4077
4484
|
$schema: {
|
|
4078
4485
|
title: "Test Environment",
|
|
4079
4486
|
type: "string",
|
|
4080
|
-
enum: [
|
|
4081
|
-
"jsdom",
|
|
4082
|
-
"node"
|
|
4083
|
-
],
|
|
4487
|
+
enum: ["jsdom", "node"],
|
|
4084
4488
|
description: "The test environment to use"
|
|
4085
4489
|
}
|
|
4086
4490
|
},
|
|
@@ -4128,8 +4532,21 @@ var _retrieveworkspacefiles = require('nx/src/project-graph/utils/retrieve-works
|
|
|
4128
4532
|
|
|
4129
4533
|
|
|
4130
4534
|
|
|
4535
|
+
|
|
4536
|
+
|
|
4537
|
+
|
|
4538
|
+
|
|
4539
|
+
|
|
4540
|
+
|
|
4541
|
+
|
|
4131
4542
|
var _npmparser = require('nx/src/plugins/js/lock-file/npm-parser');
|
|
4543
|
+
|
|
4544
|
+
|
|
4545
|
+
|
|
4132
4546
|
var _pnpmparser = require('nx/src/plugins/js/lock-file/pnpm-parser');
|
|
4547
|
+
|
|
4548
|
+
|
|
4549
|
+
|
|
4133
4550
|
var _yarnparser = require('nx/src/plugins/js/lock-file/yarn-parser');
|
|
4134
4551
|
var YARN_LOCK_FILE = "yarn.lock";
|
|
4135
4552
|
var NPM_LOCK_FILE = "package-lock.json";
|
|
@@ -4142,6 +4559,9 @@ var PNPM_LOCK_PATH = _path.join.call(void 0, _devkit.workspaceRoot, PNPM_LOCK_FI
|
|
|
4142
4559
|
|
|
4143
4560
|
|
|
4144
4561
|
|
|
4562
|
+
|
|
4563
|
+
|
|
4564
|
+
|
|
4145
4565
|
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
4146
4566
|
|
|
4147
4567
|
|